Configure WSO2 APIM with LDAP as a user-store in 2 mins

Dinusha Dissanayake
Sep 2, 2018 · 2 min read

Suppose you want to check the functionality of WSO2 APIM with LDAP as the user-store. For this, you need WSO2 APIM and IS packs.

If you have the relevant products downloaded already, you can setup these within 2 mins.

Before going into details, let me explain what is going to happen here. By default WSO2 APIM comes with JDBC user-store manager. But on the other hand WSO2 IS comes with a LDAP user-store by default.

What we are going to do is, start an IS server with a port offset so that it doesn’t conflict with WSO2 APIM ports.

Then, once there is a WSO2 IS server up and running, I could switch userstore of WSO2 APIM to LDAP user-store in IS server.

Here is how it is done.

Step 1

Start WSO2 IS server with a port offset (Eg: with port offset 1) with following command within the <IS_HOME>/bin location.

sh wso2server.sh -DportOffset=1

Step 2

Swap userstore in <APIM_HOME>/repository/conf/user-mgt.xml with the userstore in <IS_HOME>/repository/conf/user-mgt.xml. Remember to comment/remove the existing JDBC userstore manager once you configure the LDAP userstore in <APIM_HOME>/repository/conf/user-mgt.xml.

By default, IS LDAP userstore is open on port 10389. Since we have included a port offset(1) while starting the server, we will have to change the port accordingly of connection URL property in APIM user-mgt.xml as follows.

<Property name=”ConnectionURL”>ldap://localhost:10390</Property>

Start the wso2 server.

Here you go. 2 mins over and you just configured a LDAP as the user-store for the API Manager. Now you can work in APIM and check the LDAP user store functionalities without any issue.

Cheers …!

Dinusha Dissanayake

Written by

Senior Software Engineer @WSO2

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade