This tutorial guides you through creating an LDAP user store using Apache Directory Studio and connecting the user store to WSO2 Identity Server.
Before you begin
Creating a new LDAP server
- Open Apache Directory Studio.
- In the LDAP Servers tab found on the bottom left corner, click New Server.
- Select LDAP server ApacheDS 2.0.0 and click Finish.
Right-click on the newly created server and click Open Configuration.
Port offset the LDAP and LDAP server ports by changing the LDAP port to 10390 and the LDAP server port to 10637. This ensures that the embedded LDAP server running in the prior installation of WSO2 IS does not conflict with the current installation.
- Right-click on the new server and click Create a Connection.
- Right-click on the server and click Run to start the server.
Configuring the user store
- Log in to the management console.
Click Add under User Stores on the Main tab and add a new secondary user store named "EMPLOYEES".
Configure the user store properties as follows.
Connection URL - ldap://localhost:10390
Right-click on the connection in ApacheDS and click Open Configuration. Since the LDAP server will run on your local machine, you can use the connection URL
localhost:10390according to the configured port.
Connection Name -
Right-click on the connection, click Properties and then click Authentication. The connection name is the username given as the Bind DN or user value.
The user is used to connect to the database and perform various operations. This user does not have to be an administrator in the user store or have an administrator role in the WSO2 product that you are using, but this user MUST have permissions to read the user list and users' attributes and to perform search operations on the user store. This value is the DN (Distinguish Name) attribute of the user.
Connection Password - secret
This is the password for the user entered in the Connection Name field. Click on the admin user that is created by default to open up the related details.
Double-click on user password and select the Show Current Password Details check box. The current password is displayed.
User Search Base - ou=users,ou=system
This is the DN of the context or object under which the user entries are stored in the user store. i.e. the "users" container. Double-click on
ou=userson the LDAP Browser to view the DN value.
User Entry Object Class - intetOrgPerson
To find a suitable User Entry Object Class, see the documentation on the directory service. For ApacheDS, see Schema Elements.
Group Search Base - ou=groups,ou=system
On the Add New User Store screen of the management console, expand the Optional tab and edit the Group Search Base field. This is the DN of the context under which the user entries are stored in the user store. Double-click on
ou=userson the LDAP Browser of ApacheDS to view the DN value.
In order to reduce the complexity constraints of adding a username and password, disable the password quality check.
Right-click on the connection in ApacheDS and click Open Configuration.
Click on the Password Policies tab of the configuration window.
Change the Check Quality field under the Quality section to Disabled and save the configuration.
- Click Update to save the configurations.