I have been having this exact problem, and this has been the post to solve it for me.
I do have one further problem though.
I currently have code that uses the ClientLoginModule and also the
DatabaseServerLoginModule. having taken the advice to put:
<login-module code = "org.jboss.security.ClientLoginModule" flag = "required">
</login-module> in my aplication-policy, it does indeed make the db authentication
works properly.
However when I use the the other policy that uses the ClientLoginModule exclusively:
<application-policy name = "client-login">
<login-module code = "org.jboss.security.ClientLoginModule"
flag = "required">
</login-module>
</application-policy>
I recieve "Authentication exception, principal=null" for opperation that login with
this and then perform some EJB operation.
If I remove the application policy that uses the DatabaseServerLoginModule then the
code using "client-login works, and putting back in breaks it again.
This is the policy that I have hashed together to enable the database login:
<application-policy name="bank">
<login-module
code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
<module-option
name="dsJndiName">java:/DefaultDS</module-option>
<module-option name="principalsQuery">select PASSWORD
from USEREJB where USERNAME=?</module-option>
<module-option name="rolesQuery">select
ROLESEJB,'Roles' from USEREJB_ROLES_ROLESEJB_USER where USEREJB=?</module-option>
</login-module>
<login-module code = "org.jboss.security.ClientLoginModule"
flag = "required"> </login-module>
</application-policy>
The reason that I use both methods is because I have code the populates a HyperSonic
database with initial Role and User account, I do this with the client-login policy.
From then onwards I use the DatabaseServerLoginModule policy.
I am pretty new to all of this so be gentle, I am sure that there is something
blindingly obvious for why it is not working, I just can't see it. Therfore I look to
anyone that can give me the answer :)
If I need to post any more information then just say.
Many thanks,
Leon
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3830071#3830071
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3830071
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user