0 Replies Latest reply on May 29, 2013 9:46 PM by nav

    How do you define a LDAP security domain definition in a deployment descriptor on Jboss 7?

    nav Newbie

      Hi,

       

      I'm using jboss 7.1.1 and the security domain definition is placed in the standalone.xml file.

       

       

      <security-domain name="XXX">
      <authentication>
          <login-module code="LdapExtended" flag="required">
              <module-option name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"/>
              <module-option name="java.naming.provider.url" value="ldap://XXX"/>
              <module-option name="java.naming.security.authentication" value="simple"/>
              <module-option name="bindDN" value="cn=administrator"/>
              <module-option name="bindCredential" value="secret"/>
              <module-option name="baseCtxDN" value="ou=Users,DC=AS400SRV,DC=QUEBEC,DC=CANADA,DC=ACME,DC=COM"/>
              <module-option name="baseFilter" value="(uid={0})"/>
              <module-option name="rolesCtxDN" value="ou=Roles,DC=AS400SRV,DC=QUEBEC,DC=CANADA,DC=ACME,DC=COM"/>
              <module-option name="roleFilter" value="(member={1})"/>
              <module-option name="roleAttributeID" value="cn"/>
          </login-module>
      </authentication>

       

       

      In order to facilitate different deployment environments (dev/test/prod) can this configuration be bundled in my EAR or WAR file as a deployment descriptor?

      So, basically, when I build for 'Dev' I want my build to create/pick the correct dev configuration and bundle it in the war file, and in order to do that I need to define this configuration out of standalone.xml

      Thanks!