2 Replies Latest reply on Jan 22, 2015 2:01 AM by valsaraj viswanathan

    How to configure LDAP service in JBoss AS 7

    valsaraj viswanathan Master

      Hi,

      How to configure LDAP service in JBoss AS 7?

       

      Thanks in advance!

        • 1. Re: How to configure LDAP service in JBoss AS 7
          Jay SenSharma Master

          You can try using "org.jboss.security.auth.spi.LdapExtLoginModule" based "security-domain" something as following:

           

           

                    <security-domain name="AppLDAPContext">
                              <authentication>
                                <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="optional">
                                      <module-option name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"/>
                                      <module-option name="java.naming.provider.url" value="ldaps://localhost:636"/>
                                      <module-option name="bindDN" value="DN=cn=Manager,dc=app,dc=com"/>
                                      <module-option name="bindCredential" value="something@123"/>
                                      <module-option name="baseCtxDN" value="CN=Users,DC=SPNEGO,DC=COM"/>
                                      <module-option name="baseFilter" value="(sAMAccountName={0})"/>
                                      <module-option name="rolesCtxDN" value="------------"/>
                                      <module-option name="roleFilter" value="(member={1})"/>
                                      <module-option name="roleAttributeID" value="memberOf"/>
                                      <module-option name="roleNameAttributeID" value="cn"/>
                                      <module-option name="roleAttributeIsDN" value="true"/>
                                      <module-option name="throwValidateError" value="true"/>
                                      <module-option name="searchScope" value="SUBTREE_SCOPE"/>
                                      <module-option name="roleRecursion" value="2"/>
                                      <module-option name="allowEmptyPasswords" value="false"/>
                                  </login-module>
                                </authentication>
                      </security-domain>
          

           

          Refer to :  https://developer.jboss.org/wiki/JBossAS7SecurityDesignOneStopArticle

          http://middlewaremagic.com/jboss/?p=378

          1 of 1 people found this helpful
          • 2. Re: How to configure LDAP service in JBoss AS 7
            valsaraj viswanathan Master

            How can I bind this LDAP context to JNDI?