# LDAP Authentication Setup in CData Sync with ApacheDS

**URL:** <https://community.cdata.com/t/ldap-authentication-setup-in-cdata-sync-with-apacheds/1192>\
**Category:** Editions\
**Tags:** ldap, article, cdata-sync, authentication\
**Created:** [September 18, 2025, 3:16pm UTC](https://community.cdata.com/t/ldap-authentication-setup-in-cdata-sync-with-apacheds/1192 "2025-09-18T15:16:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harsh\_Paliwal](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@Harsh\_Paliwal](https://community.cdata.com/u/Harsh_Paliwal)\
**Post date:** [September 18, 2025, 3:43pm UTC](https://community.cdata.com/t/ldap-authentication-setup-in-cdata-sync-with-apacheds/1192/1 "2025-09-18T15:43:36Z")

</div>

This article explains LDAP authentication and how to set it up with an ApacheDS on-premises server.

**What is LDAP?**

LDAP (Lightweight Directory Access Protocol) is an open, vendor-neutral, industry-standard application protocol for accessing and maintaining distributed directory information services over an IP network. It’s most commonly used for authentication, authorization, and storing user-related information in enterprise systems.

At its core, LDAP is a protocol: a set of rules that client and server systems follow to communicate with a directory service. A directory is a specialized database optimized for read-heavy access, structured in a hierarchical, tree-like form (like folders and subfolders).

The protocol enables applications and services to query, modify, and authenticate against directory-based data (like usernames, passwords, email addresses, user groups, devices, etc.).

**What is a Directory Service?**

A directory service is a central repository that stores and organizes data to allow for easy lookup. Think of it like a phonebook for computers and users.

Examples:

- Microsoft Active Directory (AD)
- OpenLDAP (open-source LDAP implementation)
- ApacheDS (Java-based LDAP server)
- Novell eDirectory

**How Does LDAP Work?**

LDAP follows a client-server model:

1. The LDAP client sends a request (e.g., to authenticate a user).
2. The LDAP server processes the request and responds with results.

**Common Use Cases of LDAP:**

**Authentication and Authorization** : Centralized login system for users across systems (e.g., enterprise logins).

**Directory Services:** Storing and retrieving hierarchical data (e.g., employee contact information).

**Single Sign-On (SSO):** Integrating with identity providers and SSO platforms.

**Access Control:** Granting role-based access based on LDAP group membership.

**LDAP Structure (Key Concepts):**

LDAP stores data in a hierarchical tree structure:

**Entries** : Basic unit of information, identified by a Distinguished Name (DN).

**Attributes** : Key-value pairs describing the entry (e.g., uid, cn, sn, mail).

Object Classes: Define the schema for entries, including required and optional attributes.

**Example Structure:**

 ![bbec7dd6-1306-4e75-8852-a558a9f12834.png](https://us1.discourse-cdn.com/cdata/original/2X/c/c44aeeec28f81d9a3fa7c4e269d0c6ec39700b4d.png)

**LDAP and Authentication:**

LDAP is often used to centralize user authentication, enabling single sign-on (SSO) or unified credential systems. Applications authenticate against the LDAP server instead of managing their own user stores.

**Example Authentication Flow:**

1) A user logs into an application.

2) The app connects to the LDAP server and sends a Bind request with the user’s DN and password.

3) If the credentials are valid, the server responds with success; otherwise, failure.

Now I will explain the steps to configure LDAP authentication within CData Sync using ApacheDS, a freely available LDAP server.

**Set Up ApacheDS Server**

**Step 1: Download and Install ApacheDS**

1) Go to the official site: [https://directory.apache.org/apacheds/](https://directory.apache.org/apacheds/)

2) Download the latest installer for your OS (Windows, macOS, or Linux).

3) Run the installer and follow the prompts to complete the installation.

**Step 2: Start ApacheDS Service**

