1 Reply Latest reply on Feb 7, 2014 8:46 AM by azharblitz

    BASIC web authentication in domain configuration. Jboss 7

    azharblitz

      I have done the following steps to configure BASIC web authentication in domain mode

      1. Defined security domain.

      2. Added details to web.xml

      3. Added details in jboss-web.xml

      4. Placed the user and roles properties file in configuration folder.

       

      With the above steps , it works fine with standalone configuration, but the same doesn't work on domain configuration.

      Is there anything additional need to be done configure BASIC web authentication on domain configuration in Jboss EAP6.1

       

      Please provide any example if possible.

       

      Ref:

      web.xml

      <auth-constraint>
            <role-name>myrole</role-name>
         </auth-constraint>

          </security-constraint>

          <login-config>

         <auth-method>BASIC</auth-method>
         <realm-name>Login</realm-name>

          </login-config>

          <security-role>

         <role-name>myrole</role-name>

      jboss-web.xml

           <security-domain>myrole</security-domain>

       

      domain.xml

      <security-domain name="myrole" cache-type="default">

                              <authentication>

                                  <login-module code="UserRoles" flag="required">

                                      <module-option name="rolesProperties" value="${jboss.server.config.dir}/myrole-roles.properties"/>

                                      <module-option name="usersProperties" value="${jboss.server.config.dir}/myrole-users.properties"/>

                                  </login-module>

                              </authentication>

                          </security-domain>

        • 1. Re: BASIC web authentication in domain configuration. Jboss 7
          azharblitz

          Issue resolved:

          caused due to the value jboss.server.config.dir returns -- standalone will return the correct, but on domain it returns the path of managed servers.

           

          Resolution:

          module-option name="rolesProperties" value="${jboss.domain.config.dir}/myrole-roles.properties"/>

                                          <module-option name="usersProperties" value="${jboss.domain.config.dir}/myrole-users.properties"/>

           

          P.s: If Jboss doesn't find the prop files it will give an error as below

          PBOX000261: Failed to load users/passwords/roles files: java.io.IOException: PBOX000072: Properties file sampleJboss/domain/servers/domainName/configuration/users.properties /defaultUsers.properties not found

           

          The above can now be treated as proper workable BASIC authentication example Jboss EAP. :-)

          My first question & resolution..........