[jboss-user] [Security & JAAS/JBoss] - Re: Remote Login using custom LoginModule

Wolfgang Knauf do-not-reply at jboss.com
Mon Jul 2 11:23:55 EDT 2007


Hi Guido,

I will try to give you a short summary:

a) you need a file "auth.conf" with e.g. this content:

  | myappclientsecurity {
  |    // jBoss LoginModule
  |    org.jboss.security.ClientLoginModule  required
  |    ;
  | }; 


b) on startup, add this parameter:
-Djava.security.auth.login.config=/path/to/my/auth.conf

c) in your application client, add those lines just after fetching the initial context:


  | AppCallbackHandler callbackHandler = new AppCallbackHandler(login, password.toCharArray() );
  |     LoginContext loginContext = new LoginContext ("myappclientsecurity", callbackHandler);
  |     loginContext.login(); 

Those three changes should be sufficient to have a secured client.

Hope this helps

Wolfgang

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

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



More information about the jboss-user mailing list