2 Replies Latest reply on Oct 8, 2011 8:49 AM by iabughosh

    JBoss 6 with DatabaseServerLoginModule DIGEST auth

    iabughosh Master

      Dears,

      I'm using JBoss 6 as my AS, I've successfully done my DatabaseServerLoginModule configuration and it is just working fine with BASIC authentication,

      but I'm trying to use DIGEST authentication since it is better than just plain text transfer (BASIC), but it is not working ?? here is my login-config.xml :

       

      <policy>

      <application-policy name="testDB">

           <authentication>

           <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"

                                flag="required">

                <module-option name="dsJndiName">java:/MyDatabaseDS</module-option>

                <module-option name="principalsQuery">myPrinQuery</module-option>

                <module-option name="rolesQuery">myRoleQuery</module-option>    

                <module-option name="hashAlgorithm">SHA</module-option>

                <module-option name="hashEncoding">base64</module-option>

                <module-option name="hashStorePassword">true</module-option>

           </login-module>

      </authentication>

      </application-policy>

      </policy>

       

      and i'm using this code to hash my passwords :

      String hashedPassword = Util.createPasswordHash("SHA",

      Util.BASE64_ENCODING,

      null,

      null,

      "password");

       

      thanks in advance.