4 Replies Latest reply on Sep 4, 2012 10:56 AM by koefe euswidies

    Form based authentication in JBoss 7.0 successful but throws 408 error page

    Anton Huba Newbie

      I am trying to migrate my java application from JBoss 5.1 to JBoss 7.0. I am able to deploy the application, but if I want to login (form based authentication), I get a 408 (time out) error page. Check out this extract from server.log:

      10:06:52,997 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http-- End isValid, true
      10:06:52,997 TRACE [org.jboss.as.web.security.JBossWebRealm] (http-- User: tlubrpa1 is authenticated
      10:06:52,997 DEBUG [org.apache.catalina.authenticator.FormAuthenticator] (http-- Authentication of 'tlubrpa1' was successful
      10:06:52,998 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SSIS2_1]] (http-- User took so long to log on the session expired
      10:06:52,998 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--  Failed authenticate() test ??/SSIS2_1/View/Mainpage/j_security_check
      10:06:53,511 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Start expire sessions StandardManager at 1311062813511 sessioncount 0
      10:06:53,512 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) End expire sessions StandardManager processingTime 1 expired sessions: 0
      10:06:54,181 TRACE [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Scanning directory C:\java\jboss-as-web-7.0.0.Final\standalone\deployments for deployment content changes

      This is my the corresponding extract from standalone.xml:

      <subsystem xmlns="urn:jboss:domain:security:1.0">
      <security-domain name="SSIS2-domain">
      <login-module code="Database" flag="required">
      <module-option name="dsJndiName" value="java:/SSIS2DSDev"/>
      <module-option name="principalsQuery" value="SELECT password FROM users WHERE username=? AND active=1"/>
      <module-option name="rolesQuery" value="SELECT USERROLE.rolename, 'Roles' FROM USERS INNER JOIN (USERROLE INNER JOIN MAPUSERUSERROLE ON USERROLE.roleid = MAPUSERUSERROLE.roleid) ON USERS.userid = MAPUSERUSERROLE.userid where USERS.username=?"/>
      <module-option name="hashAlgorithm" value="MD5"/>
      <module-option name="hashEncoding" value="base64"/>

      The security stuff is actually the same like in the login-config.xml from JBoss 5.1, and as you can see above it authenticates the user.

      Does anyone have an idea?