Greetings,
We are running on:
JBoss [Zion] 4.0.1sp1 (build: CVSTag=JBoss_4_0_1_SP1 date=200502160314)
We are having a problem getting DB based login working with our application. When prompted for username and password, instead of invoking DatabaseServerLoginModule, UsersRolesLoginModule is invoked and throws an IO exception because the missing user/roles property files are missing.
We do have DB login working for the JBoss JMX and Web consoles so we are reasonably confident the DS and realm are setup correctly.
Anyone with an idea of what's happening?
Relevant file fragments are below. Thanks in advance.
Kurt Kleist
Spanlink Communications, Inc.
<!-- login-config.xml -->
<application-policy name = "MyRealm">
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
<module-option name = "dsJndiName">java:/MyDS</module-option>
<module-option name = "principalsQuery">SELECT Password FROM AccessTable WHERE UserName=?</module-option>
<module-option name = "rolesQuery">SELECT Role, RoleGroup FROM Roles WHERE PrincipalID=?</module-option>
</login-module>
</application-policy>
<!-- jboss-web.xml -->
<security-domain>java:/jaas/MyRealm</security-domain>
<!-- web.xml -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>MyRealm</realm-name>
</login-config>
Since you say you can secure the jmx-console with a similar setup, the only obvious problem would be an incorrect jboss-web.xml that is not generating an error.