Once installed, start the ApacheDS server using the Manage ApacheDS (management GUI) app or by launching the service.

 ![3a8ce245-713c-4d1e-910b-0e50be9c31ab.png](https://us1.discourse-cdn.com/cdata/original/2X/b/b07983fb0b9320dee169d6eb2cd7b856150cbe71.png)

**Step 3: Install Apache Directory Studio (Management Tool)**

1) Download from: [https://directory.apache.org/studio/](https://directory.apache.org/studio/)

3) Install and open the Studio.

**3) Create a new connection:**

3.1 Hostname: localhost

3.2 Port: 10389 (default)

 ![01dd2d5c-c9a0-44ba-9ea1-536f8e63aa4c.png](https://us1.discourse-cdn.com/cdata/original/2X/0/0a26a2423e152424aa998e0cdb60d6f50d3f0340.png)

3.4 Click on Check Network Parameter. If success, then Click on Next.

3.5 Bind DN or user: uid=admin,ou=system

3.6 Password: secret (default unless changed)

 ![44032362-0fa7-4e45-962f-483e3316a2de.png](https://us1.discourse-cdn.com/cdata/original/2X/4/41f6f84e1059033c3ac28db0676036c5f793d8b0.png)

You’ll now be connected to the LDAP directory.

**Step 4: Create LDAP Entries (Users/Groups)**

**Create a Base DN**

1) Right-click on the LDAP browser → New Context Entry

2) Choose “Create entry from scratch”

 ![ace32030-e7d0-45e2-9b7e-016a02fd215a.png](https://us1.discourse-cdn.com/cdata/original/1X/7747e394dacb102b765276c725a9f776bb4c82a7.png)

3) Use object classes:

3.1 top

3.2 person

3.3 inetOrgPerson

3.4 organizationalPerson

 ![e6930e72-f69c-4060-acd8-889a4970d87c.png](https://us1.discourse-cdn.com/cdata/original/1X/f531309bc9a782a6f3d5e869dbcfb621a8663705.png)

4) Provide domain components:

4.1) Set **Parent** : ou=system

4.2) **RDN** : uid = root

 ![00c2e8ee-a5f9-4295-9814-b9e13b0c979a.png](https://us1.discourse-cdn.com/cdata/original/2X/b/b8bfc440a961032a190505e4b254ae0ef5ec6e29.png)

 ![ac9bdaf9-146f-452b-bf83-f9c462c7ebcc.png](https://us1.discourse-cdn.com/cdata/original/1X/6f31d3a4cd8487bb7cfab35ce97e36720c9f8216.png)

5) On the final step (attributes), enter manually:

5.1 cn = Test User

5.2 sn = User

5.3 userPassword = root

 ![af734428-5ffc-4ff6-acfc-11fc0f73e0d9.png](https://us1.discourse-cdn.com/cdata/original/1X/edd394cf31caa338c93d6a25a7eaaaf3c30e5a89.png)

Then click **Finish**.

**Add Organizational Units:**

1) Create ou=users and ou=groups under the base DN:

2) Right-click dc=example,dc=com → New → New Entry

3) Use object class: organizationalUnit

 ![b38bce84-5add-47cb-a810-da6b20c71b9d.png](https://us1.discourse-cdn.com/cdata/original/1X/5c61fc161b4e511011fe4d49cea5a3027f7e995f.png)

4) Add ou=users and ou=groups

5) Click on finish.

**Add a Test User:**

1) Right-click ou=users → New → New Entry

2) Choose object classes: inetOrgPerson, organizationalPerson, person, top

3) Attributes example:

3.1 uid: jdoe

3.2 cn: John Doe

3.3 sn: Doe

3.4 mail: [jdoe@example.com](mailto:jdoe@example.com)

3.5 userPassword: password123 (make sure to encode as plain or MD5)

**Set up CData Sync to use LDAP authentication.**

**Step 1: Enable Authentication in CData Sync**

1) Open CData Sync

2) The following steps configure sync to use LDAP to authenticate users if you use the embedded jetty server.

**Step 2: Configure LDAP Authentication via sync.properties**

3) If the sync.properties file does not already exist in the Sync installation directory, generate it using the following command:

