5 Replies Latest reply on Jan 5, 2006 11:48 AM by starksm64

    JAAS DatabaseLoginModule

    sudha847

      Hi Gurus..
      I am implementing security to my application.As per the JBOSS spec i did the following changes.
      1.Modified DatabaseLoginModule to login-config.xml file
      <application-policy name = "abc">

      <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
      <!--<module-option name = "unauthenticatedIdentity">guest</module-option>-->
      <module-option name = "dsJndiName">mssqlDS</module-option>
      <module-option name = "principalsQuery">SELECT password FROM tcn_JAAS_USERS where userId=?</module-option>
      <module-option name = "rolesQuery">SELECT RoleId,'Roles' FROM tcn_JAAS_ROLES WHERE userId=?</module-option>
      </login-module>
      <login-module code = "org.jboss.security.ClientLoginModule" flag = "required"/>

      </application-policy>


      2.I did the changes for jboss-web.xml and web.xml in my application

      I have restarted the Jboss server after that its asking me to enter uid and pwd ,after entering 3 times its displaying 401 error.
      I want to cross check whether server is able to connect my database ,if i change the queries in the above login-config.xml it is giving same result.How can i test the server that it is able to connect my database and retriving the userid and pwd from that..
      Anyhelp would be greatly appreciated