This content has been marked as final.
Show 2 replies
-
1. Re: Remote Login using custom LoginModule
wolfgangknauf Jul 2, 2007 11:23 AM (in response to gscalise)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 -
2. Re: Remote Login using custom LoginModule
gscalise Jul 4, 2007 10:56 AM (in response to gscalise)Thanks Wolfgang, but I have a problem with this... Our custom loginmodule uses an aditional type of Callback, which ClientLoginModule isn't able to handle...
Also, in which way does the authenticated principal from ClientLoginModule propagate to the ejb3 container and its security domain?
Kind Regards,
Guido