title: worklight server authentication with Ldap
body: <p>I want to authenticate users using ApacheDS LDAP and then integrate it with my worklight server(liberty profile).
  For that i modified server.xml with the following code after http endpoint element.</p>
  
  <pre><code>   &lt;ldapRegistry id=”ldap” &gt;
     realm=”LdapRegistry” 
     host=”localhost” 
    port=”10389” 
    ignoreCase=”true”
    baseDN=”dc=partition1,dc=com”
    bindDN=”uid=admin,ou=system”
    userFilter=”(&amp;(uid=%v)(objectclass=inetOrgPerson))”
    bindPassword=”secret”
    ldapType="ApacheDS 2.0.0"
    &lt;/ldapRegistry&gt;
  </code></pre>
  
  <p>in authenticationconfig.xml</p>
  
  <pre><code>        "&lt;securityTests&gt;
      &lt;customSecurityTest name="LDAPSecurityTest"&gt;
          &lt;test isInternalUserID="true" realm="LDAPRealm"/&gt;
      &lt;/customSecurityTest&gt;
  
      &lt;customSecurityTest name="LDAPSecurityTestForWLConsole"&gt;
          &lt;test isInternalUserID="true" realm="WorklightConsole"/&gt;
      &lt;/customSecurityTest&gt;
  &lt;/securityTests&gt;
  
  &lt;realms&gt;
      &lt;realm loginModule="LDAPLoginModule" name="LDAPRealm"&gt;
            &lt;className&gt;com.worklight.UsernamePasswordJSONAuthenticator&lt;/className&gt;
      &lt;/realm&gt;
  
      &lt;realm loginModule="StrongDummy" name="SampleAppRealm"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.FormBasedAuthenticator&lt;/className&gt;
      &lt;/realm&gt;
  
      &lt;realm loginModule="LDAPLoginModule" name="WorklightConsole"&gt;
          &lt;className&gt;com.worklight.core.auth.ext.FormBasedAuthenticator&lt;/className&gt;
          &lt;onLoginUrl&gt;/console&lt;/onLoginUrl&gt;
      &lt;/realm&gt;
  &lt;/realms&gt;
  
  &lt;loginModules&gt;
      &lt;loginModule name="LDAPLoginModule"&gt;
          &lt;className&gt;com.worklight.LDAPLoginModule&lt;/className&gt;
          &lt;parameter name="ldapHost" value="ldap://localhost:10389"/&gt;
          &lt;parameter name="ldapDomain" value="localhost:10389"/&gt;
          &lt;parameter name="searchBase" value="dc=partition1,dc=com"/&gt;
  
          &lt;!-- 
              In case credentials are successfully validated check user's memberOf property for this string.
              Can be used to check whether user belongs to specific LDAP unit or group.
              Leave value empty to skip this check.
            --&gt;
  
  
      &lt;/loginModule&gt;
  
      &lt;loginModule name="StrongDummy"&gt;
           &lt;className&gt;com.worklight.core.auth.ext.NonValidatingLoginModule&lt;/className&gt;
      &lt;/loginModule&gt;
  
      &lt;loginModule name="requireLogin"&gt;
  &lt;className&gt;com.worklight.core.auth.ext.SingleIdentityLoginModule&lt;/className&gt;
      &lt;/loginModule&gt;
  &lt;/loginModules&gt;
    &lt;/tns:loginConfiguration&gt;
  </code></pre>
  
  <p>The worklight server console stops working.
  Following LDAP login module from ibm site and support centre for configuring to liberty profile.
  Kindly help</p>