LDAP (Lightweight Directory Access Protocol) is a client-server protocol for accessing and modifying a directory service: a specialised database optimised for read-heavy, hierarchically-organised identity data. It was derived from the X.500 directory standard in the early 1990s, stripping out OSI transport dependencies to run over TCP/IP, and standardised in its current form in RFC 4511 (LDAPv3, 2006). A directory in the LDAP sense is not a general-purpose database — it is a tree of entries (also called objects), each identified by a Distinguished Name (DN) that encodes its position in the hierarchy: cn=alice,ou=users,dc=example,dc=com. Each entry is an instance of one or more object classes (defined in a schema), and each object class defines a set of mandatory and optional attributes — typed, multi-valued fields such as uid, cn (common name), mail, userPassword, memberOf, sshPublicKey, objectClass, and userCertificate. The schema is extensible: LDAP servers ship with standard schema files (RFC 2307 for POSIX users and groups, RFC 4519 for person entries) and organisations add custom schema for application-specific attributes. The tree structure makes hierarchical policy delegation natural — all objects under ou=engineering,dc=example,dc=com can be administered by a different set of ACL rules than objects under ou=ops.
The LDAPv3 operation set covers the full directory lifecycle. Bind authenticates the client to the server using one of several mechanisms: simple bind (DN + password in cleartext — should only be used over TLS), SASL bind (pluggable authentication via GSSAPI/Kerberos, PLAIN, SCRAM, EXTERNAL for certificate-based auth), or anonymous bind (read-only access without authentication). Search is the dominant operation: the client specifies a base DN, a scope (base — only the base entry; one — direct children; sub — the entire subtree), a filter expression using a rich boolean syntax ((&(objectClass=posixAccount)(uid=alice)), (|(memberOf=cn=admins,...)(memberOf=cn=ops,...)))), and a list of attributes to return. Modify changes attributes on an existing entry; Add and Delete manage entries; ModifyDN renames or moves entries. All operations can be performed within a StartTLS or LDAPS (LDAP over TLS on port 636) session; LDAPv3 without TLS transmits bind credentials and search results in cleartext and must not be used on untrusted networks. LDAP referrals allow a directory to redirect a client to another server for entries outside its naming context, enabling multi-master and distributed directory deployments.
In the Linux infrastructure stack, LDAP is the data store that identity services query, but is rarely exposed directly to applications or users — SSSD provides the caching, reconnection, and NSS/PAM integration layer that translates LDAP directory data into the POSIX identity model (uid, gid, home directory, shell, group membership). Active Directory implements LDAPv3 as its directory protocol alongside Kerberos for authentication — AD’s LDAP schema is a superset of RFC 2307 with Microsoft-specific extensions (SIDs, msDS-* attributes, userAccountControl bitmask). FreeIPA (Red Hat Identity Management) provides an LDAP server (389 Directory Server) with a pre-configured schema combining RFC 2307, Kerberos integration, and HBAC/sudo rule storage. OpenLDAP is the dominant open-source standalone LDAP server on Linux, used as the backend for custom identity stores and for LDAP-enabled applications that require a directory without the full AD or FreeIPA stack. X.509 certificates can be stored in LDAP entries (the userCertificate attribute in the pkiUser object class), enabling certificate-based authentication flows where a client presents a certificate and the server validates it against the stored value. PBKDF2 and bcrypt password hashes stored in the userPassword attribute replace cleartext passwords in hardened LDAP deployments; the SSHA (salted SHA-1) scheme is legacy and should be migrated to stronger algorithms. Access Control Lists (ACLs) in OpenLDAP (olcAccess attributes in the cn=config DIT) govern which DNs may read, write, or authenticate which attributes — the most security-sensitive ACL being the restriction of userPassword reads to the entry’s own DN only (by self write by * none).
