0 Replies Latest reply on Oct 13, 2004 1:38 AM by Ian Lipliavyi

    Strange Situation after login

    Ian Lipliavyi Newbie

      You don't implement a servlet that retrieves the login creditials. The servlet container intercepts the j_security_check post and initiates the login with the login module you configure automatically.

      Check your query 'Roles' should be "Roles" don't ask why I don't know.

      Add this to the log4j.xml file in your default servers conf directory,



      This should add some logging to your server.log file located in the logs directory. That may help you diagnose what is really going wrong.

      A successful login will result in a log that looks like this:

      2004-10-11 12:09:14,642 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] initialize
      2004-10-11 12:09:14,642 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Saw unauthenticatedIdentity=Unknown
      2004-10-11 12:09:14,642 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] DatabaseServerLoginModule, dsJndiName=java:/TaTrac2DS
      2004-10-11 12:09:14,642 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] principalsQuery=SELECT PASSWORD FROM CONTACT WHERE USERNAME=?
      2004-10-11 12:09:14,642 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] rolesQuery=SELECT R.ROLE as role, "Roles" FROM ROLES AS R, CONTACT AS C, ROLEMAP AS M WHERE C.USERNAME = ? AND C.GROUPID = M.GROUPID AND M.ROLEID = R.ROLEID
      2004-10-11 12:09:14,642 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] login
      2004-10-11 12:09:15,095 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] User 'glloyd' authenticated, loginOk=true
      2004-10-11 12:09:15,111 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] commit, loginOk=true
      2004-10-11 12:09:15,157 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Assign user to role Admin
      2004-10-11 12:09:15,157 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Assign user to role TALiaison
      2004-10-11 12:09:15,157 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Assign user to role CCB
      2004-10-11 12:09:15,157 TRACE [org.jboss.security.plugins.JaasSecurityManager.tatrackerRealm] updateCache, subject=Subject:
      Principal: glloyd
      Principal: Roles(members:CCB,Admin,TALiaison)