users@glassfish.java.net

issues specifying login module after upgrade to V2 UR1

From: <glassfish_at_javadesktop.org>
Date: Fri, 22 Feb 2008 15:26:52 PST

I recently upgraded from V2 b58 to V2 UR1. We have a custom realm which was working properly under b58, but when we tried to set it up after the upgrade we ran into trouble.

we specified the login module to use with a property of the realm and added the following lines of code to ensure that this was properly set:

String jaasCtx = props.getProperty(AppservRealm.JAAS_CONTEXT_PARAM);
this.setProperty(AppservRealm.JAAS_CONTEXT_PARAM, jaasCtx);

After using the admin consol to set up the realm, putting the realm and login module classes in glassfish/lib/, and adding the login module to /domain1/config/login.conf like so:
  customRealm{
         com.custom.security.acl.LoginModule required;
  };

we got a null pointer exception from the first line of code above.

Hope springs eternal, so commented out these two lines, but that resulted in "javax.security.auth.login.LoginException: Invalid null input: name" when trying to authenticate off this realm. A bit of research indicates that it is the login module name which is not being found.

So, what changed? What is the appropriate way to specify which module to use for a custom realm?

Thanks,
Loren
[Message sent by forum member 'loren_' (loren_)]

http://forums.java.net/jive/thread.jspa?messageID=260533