Skip to content
Cybersecurity

LDAP

LDAP (Lightweight Directory Access Protocol) is an application protocol used to access and manage information stored in directory services. It is a lightweight and efficient way to organize and search hierarchical data, particularly useful in managing users and resources in organizations.

What is LDAP?

LDAP (Lightweight Directory Access Protocol) is an open application protocol for reading, searching and modifying data in directory services such as Active Directory or OpenLDAP. Organizations use it to store user accounts, groups and permissions centrally and to authenticate users — so applications, email or VPN check identity against a single directory.

LDAP (Lightweight Directory Access Protocol) Definition

LDAP is a standard, open protocol used to access and modify directory services operating over TCP/IP. It was designed as a lighter alternative to the DAP (Directory Access Protocol) and is widely used in corporate environments to centralize information about users, groups, and resources.

How Does LDAP Work?

LDAP operates in a client-server model:

  1. LDAP client sends a query to the LDAP server.
  2. LDAP server processes the query and searches the directory.
  3. Server returns results to the client.
  4. Client can perform operations such as adding, deleting, or modifying data in the directory.

LDAP Operations

The protocol specification (RFC 4511) defines a set of operations that a client sends to the directory server:

  • Bind — client authentication; the specification treats it, in effect, as the “authenticate” operation.
  • Search and Compare — finding entries that match a filter, and comparing a given value with the values of an attribute in a specific entry.
  • Add, Delete and Modify — adding, removing and changing an entry.
  • Modify DN — changing an entry’s relative name (RDN) or moving a subtree of entries to another place in the directory.
  • Unbind and Abandon — ending the LDAP session (despite its name, Unbind is not the opposite of Bind) and asking the server to drop an unfinished operation.
  • Extended — extended operations, including StartTLS, which sets up a TLS layer on an existing connection.

From a security standpoint, the bind operation matters most. Its simple variant (simple bind) passes a DN and a password, which is why RFC 4513 strongly discourages sending clear-text passwords over open networks without confidentiality protection such as TLS. The alternative is SASL authentication with mechanisms that never send the password at all, such as GSSAPI based on the Kerberos protocol.

Key Features and Functions of LDAP

  • Hierarchical data structure
  • Fast read and search operations
  • Scalability and replication capability
  • SSL/TLS support for secure communication
  • Ability to extend data schema
  • Standardization and interoperability

LDAP Structure and Architecture

LDAP organizes data in a tree structure:

  • Directory root (highest level)
  • Entries containing attributes
  • Attributes consisting of name-value pairs

LDAP architecture includes:

  • LDAP servers storing data
  • LDAP clients sending queries
  • Communication protocol

LDAP Applications in Organizations

  • Central user and permission management
  • Single Sign-On (SSO)
  • Authentication and authorization in applications
  • Storing IT resource information
  • Integration with email systems

LDAP vs Active Directory - Similarities and Differences

Active Directory (AD) is a Microsoft implementation of LDAP:

  • AD uses LDAP as one of its access protocols
  • AD offers additional features specific to Windows environments
  • LDAP is more universal and can be used on different operating systems

Security in LDAP

Key LDAP security aspects:

  • Communication encryption (LDAPS)
  • Attribute-level access control
  • Strong authentication
  • Directory access auditing
  • Regular updates and patches

In Active Directory, Microsoft’s documentation points out that directory security improves significantly when the server rejects SASL binds without signing (LDAP signing) and simple binds over unencrypted connections, because unsigned traffic is susceptible to replay and man-in-the-middle attacks. Before enforcing the requirement, you need to find the clients that still use such binds, since they will stop working after the change; the domain controller records them in its event log. Checking these settings, service accounts and directory permissions is part of an Active Directory security audit.

LDAP Implementation - Best Practices

  • Planning directory structure
  • Implementing strong password policies
  • Configuring encryption and secure connections
  • Regular backups and recovery testing
  • Access monitoring and auditing
  • Training for administrators and users

LDAP is a key protocol in identity and access management in organizations, offering an efficient way to store and access user and resource information. Its flexibility and scalability make it widely used in various IT environments.

Explore our services

Frequently asked questions

+ What is the difference between LDAP and Active Directory?

LDAP is an open protocol for accessing directory services, whereas Active Directory is a specific Microsoft directory service that uses LDAP as one of its protocols. In other words, LDAP defines how to communicate with a directory, while Active Directory is a complete solution that also includes Kerberos authentication, group policies (GPO) and replication. Active Directory is compatible with LDAP but adds many features that go beyond the protocol itself.

+ Is LDAP secure?

Standard LDAP transmits data (including credentials) in plain text, which is why production environments use LDAPS (LDAP over SSL/TLS) on port 636 or the StartTLS mechanism, both of which encrypt the communication. Security is also strengthened by strong authentication (SASL), limiting the privileges of service accounts and access control lists (ACLs).

+ What port does LDAP use?

Unencrypted LDAP uses port 389 by default, and encrypted LDAPS uses port 636. The StartTLS mechanism operates on port 389 and upgrades the connection to an encrypted one during the session. In Active Directory environments, the Global Catalog ports 3268 and 3269 are also used.

+ What do organizations use LDAP for?

LDAP is the foundation of centralized identity management — it stores user accounts, groups and permissions and handles authentication and authorization. It is commonly integrated with SSO, IAM, email, VPN and corporate applications, so that a single identity grants access to many of the organization's resources.

+ What is an LDAP server?

An LDAP server is a directory service that stores entries in a hierarchical directory information tree (DIT) and answers client requests: authentication (bind), search, compare and modification of entries. OpenLDAP, 389 Directory Server and Active Directory domain controllers all act as LDAP servers. By default it listens on port 389, and on port 636 for encrypted LDAPS.

+ How does the LDAP protocol work?

The client connects to the directory server and first authenticates with a bind operation — using a password sent over a protected connection or a SASL mechanism such as Kerberos. It then sends requests, such as searching for entries that match a filter or modifying them, and the server returns the results. The unbind operation ends the session; encryption is provided by StartTLS or an LDAPS connection.

Tags:

LDAP directory services authentication Active Directory identity management

Want to Reduce IT Risk and Costs?

Book a consultation - we respond within 24h

Response in 24h Custom quote No obligations