This content has been marked as final.
Show 3 replies
-
1. Re: Configure Custom JAAS Login module in JBoss
jaikiran Aug 17, 2006 6:39 AM (in response to chintan_jboss) -
2. Re: Configure Custom JAAS Login module in JBoss
chintan_jboss Aug 17, 2006 7:30 AM (in response to chintan_jboss)Hi Jaikiran,
Example which you suggested implemets DatabaseServerLoginModule. Let me tell my case in details
following is my jaas.login.config file
myloginmodule{
com.login.test.PasswordLoginModule required
authenticator = "com.login.test.authenticators.PasswordAuthImpl
digestAlgo = "SHA1"
datasource = ""
};
now PasswordAuthImpl contains method authenticate(Map, username,pwd) to authenticate user.
Now my question is where do i put my jaas.login.config file in jboss so that it works as it is. and for db what changes i need to make?
Thanks
Chintan -
3. Re: Configure Custom JAAS Login module in JBoss
jaikiran Aug 17, 2006 8:04 AM (in response to chintan_jboss)Add the following to the login-config.xml file present in %JBOSS_HOME%/server/default/conf directory:
<application-policy name="com.login.test.PasswordLoginModule"> <authentication> <login-module code="com.login.test.authenticators.PasswordAuthImpl" flag="required"> <module-option name="digestAlgo">SHA1</module-option> </login-module> </authentication> </application-policy>
As far creating the login module *configuration* in your own file(jaas.login.config) is concerned, i havent tried it myself, but here's an extract that i found from http://members.capmac.org/~orb/blog.cgi/tech/java/jaas_jboss.htmlThe documentation suggest that you can place an applications specific login-config.xml in your ear file, but I wasn't able to make it work. However, even though you provide the LoginModule definition in the global login-config.xml, you can still provide the implementation classes in your ear/war file. (you don't have to deploy the LoginModule separately)