Lightweight Directory Access Protocol: Difference between revisions

Content deleted Content added
m format RFCs
 
Line 1:
{{short description|Network protocol supporting distributed directory information services}}
In [[computer networking]], the '''Lightweight Directory Access Protocol''', or '''LDAP''' ({{IPA2|ˈɛl dap}}), is a [[networking protocol]] for querying and modifying [[directory service]]s running over [[Internet protocol suite|TCP/IP]].
{{Infobox networking protocol
| is stack = no
| purpose = [[Directory service]]
| based on = [[X.500]]
| ports = 389 (ldap), 636 (ldaps)
| rfcs = {{IETF RFC|4510|4511|plainlink=yes}}
}}
{{IPstack}}
 
The '''Lightweight Directory Access Protocol''' ('''LDAP''' {{IPAc-en|ˈ|ɛ|l|d|æ|p}}) is an open, vendor-neutral, industry standard [[application protocol]] for accessing and maintaining distributed [[Directory service|directory information services]] over an [[Internet Protocol]] (IP) network.<ref>{{cite web|url=https://tools.ietf.org/rfc/rfc4511.txt |title=Network Working Group RFC 4511 |publisher=IETF.org |date=2006-06-01|access-date=2014-04-04}}</ref> [[Directory service]]s play an important role in developing [[intranet]] and Internet applications by allowing the sharing of information about users, systems, networks, services, and applications throughout the network.<ref>{{cite web |url=https://docs.oracle.com/cd/A87860_01/doc/ois.817/a83729/adois09.htm |title=Directory Services LDAP |publisher=Oracle.com |access-date=2014-04-04}}</ref> As examples, directory services may provide any organized set of records, often with a hierarchical structure, such as a corporate [[email]] directory. Similarly, a [[telephone directory]] is a list of subscribers with an address and a phone number.
A directory is a set of information with similar attributes organized in a logical and hierarchical manner. The most common example is the telephone directory, which consists of a series of names (either of a person or organization) organized alphabetically, with an address and phone number attached.
 
LDAP is specified in a series of [[Internet Engineering Task Force]] (IETF) Standard Track publications known as [[Request for Comments]] (RFCs), using the description language [[ASN.1]]. The latest specification is Version 3, published as [https://datatracker.ietf.org/doc/html/rfc4511 RFC 4511]<ref name="gracion">[http://www.gracion.com/server/whatldap.html What is LDAP?]. Gracion.com. Retrieved on 2013-07-17.</ref> (a road map to the technical specifications is provided by [https://tools.ietf.org/html/rfc4510 RFC4510]).
An LDAP directory often reflects various political, geographic, and/or organizational boundaries, depending on the model chosen. LDAP deployments today tend to use [[Domain Name System]] (DNS)
names for structuring the topmost levels of the hierarchy. Deeper inside the directory might appear entries representing people, organizational units, printers, documents, groups of people or anything else which represents a given tree entry (or multiple entries).
 
A common use of LDAP is to provide a central place to store usernames and passwords. This allows many different applications and services to connect to the LDAP server to validate users.<ref>{{cite web|title=Introduction to OpenLDAP Directory Services|url=http://www.openldap.org/doc/admin24/intro.html|website=OpenLDAP|access-date=1 February 2016}}</ref>
Its current version is LDAPv3. LDAPv3 is specified in a series of [[Internet Engineering Task Force|IETF]] Standard Track [[Request for Comments|RFC]]s as detailed in RFC 4510.
 
LDAP is a simpler ("lightweight") subset of the standards in the [[X.500|X.500 series]], particularly the X.511 [[Directory Access Protocol]].{{ref RFC|4511|quote=The core protocol operations defined in this document can be mapped to a subset of the X.500 (1993) Directory Abstract Service [X.511]. However, there is not a one-to-one mapping between LDAP operations and X.500 Directory Access Protocol (DAP) operations.}}<ref>{{cite web |url=https://www.redhat.com/en/topics/security/what-is-ldap-authentication |title=What is lightweight directory access protocol (LDAP) authentication? |publisher=[[Red Hat]] |date=3 June 2022}}</ref> Because of this relationship, LDAP is sometimes called ''X.500 Lite''.<ref>{{cite web|url=http://www.webopedia.com/TERM/L/LDAP.html |title=LDAP - Lightweight Directory Access Protocol |date=4 December 1996 |publisher=Webopedia.com |access-date=2014-04-05}}</ref>
==Origin and influences==
Unsurprisingly, telecommunication companies introduced the concept of directories to information technology ([[computer networking]]). No doubt their understanding of directory requirements were heavily influenced by some 70 years of producing and managing telephone directories. The culmination of this input was the [[X.500]] specification, produced by the [[ITU|International Telecommunication Union (ITU)]] at a time when information technology (computers) were an organized and well-considered venture (aka pre-public-access Internet).
 
==History==
By most accounts the X.500 protocol is an extremely well engineered and thoroughly thought out specification. However, it suffers from being so thorough that even in the late '90s there were very few implementations of it and those that existed required significant computing power.
Telecommunication companies' understanding of directory requirements were well developed after some 70 years of producing and managing telephone directories. These companies introduced the concept of directory services to [[information technology]] and [[computer networking]], their input culminating in the comprehensive [[X.500]] specification,<ref>The [[X.500]] series - ITU-T Rec. X.500 to X.521</ref> a suite of protocols produced by the [[International Telecommunication Union]] (ITU) in the 1980s.
 
X.500 directory services were traditionally accessed via the X.511 Directory Access Protocol (DAP), which required the [[Open Systems Interconnection]] (OSI) [[OSI protocols|protocol stack]]. LDAP was originally intended to be a lightweight alternative protocol for accessing X.500 directory services through the simpler (and now widespread) [[TCP/IP]] protocol stack. This model of directory access was borrowed from the [[DIXIE]] and [[Directory Assistance Service]] protocols.
Unfortunately the computing resources required to implement and deploy X.500 at the time were prohibitively expensive, and so LDAP, the "Lightweight" Directory Access Protocol was developed. LDAP reduced its "weight" by only implementing a subset of the X.500 protocol and was originally designed as a gateway to X.500 servers rather than a complete standalone service.
 
The protocol was originally created<ref>{{cite web |last=Howes |first=Tim |url=http://www.openldap.org/pub/umich/ldap.pdf |title=The Lightweight Directory Access Protocol: X.500 Lite |access-date=26 December 2012}}</ref> by [[Tim Howes]] of the [[University of Michigan]], [[Steve Kille]] of Isode Limited, [[Colin Robbins (software engineer)|Colin Robbins]] of [[Nexor]] and [[Wengyik Yeong]] of [[Performance Systems International]], circa 1993, as a successor<ref>{{cite web|title=Pre-History of LDAP|url=http://cybermatters.info/2013/04/09/prehistory-of-ldap/|website=Cyber Matters|access-date=5 October 2014|date=2013-04-09}}</ref> to [[DIXIE]] and [[Directory Assistance Service|DAS]]. Mark Wahl of Critical Angle Inc., Tim Howes, and Steve Kille started work in 1996 on a new version of LDAP, LDAPv3, under the aegis of the [[Internet Engineering Task Force]] (IETF). LDAPv3, first published in 1997, superseded LDAPv2 and added support for extensibility, integrated the [[Simple Authentication and Security Layer]], and better aligned the protocol to the 1993 edition of X.500. Further development of the LDAPv3 specifications themselves and of numerous extensions adding features to LDAPv3 has come through the [[IETF]].
LDAP was originally intended to be a lightweight alternative protocol for accessing [[X.500]] directory services. X.500 directory services were traditionally accessed via the X.500 Directory Access Protocol, or [[Directory Access Protocol|DAP]], which required the cumbersome [[Open Systems Interconnection]] (OSI) protocol stack. With LDAP, a client could access these directory services without all of the overhead. This model of directory access was borrowed from [[DIXIE]] and the [[Directory Assistance Service]].
 
In the early engineering stages of LDAP, it was known as ''Lightweight Directory Browsing Protocol'', or ''LDBP''. It was renamed with the expansion of the scope of the protocol beyond directory browsing and searching, to include directory update functions. It was given its ''Lightweight'' name because it was not as network intensive as its DAP predecessor and thus was more easily implemented over the Internet due to its relatively modest bandwidth usage.
Standalone LDAP directory servers soon followed, as did directory servers supporting both DAP and LDAP. The former has become popular in enterprises as they removed any need to deploy an OSI network. Today, X.500 directory protocols including DAP can also be used directly over [[TCP/IP]].
 
LDAP has influenced subsequent Internet protocols, including later versions of X.500, [[XML Enabled Directory]] (XED), [[Directory Service Markup Language]] (DSML), [[Service Provisioning Markup Language]] (SPML), and the [[Service Location Protocol]] (SLP). It is also used as the basis for [[Microsoft]]'s [[Active Directory]].
The protocol was originally created by [[Tim Howes]] of the [[University of Michigan]], [[Steve Kille]] of [[ISODE]] and Wengyik Yeong of [[Performance Systems International]], circa 1993. Further development has been done via the [[Internet Engineering Task Force]] (IETF).
 
Note that in the early engineering stages of LDAP, it was known as ''Lightweight Directory Browsing Protocol'' or ''LDBP''. It was renamed as the scope of the protocol was expanded to not only include directory browsing functions (i.e., search) but also directory update functions (i.e., modify).
 
LDAP has influenced subsequent Internet protocols, including later versions of [[X.500]], [[XML Enabled Directory|XML Enabled Directory (XED)]], [[Directory Service Markup Language|Directory Services Markup Language (DSML)]], [[SPML|Service Provisioning Markup Language (SPML)]], and the [[Service Location Protocol|Service Location Protocol (SLP)]].
 
==Protocol overview==
A client starts an LDAP session by connecting to an LDAP server, called a [[Directory System Agent]] (DSA), by default on [[Transmission Control Protocol|TCP]] and [[TCPUser andDatagram Protocol|UDP]] port[[Port (computer networking)|port]] 389, or on port 636 for [[LDAPS]] (LDAP over TLS/SSL, see below).<ref>{{Cite web|url = https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=ldap|title = Service Name and Transport Protocol Port Number Registry|publisher = [[IANA]]|access-date = 24 March 2021}}</ref> The client then sends an operation requestsrequest to the server, and thea server sends responses in turnreturn. With some exceptions, the client needdoes not need to wait for a response before sending the next request, and the server may send the responses in any order. All information is transmitted using [[Basic Encoding Rules]] (BER).
 
The basic operations are:
 
The client may request the following operations:
* Start TLS - protect the connection with [[Transport Layer Security]] (TLS), to have a more secure connection
* [[StartTLS]] – use the LDAPv3 [[Transport Layer Security]] (TLS) extension for a secure connection
* Bind - [[Authentication|authenticate]] and specify LDAP protocol version
* Bind – [[authenticate]] and specify LDAP protocol version
* Search - search for and/or retrieve directory entries
* Search – search for and/or retrieve directory entries
* Compare - test if a named entry contains a given attribute value
* Compare – test if a named entry contains a given attribute value
* Add a new entry
* Delete an entry
* Modify an entry
* Modify Distinguished Name (DN) - move or rename an entry
* Abandon - abort a previous request
* Extended Operation - generic operation used to define other operations
* Unbind - close the connection (not the inverse of Bind)
In addition the server may send "Unsolicited Notifications" that are not responses to any request, e.g. before it times out a connection.
 
In addition the server may send "Unsolicited Notifications" that are not responses to any request, e.g. before the connection is timed out.
A common alternate method of securing LDAP communication is using an SSL tunnel. This is denoted in LDAP URLs by using the URL scheme "ldaps". The standard port for LDAP over [[Secure Socket Layer|SSL]] is 636.
 
A common alternative method of securing LDAP communication is using an [[Secure Sockets Layer|SSL]] [[tunneling protocol|tunnel]]. The default port for LDAP over SSL is 636. The use of LDAP over SSL was common in LDAP Version 2 (LDAPv2) but it was never standardized in any formal specification. This usage has been deprecated along with LDAPv2, which was officially retired in 2003.<ref>[http://tools.ietf.org/html/rfc3494 RFC3494]</ref>
LDAP is defined in terms of [[Abstract syntax notation one|ASN.1]], and protocol messages are encoded in the binary format [[Basic encoding rules|BER]]. It uses textual representations for a number of ASN.1 fields/types, however.
 
==Directory structure==
The protocol accessesprovides LDAPan interface with directories, whichthat follow the 1993 edition of the [[X.500]] model:
* An entry consists of a set of attributes.
* An attribute has a name (an ''attribute type'' or ''attribute description'') and one or more values. The attributes are defined in a ''schema'' (see below).
* Each entry has a unique identifier: its ''Distinguished Name'' (DN). This consists of its ''Relative Distinguished Name'' (RDN), constructed from some attribute(s) in the entry, followed by the parent entry's DN. Think of the DN as the [[full path|full file path]] and the RDN as its relative filename in its parent folder (e.g. if <code>/foo/bar/myfile.txt</code> were the DN, then <code>myfile.txt</code> would be the RDN).
 
A DN may change over the lifetime of the entry, for instance, when entries are moved within a tree. To reliably and unambiguously identify entries, a [[UUID]] might be provided in the set of the entry's ''operational attributes''.
* A directory is a tree of directory entries.<br>
* An entry consists of a set of attributes.<br>
* An attribute has a name (an ''attribute type'' or ''attribute description'') and one or more values. The attributes are defined in a ''schema'' (see below).
* Each entry has a unique identifier: its ''Distinguished Name'' (DN). This consists of its ''Relative Distinguished Name'' (RDN) constructed from some attribute(s) in the entry, followed by the parent entry's DN. Think of the DN as a full filename and the RDN as a relative filename in a folder.
 
An entry can look like this when represented in [[LDAP Data Interchange Format]] (LDIF), a plain text format (as opposed a [[binary protocol]] such as LDAP itself):
Be aware that a DN may change over the lifetime of the entry, for instance, when entries are moved
<syntaxhighlight lang="ldif">
within a tree. To reliably and unambiguously identify entries, a [[UUID]] may be provided in the set of the entry's ''operational attributes''.
dn: cn=John Doe,dc=example,dc=com
cn: John Doe
givenName: John
sn: Doe
telephoneNumber: +1 888 555 6789
telephoneNumber: +1 888 555 1232
mail: john@example.com
manager: cn=Barbara Doe,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
</syntaxhighlight>
"<code>dn</code>" is the distinguished name of the entry; it is neither an attribute nor a part of the entry. "<code>cn=John Doe</code>" is the entry's RDN (Relative Distinguished Name), and "<code>dc=example,dc=com</code>" is the DN of the parent entry, where "<code>dc</code>" denotes '[[Domain Name System|Domain Component]]'. The other lines show the attributes in the entry. Attribute names are typically mnemonic strings, like "<code>cn</code>" for common name, "<code>dc</code>" for ___domain component, "<code>mail</code>" for email address, and "<code>sn</code>" for surname.<ref>{{FOLDOC|Lightweight+Directory+Access+Protocol}}</ref>
 
A server holds a subtree starting from a specific entry, e.g. "<code>dc=example,dc=com</code>" and its children. Servers may also hold references to other servers, so an attempt to access "<code>ou=department,dc=example,dc=com</code>" could return a ''referral'' or ''continuation reference'' to a server that holds that part of the directory tree. The client can then contact the other server. Some servers also support ''chaining'', which means the server contacts the other server and returns the results to the client.
An entry can look like this when represented in [[LDIF]] format (LDAP itself is a binary protocol):
 
LDAP rarely defines any ordering: The server may return the values of an attribute, the attributes in an entry, and the entries found by a search operation in any order. This follows from the formal definitions - an entry is defined as a [[set (computer science)|set]] of attributes, and an attribute is a set of values, and sets need not be ordered.
dn: cn=John Doe,dc=example,dc=com
cn: John Doe
givenName: John
sn: Doe
telephoneNumber: +1 555 6789
telephoneNumber: +1 555 1234
mail: john@example.com
manager: cn=Barbara Doe,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
 
dn is the name of the entry; it's not an attribute nor part of the entry. "cn=John Doe" is the entry's RDN, and "dc=example,dc=com" is the DN of the parent entry. The other lines show the attributes in the entry. Attribute names are typically mnemonic strings, like "cn" for common name, "dc" for ___domain component, and "mail" for e-mail address.
 
A server holds a subtree starting from a specific entry, e.g. "dc=example,dc=com" and its children. Servers may also hold references to other servers, so an attempt to access "ou=Some department,dc=example,dc=com" could return a ''referral'' or ''continuation reference'' to a server which holds that part of the directory tree. The client can then contact the other server. Some servers also support ''chaining'', which means the server contacts the other server and returns the results to the client.
 
LDAP rarely defines any ordering: The server may return the values in an attribute, the attributes in an entry, and the entries found by a search operation in any order.
 
==Operations==
The client gives each request a positive Message ID, and the server response has the same Message ID. The response includes a numeric result code which indicates success, some error condition or some other special cases. Before the response, the server may send other messages with other result data - for example each entry found by the Search operation is returned in such a message.
 
===Add===
{{Sectstub}}
The ADD operation inserts a new entry into the directory-server database.<ref>[http://tools.ietf.org/html/rfc4511#section-4.7 Add section of RFC4511]</ref> If the distinguished name in the add request already exists in the directory, then the server will not add a duplicate entry but will set the result code in the add result to decimal 68, "entryAlreadyExists".<ref>[http://tools.ietf.org/html/rfc4511#appendix-A LDAP result codes]</ref>
:''Expand discussion of referral responses to various operations, especially modify, for example where all modifies must be directed from replicas to a master directory.''
* LDAP-compliant servers will never dereference the distinguished name transmitted in the add request when attempting to locate the entry, that is, distinguished names are never de-aliased.
* LDAP-compliant servers will ensure that the distinguished name and all attributes conform to naming standards.
* The entry to be added must not exist, and the immediate superior must exist.
<syntaxhighlight lang="ldif">
dn: uid=user,ou=people,dc=example,dc=com
changetype: add
objectClass:top
objectClass:person
uid: user
sn: last-name
cn: common-name
userPassword: password
</syntaxhighlight>
 
In the above example, <code>uid=user,ou=people,dc=example,dc=com</code> must not exist, and <code>ou=people,dc=example,dc=com</code> must exist.
===StartTLS===
The StartTLS operation establishes [[Transport Layer Security]] (the descendant of SSL) on the connection. That can provide data confidentiality (cannot be read by third parties) and/or data integrity protection (protect from tampering). During TLS negotiation the server sends its [[X.509]] certificate to prove its identity. The client may also send a certificate to prove its identity. After doing so, the client may then use SASL/EXTERNAL to have this identity used in determining the identity used in making LDAP authorization decisions.
 
===Bind (authenticate)===
Servers also often support the non-standard "LDAPS" ("Secure LDAP", commonly known as "LDAP over SSL") protocol on a separate port, by default 636. LDAPS differs from LDAP in two ways: 1) upon connect, the client and server establish TLS before any LDAP messages are transferred (without a Start TLS operation) and 2) the LDAPS connection must be closed upon TLS closure.
When an LDAP session is created, that is, when an LDAP client connects to the server, the '''authentication state''' of the session
is set to anonymous. The BIND operation establishes the authentication state for a session.
 
Simple BIND and SASL PLAIN can send the user's DN and password in [[plaintext]], so the connections utilizing either Simple or SASL PLAIN
The StartTLS operation was not available in LDAPv2.
should be encrypted using [[Transport Layer Security]] (TLS). The server typically checks the password against the <code>userPassword</code>
attribute in the named entry. Anonymous BIND (with empty DN and password) resets the connection to anonymous state.
 
[[Simple Authentication and Security Layer|SASL]] (Simple Authentication and Security Layer) BIND provides authentication services through a
===Bind (authenticate)===
wide range of mechanisms, e.g. [[Kerberos (protocol)|Kerberos]] or the [[client certificate]] sent with TLS.<ref>[https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xml SASL Mechanisms at IANA]</ref>
The Bind operation authenticates the client to the server. Simple Bind can send the user's DN and password - in cleartext, so the connection should be protected using [[Transport Layer Security]] (TLS). The server typically checks the password against the userPassword attribute in the named entry. Anonymous Bind (with empty DN and password) resets the connection to anonymous state. [[SASL]] (Simple Authentication and Security Layer) Bind provides authentication services through a wide range of mechanisms, e.g. [[Kerberos (protocol)|Kerberos]] or the client certificate sent with TLS.
 
BIND also sets the LDAP protocol version by sending a version number as an integer. If the client requests a version that the server does not support, the server must set the result code in the BIND response to the code for a protocol error. Normally clients should use LDAPv3, which is the
default in the protocol but not always in LDAP libraries.
 
BIND had to be the first operation in a session in LDAPv2, but is not required as of LDAPv3. In LDAPv3, each
Bind also sets the LDAP protocol version. Normally clients should use LDAPv3, which is the default in the protocol but not always in LDAP libraries.
successful BIND request changes the authentication state of the session and each unsuccessful BIND request resets the authentication state of the session.
 
===Delete===
Bind had to be the first operation in a session in LDAPv2, but is not required in LDAPv3 (the current LDAP version).
To delete an entry, an LDAP client transmits a properly formed delete request to the server.<ref>[http://tools.ietf.org/html/rfc4511#section-4.8 RFC4511: delete request]</ref>
* A delete request must contain the distinguished name of the entry to be deleted
* Request controls may also be attached to the delete request
* Servers do not dereference aliases when processing a delete request
* Only leaf entries (entries with no subordinates) may be deleted by a delete request. Some servers support an operational attribute <code>hasSubordinates</code> whose value indicates whether an entry has any subordinate entries, and some servers support an operational attribute <code>numSubordinates</code><ref>[http://tools.ietf.org/html/draft-boreham-numsubordinates-01 Boreham Draft (numSubordinates)]</ref> indicating the number of entries subordinate to the entry containing the <code>numSubordinates</code> attribute.
* Some servers support the subtree delete request control permitting deletion of the DN and all objects subordinate to the DN, subject to access controls. Delete requests are subject to access controls, that is, whether a connection with a given authentication state will be permitted to delete a given entry is governed by server-specific access control mechanisms.
 
===Search and Comparecompare===
The Search operation is used to both search for and read entries. Its parameters are:
*; baseObject -: theThe DN (Distinguished Name)name of the base object entry at(or whichpossibly the root) relative to startwhich the search, is to be performed.
*; scope -: What elements below the baseObject to search. This can be <code>BaseObject</code> (search just the named entry, typically used to read one entry), <code>singleLevel</code> (entries immediately below the base DN), or <code>wholeSubtree</code> (the entire subtree starting at the base DN).
; filter : Criteria to use in selecting elements within scope. For example, the filter <code>(&(objectClass=person)(|(givenName=John)(mail=john*)))</code> will select "persons" (elements of objectClass <code>person</code>) where the matching rules for <code>givenName</code> and <code>mail</code> determine whether the values for those attributes match the filter assertion. Note that a common misconception is that LDAP data is case-sensitive, whereas in fact matching rules and ordering rules determine matching, comparisons, and relative value relationships. If the example filters were required to match the case of the attribute value, an ''extensible match filter'' must be used, for example, <code>(&(objectClass=person)(|(givenName:caseExactMatch:=John)(mail:caseExactSubstringsMatch:=john*)))</code>
* filter - how to examine each entry in the scope. E.g. (&(objectClass=person)(|(givenName=John)(mail=john*))) - search for persons who either have given name John or an e-mail address starting with john.
*; derefAliases -: whetherWhether and how to follow alias entries (entries whichthat refer to other entries),
*; attributes -: whichWhich attributes to return in result entries.
*; sizeLimit, timeLimit -: maxMaximum number of entries to return, and maxmaximum time to allow search to run. These values, however, cannot override any restrictions the server places on size limit and time limit.
*; typesOnly -: returnReturn attribute types only, not attribute values.
 
The server returns the matching entries and maybepotentially continuation references. These may be returned (in any order),. followed by theThe final result withwill include the result code.
 
The Compare operation takes a DN, an attribute name and an attribute value, and checks if the named entry contains that attribute with that value.
 
===Update operationsModify===
The MODIFY operation is used by LDAP clients to request that the LDAP server make changes to existing entries.<ref>[http://tools.ietf.org/html/rfc4511#section-4.6 Modify Section of RFC4511]</ref> Attempts to modify entries that do not exist will fail. MODIFY requests are subject to access controls as implemented by the server.
Add, Delete, and Modify DN - all require the DN of the entry that is to be changed.
 
The MODIFY operation requires that the distinguished name (DN) of the entry be specified, and a sequence of changes. Each change in the sequence must be one of:
Modify takes a list of attributes to modify and the modifications to each: Delete the attribute or some values, add new values, or replace the current values with the new ones.
* add (add a new value, which must not already exist in the attribute)
* delete (delete an existing value)
* replace (replace an existing value with a new value)
 
[[LDIF]] example of adding a value to an attribute:
Add operations also can have additional attributes and values for those attributes.
 
<syntaxhighlight lang="ldif">
Modify DN (move/rename entry) takes the new RDN (Relative Distinguished Name), optionally the new parent's DN, and a flag which says whether to delete the value(s) in the entry which match the old RDN. The server may support renaming of entire directory subtrees.
dn: dc=example,dc=com
changetype: modify
add: cn
cn: the-new-cn-value-to-be-added
-
</syntaxhighlight>
 
To replace the value of an existing attribute, use the <code>replace</code> keyword. If the attribute is multi-valued, the client must specify the value of the attribute to update.
An update operation is atomic: Other operations will see either the new entry or the old one. On the other hand, LDAP does not define transactions of multiple operations: If you read an entry and then modify it, another client may have updated the entry in the mean time. Servers may implement extensions which support this, however.
 
To delete an attribute from an entry, use the keyword <code>delete</code> and the changetype designator <code>modify</code>. If the attribute is multi-valued, the client must specify the value of the attribute to delete.
 
There is also a Modify-Increment extension<ref>{{cite IETF|title=LDAP Modify-Increment Extension|rfc=4525|first=K.|last=Zeilenga}}</ref> which allows an incrementable attribute value to be incremented by a specified amount. The following example using LDIF increments <code>employeeNumber</code> by <code>5</code>:
 
<syntaxhighlight lang="ldif">
dn: uid=user.0,ou=people,dc=example,dc=com
changetype: modify
increment: employeeNumber
employeeNumber: 5
-
</syntaxhighlight>
 
When LDAP servers are in a replicated topology, LDAP clients should consider using the post-read control to verify updates instead of a search after an update.<ref>{{Cite IETF|title = Lightweight Directory Access Protocol (LDAP) Read Entry Controls|rfc = 4527|publisher = [[IETF]]|last = Zeilenga|first = K.}}</ref> The post-read control is designed so that applications need not issue a search request after an update – it is bad form to retrieve an entry for the sole purpose of checking that an update worked because of the replication [[eventual consistency]] model. An LDAP client should not assume that it connects to the same directory server for each request because architects may have placed load-balancers or LDAP proxies or both between LDAP clients and servers.
 
===Modify DN===
Modify DN (move/rename entry) takes the new RDN (Relative Distinguished Name), optionally the new parent's DN, and a flag that indicates whether to delete the value(s) in the entry that match the old RDN. The server may support renaming of entire directory subtrees.
 
An update operation is atomic: Other operations will see either the new entry or the old one. On the other hand, LDAP does not define transactions of multiple operations: If you read an entry and then modify it, another client may have updated the entry in the meantime. Servers may implement extensions<ref>[http://tools.ietf.org/html/draft-zeilenga-ldap-txn-15 INTERNET-DRAFT LDAP Transactions draft-zeilenga-ldap-txn-15.txt]</ref> that support this, though.
 
===Extended operations===
The Extended Operation is a generic LDAP operation whichthat can be used to define new operations that were not part of the original protocol specification. StartTLS Examplesis includeone of the Cancel,most Passwordsignificant Modifyextensions. and StartOther TLSexamples operationsinclude Cancel and Password Modify.{{citation needed|date=January 2024}}
 
====StartTLS====
The [[StartTLS]] operation establishes [[Transport Layer Security]] (the descendant of [[Transport Layer Security|SSL]]) on the connection. It can provide data confidentiality (to protect data from being observed by third parties) and/or data integrity protection (which protects the data from tampering). During TLS negotiation the server sends its [[X.509]] certificate to prove its identity. The client may also send a certificate to prove its identity. After doing so, the client may then use [[Simple Authentication and Security Layer|SASL]]/EXTERNAL. By using the SASL/EXTERNAL, the client requests the server derive its identity from credentials provided at a lower level (such as TLS). Though technically the server may use any identity information established at any lower level, typically the server will use the identity information established by TLS.
 
Servers also often support the non-standard "LDAPS" ("Secure LDAP", commonly known as "LDAP over SSL") protocol on a separate port, by default 636. LDAPS differs from LDAP in two ways:
1) upon connect, the client and server establish TLS before any LDAP messages are transferred (without a StartTLS operation) and
2) the LDAPS connection must be closed upon TLS closure.
 
Some "LDAPS" client libraries only encrypt communication; they do not check the host name against the name in the supplied certificate.<ref>[http://shibboleth.net/community/advisories/secadv_20120227.txt Shibboleth Security alert 20120227]</ref>
 
===Abandon===
The Abandon operation requests that the server abortsabort an operation named by a message ID. The server need not honor the request. Unfortunately, neitherNeither Abandon nor a successfully abandoned operation send a response. A similar Cancel extended operation has therefore been defined which does send responses, but not all implementations support this.
 
===Unbind===
The Unbind operation abandons any outstanding operations and closes the connection. It has no response. The name is of historical origin:, Itand is ''not'' the opposite of the Bind operation.<ref>[http://tools.ietf.org/html/rfc4511#section-4.3 Tools.ietf.org]</ref>
 
Clients can abort a session by simply closing the connection, but they should use Unbind.<ref>[http://tools.ietf.org/html/rfc4511#section-5.3 Tools.ietf.org]</ref> Unbind Otherwiseallows the server cannotto gracefully tellclose the differenceconnection betweenand afree failedresources networkthat it would otherwise keep for some time until discovering the client had abandoned the connection. (orIt aalso truncationinstructs attack)the server to cancel operations that can be canceled, and ato discourteousnot clientsend responses for operations that cannot be canceled.<ref>[http://tools.ietf.org/html/rfc4511#section-3.1 Tools.ietf.org]</ref>
 
==LDAPURI URLsscheme==
An LDAP [[URLUniform resource identifier|uniform resource identifier (URI)]] formatscheme exists, which clients support in varying degreedegrees, and which servers return in referrals and continuation references (see RFC 4516):<br>
"ldap://host:port/DN?attributes?scope?filter?extensions"<br>
where most components after "ldap://" can be omitted.
 
ldap://host:port/DN?attributes?scope?filter?extensions
''attributes'' is a comma-separated list of attributes to retrieve.<br>
''scope'' can be "base" (the default), "one" or "sub".<br>
''filter'' e.g, (objectClass=*) see RFC 4515.<br>
''extensions'' are extensions to the LDAP URL format.<br>
As in other URLs, special characters must be escaped with %hex format.
 
Most of the components described below are optional.
There is a similar non-standard "ldaps:" URL scheme for LDAP over SSL.
* ''host'' is the [[FQDN]] or IP address of the LDAP server to search.
* ''port'' is the [[network port]] (default port 389) of the LDAP server.
* ''DN'' is the distinguished name to use as the search base.
* ''attributes'' is a comma-separated list of attributes to retrieve.
* ''scope'' specifies the search scope and can be "base" (the default), "one" or "sub".
* ''filter'' is a search filter. For example, <code>(objectClass=*)</code> as defined in RFC 4515.
* ''extensions'' are extensions to the LDAP URL format.
 
For example, "<code>ldap://ldap.example.com/cn=John%20Doe,dc=example,dc=com</code>" refers to all user attributes in John Doe's entry in <code>ldap.example.com.</code>, while "<code>ldap:///dc=example,dc=com??sub?(givenName=John)</code>" searches for himthe entry in the default server (note the triple slash, omitting the host, and the double question mark, omitting the attributes). As in other URLs, special characters must be [[percent-encoded]].
 
There is a similar non-standard <code>ldaps</code> URI scheme for LDAP over SSL. This should not be confused with LDAP with TLS, which is achieved using the StartTLS operation using the standard <code>ldap</code> scheme.
 
==Schema==
The contents of the entries in a subtree isare governed by a [[logical schema|directory schema]], a set of definitions and constraints concerning the structure of the directory information tree (DIT).
 
The schema of a Directory Server defines a set of rules that govern the kinds of information that the server can hold. It has a number of elements, including:
The schema defines the ''attribute types'' that directory entries can contain. An attribute definition includes a ''syntax'', and most non-binary values in LDAPv3 use [[UTF-8]] string syntax. For example, a "mail" attribute might contain the value "user@example.com". A "jpegPhoto" attribute would contain photograph(s) in binary [[JPEG]]/JFIF format. A "member" attribute contains the DNs of other directory entries. Attribute definitions also specify whether the attribute is single-valued or multi-valued, how to search/compare the attribute (e.g. case-sensitive vs. case-insensitive and whether substring matching is supported), etc.
* Attribute Syntaxes—Provide information about the kind of information that can be stored in an attribute.
* Matching Rules—Provide information about how to make comparisons against attribute values.
* Matching Rule Uses—Indicate which attribute types may be used in conjunction with a particular matching rule.
* Attribute Types—Define an [[object identifier]] (OID) and a set of names that may refer to a given attribute, and associates that attribute with a syntax and set of matching rules.
* Object Classes—Define named collections of attributes and classify them into sets of required and optional attributes.
* Name Forms—Define rules for the set of attributes that should be included in the RDN for an entry.
* Content Rules—Define additional constraints about the object classes and attributes that may be used in conjunction with an entry.
* Structure Rule—Define rules that govern the kinds of subordinate entries that a given entry may have.
 
Attributes are the elements responsible for storing information in a directory, and the schema defines the rules for which attributes may be used in an entry, the kinds of values that those attributes may have, and how clients may interact with those values.
The schema defines ''object classes''. Each entry must have an objectClass attribute, containing named classes defined in the schema. The schema definition of the classes of an entry defines what kind of object the entry may represent - e.g. a person, organization or ___domain. The object class definitions also list which attributes the entry MAY and MUST contain. For example, an entry representing a person might belong to the classes "top" and "person". Membership in the "person" class would require the entry to contain the "sn" and "cn" attributes, and allow the entry also to contain "userPassword", "telephoneNumber", and other attributes. Since entries may belong to multiple classes, each entry has a complex of optional and mandatory attribute sets formed from the union of the object classes it represents.
 
Clients may learn about the schema elements that the server supports by retrieving an appropriate subschema subentry.
The schema also includes various other information controlling directory entries.
 
The schema defines ''object classes''. Each entry must have an objectClass attribute, containing named classes defined in the schema. The schema definition of the classes of an entry defines what kind of object the entry may represent - e.g. a person, organization or ___domain. The object class definitions also define the list of attributes that must contain values and the list of attributes which may contain values.
Most schema elements have a name and a globally unique [[Object identifier]] (OID).
 
For example, an entry representing a person might belong to the classes "top" and "person". Membership in the "person" class would require the entry to contain the "sn" and "cn" attributes, and allow the entry also to contain "userPassword", "telephoneNumber", and other attributes. Since entries may have multiple ObjectClasses values, each entry has a complex of optional and mandatory attribute sets formed from the union of the object classes it represents. ObjectClasses can be inherited, and a single entry can have multiple ObjectClasses values that define the available and required attributes of the entry itself. A parallel to the schema of an objectClass is a [[Class (computer science)|class]] definition and an [[Instantiation (computer science)|instance]] in [[Object-oriented programming]], representing LDAP objectClass and LDAP entry, respectively.
 
Directory servers may publish the directory schema controlling an entry at a base DN given by the entry's subschemaSubentry operational attribute. (An ''operational attribute'' describes operation of the directory rather than user information and is only returned from a search when it is explicitly requested.)
 
Server administrators can defineadd theiradditional ownschema schemasentries in addition to the standardprovided onesschema elements. A schema for representing individual people within organizations is termed a [[white pages schema]].
 
==Security vulnerabilities==
==Variations==
A lot of the server operation is left to the implementor or administrator to decide. Accordingly, servers may be set up to support a wide variety of scenarios.
 
===LDAP injection===
For example, data storage in the server is not specified - the server may use flat files, databases, or just be a gateway to some other server. Access control is not standardized, though there has been work on it and there are commonly used models. Users' passwords may be stored in their entries or elsewhere. The server may refuse to perform operations when it wishes, and impose various limits.
 
LDAP injection is a [[cyberattack|computer security attack]] similar to [[SQL injection]] that can occur when an application implementing LDAP fails to properly sanitize user input.<ref>{{cite web |url=https://owasp.org/www-community/attacks/LDAP_Injection |publisher=OWASP Foundation |website=[[OWASP]] |title=LDAP Injection Description }}</ref>
Most parts of LDAP are extensible. Examples: One can define new operations. ''Controls'' may modify requests and responses, e.g. to request sorted search results. New search scopes and Bind methods can be defined. Attributes can have ''options'' that may modify their semantics.
 
As an example, consider an LDAP search query that allows the user to search people by their name, the <code>cn</code> attribute. A malicious user might replace a valid name with the <code>*</code> character, which matches any object with the <code>cn</code> attribute. If the application is vulnerable to this attack, it may display attributes that the searching user is not authorized to see.<ref>{{cite book |url=https://books.google.com/books?id=cTI9EQAAQBAJ&dq=ldap+injection&pg=SA10-PA51 |title=A Beginner's Guide To Web Application Penetration Testing |first=Ali |last=Abdollahi |year=2025 |isbn=9781394295609 |publisher=Wiley }}</ref>
==Other data models==
As LDAP has gained momentum, vendors have provided it as an access protocol to other services. The implementation then recasts the data to mimic the LDAP/X.500 model, but how closely this model is followed varies. For example, there is software to access [[SQL]] databases through LDAP, even though LDAP does not readily lend itself to this. [[X.500]] servers may support LDAP as well.
 
LDAP injection vulnerabilities are mitigated by [[escape sequence|escaping]] variables. Escaping is accomplished with two distinct encoding functions {{mdash}} one for Distinguished Names and one for search strings {{mdash}} because they each allow different special characters. Some web frameworks come with escaping built in.<ref>{{cite report |url=https://cheatsheetseries.owasp.org/cheatsheets/LDAP_Injection_Prevention_Cheat_Sheet.html |publisher=OWASP Foundation |title=LDAP Injection Prevention Cheat Sheet }}</ref>
Similarly, data which were previously held in other types of data stores are sometimes moved to LDAP directories. For example, Unix user and group information can be stored in LDAP and accessed via [[Pluggable Authentication Modules|PAM]] and [[Name Service Switch|NSS]] modules. LDAP is often used by other services for authentication.
 
===Man-in-the-middle attacks===
==Usage==
 
Like other parts of TCP/IP, LDAP was originally created without encryption. This makes it vulnerable to [[man-in-the-middle]] attacks, in which attackers intercept credentials during the bind process. This attack can be mitigated by requiring LDAPS or StartLDAP during every bind involving credentials.<ref>{{cite book |url=https://books.google.com/books?id=j4FiEQAAQBAJ&dq=ldap+man+in+the+middle&pg=PT224 |title=LDAP Architecture and Implementation: Definitive Reference for Developers and Engineers
===Applications===
|first=Richard |last=Johnson |year=2025 |publisher=HiTeX Press }}</ref>
One reason to choose LDAP for a service is that it is quite widely supported, and data presented in LDAP is thus immediately available to many clients and libraries. Another is that LDAP is very general and includes basic features like security, and can support many types of applications.
 
==Variations==
Thus, if one chooses a few general protocols like LDAP and [[Hypertext Transfer Protocol|HTTP]] for various services, one can focus on these few protocols instead of having to maintain and upgrade many specialized protocols.
Much of the server operation is left to the implementor or administrator to decide. Accordingly, servers may be set up to support a wide variety of scenarios.
 
For example, data storage in the server is not specified - the server may use flat files, databases, or just be a gateway to some other server. Access control is not standardized, though there are commonly used models. Users' passwords may be stored in their entries or elsewhere. The server may refuse to perform operations when it wishes, and impose various limits.
Two common applications of LDAP are for computer user/group data, and for address book information (persons, departments etc). Many e-mail clients support LDAP lookups.
 
Most parts of LDAP are extensible. Examples: One can define new operations. ''Controls'' may modify requests and responses, e.g. to request sorted search results. New search scopes and Bind methods can be defined. Attributes can have ''options'' that may modify their semantics.
Some tasks LDAP does not handle well are to model a relational database, and data whose ordering must be preserved. (Though an extension does exist for the latter.)
 
===NamingOther structure=data models==
As LDAP has gained momentum, vendors have provided it as an access protocol to other services. The implementation then recasts the data to mimic the LDAP/X.500 model, but how closely this model is followed varies. For example, there is software to access [[SQL]] databases through LDAP, even though LDAP does not readily lend itself to this.<ref>[http://www.openldap.org/doc/admin24/backends.html#SQL Openldap.org]</ref> X.500 servers may support LDAP as well.
Since an LDAP server can return referrals to other servers for requests the server itself will not/can not serve, a naming structure for LDAP entries is needed so one can find a server holding a given DN. Since such a structure already exists in the [[Domain name system]] (DNS), servers' top level names often mimic DNS names.
 
Similarly, data previously held in other types of data stores are sometimes moved to LDAP directories. For example, Unix user and group information can be stored in LDAP and accessed via [[Pluggable Authentication Modules|PAM]] and [[Name Service Switch|NSS]] modules. LDAP is often used by other services for authentication and/or authorization (what actions a given already-authenticated user can do on what service). For example, in Active Directory Kerberos is used in the authentication step, while LDAP is used in the authorization step.
If an organization has ___domain name foo.bar.baz, its top level LDAP entry will therefore typically have the DN dc=foo,dc=bar,dc=baz (where dc means ___domain component). If the ldap server is also named ldap.foo.bar.baz, the organization's top level LDAP URL becomes ldap://ldap.foo.bar.baz/dc=foo,dc=bar,dc=baz.
 
An example of such data model is the GLUE Schema,<ref>[https://www.ogf.org/documents/GFD.218.pdf Open Grid Forum : Project Home<!-- Bot generated title -->]</ref> which is used in a distributed information system based on LDAP that enable users, applications and services to discover which services exist in a Grid infrastructure and further information about their structure and state.
Below the top level, the entry names will typically reflect the organization's internal structure or needs rather than DNS names.
 
==TerminologyUsage==
An LDAP server may return referrals to other servers for requests that it cannot fulfill itself. This requires a naming structure for LDAP entries so one can find a server holding a given distinguished name (DN), a concept defined in the X.500 Directory and also used in LDAP. Another way of locating LDAP servers for an organization is a DNS [[SRV record|server record]] (SRV).
The LDAP terminology one can encounter is quite a mess. Some of this is due to misunderstandings, other examples are due to its historical origins, others arise when used with non-X.500 services that use different terminology.
 
An organization with the ___domain example.org may use the top level LDAP DN <code>dc=example, dc=org</code> (where ''dc'' means ___domain component). If the LDAP server is also named ldap.example.org, the organization's top level LDAP URL becomes <code>ldap://ldap.example.org/dc=example,dc=org</code>.
For example, "LDAP" is sometimes used to refer to the protocol, other times to the protocol and the data. An "LDAP directory" may be the data or also the access point. An "attribute" may be the attribute type, or the contents of an attribute in a directory, or an attribute description (an attribute type with ''options''). An "anonymous" and an "unauthenticated" Bind are different Bind methods that both produce anonymous authentication state, so both terms are being used for both variants. The "uid" attribute should hold user names rather than numeric user IDs.
 
Primarily two common styles of naming are used in both X.500 [2008] and LDAPv3. These are documented in the ITU specifications and IETF RFCs. The original form takes the top level object as the country object, such as <code>c=US</code>, <code>c=FR</code>. The ___domain component model uses the model described above. An example of country based naming could be <code>l=Locality, ou=Some Organizational Unit, o=Some Organization, c=FR</code>, or in the US: <code>cn=Common Name, l=Locality, ou=Some Organizational Unit, o=Some Organization, st=CA, c=US</code>.
==Supporting vendors==
LDAP has gained wide support from vendors such as:
* [[Apache Software Foundation|Apache]] (through [[Apache Directory Server]])
* [[Apple Computer|Apple]] (through Open Directory/OpenLDAP)
* [[AT&T]]
* [[Avaya]] (through [[Directory Enabled Management]])
* [[Banyan (company)|Banyan]]
* [http://www.ca.com/ CA] (through [http://www3.ca.com/solutions/Product.aspx?ID=160 eTrust Directory])
* [http://www.cisco.com/ Cisco]
* [http://www.criticalpath.net/ Critical Path]
* [[eB2Bcom]] (through [[View500]])
* [[RedHat]] through Fedora Directory Server aka Red Hat Directory server
* [[Hewlett-Packard]]
* [[Identyx]]
* [[International Business Machines|IBM]]/[[Lotus Development|Lotus]]
* [[ISODE]] (through M-Vault server)
* [http://www.maxware.com/ MaXware] (through MaXware Virtual Directory)
* [[Microsoft]] (through [[Active Directory]])
* [[Netscape]] (now in [[Sun Microsystems]] and [[Red Hat]] products)
* [[NITIX]]
* [[Novell]] (through [[Novell eDirectory|eDirectory]])
* [[OctetString]] (through VDE server)
* [[Oracle Corporation|Oracle]] (through [[Oracle Internet Directory]])
* [[Radiant Logic]] (through RadiantOne Virtual Directory Server)
* [http://www.redhat.com/en_us/USA/home/solutions/directoryserver/ Red Hat Directory Server ]
* [[Siemens AG]] (through DirX server)
* [[Silicon Graphics|SGI]] and
* [[Sun Microsystems|Sun Microsystems]] [http://www.sun.com/software/products/directory_srvr_ee/index.xml Directory Server Enterprise Edition 6] and Sun Java Systems Directory Server 5.2
* [http://www.symlabs.com/ Symlabs] (through [http://www.symlabs.com/Products/DirExt.html Directory Extender 3.0])
as well as in [[open source]]/[[free software]] implementations such as [[OpenLDAP]], [[Fedora Directory Server]] and the [http://lds.linbox.org Linbox Directory Server].
Also the [[Apache HTTP Server]] used as a [[proxy]] (by the module mod_proxy) supports LDAP.
 
==See also==
===LDAP implementations===
* [[Ambiguous name resolution]]
* [http://directory.apache.org Apache Directory Server]
* [[CCSO Nameserver]]
* [http://www3.ca.com/solutions/Product.aspx?ID=160 CA eTrust Directory]
* [[Federated Naming Service]]
* [http://theLDAPcompany.com AE SLAPD LDAP Server for Windows]
* [[Hesiod (name service)]]
* [http://www.criticalpath.net/ Critical Path] Directory Server and Meta Directory Server
* [[Hierarchical database model]]
* [http://directory.fedora.redhat.com Fedora Directory Server]
* [[Key server (cryptographic)]]
* [http://www.redhat.com/software/rha/directory/ Red Hat Directory Server]
* [[LDAP Application Program Interface]]
* [[OpenLDAP]]
* [[List of LDAP software]]
* [http://www.novell.com/products/edirectory/ Novell eDirectory]
* [[Simple Authentication and Security Layer]] (SASL)
* [http://www.sun.com/dsee Sun Directory Server Enterprise Edition]
* [[IBM SecureWay Directory]]
* [[IBM Tivoli Directory Server]] (formerly IBM Directory Server)
* [[IBM Lotus Domino]]
* [http://www.microsoft.com/windowsserver2003/technologies/directory/activedirectory/default.mspx Windows Server 2003 Active Directory]
* [http://www.siemens.com Siemens] DirX
* [http://www.view500.com View500]
* [http://en.wikipedia.org/wiki/Oracle_Internet_Directory Oracle Internet Directory]
* [http://www.fefe.de/tinyldap/ tinyldap] a small LDAP implementation
 
===LDAP clients and libraries===
* [http://www.plangear.com/ldapxl/ LDAPxl], A directory services add-in for Microsoft Office that allows you to query LDAP servers and import data directly into your Excel worksheet, Word document, and Access database.
* [http://lds.linbox.org Linbox Directory Server], offers a [[Web-interface]] to manage the [[Samba (software)|Samba]] [[___domain controller]] and the LDAP [[directory service]].
* [[phpLDAPadmin]], a web-based LDAP browser/server manager
* [http://edsadmin.sourceforge.net/ EDS Admin tool]
* [http://www.softerra.com/products/ldapbrowser.php Softerra] Freeware Browser and paid for Administrator products
* [http://www.jxplorer.org JXplorer java OSS LDAP Client]
* [[GQ (software)|GQ]] ([http://sourceforge.net/projects/gqclient Homepage]) (GTK+ based)
* [[Luma (Software)|Luma]] ([http://luma.sourceforge.net Homepage]), written in Python (Qt based)
* [http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP.pod Net::LDAP] Perl API, written in Perl
* [http://www.perldap.org PerLDAP], an interface to the C SDK API, and a set of Object Oriented Perl classes
* [http://python-ldap.sourceforge.net/ Python-LDAP], LDAP API for the [[Python (programming language)|Python]] language
* [http://rubyforge.org/projects/ruby-activeldap/ ActiveLDAP], Object oriented LDAP API for [[Ruby programming language|Ruby]]
* [http://rubyforge.org/projects/net-ldap/ Ruby Net::LDAP], Pure [[Ruby programming language|Ruby]] LDAP API
* [http://www.maxware.com/ MaXware] - Directory Explorer (free Windows LDAP Browser client)
* [http://www.mozilla.org/directory/ Mozilla Directory (LDAP) SDK Project] - clients and C, Java and Perl libraries
* [http://oss.gonicus.de/gosa/index.php/Main_Page Gosa ] Gosa: A PHP Based Admin tool
* [http://jamm.sourceforge.net/ Jamm] Jamm, (Java Mail Manager) is a web application to manage virtual email account information stored in an LDAP directory.
* [http://ldapadmin.sourceforge.net/ LDAP Admin], an open source LDAP client for Windows
* [http://www.symlabs.com/ Symlabs] Virtual Directory Server - LDAP Proxy - LDAP Gateway
* [http://www.ldapservices.com/ LDAP Services] LDAP clients for ActiveX and .Net
 
==References==
{{FOLDOCReflist}}
 
* [http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/ic/&toc=comp/mags/ic/2004/05/w5toc.xml&DOI=10.1109/MIC.2004.44]LDAP: Framework, Practices, and Trends
===Sources===
* The [[X.500]] series - ITU-T Rec. X.500 to X.521
* [[Abstract syntax notation one|ITU-T Rec. X.680]], "Abstract Syntax Notation One (ASN.1) - Specification of Basic Notation", 1994
* [[Basic encoding rules]] (BER) - ITU-T Rec. X.690, "Specification of ASN.1 encoding rules: Basic, Canonical, and Distinguished Encoding Rules", 1994
* {{IETF RFC|3641|link=no}} - [[Generic String Encoding Rules]] (GSER) for ASN.1 Types
* RFC 4346 - The [[Transport Layer Security|TLS]] Protocol Version 1.1
* {{IETF RFC|4346|link=no}} - The [[Transport Layer Security|TLS]] Protocol Version 1.1
* RFC 4422 - Simple Authentication and Security Layer ([[SASL]])
* {{IETF RFC|4422|link=no}} - Simple Authentication and Security Layer ([[Simple Authentication and Security Layer|SASL]])
* [http://www.iana.org/assignments/sasl-mechanisms SASL mechanisms] registered at IANA
* SASL mechanisms registered at IANA
 
==SeeFurther alsoreading==
* {{Cite book | last=Arkills | first=B | title=LDAP Directories Explained: An Introduction and Analysis | publisher=[[Addison-Wesley Professional]] | year=2003 | isbn=978-0-201-78792-4 | url=http://www.informit.com/store/ldap-directories-explained-an-introduction-and-analysis-9780201787924 }}
* [[LDAP Data Interchange Format]] (LDIF)
* {{Cite book | last=Carter | first=G | title=LDAP System Administration | publisher=[[O'Reilly Media]] | year=2003 | isbn=978-1-56592-491-8 | url=https://archive.org/details/ldapsystemadmini00cart | url-access=registration }}
* [[LDAP Application Program Interface]]
* {{Cite book | last=Donley | first=C | title=LDAP Programming, Management, and Integration | publisher=[[Manning Publications]] | year=2002 | isbn=978-1-930110-40-3 }}
* [[Directory service]]
* {{Cite book | last1=Howes | first1=T | last2=Smith | first2=M | last3=Good | first3=G | title=Understanding and Deploying LDAP Directory Services | publisher=[[Addison-Wesley Professional]] | year=2003 | isbn=978-0-672-32316-4 | url=http://www.informit.com/store/understanding-and-deploying-ldap-directory-services-9780672323164}}
* [[X.500]]
* {{Cite book | last=Rhoton | first=J | title=Programmer's Guide to Internet Mail: SMTP, POP, IMAP, and LDAP | publisher=Elsevier | year=1999 | isbn=978-1-55558-212-8}}
* [[Transport Layer Security|Transport Layer Security (TLS)]]
* {{Cite book | last=Voglmaier | first=R | title=The ABCs of LDAP: How to Install, Run, and Administer LDAP Services | publisher=Auerbach Publications | year=2003 | isbn=978-0-8493-1346-2}}
* [[SASL|Simple Authentication and Security Layer (SASL)]]
 
==External links==
*List of public LDAP Servers (2013): {{Cite web|url=https://ldapwiki.com/wiki/Public%20LDAP%20Servers|title=Ldapwiki: Public LDAP Servers|website=ldapwiki.com|access-date=2020-01-18|date=2013}}
*[http://www.ldapservices.com/ ActiveX and .Net LDAP libraries] LDAP Services
*[http://www.paldap.org/ PALDAP, A Lazy Directory Administrator's Pal] An LDAP Wiki
*[http://www.emailman.com/ldap/public.html Public LDAP Servers] Look up people at many different universities, institutions, etc.
*[http://www.tldp.org/HOWTO/LDAP-HOWTO/ Linux LDAP HOWTO]
*[http://www.bind9.net/ldap/ LDAP Articles, Links, Whitepapers]
*[http://www.bind9.net/ldap-tools LDAP Software, Tools & Utilities]
*[http://twistedmatrix.com/users/tv/ldap-intro/ldap-intro.html Nice Neat Introduction To LDAP with examples ]
*[http://www.ilex.fr/openldap.htm OpenLDAP install for Windows with support of the LDAPS protocol]
*[http://forge.novell.com/modules/xfmod/project/showfiles.php?group_id=1318 LDAP Libraries for C#].
*[http://www.zytrax.com/books/ldap/ LDAP for Rocket Scientists] - Comprehensive LDAP Guide/Tutorial
*[http://www.mark-macdonald.com/ldap/ OpenLDAP Chaining] - A guide to chaining implementation with OpenLDAP
*[http://www.freesoftwaremagazine.com/free_issues/issue_03/ldap/ The importance of LDAP] A commentary by Tom Jackiewicz about LDAP
*[http://nermus.its.ac.id/show/main.php?track0=3&track1=0&&howto=central-auth&xml=no HOWTO on LDAP + SASL + KERBEROS Master/Slave Central Authentication] A Complex Howto By Danang Wijanarko
*[http://www.techie-blogs.com/wordpress/web/net/ldap-to-sql-perl-code/ LDAP to SQL] - Perl code extracting from a hierarchical structure and producing a relational one
*[http://wiki.debian.org/LDAP A Wiki for using LDAP in Debian]
*[http://yolinux.com/TUTORIALS/LinuxTutorialLDAP.html A loose collection of Linux LDAP tutorials]
*[http://www.nabber.org/projects/oneldap/ OneLDAP] An LDAP gateway to standard protocols like POP3 and IMAP.
*[http://www.skills-1st.co.uk/papers/ldap-schema-design-feb-2005/index.html LDAP schema design]
*[http://www.skills-1st.co.uk/papers/security-with-ldap-jan-2002/index.html Security with LDAP]
===Articles===
* [http://www.trizsite.com/articles/jul2006/Inventions%20on%20LDAP%20data%20storage-%20A%20study%20based%20on%20US%20patents.pdf Inventions on LDAP data storage- A study based on US patents ]
* [http://www.trizsite.com/articles/jul2006/Inventions%20on%20LDAP%20data%20storage-%20A%20TRIZ%20based%20analysis.pdf Inventions on LDAP data storage- A TRIZ based analysis]
* [http://www.trizsite.com/articles/aug2006/Inventions%20on%20LDAP%20security-%20A%20TRIZ%20based%20analysis.pdf Inventions on LDAP security- A TRIZ based analysis]
* [http://www.trizsite.com/articles/aug2006/Inventions%20on%20LDAP%20data%20management-%20a%20TRIZ%20based%20analysis.pdf Inventions on LDAP data management- a TRIZ based analysis ]
* [http://www.trizsite.com/articles/aug2006/Inventions%20on%20LDAP%20Administration-%20A%20TRIZ%20based%20analysis.pdf Inventions on LDAP Administration- A TRIZ based analysis ]
* [http://www.trizsite.com/articles/aug2006/Inventions%20on%20Data%20Searching%20in%20LDAP.pdf Inventions on Data Searching in LDAP- A TRIZ based analysis ]
* [http://www.trizsite.com/articles/aug2006/Inventions%20on%20LDAP%20access%20interface.pdf Inventions on LDAP access interface- a TRIZ based analysis ]
* [http://www.trizsite.com/articles/sep2006/Inventions%20on%20Extending%20LDAP%20functionality.pdf Inventions on Extending LDAP functionality- A TRIZ based Analysis ]
* [http://www.trizsite.com/articles/sep2006/Inventions%20on%20Integrating%20LDAP%20with%20other%20directories.pdf Inventions on Integrating LDAP with other directories- A TRIZ based analysis ]
* [http://www.trizsite.com/articles/sep2006/Inventions%20on%20using%20LDAP%20for%20different%20purposes-Part-1.pdf Inventions on using LDAP for different purposes-Part-1]
* [http://www.trizsite.com/articles/sep2006/Inventions%20on%20using%20LDAP%20for%20different%20purposes-Part-2.pdf Inventions on using LDAP for different purposes-Part-2]
* [http://www.trizsite.com/articles/sep2006/Inventions%20on%20using%20LDAP%20for%20different%20purposes-Part-3.pdf Inventions on using LDAP for different purposes-Part-3 ]
 
{{Open Group standards}}
===LDAP fora===
{{Query languages}}
* [http://www.umich.edu/~dirsvcs/ldap/mailinglist.html LDAP mailinglist at umich.edu]
* "#ldap" [[Internet Relay Chat|IRC]] channel in the [[freenode]] IRC network
* [http://www.ietf.org/html.charters/ldapbis-charter.html LDAP (v3) Revision (ldapbis) Working Group]
* [https://www1.ietf.org/mailman/listinfo/ldapext LDAPext] (LDAP Extensions) mailing list - originally created for an [[IETF]] [[working group]]. The list is archived at [[Gmane]].
 
{{Authority control}}
===RFCs===
LDAP is currently specified in a series of [[Request for Comments]] documents:
* RFC 4510 - Lighweight Directory Access Protocol (LDAP) Technical Specification Roadmap (replaced the previous LDAP Technical specification, RFC 3377, in its entirety)
* RFC 4511 - Lightweight Directory Access Protocol (LDAP): The Protocol
* RFC 4512 - Lightweight Directory Access Protocol (LDAP): Directory Information Models
* RFC 4513 - Lightweight Directory Access Protocol (LDAP): Authentication Methods and Security Mechanisms
* RFC 4514 - Lightweight Directory Access Protocol (LDAP): String Representation of Distinguished Names
* RFC 4515 - Lightweight Directory Access Protocol (LDAP): String Representation of Search Filters
* RFC 4516 - Lightweight Directory Access Protocol (LDAP): Uniform Resource Locator
* RFC 4517 - Lightweight Directory Access Protocol (LDAP): Syntaxes and Matching Rules
* RFC 4518 - Lightweight Directory Access Protocol (LDAP): Internationalized String Preparation
* RFC 4519 - Lightweight Directory Access Protocol (LDAP): Schema for User Applications
 
The following RFCs detail LDAP-specific Best Current Practices:
* RFC 4520 (also BCP 64) - Internet Assigned Numbers Authority (IANA) Considerations for the Lightweight Directory Access Protocol (LDAP) (replaced RFC 3383)
* RFC 4521 (also BCP 118) - Considerations for Lightweight Directory Access Protocol (LDAP) Extensions
 
The following is a partial list of RFCs specifying LDAPv3 extensions:
* RFC 2247 - Use of [[Domain Name System|DNS]] domains in distinguished names
* RFC 2307 - Using LDAP as a [[Network Information Service]]
* RFC 2589 - LDAPv3: Dynamic Directory Services Extensions
* RFC 2649 - LDAPv3 Operational Signatures
* RFC 2696 - LDAP Simple Paged Result Control
* RFC 2798 - inetOrgPerson LDAP Object Class
* RFC 2849 - The LDAP Data Interchange Format ([[LDIF]])
* RFC 2891 - Server Side Sorting of Search Results
* RFC 3045 - Storing Vendor Information in the LDAP root DSE
* RFC 3062 - LDAP Password Modify Extended Operation
* RFC 3296 - Named Subordinate References in LDAP Directories
* RFC 3671 - Collective Attributes in LDAP
* RFC 3672 - Subentries in LDAP
* RFC 3673 - LDAPv3: All Operational Attributes
* RFC 3687 - LDAP Component Matching Rules
* RFC 3698 - LDAP: Additional Matching Rules
* RFC 3829 - LDAP Authorization Identity Controls
* RFC 3866 - Language Tags and Ranges in LDAP
* RFC 3909 - LDAP Cancel Operation
* RFC 3928 - LDAP Client Update Protocol
* RFC 4370 - LDAP Proxied Authorization Control
* RFC 4373 - LBURP
* RFC 4403 - LDAP Schema for UDDI
* RFC 4522 - LDAP: Binary Encoding Option
* RFC 4523 - LDAP: X.509 Certificate Schema
* RFC 4524 - LDAP: COSINE Schema (replaces RFC 1274)
* RFC 4525 - LDAP: Modify-Increment Extension
* RFC 4526 - LDAP: Absolute True and False Filters
* RFC 4527 - LDAP: Read Entry Controls
* RFC 4528 - LDAP: Assertion Control
* RFC 4529 - LDAP: Requesting Attributes by Object Class
* RFC 4530 - LDAP: entryUUID
* RFC 4531 - LDAP Turn Operation
* RFC 4532 - LDAP Who am I? Operation
* RFC 4533 - LDAP Content Sync Operation
 
LDAPv2 was specified in the following RFCs:
* RFC 1777 - Lightweight Directory Access Protocol (replaced RFC 1487)
* RFC 1778 - The String Representation of Standard Attribute Syntaxes (replaced RFC 1488)
* RFC 1779 - A String Representation of Distinguished Names (replaced RFC 1485)
 
LDAPv2 was moved to historic status by the following RFC:
* RFC 3494 - Lightweight Directory Access Protocol version 2 (LDAPv2) to Historic Status
 
{{DEFAULTSORT:Ldap}}
[[Category:Application layer protocols]]
[[Category:Directory services]]
[[Category:Internet protocols]]
[[Category:Internet standardsStandards]]
[[Category:IdentityOpen managementGroup standards]]
 
[[ar:إل داب]]
[[bs:LDAP]]
[[bg:LDAP]]
[[cv:LDAP]]
[[cs:LDAP]]
[[de:Lightweight Directory Access Protocol]]
[[es:LDAP]]
[[eu:LDAP]]
[[fr:Lightweight Directory Access Protocol]]
[[id:LDAP]]
[[it:Lightweight Directory Access Protocol]]
[[nl:Lightweight Directory Access Protocol]]
[[ja:Lightweight Directory Access Protocol]]
[[no:Lightweight Directory Access Protocol]]
[[pl:Lightweight Directory Access Protocol]]
[[pt:Lightweight Directory Access Protocol]]
[[ro:LDAP]]
[[ru:LDAP]]
[[sk:LDAP]]
[[fi:LDAP]]
[[sv:LDAP]]
[[tr:LDAP]]
[[uk:Простий протокол доступу до каталогів]]
[[zh:轻型目录访问协议]]