[jboss-user] [Security & JAAS/JBoss] - can't do loging to Authorized pages using JAAS
haplo_3
do-not-reply at jboss.com
Tue Oct 17 04:40:16 EDT 2006
hi all
i have problem using jaas the login/password popup window apear but when im trying to enter the username and password nothing happen
web.xml
-----------
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Content</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>AuthorizedUser</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>AuthorizedUser</realm-name>
</login-config>
<security-role>
The role required to access restricted content
<role-name>AuthorizedUser</role-name>
mysql-ds.xml
----------------------
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/authority</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
root
</local-tx-datasource>
login-config.xml
----------------------
<application-policy name="myOwnDomain">
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule\"
flag="required">
<module-option name="dsJndiName">java:MySqlDS</module-option>
<module-option name="principalsQuery">
select Password from users where userID=?</module-option>
<module-option name="rolesQuery">
select Role,'Roles' from Roles where userID=?</module-option>
</login-module>
</application-policy>
is there a way i can debug what the query return?
how can i make sure jboss succefully conncted to mysql?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978717#3978717
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978717
More information about the jboss-user
mailing list