Skip to main content

WEB0607: Cannot configure an authenticator for method DIGEST

13 replies [Last post]
cowwoc
Offline
Joined: 2003-08-24

When I try using:

<br />
  DIGEST<br />
  myCustomRealm<br />

under Glassfish v2 ur2 I get:

WEB0607: Cannot configure an authenticator for method DIGEST

According to http://forums.java.net/jive/message.jspa?messageID=247945#247914:

"GlassFish does not support DIGEST authentication. [...]Digest Authentication[1] is being enabled in Sailfin and will soon be in GF."

What's the status as of today? Is this functionality only available in Glassfish v3 Prelude?

Thank you,
Gili

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cowwoc
Offline
Joined: 2003-08-24

Yay! I got digest authentication working under Glassfish v3. Woohoo! :)

Thanks a lot!
Gili

kumarjayanti
Offline
Joined: 2003-12-10
cowwoc
Offline
Joined: 2003-08-24

> Also the following might be of help to you :
> http://blogs.sun.com/venu/entry/implementing_custom_r
> alms_for_digest

Wow! That is precisely what I've been looking for. Thank you!

Gili

part_secret
Offline
Joined: 2010-03-10

Hello people,
I'm very late in the discussion, but, I'm not able to implement the Cutom Realm with DIGEST authentication... I tried, but in my server.log file, not appear my log messages... The custom realm loads, but not performs the authenticate (because the log messages not appear)...

Someone may help me?

Thank for all. Excuse my english...

cowwoc
Offline
Joined: 2003-08-24

When I run the same test under Glassfish v3 Prelude the webapp now initializes properly, but when I try authenticating I get:

SEVERE: passwordlm.nopwdcred
INFO: java_security.audit_auth_refused
WARNING: Web login failed: Login failed: javax.security.auth.login.LoginException: No credentials.

I'm so close I can feel it.... :) Any ideas?

kumarjayanti
Offline
Joined: 2003-12-10

Can you please post the server.log.

cowwoc
Offline
Joined: 2003-08-24

This was caused by the fact that I took a Glassfish v2 custom realm and dumped it into a Glassfish v3 environment. Apparently the API has changed (breaking backwards compatibility) which is fine in my case because it turns out I have to implement totally different interfaces for DIGEST.

I just wish that a lot of this stuff was easier to find out. I hate having to dig through the Glassfish v3 source-code (which is hard to find) just to find these things out. I'll let you know if I run into any further questions with the new v3 interfaces...

Thanks!
Gili

kumarjayanti
Offline
Joined: 2003-12-10

There should have been no break in backward compatibility can you tell me where is the break.

You have to extend com.sun.appserv.security.AppservRealm and com.sun.appserv.security.AppservPasswordLogingModule in V2 :

https://glassfish.dev.java.net/nonav/javaee5/api/com/sun/appserv/securit...

And the same is true for V3-Prelude as well, unless you were using V3-TP2 (where temporarily the BC was broken).

Thanks.

kumarjayanti
Offline
Joined: 2003-12-10

Just to add, i did test dropping a binary custom realm jar built for V2 into V3-Prelude and it did work for me.

cowwoc
Offline
Joined: 2003-08-24

My binary custom realm was compiled against appserv-rt.jar from Glassfish v2. It was then being used against a DIGEST auth-type as I mentioned. The combination of the two gave rise to the confusing error message mentioned above.

1) I did not mean to imply that backwards compatibility was broken for http-BASIC realms
2) Building custom realms for Glassfish is *way* too hard.

Honestly, you guys have to confront this front-and-center. There are tons of posts on this forum showing people running into the same problems over and over again.

Part of the problem is that there is no clear documentation saying: "here is how you do this for Glassfish v2, and here is how you do this for Glassfish v3". There are many different versions of the documentation floating around and users have no way of knowing which one is the correct one. Worse yet, the Glassfish v3 documentation does not say anything about how to build DIGEST custom realms so I assumed (incorrectly) that it was the same as building BASIC custom realms. The documentation should explicitly discuss this.

Furthermore, there should be more verbose and clearer debugging output for troubleshooting these problems. For example, if web.xml refers to a non-existant Realm then Glassfish should output an error message front-and-center saying "Could not find Realm . This realm must show up in /domains//config/domain.xml under "

Messages like that would go *a long way* in helping users. You have to describe what operation failed and what could be done to fix it. You have to tell users *exactly* the key you're looking at. Just my 2 cents.

PS: I filed https://glassfish.dev.java.net/issues/show_bug.cgi?id=6912

Gili

paulbrickell
Offline
Joined: 2003-09-17

I have come to this party a little late and I am trying to do the same thing as cowwoc.

I followed the tutorial and have therefore built myself a LoginModule and Realm implementation, but what is not clear to me is what I do with the jar I have just created.

Can I drop this into the Glassfish V3 prelude deployment somewhere? I have tried any number of 'likely' destinations. None works.

Thanks

Message was edited by: paulbrickell

kumarjayanti
Offline
Joined: 2003-12-10

Try this:

http://blogs.sun.com/nithya/entry/groups_in_custom_realms

http://blogs.sun.com/nithya/entry/modularized_osgi_custom_realms_in

You have to use latest V3 promoted builds.

But for V2 you can follows similar documentation :

http://docs.sun.com/source/817-6087/dgsecure.html#wp22266

search for "Realm Configuration" on the page

paulbrickell
Offline
Joined: 2003-09-17

Sorry, I did say v3 prelude in my post.