[jboss-user] [EJB 3.0] - Re: Invalid User on EJB authentication (JBoss 5 CR2)

javidjamae do-not-reply at jboss.com
Wed Oct 15 16:42:54 EDT 2008

OK, when I try to do it with a real JAAS login, it works. 

My client looks like this:

  | SecurityAssociationHandler handler = new SecurityAssociationHandler();
  | SimplePrincipal user = new SimplePrincipal(principal);
  | handler.setSecurityInfo(user, password.toCharArray());
  | LoginContext loginContext = 
  |     new LoginContext("myClientDomain", (CallbackHandler) handler);
  | loginContext.login();
  | InitialContext ctx = new InitialContext();

I create a auth.conf file that looks like this:

  | myClientDomain {
  |      org.jboss.security.ClientLoginModule required;
  | };

And I specified the following JVM argument on my client:

  | -Djava.security.auth.login.config=/full/path/to/auth.conf

It seems like the SecurityAssociation way and the ClientLoginModule way do not work. Is this a bug, or do you have to do it using JAAS in JBoss 5?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182508#4182508

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182508

More information about the jboss-user mailing list