5 Replies Latest reply on Jan 23, 2012 7:04 AM by zemunk

    Where to specify security-domain in .ear?

    zemunk Newbie

      Hi,

       

      I'm migrating an application from Jboss 5 to Jboss 7. In jboss 5 the security-domain was specified in the .ear's jboss.xml.

      For now I only tried to migrate the backend but the security-domain doesn't seem to be read from jboss.xml anymore.

       

      Here is the standalone.xml domain specification:

       

                     <security-domain name="gfo" cache-type="default">
                          <authentication>
                              <login-module code="Database" flag="required">
                                  <module-option name="unauthenticatedIdentity" value="guest"/>
                                  <module-option name="dsJndiName" value="java:/GFO_DS"/>
                                  <module-option name="principalsQuery" value="SELECT passwd FROM users WHERE users.user=?"/>
                                  <module-option name="rolesQuery" value="SELECT role, 'Roles' FROM roles WHERE roles.user=?"/>
                              </login-module>
                          </authentication>
                      </security-domain>
                      <security-domain name="other" cache-type="default">
                          <authentication>
                              <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"/>
                          </authentication>
                      </security-domain>
      

       

      If I try testing the webservices the security-domain "other" is taken instead of gfo as specified in jboss.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd" >
      <jboss>
          <security-domain>gfo</security-domain>
      </jboss>
      

       

      When I tried out the database authentification in "other", I could test the services.

       

      Could anyone please tell me where to specify the security-domain in an ear for jboss 7?

       

      The help is very much appreciated!