7 Replies Latest reply on May 31, 2005 7:43 PM by rpa_rio

    Problems configuring JAAS

      I created a app.sar file with login-config.xml and jboss-service.xml, but now i'm getting host not found on port 8443 when i try to access my webapp that uses JAAS, somebody can help me?

        • 1. Re: Problems configuring JAAS

          This is my login-config.xml:

          <application-policy name="NexusAcesso">
          <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
          <module-option name="dsJndiName">java:/NexusDS</module-option>
          <module-option name="principalsQuery">SELECT senha FROM usuarios WHERE usuario = ?</module-option>
          <module-option name="rolesQuery">SELECT papel, 'Roles' FROM papeisusuarios WHERE usuario = ?</module-option>
          <module-option name="unauthenticatedIdentity">convidado</module-option>
          </login-module>
          </application-policy>

          • 2. Re: Problems configuring JAAS

            And this is my jboss-service.xml:



            META-INF/login-config.xml
            <depends optional-attribute-name="LoginConfigService">
            jboss.security:service=XMLLoginConfig

            <depends optional-attribute-name="SecurityManagerService">
            jboss.security:service=JaasSecurityManager





            both (login-config.xml and jboss-service.xml) are packaged in eAIDF.sar, and when i deploy this file, i got a error:

            MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
            ObjectName: jboss:service=DynamicLoginConfig
            state: FAILED
            I Depend On: jboss.security:service=XMLLoginConfig
            jboss.security:service=JaasSecurityManager

            Depends On Me: org.jboss.security.auth.login.ParseException: Encountered "<application-policy" at line 1, column 1.
            Was expecting one of:

            ...

            ObjectName: jboss.web.deployment:war=eAIDF.war,id=-1644713059
            state: DESTROYED
            I Depend On:
            Depends On Me:

            what can i do? I tried to find the answer in all the Internet, but no sucess...

            Thanks a lot for any answer!

            • 3. Re: Problems configuring JAAS

               

              "rpa_rio" wrote:
              I created a app.sar file with login-config.xml and jboss-service.xml, but now i'm getting host not found on port 8443 when i try to access my webapp that uses JAAS, somebody can help me?


              I got it working, i was using <transport-guarantee>CONFIDENTIAL</transport-guarantee> and i changed to
              <transport-guarantee>NONE</transport-guarantee>

              • 4. Re: Problems configuring JAAS

                 

                "rpa_rio" wrote:
                And this is my jboss-service.xml:

                <server>
                <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
                name="jboss:service=DynamicLoginConfig">
                <attribute name="AuthConfig">META-INF/login-config.xml</attribute>
                <depends optional-attribute-name="LoginConfigService">
                jboss.security:service=XMLLoginConfig
                </depends>
                <depends optional-attribute-name="SecurityManagerService">
                jboss.security:service=JaasSecurityManager
                </depends>
                </mbean>
                </server>


                both (login-config.xml and jboss-service.xml) are packaged in eAIDF.sar, and when i deploy this file, i got a error:

                MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
                ObjectName: jboss:service=DynamicLoginConfig
                state: FAILED
                I Depend On: jboss.security:service=XMLLoginConfig
                jboss.security:service=JaasSecurityManager

                Depends On Me: org.jboss.security.auth.login.ParseException: Encountered "<application-policy" at line 1, column 1.
                Was expecting one of:
                <EOF>
                <IDENTIFIER> ...

                ObjectName: jboss.web.deployment:war=eAIDF.war,id=-1644713059
                state: DESTROYED
                I Depend On:
                Depends On Me:

                what can i do? I tried to find the answer in all the Internet, but no sucess...

                Thanks a lot for any answer!


                I solved this too by adding the tag before and after <application-policy> : )


                • 5. Re: Problems configuring JAAS

                  The tag...

                  • 6. Re: Problems configuring JAAS

                    tag! before and after <application-policy> tag!

                    • 7. Re: Problems configuring JAAS

                      policy tag! finally!