0 Replies Latest reply on Nov 18, 2002 6:10 PM by Dave E

    DatabaseServerLoginModule problem

    Dave E Newbie


      I've got a strange problem in that when I create users in my application, they fail login until the server is restarted or until a certain amount of time elapses. The msg I get is:

      14:09:22,579 WARN [JBossUserRealm#jdbcRealm] authentication failure: larry

      Now I System.out the hash result of the password I typed in, and I find Principals.principal_id= larry and sure enough the hash for the password matches. Is this a problem that someone has heard of before? Any help would be greatly appreciated.

      <!-- login-config -->
      <application-policy name = "jdbcRealm">

      <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 Principals where Principal_Id=?</module-option>
      <module-option name = "rolesQuery">select Role, Role_Group from Roles where Principal_Id=?</module-option>
      <module-option name= "hashAlgorithm">MD5</module-option>
      <module-option name= "hashEncoding">hex</module-option>


      <!-- mysql-service -->


      <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/moxrocks</config-property>
      <config-property name="DriverClass" type="java.lang.String">com.mysql.jdbc.Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String"></config-property>
      <config-property name="Password" type="java.lang.String"></config-property>

      <!-- Standard Jaws -->