3 Replies Latest reply on Sep 10, 2012 1:39 AM by hisanobu.okuda

    GenericHeaderAuthenticator on JBoss AS 7

    benneuman

      I've used GenericHeaderAuthenticator on 4.2.3 and 6.x JBoss servers however, I'm not having much luck on 7.1.0.

       

      The info here: https://community.jboss.org/wiki/GenericHeaderBasedAuthentication is not relevent to 7.x and, correct me if I'm wrong, but the information here: https://community.jboss.org/wiki/JBossAS7SecurityCustomLoginModules does not allow one to use a nonstandard auth-method (HEADER).

       

      So, is it possible to use the GenericHeaderAuthenticator on JBoss AS 7.x and if so, how?

       

      Thanks!

      Ben

        • 1. Re: GenericHeaderAuthenticator on JBoss AS 7
          dlofthouse

          Within AS7 the missing piece is that you need to define the Valve to add in your deployment rather than defining a new auth method.  Once defined during the deployment process this will be detected and no additional authenticator will be added regardless of the specified auth method.

          1 of 1 people found this helpful
          • 2. Re: GenericHeaderAuthenticator on JBoss AS 7
            benneuman

            ok. I'm having a problem with writing the valve configuration.

             

            <jboss-web>

                <security-domain>SECURITY_DOMAIN</security-domain>

                <valve>

                    <class-name>com.ijet.web.security.jboss.GenericHeaderAuthenticator</class-name>

                    <attribute name="httpHeaderForSSOAuth">sm_ssoid,ct-remote-user,HTTP_OBLIX_UID</attribute>

                    <attribute name="sessionCookieForSSOAuth">SMSESSION,CTSESSION,ObSSOCookie</attribute>

                </valve>

            <jboss-web>

             

            This gives the error:

             

            Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018014: Failed to parse XML descriptor "/content/Employee_Search-1.0-SNAPSHOT.war/WEB-INF/jboss-web.xml" at [6,9]

                    at org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:77)

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

                    ... 5 more

            Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[6,9]

            Message: Unexpected element 'attribute' encountered

             

            So the parser doesn't like <attribute>. What does it like? I can find no documentation regarding this.

             

            Any help greatly appreciated!

            Thanks!

            Ben

            • 3. Re: GenericHeaderAuthenticator on JBoss AS 7
              hisanobu.okuda

              Hi Ben,

              Do you have already resolved the issue? If no, please see [0].

               

              [0] https://community.jboss.org/wiki/AS7EAP6CustomAuthenticatorValves-WritingAndConfiguring