1 Reply Latest reply on Sep 29, 2002 12:32 AM by TJ

    DatabaseServerLoginModule problem

    Victor Batista Newbie

      Hello!
      I am having problems validating users with DatabaseServerLoginModule. I am trying to validate users with
      MySQL and Firebird, but with no success in both of them. I am using Jboss 3.0.0 with bundled Tomcat 4.0.3.
      When I use UsersRolesLoginModule, I can do the Login correctly.

      I have one ConfiguredIdentityLoginModule for each database. My CMP tables are correctly created.

      When I try lo Login using "DatabaseServerLoginModule" I always get redirected to the error page,
      without any log message on the server. My login-config.xml has the following Policies:

      <application-policy name="MyFirebirdDBRealm">

      <login-module code="org.jboss.resource.security.auth.spi.DatabaseServerLoginModule" flag="required">
      <module-option name="dsJndiName">java:/FirebirdDS</module-option>
      <module-option name="principalsQuery">SELECT passorwd FROM USERS WHERE USERNAME=?</module-option>
      <module-option name="rolesQuery">SELECT roles, 'Roles' FROM USERROLES WHERE USERNAME=?</module-option>
      </login-module>

      </application-policy>


      <application-policy name="MyMysql">

      <login-module code="org.jboss.resource.security.auth.spi.DatabaseServerLoginModule" flag="required">
      <module-option name="dsJndiName">java:/MySqlDS</module-option>
      <module-option name="principalsQuery">SELECT password FROM users WHERE username='?'</module-option>
      <module-option name="rolesQuery">SELECT roles, 'Roles' FROM userroles WHERE username='?'</module-option>
      </login-module>

      </application-policy>

      Can any one help me, please?

      Are "DatabaseServerLoginModule" and "ConfiguredIdentityLoginModule" indepenents?
      Can I use "ConfiguredIdentityLoginModule" to log into one database (ex:mysql) and "DatabaseServerLoginModule" (Ex:Firebird) to validate my users?

      Thanks in advance,
      Victor Batista