[jboss-user] [Security & JAAS/JBoss] - Compare a VarBinary Password

aeguzmanv do-not-reply at jboss.com
Fri Feb 16 15:19:40 EST 2007


Hi, I'm trying to Authenticate a user using DatabaseLoginModule, but the password is stored in a binary datatype field of SQL. 
When I do the authentication JBoss always throw me the following errors: Bad password for username=user

I've been used the same security configuration but the password stored is a varchar datatype fields and its works perfect.

Does any one knows if their is a special feature to configure to compare binary password instead of text in JBoss ??

login-config.xml
  <application-policy name = "Servipago-domain">
    
      <login-module code = "com.servi.seguridad.jboss.ServiDatabaseServerLoginModule" flag="required">
       <module-option name = "dsJndiName">java:/ServiDS</module-option>
       <module-option name = "principalsQuery">
          SELECT Co_Clave AS Password FROM Usuario_Sistema_Internet WHERE Di_Correo=?
       </module-option>
       <module-option name = "rolesQuery">
          SELECT r.de_rol AS Role, 'Roles' FROM rol r, usuario_sistema_internet usi WHERE usi.di_correo= ? AND usi.co_rol = r.co_rol 
       </module-option>
       <module-option name = "hashAlgorithm">MD5</module-option>
       <module-option name = "password-stacking">useFirstPass</module-option>
      </login-module>
    
  </application-policy>

Thanks in advance..
Alejandro

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017863#4017863

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017863



More information about the jboss-user mailing list