I am very new to jboss / security. Currently doing a study project which
requires database realm.
1)I downloaded jboss 3.2.5 and configures mysql for it. To configure mysql i
changed
- mysql-ds.xml (put inside deploy and added database name and url)
- standardjaws.xml (added jndi - java:/MySqlDS)
- login-config.xml -> added as below ->
<application-policy name = "MySqlDbRealm">
<login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name ="principal">sa</module-option>
<module-option name ="userName">sa</module-option>
<module-option name ="password"></module-option>
<module-option name ="managedConnectionFactoryName">
jboss.jca:service=LocalTxCM,name=MySqlDS
</module-option>
</login-module>
</application-policy>
and tested with one testconnection servlet which is fine.
2)Now I want to set form based authentication with DatabaseServerLoginModule
- added corresponding entries inside web.xml
- created 2 tables:
CREATE TABLE Users(username VARCHAR(64) PRIMARY KEY, passwd VARCHAR(64))
CREATE TABLE UserRoles(username VARCHAR(64), userRoles VARCHAR(32))
- added into login-config.xml
<application-policy name="testDB">
<login-module
code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag="required">
<module-option name="dsJndiName">MySqlDS</module-option>
<module-option name="principalsQuery">
select passwd from Users where username=?</module-option>
<module-option name="rolesQuery">
select userRoles from UserRoles where username=?</module-option>
</login-module>
</application-policy>
if i access any page which is restricted it gives me login page but it always
goes inside, user id and password has no effect at all.
What is missing ? Pls help me.
regards
Manisha
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3933184#3933184
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3933184
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user