0 Replies Latest reply on Nov 20, 2012 5:08 AM by Lara LG

    LDAP Login in the application

    Lara LG Newbie

      Hello,

       

      I am configuring a login through ldap to my application, I've modified the standalone.xml as i've seen in numeros tutorials in the following fasion:

       

      <security-domain name="test_ldap_security_domain">

                          <authentication>

                              <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required">

                                  <module-option name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"/>

                                  <module-option name="java.naming.provider.url" value="ldap://xxxx:xxxx"/>

                                  <module-option name="bindDN" value="cn=xxx,dc=xxx,dc=xxx"/>

                                  <module-option name="bindCredential" value="xxxxx"/>

                                  <module-option name="baseCtxDN" value="dc=xxxx,dc=xxxx"/>

                                  <module-option name="allowEmptyPasswords" value="false"/>

                                  <module-option name="baseFilter" value="uniqueMember={0}"/>

                                  <module-option name="allowEmptyPasswords" value="false"/>

                              </login-module>

                          </authentication>

                      </security-domain>

       

       

      The thing is in this documentation https://docs.jboss.org/author/display/AS71/Examples# I've seen this modification for the management realm, I'm not sure If I need to to this for the application realm, or not, because this is the only source I've been able to find, and when I modify the standalone to include the code as follows it always crashes.

       

       

      <management>

              <security-realms>

                  <security-realm name="ManagementRealm">

                      <authentication>

                          <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                      </authentication>

                  </security-realm>

                  <security-realm name="ApplicationRealm">

                      <authentication>

                     <!--     <properties path="application-users.properties" relative-to="jboss.server.config.dir"/> -->

                     <ldap connection="TESTLDAP" base-dn"cn=xxx,dc=xxx,dc=xxx">

                     </ldap>

                      </authentication>

                  </security-realm>

              </security-realms>

      <outbound-connection>

      <ldap name="TESTLDAP" url="ldap://xxxx:xxxx" search-dn="" search-credential="password"/>

      </outbound-connection>

              <management-interfaces>

                  <native-interface security-realm="ManagementRealm">

                      <socket-binding native="management-native"/>

                  </native-interface>

                  <http-interface security-realm="ManagementRealm">

                      <socket-binding http="management-http"/>

                  </http-interface>

              </management-interfaces>

          </management>

       

       

      Any help would be appreciated as I'm finding the documentation very confusing.