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

    DatabaseServerLoginModule problem

    milder60

      Hi,

      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.

      dave
      <!-- 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>
      </login-module>

      </application-policy>

      <!-- mysql-service -->



      MySqlDS



      <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 -->

      java:/MySqlDS
      <type-mapping>mySQL</type-mapping>
      true

      <default-entity>
      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <tuned-updates>true</tuned-updates>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <row-locking>false</row-locking>
      <read-ahead>false</read-ahead>
      </default-entity>