_java -jar sync.jar -GenerateProperties_

4) The following mandatory setting instructs the embedded Jetty server to use LDAP for authentication:

_;; LDAP_

_cdata.loginService.ldap.enabled=true_

This setting instructs the embedded Jetty server to use LDAP for user authentication.

5) Include the minimum required properties based on your LDAP server setup. At a minimum, Sync requires:

_cdata.loginService.ldap.hostname_

_cdata.loginService.ldap.bindDn_

_cdata.loginService.ldap.bindPassword_

6) You may also configure additional optional properties as needed. Below is a full list of available settings:

_cdata.loginService.ldap.userIdAttribute_

_cdata.loginService.ldap.debug_

_cdata.loginService.ldap.forceBindingLogin_

_cdata.loginService.ldap.bindPassword_

_cdata.loginService.ldap.roleMemberAttribute_

_cdata.loginService.ldap.useLdaps_

_cdata.loginService.ldap.roleBaseDn_

_cdata.loginService.ldap.bindDn_

_cdata.loginService.ldap.userPasswordAttribute_

_cdata.loginService.ldap.hostname_

_cdata.loginService.ldap.userRdnAttribute_

_cdata.loginService.ldap.roleObjectClass_

_cdata.loginService.ldap.port_

_cdata.loginService.ldap.authenticationMethod_

_cdata.loginService.ldap.userBaseDn_

_cdata.loginService.ldap.contextFactory_

_cdata.loginService.ldap.userObjectClass_

_cdata.loginService.ldap.roleNameAttribute_

7) Here’s an example configuration section for a local ApacheDS LDAP server that I have configured at my end:

_;; LDAP_

_cdata.loginService.ldap.enabled=true_

_cdata.loginService.ldap.bindDn=uid=root,ou=system_

_cdata.loginService.ldap.hostname=127.0.0.1_

_cdata.loginService.ldap.bindPassword=root_

_cdata.loginService.ldap.port=10389_

_cdata.loginService.ldap.debug=true_

_cdata.loginService.ldap.authenticationMethod=Simple_

_cdata.loginService.ldap.userBaseDn=ou=system_

_cdata.loginService.ldap.userObjectClass=organizationalPerson_

_cdata.loginService.ldap.userRdnAttribute=uid_

_cdata.loginService.ldap.userIdAttribute=uid_

_cdata.loginService.ldap.userPasswordAttribute=userPassword_

_cdata.loginService.ldap.forceBindingLogin=true_

_cdata.loginService.ldap.roleBaseDn=ou=system_

_cdata.loginService.ldap.roleNameAttribute=cn_

_cdata.loginService.ldap.roleMemberAttribute=member_

_cdata.loginService.ldap.roleObjectClass=groupOfNames_

_cdata.loginService.ldap.useLdaps=false_

 ![2d5fa18f-d729-4ed2-93d5-c1b3194026ff.png](https://us1.discourse-cdn.com/cdata/original/2X/b/bb4e74acc188537da400e850e85a635db978c9f1.png)

**Step 3: Add LDAP Users in CData Sync**

To allow LDAP-authenticated users to log in, their usernames must also exist in Sync’s internal user list. To add them:

1) Log in to Sync as an administrator.

2) Go to the gear icon (⚙) → Users.

3) Add each LDAP user with the exact same username as in your LDAP directory.

For example, if your LDAP server has users user01 and user02, ensure these same users are added in Sync.

Once done, you can stop the application.

**Step 4: Test the Configuration**

Once you have created the  **sync.properties**  file with the necessary LDAP settings, added your LDAP users to Sync, and confirmed that their configuration is correct based on your LDAP server’s requirements, you are ready to test the functionality.

Start Sync using java -jar sync.jar or as a service. When the login screen appears, enter a username and password for an LDAP user you’ve also added in Sync.

**Sync will:**

1) Match the input username against its internal user list.

2) Authenticate the credentials against your LDAP server.

If everything is configured correctly, the user will be logged into the application. If login is successful, you are now using **ApacheDS** for authentication.
