1 Reply Latest reply on Sep 30, 2013 8:54 PM by shanewaj

    Form based authentication ends up in 404-error-page

    ahuba

      Hi all,

      I really need help on this. I am trying to migrate my JBoss 5.1 application to JBoss 7.0. I am using form based authentication but as you can see below, it fails. I always get a 404 error page.

       

       

      15:52:23,476 DEBUG [org.apache.tomcat.util.http.Cookies] (http--127.0.0.1-8080-4) Cookies: Parsing b[]: JSESSIONID=-StVGfWuOaNgHI4ZP34AfqZE

       


      15:52:23,481 DEBUG [org.apache.catalina.realm.RealmBase] (http--127.0.0.1-8080-2)   Checking constraint 'SecurityConstraint[Protected Area]' against GET /View/Mainpage/design/empty.gif --> false

      15:52:23,481 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-3) We have cached auth type FORM for principal GenericPrincipal[tlubrpa1(A,CCM,PP,)]

      15:52:23,935 DEBUG [org.apache.catalina.realm.RealmBase] (http--127.0.0.1-8080-2)   No applicable constraint located

      15:52:23,936 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-2)  Not subject to any constraint

      15:52:23,936 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]] (http--127.0.0.1-8080-2) Processing ErrorPage[errorCode=404, location=/error/error404.jsp]

      15:52:23,937 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SSIS2_1].[jsp]] (http--127.0.0.1-8080-2)  Disabling the response for futher output

      15:52:24,044 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-4)  Calling hasUserDataPermission()

      15:52:24,045 DEBUG [org.apache.catalina.realm.RealmBase] (http--127.0.0.1-8080-4)   User data constraint has no restrictions

      15:52:24,047 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-4)  Calling accessControl()

      15:52:24,048 DEBUG [org.apache.catalina.realm.RealmBase] (http--127.0.0.1-8080-4)   Checking roles GenericPrincipal[tlubrpa1(A,CCM,PP,)]

      15:52:24,048 DEBUG [org.apache.catalina.realm.RealmBase] (http--127.0.0.1-8080-4) Passing all access

      15:52:24,050 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-4)  Successfully passed all security constraints

      15:52:24,086 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-3)  Calling hasUserDataPermission()

      15:52:24,088 DEBUG [org.apache.catalina.realm.RealmBase] (http--127.0.0.1-8080-3)   User data constraint has no restrictions

      15:52:24,088 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-3)  Calling accessControl()

      15:52:24,089 DEBUG [org.apache.catalina.realm.RealmBase] (http--127.0.0.1-8080-3)   Checking roles GenericPrincipal[tlubrpa1(A,CCM,PP,)]

      15:52:24,089 DEBUG [org.apache.catalina.realm.RealmBase] (http--127.0.0.1-8080-3) Passing all access

       

      15:52:24,090 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-3)  Successfully passed all security constraints


      I basically copied the security stuff from the login-config.xml from JBoss 5.1. The sql queries are still the same:

       

      <subsystem xmlns="urn:jboss:domain:security:1.0">


                  <security-domains>

                      <security-domain name="SSIS2-domain">

                          <authentication>

                              <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"/>

                              </login-module>

                          </authentication>

                      </security-domain>

                  </security-domains>

       

              </subsystem>

       

      Why do I end up in a error page when all access is passed?

       

      Thanks a lot

        • 1. Re: Form based authentication ends up in 404-error-page
          shanewaj

          Hi,

          I am trying to migrate an Tomcat application to JBOSS it seems like every thing is fine but I get very seemlier Warning.

           

          10:49:02,912 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]] (http-localhost/127.0.0.1:8080-3) Processing ErrorPage[errorCode=404, location=/404.jsp]

          10:49:03,022 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/etcs].[jsp]] (http-localhost/127.0.0.1:8080-3)  Disabling the response for futher output

          10:49:03,508 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/etcs].[jsp]] (http-localhost/127.0.0.1:8080-1)  Disabling the response for futher output

          10:49:03,508 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/etcs].[action]] (http-localhost/127.0.0.1:8080-1)  Disabling the response for futher output

           

          So just wandering have you fixed your problem? or any suggestion for me.

           

          Thanks

          Shanewaj