draft-ietf-ldapbis-protocol-28.txt   draft-ietf-ldapbis-protocol-29.txt 
Internet-Draft Editor: J. Sermersheim Internet-Draft Editor: J. Sermersheim
Intended Category: Standard Track Novell, Inc Intended Category: Standard Track Novell, Inc
Document: draft-ietf-ldapbis-protocol-28.txt Nov 2004 Document: draft-ietf-ldapbis-protocol-29.txt Feb 2005
Obsoletes: RFCs 2251, 2830, 3771 Obsoletes: RFCs 2251, 2830, 3771
LDAP: The Protocol LDAP: The Protocol
Status of this Memo Status of this Memo
This document is an Internet-Draft and is subject to all provisions This document is an Internet-Draft and is subject to all provisions
of section 3 of RFC 3667. By submitting this Internet-Draft, each of section 3 of RFC 3667. By submitting this Internet-Draft, each
author represents that any applicable patent or other IPR claims of author represents that any applicable patent or other IPR claims of
which he or she is aware have been or will be disclosed, and any of which he or she is aware have been or will be disclosed, and any of
skipping to change at line 57 skipping to change at line 58
(LDAP). LDAP provides access to distributed directory services that (LDAP). LDAP provides access to distributed directory services that
act in accordance with X.500 data and service models. These protocol act in accordance with X.500 data and service models. These protocol
elements are based on those described in the X.500 Directory Access elements are based on those described in the X.500 Directory Access
Protocol (DAP). Protocol (DAP).
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
Table of Contents Table of Contents
1. Introduction....................................................3 1. Introduction....................................................3
1.1. Relationship to Obsolete Specifications.......................3 1.1. Relationship to Other LDAP Specifications.....................3
2. Conventions.....................................................3 2. Conventions.....................................................3
3. Protocol Model..................................................4 3. Protocol Model..................................................4
3.1 Operation and LDAP Exchange Relationship.......................4 3.1 Operation and LDAP Message Layer Relationship..................4
4. Elements of Protocol............................................5 4. Elements of Protocol............................................5
4.1. Common Elements...............................................5 4.1. Common Elements...............................................5
4.1.1. Message Envelope............................................5 4.1.1. Message Envelope............................................5
4.1.2. String Types................................................7 4.1.2. String Types................................................7
4.1.3. Distinguished Name and Relative Distinguished Name..........7 4.1.3. Distinguished Name and Relative Distinguished Name..........7
4.1.4. Attribute Descriptions......................................8 4.1.4. Attribute Descriptions......................................8
4.1.5. Attribute Value.............................................8 4.1.5. Attribute Value.............................................8
4.1.6. Attribute Value Assertion...................................8 4.1.6. Attribute Value Assertion...................................8
4.1.7. Attribute and PartialAttribute..............................9 4.1.7. Attribute and PartialAttribute..............................9
4.1.8. Matching Rule Identifier....................................9 4.1.8. Matching Rule Identifier....................................9
4.1.9. Result Message..............................................9 4.1.9. Result Message..............................................9
4.1.10. Referral..................................................11 4.1.10. Referral..................................................11
4.1.11. Controls..................................................12 4.1.11. Controls..................................................12
4.2. Bind Operation...............................................14 4.2. Bind Operation...............................................14
4.3. Unbind Operation.............................................17 4.3. Unbind Operation.............................................17
4.4. Unsolicited Notification.....................................17 4.4. Unsolicited Notification.....................................17
4.5. Search Operation.............................................18
4.6. Modify Operation.............................................28 4.6. Modify Operation.............................................28
4.7. Add Operation................................................29 4.7. Add Operation................................................29
4.8. Delete Operation.............................................30 4.8. Delete Operation.............................................30
4.9. Modify DN Operation..........................................31 4.9. Modify DN Operation..........................................31
4.10. Compare Operation...........................................32 4.10. Compare Operation...........................................32
4.11. Abandon Operation...........................................33 4.11. Abandon Operation...........................................33
4.12. Extended Operation..........................................34 4.12. Extended Operation..........................................34
4.13. IntermediateResponse Message................................35 4.13. IntermediateResponse Message................................35
4.13.1. Usage with LDAP ExtendedRequest and ExtendedResponse......36 4.13.1. Usage with LDAP ExtendedRequest and ExtendedResponse......36
4.13.2. Usage with LDAP Request Controls..........................36 4.13.2. Usage with LDAP Request Controls..........................36
4.14. StartTLS Operation..........................................36 4.14. StartTLS Operation..........................................36
5. Protocol Encoding, Connection, and Transfer....................38 5. Protocol Encoding, Connection, and Transfer....................38
5.2. Protocol Encoding............................................39 5.1. Protocol Encoding............................................38
5.3. Transmission Control Protocol (TCP)..........................39 5.2. Transmission Control Protocol (TCP)..........................39
5.3. Termination of the LDAP session..............................39
6. Security Considerations........................................39 6. Security Considerations........................................39
7. Acknowledgements...............................................41 7. Acknowledgements...............................................41
8. Normative References...........................................41 8. Normative References...........................................41
9. Informative References.........................................43 9. Informative References.........................................43
10. IANA Considerations...........................................43 10. IANA Considerations...........................................43
11. Editor's Address..............................................43 11. Editor's Address..............................................43
Appendix A - LDAP Result Codes....................................44 Appendix A - LDAP Result Codes....................................45
A.1 Non-Error Result Codes........................................44 A.1 Non-Error Result Codes........................................45
A.2 Result Codes..................................................44 A.2 Result Codes..................................................45
Appendix B - Complete ASN.1 Definition............................49 Appendix B - Complete ASN.1 Definition............................50
Appendix C - Changes..............................................55 Appendix C - Changes..............................................56
C.1 Changes made to RFC 2251:.....................................55 C.1 Changes made to RFC 2251:.....................................56
C.2 Changes made to RFC 2830:.....................................60 C.2 Changes made to RFC 2830:.....................................61
C.3 Changes made to RFC 3771:.....................................61 C.3 Changes made to RFC 3771:.....................................62
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
1. Introduction 1. Introduction
The Directory is "a collection of open systems cooperating to provide The Directory is "a collection of open systems cooperating to provide
directory services" [X.500]. A directory user, which may be a human directory services" [X.500]. A directory user, which may be a human
or other entity, accesses the Directory through a client (or or other entity, accesses the Directory through a client (or
Directory User Agent (DUA)). The client, on behalf of the directory Directory User Agent (DUA)). The client, on behalf of the directory
user, interacts with one or more servers (or Directory System Agents user, interacts with one or more servers (or Directory System Agents
(DSA)). Clients interact with servers using a directory access (DSA)). Clients interact with servers using a directory access
skipping to change at line 306 skipping to change at line 304
The function of the LDAPMessage is to provide an envelope containing The function of the LDAPMessage is to provide an envelope containing
common fields required in all protocol exchanges. At this time the common fields required in all protocol exchanges. At this time the
only common fields are the messageID and the controls. only common fields are the messageID and the controls.
If the server receives a PDU from the client in which the LDAPMessage If the server receives a PDU from the client in which the LDAPMessage
SEQUENCE tag cannot be recognized, the messageID cannot be parsed, SEQUENCE tag cannot be recognized, the messageID cannot be parsed,
the tag of the protocolOp is not recognized as a request, or the the tag of the protocolOp is not recognized as a request, or the
encoding structures or lengths of data fields are found to be encoding structures or lengths of data fields are found to be
incorrect, then the server SHOULD return the Notice of Disconnection incorrect, then the server SHOULD return the Notice of Disconnection
described in Section 4.4.1, with the resultCode set to protocolError, described in Section 4.4.1, with the resultCode set to protocolError,
and MUST immediately close the transport connection. and MUST immediately terminate the LDAP session as described in
Section 5.3.
In other cases where the client or server cannot parse a PDU, it In other cases where the client or server cannot parse a PDU, it
SHOULD abruptly close the transport connection where further SHOULD abruptly terminate the LDAP session (Section 5.3) where
communication (including providing notice) would be further communication (including providing notice) would be
pernicious. Otherwise, server implementations MUST return an pernicious. Otherwise, server implementations MUST return an
appropriate response to the request, with the resultCode set to appropriate response to the request, with the resultCode set to
protocolError. protocolError.
4.1.1.1. Message ID 4.1.1.1. Message ID
All LDAPMessage envelopes encapsulating responses contain the All LDAPMessage envelopes encapsulating responses contain the
messageID value of the corresponding request LDAPMessage. messageID value of the corresponding request LDAPMessage.
The message ID of a request MUST have a non-zero value different from The message ID of a request MUST have a non-zero value different from
skipping to change at line 483 skipping to change at line 479
request. request.
LDAPResult ::= SEQUENCE { LDAPResult ::= SEQUENCE {
resultCode ENUMERATED { resultCode ENUMERATED {
success (0), success (0),
operationsError (1), operationsError (1),
protocolError (2), protocolError (2),
timeLimitExceeded (3), timeLimitExceeded (3),
sizeLimitExceeded (4), sizeLimitExceeded (4),
compareFalse (5), compareFalse (5),
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
compareTrue (6), compareTrue (6),
authMethodNotSupported (7), authMethodNotSupported (7),
strongAuthRequired (8), strongerAuthRequired (8),
-- 9 reserved -- -- 9 reserved --
referral (10), referral (10),
adminLimitExceeded (11), adminLimitExceeded (11),
unavailableCriticalExtension (12), unavailableCriticalExtension (12),
confidentialityRequired (13), confidentialityRequired (13),
saslBindInProgress (14), saslBindInProgress (14),
noSuchAttribute (16), noSuchAttribute (16),
undefinedAttributeType (17), undefinedAttributeType (17),
inappropriateMatching (18), inappropriateMatching (18),
constraintViolation (19), constraintViolation (19),
skipping to change at line 594 skipping to change at line 588
Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI
URI ::= LDAPString -- limited to characters permitted in URI ::= LDAPString -- limited to characters permitted in
-- URIs -- URIs
If the client wishes to progress the operation, it contacts one of If the client wishes to progress the operation, it contacts one of
the supported services found in the referral. If multiple URIs are the supported services found in the referral. If multiple URIs are
present, the client assumes that any supported URI may be used to present, the client assumes that any supported URI may be used to
progress the operation. progress the operation.
Protocol peers that follow referrals MUST ensure that they do not Clients that follow referrals MUST ensure that they do not loop
loop between servers. They MUST NOT repeatedly contact the same between servers. They MUST NOT repeatedly contact the same server for
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
server for the same request with the same parameters. Some the same request with the same parameters. Some clients use a counter
implementations use a counter that is incremented each time referral that is incremented each time referral handling occurs for an
handling occurs for an operation, and these kinds of implementations operation, and these kinds of clients MUST be able to handle at least
MUST be able to handle at least ten nested referrals between the root ten nested referrals while progressing the operation.
and a leaf entry.
A URI for a server implementing LDAP and accessible via [TCP]/[IP] A URI for a server implementing LDAP and accessible via [TCP]/[IP]
(v4 or v6) is written as an LDAP URL according to [LDAPURL]. (v4 or v6) is written as an LDAP URL according to [LDAPURL].
Referral values which are LDAP URLs follow these rules: Referral values which are LDAP URLs follow these rules:
- If an alias was dereferenced, the <dn> part of the URL MUST be - If an alias was dereferenced, the <dn> part of the LDAP URL MUST
present, with the new target object name. be present, with the new target object name.
- It is RECOMMENDED that the <dn> part be present to avoid - It is RECOMMENDED that the <dn> part be present to avoid
ambiguity. ambiguity.
- If the <dn> part is present, the client uses this name in its next - If the <dn> part is present, the client uses this name in its next
request to progress the operation, and if it is not present the request to progress the operation, and if it is not present the
client uses the same name as in the original request. client uses the same name as in the original request.
- Some servers (e.g. participating in distributed indexing) may - Some servers (e.g. participating in distributed indexing) may
provide a different filter in a URL of a referral for a Search provide a different filter in a URL of a referral for a Search
skipping to change at line 643 skipping to change at line 635
is used by the client to progress the operation. is used by the client to progress the operation.
- Other aspects of the new request may be the same as or different - Other aspects of the new request may be the same as or different
from the request which generated the referral. from the request which generated the referral.
Other kinds of URIs may be returned. The syntax and semantics of such Other kinds of URIs may be returned. The syntax and semantics of such
URIs is left to future specifications. Clients may ignore URIs that URIs is left to future specifications. Clients may ignore URIs that
they do not support. they do not support.
UTF-8 encoded characters appearing in the string representation of a UTF-8 encoded characters appearing in the string representation of a
DN, search filter, or other fields may not be legal for URLs (e.g. DN, search filter, or other fields of the referral value may not be
spaces) and MUST be escaped using the % method in [URI]. legal for URIs (e.g. spaces) and MUST be escaped using the % method
in [URI].
4.1.11. Controls 4.1.11. Controls
Controls provide a mechanism whereby the semantics and arguments of Controls provide a mechanism whereby the semantics and arguments of
existing LDAP operations may be extended. One or more controls may be existing LDAP operations may be extended. One or more controls may be
attached to a single LDAP message. A control only affects the attached to a single LDAP message. A control only affects the
semantics of the message it is attached to. semantics of the message it is attached to.
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
skipping to change at line 816 skipping to change at line 808
BindResponse to indicate the status of authentication. BindResponse to indicate the status of authentication.
After sending a BindRequest, clients MUST NOT send further LDAP PDUs After sending a BindRequest, clients MUST NOT send further LDAP PDUs
until receiving the BindResponse. Similarly, servers SHOULD NOT until receiving the BindResponse. Similarly, servers SHOULD NOT
process or respond to requests received while processing a process or respond to requests received while processing a
BindRequest. BindRequest.
If the client did not bind before sending a request and receives an If the client did not bind before sending a request and receives an
operationsError to that request, it may then send a BindRequest. If operationsError to that request, it may then send a BindRequest. If
this also fails or the client chooses not to bind on the existing this also fails or the client chooses not to bind on the existing
LDAP session, it may close the transport connection, reopen it and LDAP session, it may terminate the LDAP session, re-establish it and
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
begin again by first sending a PDU with a BindRequest. This will aid begin again by first sending a PDU with a BindRequest. This will aid
in interoperating with servers implementing other versions of LDAP. in interoperating with servers implementing other versions of LDAP.
Clients may send multiple Bind requests to change the authentication Clients may send multiple Bind requests to change the authentication
and/or security associations or to complete a multi-stage Bind and/or security associations or to complete a multi-stage Bind
process. Authentication from earlier binds is subsequently ignored. process. Authentication from earlier binds is subsequently ignored.
For some SASL authentication mechanisms, it may be necessary for the For some SASL authentication mechanisms, it may be necessary for the
skipping to change at line 865 skipping to change at line 856
set in the BindResponse. For BindResponse, the protocolError result set in the BindResponse. For BindResponse, the protocolError result
code may be used to indicate that the version number supplied by the code may be used to indicate that the version number supplied by the
client is unsupported. client is unsupported.
If the client receives a BindResponse where the resultCode is set to If the client receives a BindResponse where the resultCode is set to
protocolError, it is to assume that the server does not support this protocolError, it is to assume that the server does not support this
version of LDAP. While the client may be able proceed with another version of LDAP. While the client may be able proceed with another
version of this protocol (this may or may not require closing and re- version of this protocol (this may or may not require closing and re-
establishing the transport connection), how to proceed with another establishing the transport connection), how to proceed with another
version of this protocol is beyond the scope of this document. version of this protocol is beyond the scope of this document.
Clients which are unable or unwilling to proceed SHOULD close the Clients which are unable or unwilling to proceed SHOULD terminate the
transport connection. LDAP session.
The serverSaslCreds field is used as part of a SASL-defined bind The serverSaslCreds field is used as part of a SASL-defined bind
mechanism to allow the client to authenticate the server to which it mechanism to allow the client to authenticate the server to which it
is communicating, or to perform "challenge-response" authentication. is communicating, or to perform "challenge-response" authentication.
If the client bound with the simple choice, or the SASL mechanism If the client bound with the simple choice, or the SASL mechanism
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
does not require the server to return information to the client, then does not require the server to return information to the client, then
this field SHALL NOT be included in the BindResponse. this field SHALL NOT be included in the BindResponse.
4.3. Unbind Operation 4.3. Unbind Operation
The function of the Unbind operation is to terminate an LDAP session. The function of the Unbind operation is to terminate an LDAP session.
The Unbind operation is not the antithesis of the Bind operation as The Unbind operation is not the antithesis of the Bind operation as
the name implies. The naming of these operations are historical. The the name implies. The naming of these operations are historical. The
skipping to change at line 890 skipping to change at line 880
The function of the Unbind operation is to terminate an LDAP session. The function of the Unbind operation is to terminate an LDAP session.
The Unbind operation is not the antithesis of the Bind operation as The Unbind operation is not the antithesis of the Bind operation as
the name implies. The naming of these operations are historical. The the name implies. The naming of these operations are historical. The
Unbind operation should be thought of as the "quit" operation. Unbind operation should be thought of as the "quit" operation.
The Unbind operation is defined as follows: The Unbind operation is defined as follows:
UnbindRequest ::= [APPLICATION 2] NULL UnbindRequest ::= [APPLICATION 2] NULL
The client, upon transmission of the UnbindRequest, and the server, The client, upon transmission of the UnbindRequest, and the server,
upon receipt of the UnbindRequest are to close the LDAP session as upon receipt of the UnbindRequest are to gracefully terminate the
follows: LDAP session as described in Section 5.3.
- cease exchanges at the LDAP message layer,
- close the SASL layer (if installed),
- close the TLS layer (if installed), and
- close the transport connection.
Uncompleted operations are handled as specified in Section 5.1. Uncompleted operations are handled as specified in Section 3.1.
4.4. Unsolicited Notification 4.4. Unsolicited Notification
An unsolicited notification is an LDAPMessage sent from the server to An unsolicited notification is an LDAPMessage sent from the server to
the client which is not in response to any LDAPMessage received by the client which is not in response to any LDAPMessage received by
the server. It is used to signal an extraordinary condition in the the server. It is used to signal an extraordinary condition in the
server or in the LDAP session between the client and the server. The server or in the LDAP session between the client and the server. The
notification is of an advisory nature, and the server will not expect notification is of an advisory nature, and the server will not expect
any response to be returned from the client. any response to be returned from the client.
skipping to change at line 927 skipping to change at line 912
consists of: consists of:
- the OBJECT IDENTIFIER assigned to the notification (to be - the OBJECT IDENTIFIER assigned to the notification (to be
specified in the responseName, specified in the responseName,
- the format of the contents of the responseValue (if any), - the format of the contents of the responseValue (if any),
- the circumstances which will cause the notification to be sent, - the circumstances which will cause the notification to be sent,
and and
Lightweight Directory Access Protocol Version 3
- the semantics of the message. - the semantics of the message.
4.4.1. Notice of Disconnection 4.4.1. Notice of Disconnection
Lightweight Directory Access Protocol Version 3
This notification may be used by the server to advise the client that This notification may be used by the server to advise the client that
the server is about to close the transport connection on its own the server is about to terminate the LDAP session on its own
initiative. This notification is intended to assist clients in initiative. This notification is intended to assist clients in
distinguishing between an exceptional server condition and a distinguishing between an exceptional server condition and a
transient network failure. Note that this notification is not a transient network failure. Note that this notification is not a
response to an Unbind requested by the client. Uncompleted operations response to an Unbind requested by the client. Uncompleted operations
are handled as specified in Section 5.1. are handled as specified in Section 3.1.
The responseName is 1.3.6.1.4.1.1466.20036, the responseValue field The responseName is 1.3.6.1.4.1.1466.20036, the responseValue field
is absent, and the resultCode is used to indicate the reason for the is absent, and the resultCode is used to indicate the reason for the
disconnection. When the strongAuthRequired resultCode is returned disconnection. When the strongerAuthRequired resultCode is returned
with this message, it indicates that the server has detected that an with this message, it indicates that the server has detected that an
established security association between the client and server has established security association between the client and server has
unexpectedly failed or been compromised. unexpectedly failed or been compromised.
Upon transmission of the Notice of Disconnection, the server MUST Upon transmission of the Notice of Disconnection, the server
cease transmission of messages to the client, and MUST close the gracefully terminates the LDAP session as described in Section 5.3.
transport connection.
4.5. Search Operation 4.5. Search Operation
The Search operation is used to request a server to return, subject The Search operation is used to request a server to return, subject
to access controls and other restrictions, a set of entries matching to access controls and other restrictions, a set of entries matching
a complex search criterion. This can be used to read attributes from a complex search criterion. This can be used to read attributes from
a single entry, from entries immediately subordinate to a particular a single entry, from entries immediately subordinate to a particular
entry, or a whole subtree of entries. entry, or a whole subtree of entries.
4.5.1. Search Request 4.5.1. Search Request
skipping to change at line 980 skipping to change at line 963
... }, ... },
derefAliases ENUMERATED { derefAliases ENUMERATED {
neverDerefAliases (0), neverDerefAliases (0),
derefInSearching (1), derefInSearching (1),
derefFindingBaseObj (2), derefFindingBaseObj (2),
derefAlways (3) }, derefAlways (3) },
sizeLimit INTEGER (0 .. maxInt), sizeLimit INTEGER (0 .. maxInt),
timeLimit INTEGER (0 .. maxInt), timeLimit INTEGER (0 .. maxInt),
typesOnly BOOLEAN, typesOnly BOOLEAN,
filter Filter, filter Filter,
Lightweight Directory Access Protocol Version 3
attributes AttributeSelection } attributes AttributeSelection }
AttributeSelection ::= SEQUENCE OF selector LDAPString AttributeSelection ::= SEQUENCE OF selector LDAPString
-- The LDAPString is constrained to -- The LDAPString is constrained to
-- <attributeSelector> below -- <attributeSelector> in Section 4.5.1.7
Lightweight Directory Access Protocol Version 3
Filter ::= CHOICE { Filter ::= CHOICE {
and [0] SET SIZE (1..MAX) OF filter Filter, and [0] SET SIZE (1..MAX) OF filter Filter,
or [1] SET SIZE (1..MAX) OF filter Filter, or [1] SET SIZE (1..MAX) OF filter Filter,
not [2] Filter, not [2] Filter,
equalityMatch [3] AttributeValueAssertion, equalityMatch [3] AttributeValueAssertion,
substrings [4] SubstringFilter, substrings [4] SubstringFilter,
greaterOrEqual [5] AttributeValueAssertion, greaterOrEqual [5] AttributeValueAssertion,
lessOrEqual [6] AttributeValueAssertion, lessOrEqual [6] AttributeValueAssertion,
present [7] AttributeDescription, present [7] AttributeDescription,
skipping to change at line 1033 skipping to change at line 1014
semantics as the X.500 Search operation. semantics as the X.500 Search operation.
4.5.1.1 SearchRequest.baseObject 4.5.1.1 SearchRequest.baseObject
The name of the base object entry (or possibly the root) relative to The name of the base object entry (or possibly the root) relative to
which the Search is to be performed. which the Search is to be performed.
4.5.1.2 SearchRequest.scope 4.5.1.2 SearchRequest.scope
Specifies the scope of the Search to be performed. The semantics (as Specifies the scope of the Search to be performed. The semantics (as
described in [X.511]) of the possible values of this field are: described in [X.511]) of the defined values of this field are:
Lightweight Directory Access Protocol Version 3
baseObject: The scope is constrained to the entry named by baseObject: The scope is constrained to the entry named by
baseObject. baseObject.
singleLevel: The scope is constrained to the immediate singleLevel: The scope is constrained to the immediate
subordinates of the entry named by baseObject. subordinates of the entry named by baseObject.
Lightweight Directory Access Protocol Version 3
wholeSubtree: the scope is constrained to the entry named by the wholeSubtree: the scope is constrained to the entry named by the
baseObject, and all its subordinates. baseObject, and all its subordinates.
4.5.1.3 SearchRequest.derefAliases 4.5.1.3 SearchRequest.derefAliases
An indicator as to how alias entries (as defined in [Models]) are to An indicator as to whether or not alias entries (as defined in
be handled in searching. The semantics of the defined values of this [Models]) are to be dereferenced during stages of the Search
field are: operation.
The act of dereferencing an alias includes recursively dereferencing
aliases which refer to aliases.
Servers MUST detect looping while dereferencing aliases in order to
prevent denial of service attacks of this nature.
The semantics of the defined values of this field are:
neverDerefAliases: Do not dereference aliases in searching or in neverDerefAliases: Do not dereference aliases in searching or in
locating the base object of the Search. locating the base object of the Search.
derefInSearching: While searching subordinates of the base object, derefInSearching: While searching subordinates of the base object,
dereference any alias within the search scope (the act of dereference any alias within the search scope. Dereferenced
dereferencing an alias includes recursively dereferencing aliases objects become the vertices of further search scopes where the
which refer to aliases). Dereferenced objects become the vertices Search operation is also applied. If the search scope is
of further search scopes where the Search operation continues. If wholeSubtree, the Search continues in the subtree(s) of any
the search scope is wholeSubtree, the Search continues in the dereferenced object. If the search scope is singleLevel, the
subtree(s) of any dereferenced object. If the search scope is search is applied to any dereferenced objects, and is not applied
singleLevel, the search is applied to any dereferenced objects, to their subordinates. Servers SHOULD eliminate duplicate entries
and is not applied to their subordinates. Servers SHOULD eliminate that arise due to alias dereferencing while searching.
duplicate entries that arise due to alias dereferencing while
searching.
derefFindingBaseObj: Dereference aliases in locating the base derefFindingBaseObj: Dereference aliases in locating the base
object of the Search, but not when searching subordinates of the object of the Search, but not when searching subordinates of the
base object. base object.
derefAlways: Dereference aliases both in searching and in locating derefAlways: Dereference aliases both in searching and in locating
the base object of the Search. the base object of the Search.
Servers MUST detect looping while dereferencing aliases in order to
prevent denial of service attacks of this nature.
4.5.1.4 SearchRequest.sizeLimit 4.5.1.4 SearchRequest.sizeLimit
A size limit that restricts the maximum number of entries to be A size limit that restricts the maximum number of entries to be
returned as a result of the Search. A value of zero in this field returned as a result of the Search. A value of zero in this field
indicates that no client-requested size limit restrictions are in indicates that no client-requested size limit restrictions are in
effect for the Search. Servers may also enforce a maximum number of effect for the Search. Servers may also enforce a maximum number of
entries to return. entries to return.
4.5.1.5 SearchRequest.timeLimit 4.5.1.5 SearchRequest.timeLimit
Lightweight Directory Access Protocol Version 3
A time limit that restricts the maximum time (in seconds) allowed for A time limit that restricts the maximum time (in seconds) allowed for
a Search. A value of zero in this field indicates that no client- a Search. A value of zero in this field indicates that no client-
requested time limit restrictions are in effect for the Search. requested time limit restrictions are in effect for the Search.
Servers may also enforce a maximum time limit for the Search. Servers may also enforce a maximum time limit for the Search.
Lightweight Directory Access Protocol Version 3
4.5.1.6 SearchRequest.typesOnly 4.5.1.6 SearchRequest.typesOnly
An indicator as to whether Search results are to contain both An indicator as to whether Search results are to contain both
attribute descriptions and values, or just attribute descriptions. attribute descriptions and values, or just attribute descriptions.
Setting this field to TRUE causes only attribute descriptions (no Setting this field to TRUE causes only attribute descriptions (no
values) to be returned. Setting this field to FALSE causes both values) to be returned. Setting this field to FALSE causes both
attribute descriptions and values to be returned. attribute descriptions and values to be returned.
4.5.1.7 SearchRequest.filter 4.5.1.7 SearchRequest.filter
skipping to change at line 1141 skipping to change at line 1125
able to determine whether the assertion value matches an entry. able to determine whether the assertion value matches an entry.
Examples include: Examples include:
- An attribute description in an equalityMatch, substrings, - An attribute description in an equalityMatch, substrings,
greaterOrEqual, lessOrEqual, approxMatch or extensibleMatch greaterOrEqual, lessOrEqual, approxMatch or extensibleMatch
filter is not recognized by the server. filter is not recognized by the server.
- The attribute type does not define the appropriate matching - The attribute type does not define the appropriate matching
rule. rule.
Lightweight Directory Access Protocol Version 3
- A MatchingRuleId in the extensibleMatch is not recognized by - A MatchingRuleId in the extensibleMatch is not recognized by
the server or is not valid for the attribute type. the server or is not valid for the attribute type.
- The type of filtering requested is not implemented. - The type of filtering requested is not implemented.
Lightweight Directory Access Protocol Version 3
- The assertion value is invalid. - The assertion value is invalid.
For example, if a server did not recognize the attribute type For example, if a server did not recognize the attribute type
shoeSize, a filter of (shoeSize=*) would evaluate to FALSE, and the shoeSize, a filter of (shoeSize=*) would evaluate to FALSE, and the
filters (shoeSize=12), (shoeSize>=12) and (shoeSize<=12) would each filters (shoeSize=12), (shoeSize>=12) and (shoeSize<=12) would each
evaluate to Undefined. evaluate to Undefined.
Servers MUST NOT return errors if attribute descriptions or matching Servers MUST NOT return errors if attribute descriptions or matching
rule ids are not recognized, assertion values are invalid, or the rule ids are not recognized, assertion values are invalid, or the
assertion syntax is not supported. More details of filter processing assertion syntax is not supported. More details of filter processing
skipping to change at line 1193 skipping to change at line 1177
The matching rule for the greaterOrEqual filter item is defined by The matching rule for the greaterOrEqual filter item is defined by
the ORDERING and EQUALITY matching rules for the attribute type. the ORDERING and EQUALITY matching rules for the attribute type.
4.5.1.7.4 SearchRequest.filter.lessOrEqual 4.5.1.7.4 SearchRequest.filter.lessOrEqual
The matching rule for the lessOrEqual filter item is defined by the The matching rule for the lessOrEqual filter item is defined by the
ORDERING matching rule for the attribute type. ORDERING matching rule for the attribute type.
4.5.1.7.5 SearchRequest.filter.present 4.5.1.7.5 SearchRequest.filter.present
Lightweight Directory Access Protocol Version 3
The present match evaluates to TRUE where there is an attribute or The present match evaluates to TRUE where there is an attribute or
subtype of the specified attribute description present in an entry, subtype of the specified attribute description present in an entry,
Lightweight Directory Access Protocol Version 3
and FALSE otherwise (including a presence test with an unrecognized and FALSE otherwise (including a presence test with an unrecognized
attribute description). attribute description).
4.5.1.7.6 SearchRequest.filter.approxMatch 4.5.1.7.6 SearchRequest.filter.approxMatch
An approxMatch filter item evaluates to TRUE when there is a value of An approxMatch filter item evaluates to TRUE when there is a value of
the attribute or subtype for which some locally-defined approximate the attribute or subtype for which some locally-defined approximate
matching algorithm (e.g. spelling variations, phonetic match, etc.) matching algorithm (e.g. spelling variations, phonetic match, etc.)
returns TRUE. If an item matches for equality, it also satisfies an returns TRUE. If an item matches for equality, it also satisfies an
approximate match. If approximate matching is not supported for the approximate match. If approximate matching is not supported for the
skipping to change at line 1244 skipping to change at line 1228
The matchingRule used for evaluation determines the syntax for the The matchingRule used for evaluation determines the syntax for the
assertion value. Once the matchingRule and attribute(s) have been assertion value. Once the matchingRule and attribute(s) have been
determined, the filter item evaluates to TRUE if it matches with at determined, the filter item evaluates to TRUE if it matches with at
least one attribute in the entry, FALSE if it does not match any least one attribute in the entry, FALSE if it does not match any
attribute in the entry, and Undefined if the matchingRule is not attribute in the entry, and Undefined if the matchingRule is not
recognized, the matchingRule is unsuitable for use with the specified recognized, the matchingRule is unsuitable for use with the specified
type, or the assertionValue is invalid. type, or the assertionValue is invalid.
4.5.1.7 SearchRequest.attributes 4.5.1.7 SearchRequest.attributes
Lightweight Directory Access Protocol Version 3
A selection list of the attributes to be returned from each entry A selection list of the attributes to be returned from each entry
which matches the search filter. LDAPString values of this field are which matches the search filter. LDAPString values of this field are
constrained to the following Augmented Backus-Naur Form ([ABNF]): constrained to the following Augmented Backus-Naur Form ([ABNF]):
attributeSelector = attributedescription / selectorpecial Lightweight Directory Access Protocol Version 3
attributeSelector = attributedescription / selectorspecial
selectorspecial = noattrs / alluserattrs selectorspecial = noattrs / alluserattrs
noattrs = %x31.2E.31 ; "1.1" noattrs = %x31.2E.31 ; "1.1"
alluserattrs = %x2A ; asterisk ("*") alluserattrs = %x2A ; asterisk ("*")
The <attributedescription> production is defined in Section 2.5 of The <attributedescription> production is defined in Section 2.5 of
[Models]. [Models].
skipping to change at line 1297 skipping to change at line 1281
listed by name. Operational attributes are described in [Models]. listed by name. Operational attributes are described in [Models].
Attributes are returned at most once in an entry. If an attribute Attributes are returned at most once in an entry. If an attribute
description is named more than once in the list, the subsequent names description is named more than once in the list, the subsequent names
are ignored. If an attribute description in the list is not are ignored. If an attribute description in the list is not
recognized, it is ignored by the server. recognized, it is ignored by the server.
4.5.2. Search Result 4.5.2. Search Result
The results of the Search operation are returned as zero or more The results of the Search operation are returned as zero or more
SearchResultEntry and/or zero or more SearchResultReference messages, SearchResultEntry and/or SearchResultReference messages, followed by
followed by a single SearchResultDone message. a single SearchResultDone message.
Lightweight Directory Access Protocol Version 3
SearchResultEntry ::= [APPLICATION 4] SEQUENCE { SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
objectName LDAPDN, objectName LDAPDN,
attributes PartialAttributeList } attributes PartialAttributeList }
Lightweight Directory Access Protocol Version 3
PartialAttributeList ::= SEQUENCE OF PartialAttributeList ::= SEQUENCE OF
partialAttribute PartialAttribute partialAttribute PartialAttribute
-- Note that the PartialAttributeList may hold zero elements.
-- This may happen when none of the attributes of an entry
-- were requested, or could be returned.
-- Note also that the partialAttribute vals set may hold zero
-- elements. This may happen when typesOnly is requested, access
-- controls prevent the return of values, or other reasons.
SearchResultReference ::= [APPLICATION 19] SEQUENCE SearchResultReference ::= [APPLICATION 19] SEQUENCE
SIZE (1..MAX) OF uri URI SIZE (1..MAX) OF uri URI
SearchResultDone ::= [APPLICATION 5] LDAPResult SearchResultDone ::= [APPLICATION 5] LDAPResult
Each SearchResultEntry represents an entry found during the Search. Each SearchResultEntry represents an entry found during the Search.
Each SearchResultReference represents an area not yet explored during Each SearchResultReference represents an area not yet explored during
the Search. The SearchResultEntry and SearchResultReference PDUs may the Search. The SearchResultEntry and SearchResultReference PDUs may
come in any order. Following all the SearchResultReference and come in any order. Following all the SearchResultReference and
SearchResultEntry responses, the server returns a SearchResultDone SearchResultEntry responses, the server returns a SearchResultDone
response, which contains an indication of success, or detailing any response, which contains an indication of success, or detailing any
errors that have occurred. errors that have occurred.
Each entry returned in a SearchResultEntry will contain all Each entry returned in a SearchResultEntry will contain all
appropriate attributes as specified in the attributes field of the appropriate attributes as specified in the attributes field of the
Search Request, subject to access control and other administrative Search Request, subject to access control and other administrative
policy. policy. Note that the PartialAttributeList may hold zero elements.
This may happen when none of the attributes of an entry were
requested, or could be returned. Note also that the partialAttribute
vals set may hold zero elements. This may happen when typesOnly is
requested, access controls prevent the return of values, or other
reasons.
Some attributes may be constructed by the server and appear in a Some attributes may be constructed by the server and appear in a
SearchResultEntry attribute list, although they are not stored SearchResultEntry attribute list, although they are not stored
attributes of an entry. Clients SHOULD NOT assume that all attributes attributes of an entry. Clients SHOULD NOT assume that all attributes
can be modified, even if permitted by access control. can be modified, even if permitted by access control.
If the server's schema defines short names [Models] for an attribute If the server's schema defines short names [Models] for an attribute
type then the server SHOULD use one of those names in attribute type then the server SHOULD use one of those names in attribute
descriptions for that attribute type (in preference to using the descriptions for that attribute type (in preference to using the
<numericoid> [Models] format of the attribute type's object <numericoid> [Models] format of the attribute type's object
identifier). The server SHOULD NOT use the short name if that name is identifier). The server SHOULD NOT use the short name if that name is
known by the server to be ambiguous, or otherwise likely to cause known by the server to be ambiguous, or otherwise likely to cause
interoperability problems. interoperability problems.
4.5.3. Continuation References in the Search Result 4.5.3. Continuation References in the Search Result
If the server was able to locate the entry referred to by the If the server was able to locate the entry referred to by the
baseObject but was unable to search one or more non-local entries, baseObject but was unable or unwilling to search one or more non-
the server may return one or more SearchResultReference messages, local entries, the server may return one or more
each containing a reference to another set of servers for continuing SearchResultReference messages, each containing a reference to
the operation. A server MUST NOT return any SearchResultReference another set of servers for continuing the operation. A server MUST
messages if it has not located the baseObject and thus has not NOT return any SearchResultReference messages if it has not located
the baseObject and thus has not searched any entries; in this case it
would return a SearchResultDone containing either a referral or
noSuchObject result code (depending on the server's knowledge of the
entry named in the baseObject).
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
searched any entries; in this case it would return a SearchResultDone
containing either a referral or noSuchObject result code (depending
on the server's knowledge of the entry named in the baseObject).
If a server holds a copy or partial copy of the subordinate naming If a server holds a copy or partial copy of the subordinate naming
context (Section 5 of [Models]), it may use the search filter to context (Section 5 of [Models]), it may use the search filter to
determine whether or not to return a SearchResultReference response. determine whether or not to return a SearchResultReference response.
Otherwise SearchResultReference responses are always returned when in Otherwise SearchResultReference responses are always returned when in
scope. scope.
The SearchResultReference is of the same data type as the Referral. The SearchResultReference is of the same data type as the Referral.
A URI for a server implementing LDAP and accessible via [TCP]/[IP] If the client wishes to progress the Search, it issues a new Search
(v4 or v6) is written as an LDAP URL according to [LDAPURL]. operation for each SearchResultReference that is returned. If
multiple URIs are present, the client assumes that any supported URI
In order to complete the Search, the client issues a new Search may be used to progress the operation.
operation for each SearchResultReference that is returned. Note that
the Abandon operation described in Section 4.11 applies only to a
particular operation sent at the LDAP message layer between a client
and server. The client must abandon subsequent Search operations it
wishes to individually.
Clients that follow search continuation references MUST ensure that Clients that follow search continuation references MUST ensure that
they do not loop between servers. They MUST NOT repeatedly contact they do not loop between servers. They MUST NOT repeatedly contact
the same server for the same request with the same target entry name, the same server for the same request with the same parameters. Some
scope and filter. Some clients use a counter that is incremented each clients use a counter that is incremented each time search result
time search result reference handling occurs for an operation, and reference handling occurs for an operation, and these kinds of
these kinds of clients MUST be able to handle at least ten nested clients MUST be able to handle at least ten nested referrals while
search result references between the root and a leaf entry. progressing the operation.
Note that the Abandon operation described in Section 4.11 applies
only to a particular operation sent at the LDAP message layer between
a client and server. The client must abandon subsequent Search
operations it wishes to individually.
A URI for a server implementing LDAP and accessible via [TCP]/[IP]
(v4 or v6) is written as an LDAP URL according to [LDAPURL].
SearchResultReference values which are LDAP URLs follow these rules: SearchResultReference values which are LDAP URLs follow these rules:
- The <dn> part of the URL MUST be present, with the new target - The <dn> part of the LDAP URL MUST be present, with the new target
object name. The client MUST use this name when following the object name. The client uses this name when following the
reference. UTF-8 encoded characters appearing in the string reference.
representation of a DN or search filter may not be legal for URLs
(e.g. spaces) and MUST be escaped using the % method in [URI].
- Some servers (e.g. participating in distributed indexing) may - Some servers (e.g. participating in distributed indexing) may
provide a different filter in a URL of a SearchResultReference. provide a different filter in the LDAP URL.
- If the <filter> part of the URL is present, the client MUST use - If the <filter> part of the LDAP URL is present, the client uses
this filter in its next request to progress this Search, and if it this filter in its next request to progress this Search, and if it
is not present the client MUST use the same filter as it used for is not present the client uses the same filter as it used for that
that Search. Search.
- If the originating search scope was singleLevel, the <scope> part - If the originating search scope was singleLevel, the <scope> part
of the URL will be "base". of the LDAP URL will be "base".
- It is RECOMMENDED that the <scope> part be present to avoid - It is RECOMMENDED that the <scope> part be present to avoid
ambiguity. In the absence of a <scope> part, the scope of the ambiguity. In the absence of a <scope> part, the scope of the
original Search request is assumed. original Search request is assumed.
Lightweight Directory Access Protocol Version 3
- Other aspects of the new Search request may be the same as or - Other aspects of the new Search request may be the same as or
different from the Search request which generated the different from the Search request which generated the
SearchResultReference. SearchResultReference.
Lightweight Directory Access Protocol Version 3
- The name of an unexplored subtree in a SearchResultReference need - The name of an unexplored subtree in a SearchResultReference need
not be subordinate to the base object. not be subordinate to the base object.
Other kinds of URIs may be returned. The syntax and semantics of such Other kinds of URIs may be returned. The syntax and semantics of such
URIs is left to future specifications. Clients may ignore URIs that URIs is left to future specifications. Clients may ignore URIs that
they do not support. they do not support.
UTF-8 encoded characters appearing in the string representation of a
DN, search filter, or other fields of the referral value may not be
legal for URIs (e.g. spaces) and MUST be escaped using the % method
in [URI].
4.5.3.1. Examples 4.5.3.1. Examples
For example, suppose the contacted server (hosta) holds the entry For example, suppose the contacted server (hosta) holds the entry
<DC=Example,DC=NET> and the entry <CN=Manager,DC=Example,DC=NET>. It <DC=Example,DC=NET> and the entry <CN=Manager,DC=Example,DC=NET>. It
knows that both LDAP servers (hostb) and (hostc) hold knows that both LDAP servers (hostb) and (hostc) hold
<OU=People,DC=Example,DC=NET> (one is the master and the other server <OU=People,DC=Example,DC=NET> (one is the master and the other server
a shadow), and that LDAP-capable server (hostd) holds the subtree a shadow), and that LDAP-capable server (hostd) holds the subtree
<OU=Roles,DC=Example,DC=NET>. If a wholeSubtree Search of <OU=Roles,DC=Example,DC=NET>. If a wholeSubtree Search of
<DC=Example,DC=NET> is requested to the contacted server, it may <DC=Example,DC=NET> is requested to the contacted server, it may
return the following: return the following:
skipping to change at line 1463 skipping to change at line 1451
ldap://hostf/OU=Consultants,OU=People,DC=Example,DC=NET??sub } ldap://hostf/OU=Consultants,OU=People,DC=Example,DC=NET??sub }
SearchResultDone (success) SearchResultDone (success)
Similarly, if a singleLevel Search of <DC=Example,DC=NET> is Similarly, if a singleLevel Search of <DC=Example,DC=NET> is
requested to the contacted server, it may return the following: requested to the contacted server, it may return the following:
SearchResultEntry for CN=Manager,DC=Example,DC=NET SearchResultEntry for CN=Manager,DC=Example,DC=NET
SearchResultReference { SearchResultReference {
ldap://hostb/OU=People,DC=Example,DC=NET??base ldap://hostb/OU=People,DC=Example,DC=NET??base
ldap://hostc/OU=People,DC=Example,DC=NET??base } ldap://hostc/OU=People,DC=Example,DC=NET??base }
SearchResultReference {
ldap://hostd/OU=Roles,DC=Example,DC=NET??base }
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
SearchResultReference {
ldap://hostd/OU=Roles,DC=Example,DC=NET??base }
SearchResultDone (success) SearchResultDone (success)
If the contacted server does not hold the base object for the Search, If the contacted server does not hold the base object for the Search,
but has knowledge of its possible location, then it may return a but has knowledge of its possible location, then it may return a
referral to the client. In this case, if the client requests a referral to the client. In this case, if the client requests a
subtree Search of <DC=Example,DC=ORG> to hosta, the server returns a subtree Search of <DC=Example,DC=ORG> to hosta, the server returns a
SearchResultDone containing a referral. SearchResultDone containing a referral.
SearchResultDone (referral) { SearchResultDone (referral) {
ldap://hostg/DC=Example,DC=ORG??sub } ldap://hostg/DC=Example,DC=ORG??sub }
skipping to change at line 1517 skipping to change at line 1504
performed MUST conform to the requirements of the directory model performed MUST conform to the requirements of the directory model
and controlling schema [Models]. and controlling schema [Models].
- operation: Used to specify the type of modification being - operation: Used to specify the type of modification being
performed. Each operation type acts on the following performed. Each operation type acts on the following
modification. The values of this field have the following modification. The values of this field have the following
semantics respectively: semantics respectively:
add: add values listed to the modification attribute, add: add values listed to the modification attribute,
creating the attribute if necessary; creating the attribute if necessary;
Lightweight Directory Access Protocol Version 3
delete: delete values listed from the modification attribute. delete: delete values listed from the modification attribute.
If no values are listed, or if all current values of the If no values are listed, or if all current values of the
attribute are listed, the entire attribute is removed; attribute are listed, the entire attribute is removed;
Lightweight Directory Access Protocol Version 3
replace: replace all existing values of the modification replace: replace all existing values of the modification
attribute with the new values listed, creating the attribute attribute with the new values listed, creating the attribute
if it did not already exist. A replace with no value will if it did not already exist. A replace with no value will
delete the entire attribute if it exists, and is ignored if delete the entire attribute if it exists, and is ignored if
the attribute does not exist. the attribute does not exist.
- modification: A PartialAttribute (which may have an empty SET - modification: A PartialAttribute (which may have an empty SET
of vals) used to hold the attribute type or attribute type and of vals) used to hold the attribute type or attribute type and
values being modified. values being modified.
skipping to change at line 1572 skipping to change at line 1558
Section 2.5.1 of [Models] are followed. Section 2.5.1 of [Models] are followed.
Note that due to the simplifications made in LDAP, there is not a Note that due to the simplifications made in LDAP, there is not a
direct mapping of the changes in an LDAP ModifyRequest onto the direct mapping of the changes in an LDAP ModifyRequest onto the
changes of a DAP ModifyEntry operation, and different implementations changes of a DAP ModifyEntry operation, and different implementations
of LDAP-DAP gateways may use different means of representing the of LDAP-DAP gateways may use different means of representing the
change. If successful, the final effect of the operations on the change. If successful, the final effect of the operations on the
entry MUST be identical. entry MUST be identical.
4.7. Add Operation 4.7. Add Operation
Lightweight Directory Access Protocol Version 3
The Add operation allows a client to request the addition of an entry The Add operation allows a client to request the addition of an entry
into the Directory. The Add Request is defined as follows: into the Directory. The Add Request is defined as follows:
Lightweight Directory Access Protocol Version 3
AddRequest ::= [APPLICATION 8] SEQUENCE { AddRequest ::= [APPLICATION 8] SEQUENCE {
entry LDAPDN, entry LDAPDN,
attributes AttributeList } attributes AttributeList }
AttributeList ::= SEQUENCE OF attribute Attribute AttributeList ::= SEQUENCE OF attribute Attribute
Fields of the Add Request are: Fields of the Add Request are:
- entry: the name of the entry to be added. The server SHALL NOT - entry: the name of the entry to be added. The server SHALL NOT
dereference any aliases in locating the entry to be added. dereference any aliases in locating the entry to be added.
skipping to change at line 1625 skipping to change at line 1610
A response of success indicates that the new entry has been added to A response of success indicates that the new entry has been added to
the Directory. the Directory.
4.8. Delete Operation 4.8. Delete Operation
The Delete operation allows a client to request the removal of an The Delete operation allows a client to request the removal of an
entry from the Directory. The Delete Request is defined as follows: entry from the Directory. The Delete Request is defined as follows:
DelRequest ::= [APPLICATION 10] LDAPDN DelRequest ::= [APPLICATION 10] LDAPDN
Lightweight Directory Access Protocol Version 3
The Delete Request consists of the name of the entry to be deleted. The Delete Request consists of the name of the entry to be deleted.
The server SHALL NOT dereference aliases while resolving the name of The server SHALL NOT dereference aliases while resolving the name of
the target entry to be removed. the target entry to be removed.
Lightweight Directory Access Protocol Version 3
Only leaf entries (those with no subordinate entries) can be deleted Only leaf entries (those with no subordinate entries) can be deleted
with this operation. with this operation.
Upon receipt of a Delete Request, a server will attempt to perform Upon receipt of a Delete Request, a server will attempt to perform
the entry removal requested and return the result in the Delete the entry removal requested and return the result in the Delete
Response defined as follows: Response defined as follows:
DelResponse ::= [APPLICATION 11] LDAPResult DelResponse ::= [APPLICATION 11] LDAPResult
4.9. Modify DN Operation 4.9. Modify DN Operation
skipping to change at line 1681 skipping to change at line 1665
existing entry. existing entry.
The server SHALL NOT dereference any aliases in locating the objects The server SHALL NOT dereference any aliases in locating the objects
named in entry or newSuperior. named in entry or newSuperior.
Upon receipt of a ModifyDNRequest, a server will attempt to perform Upon receipt of a ModifyDNRequest, a server will attempt to perform
the name change and return the result in the Modify DN Response, the name change and return the result in the Modify DN Response,
defined as follows: defined as follows:
ModifyDNResponse ::= [APPLICATION 13] LDAPResult ModifyDNResponse ::= [APPLICATION 13] LDAPResult
Lightweight Directory Access Protocol Version 3
For example, if the entry named in the entry field was <cn=John For example, if the entry named in the entry field was <cn=John
Smith,c=US>, the newrdn field was <cn=John Cougar Smith>, and the Smith,c=US>, the newrdn field was <cn=John Cougar Smith>, and the
newSuperior field was absent, then this operation would attempt to newSuperior field was absent, then this operation would attempt to
Lightweight Directory Access Protocol Version 3
rename the entry to be <cn=John Cougar Smith,c=US>. If there was rename the entry to be <cn=John Cougar Smith,c=US>. If there was
already an entry with that name, the operation would fail with the already an entry with that name, the operation would fail with the
entryAlreadyExists result code. entryAlreadyExists result code.
Servers MUST ensure that entries conform to user and system schema Servers MUST ensure that entries conform to user and system schema
rules or other data model constraints. For attribute types which rules or other data model constraints. For attribute types which
specify no equality matching, the rules in Section 2.5.1 of [Models] specify no equality matching, the rules in Section 2.5.1 of [Models]
are followed (this pertains to newrdn and deleteoldrdn). are followed (this pertains to newrdn and deleteoldrdn).
The object named in newSuperior MUST exist. For example, if the The object named in newSuperior MUST exist. For example, if the
skipping to change at line 1737 skipping to change at line 1719
- entry: the name of the entry to be compared. The server SHALL NOT - entry: the name of the entry to be compared. The server SHALL NOT
dereference any aliases in locating the entry to be compared. dereference any aliases in locating the entry to be compared.
- ava: holds the attribute value assertion to be compared. - ava: holds the attribute value assertion to be compared.
Upon receipt of a Compare Request, a server will attempt to perform Upon receipt of a Compare Request, a server will attempt to perform
the requested comparison and return the result in the Compare the requested comparison and return the result in the Compare
Response, defined as follows: Response, defined as follows:
Lightweight Directory Access Protocol Version 3
CompareResponse ::= [APPLICATION 15] LDAPResult CompareResponse ::= [APPLICATION 15] LDAPResult
The resultCode is set to compareTrue, compareFalse, or an appropriate The resultCode is set to compareTrue, compareFalse, or an appropriate
error. compareTrue indicates that the assertion value in the ava error. compareTrue indicates that the assertion value in the ava
Lightweight Directory Access Protocol Version 3
field matches a value of the attribute or subtype according to the field matches a value of the attribute or subtype according to the
attribute's EQUALITY matching rule. compareFalse indicates that the attribute's EQUALITY matching rule. compareFalse indicates that the
assertion value in the ava field and the values of the attribute or assertion value in the ava field and the values of the attribute or
subtype did not match. Other result codes indicate either that the subtype did not match. Other result codes indicate either that the
result of the comparison was Undefined (Section 4.5.1), or that some result of the comparison was Undefined (Section 4.5.1), or that some
error occurred. error occurred.
Note that some directory systems may establish access controls which Note that some directory systems may establish access controls which
permit the values of certain attributes (such as userPassword) to be permit the values of certain attributes (such as userPassword) to be
compared but not interrogated by other means. compared but not interrogated by other means.
skipping to change at line 1780 skipping to change at line 1761
by the MessageID. Since the client cannot tell the difference between by the MessageID. Since the client cannot tell the difference between
a successfully abandoned operation and an uncompleted operation, the a successfully abandoned operation and an uncompleted operation, the
application of the Abandon operation is limited to uses where the application of the Abandon operation is limited to uses where the
client does not require an indication of its outcome. client does not require an indication of its outcome.
Abandon, Bind, Unbind, and StartTLS operations cannot be abandoned. Abandon, Bind, Unbind, and StartTLS operations cannot be abandoned.
In the event that a server receives an Abandon Request on a Search In the event that a server receives an Abandon Request on a Search
operation in the midst of transmitting responses to the Search, that operation in the midst of transmitting responses to the Search, that
server MUST cease transmitting entry responses to the abandoned server MUST cease transmitting entry responses to the abandoned
request immediately, and MUST NOT send the SearchResponseDone. Of request immediately, and MUST NOT send the SearchResultDone. Of
course, the server MUST ensure that only properly encoded LDAPMessage course, the server MUST ensure that only properly encoded LDAPMessage
PDUs are transmitted. PDUs are transmitted.
The ability to abandon other (particularly update) operations is at The ability to abandon other (particularly update) operations is at
the discretion of the server. the discretion of the server.
Clients should not send Abandon requests for the same operation Clients should not send Abandon requests for the same operation
multiple times, and MUST also be prepared to receive results from multiple times, and MUST also be prepared to receive results from
operations it has abandoned (since these may have been in transit operations it has abandoned (since these may have been in transit
when the Abandon was requested, or are not able to be abandoned). when the Abandon was requested, or are not able to be abandoned).
Lightweight Directory Access Protocol Version 3
Servers MUST discard Abandon requests for message IDs they do not Servers MUST discard Abandon requests for message IDs they do not
recognize, for operations which cannot be abandoned, and for recognize, for operations which cannot be abandoned, and for
operations which have already been abandoned. operations which have already been abandoned.
Lightweight Directory Access Protocol Version 3
4.12. Extended Operation 4.12. Extended Operation
The Extended operation allows additional operations to be defined for The Extended operation allows additional operations to be defined for
services not already available in the protocol. For example, to Add services not already available in the protocol. For example, to Add
operations to install transport layer security (see Section 4.14). operations to install transport layer security (see Section 4.14).
The Extended operation allows clients to make requests and receive The Extended operation allows clients to make requests and receive
responses with predefined syntaxes and semantics. These may be responses with predefined syntaxes and semantics. These may be
defined in RFCs or be private to particular implementations. defined in RFCs or be private to particular implementations.
skipping to change at line 1846 skipping to change at line 1827
protocolError. protocolError.
The requestValue and responseValue fields contain any information The requestValue and responseValue fields contain any information
associated with the operation. The format of these fields is defined associated with the operation. The format of these fields is defined
by the specification of the Extended operation. Implementations MUST by the specification of the Extended operation. Implementations MUST
be prepared to handle arbitrary contents of these fields, including be prepared to handle arbitrary contents of these fields, including
zero bytes. Values that are defined in terms of ASN.1 and BER encoded zero bytes. Values that are defined in terms of ASN.1 and BER encoded
according to Section 5.1, also follow the extensibility rules in according to Section 5.1, also follow the extensibility rules in
Section 4. Section 4.
Lightweight Directory Access Protocol Version 3
Servers list the requestName of Extended Requests they recognize in Servers list the requestName of Extended Requests they recognize in
the 'supportedExtension' attribute in the root DSE (Section 5.1 of the 'supportedExtension' attribute in the root DSE (Section 5.1 of
[Models]). [Models]).
Extended operations may be specified in other documents. The Extended operations may be specified in other documents. The
specification of an Extended operation consists of: specification of an Extended operation consists of:
Lightweight Directory Access Protocol Version 3
- the OBJECT IDENTIFIER assigned to the requestName, - the OBJECT IDENTIFIER assigned to the requestName,
- the OBJECT IDENTIFIER (if any) assigned to the responseName (note - the OBJECT IDENTIFIER (if any) assigned to the responseName (note
that the same OBJECT IDENTIFIER my be used for both the that the same OBJECT IDENTIFIER my be used for both the
requestName and responseName), requestName and responseName),
- the format of the contents of the requestValue and responseValue - the format of the contents of the requestValue and responseValue
(if any), and (if any), and
- the semantics of the operation. - the semantics of the operation.
skipping to change at line 1901 skipping to change at line 1882
unless the client issues a request that specifically solicits their unless the client issues a request that specifically solicits their
return. This document defines two forms of solicitation: Extended return. This document defines two forms of solicitation: Extended
operation and request control. IntermediateResponse messages are operation and request control. IntermediateResponse messages are
specified in documents describing the manner in which they are specified in documents describing the manner in which they are
solicited (i.e. in the Extended operation or request control solicited (i.e. in the Extended operation or request control
specification that uses them). These specifications include: specification that uses them). These specifications include:
- the OBJECT IDENTIFIER (if any) assigned to the responseName, - the OBJECT IDENTIFIER (if any) assigned to the responseName,
- the format of the contents of the responseValue (if any), and - the format of the contents of the responseValue (if any), and
Lightweight Directory Access Protocol Version 3
- the semantics associated with the IntermediateResponse message. - the semantics associated with the IntermediateResponse message.
Extensions that allow the return of multiple types of Extensions that allow the return of multiple types of
IntermediateResponse messages SHALL identify those types using unique IntermediateResponse messages SHALL identify those types using unique
responseName values (note that one of these may specify no value). responseName values (note that one of these may specify no value).
Lightweight Directory Access Protocol Version 3
Sections 4.13.1 and 4.13.2 describe additional requirements on the Sections 4.13.1 and 4.13.2 describe additional requirements on the
inclusion of responseName and responseValue in IntermediateResponse inclusion of responseName and responseValue in IntermediateResponse
messages. messages.
4.13.1. Usage with LDAP ExtendedRequest and ExtendedResponse 4.13.1. Usage with LDAP ExtendedRequest and ExtendedResponse
A single-request/multiple-response operation may be defined using a A single-request/multiple-response operation may be defined using a
single ExtendedRequest message to solicit zero or more single ExtendedRequest message to solicit zero or more
IntermediateResponse messages of one or more kinds followed by an IntermediateResponse messages of one or more kinds followed by an
ExtendedResponse message. ExtendedResponse message.
skipping to change at line 1951 skipping to change at line 1931
The Start Transport Layer Security (StartTLS) operation's purpose is The Start Transport Layer Security (StartTLS) operation's purpose is
to initiate installation of a TLS layer. The StartTLS operation is to initiate installation of a TLS layer. The StartTLS operation is
defined using the Extended operation mechanism described in Section defined using the Extended operation mechanism described in Section
4.12. 4.12.
4.14.1. StartTLS Request 4.14.1. StartTLS Request
A client requests TLS establishment by transmitting a StartTLS A client requests TLS establishment by transmitting a StartTLS
request PDU to the server. The StartTLS request is defined in terms request PDU to the server. The StartTLS request is defined in terms
Lightweight Directory Access Protocol Version 3
of an ExtendedRequest. The requestName is "1.3.6.1.4.1.1466.20037", of an ExtendedRequest. The requestName is "1.3.6.1.4.1.1466.20037",
and the requestValue field is always absent. and the requestValue field is always absent.
The client MUST NOT send any PDUs at this LDAP message layer The client MUST NOT send any PDUs at this LDAP message layer
following this request until it receives a StartTLS Extended response following this request until it receives a StartTLS Extended response
and, in the case of a successful response, completes TLS and, in the case of a successful response, completes TLS
negotiations. negotiations.
Lightweight Directory Access Protocol Version 3
Detected sequencing problems (particularly those detailed in Section Detected sequencing problems (particularly those detailed in Section
3.1.1 of [AuthMeth]) result in the resultCode being set to 3.1.1 of [AuthMeth]) result in the resultCode being set to
operationsError. operationsError.
If the server does not support TLS (whether by design or by current If the server does not support TLS (whether by design or by current
configuration), it returns with the resultCode set to protocolError configuration), it returns with the resultCode set to protocolError
as described in Section 4.12. as described in Section 4.12.
4.14.2. StartTLS Response 4.14.2. StartTLS Response
skipping to change at line 1988 skipping to change at line 1968
details. details.
If the server is otherwise unwilling or unable to perform this If the server is otherwise unwilling or unable to perform this
operation, the server is to return an appropriate result code operation, the server is to return an appropriate result code
indicating the nature of the problem. For example, if the TLS indicating the nature of the problem. For example, if the TLS
subsystem is not presently available, the server may indicate so by subsystem is not presently available, the server may indicate so by
returning with the resultCode set to unavailable. returning with the resultCode set to unavailable.
4.14.3. Removal of the TLS Layer 4.14.3. Removal of the TLS Layer
Two forms of TLS layer removal -- graceful and abrupt -- are
provided. These do not involve LDAP PDUs, but are preformed at the
underlying layers.
If the transport connection is closed, uncompleted operations are
handled as specified in Section 5.1.
4.14.3.1. Graceful Removal
Either the client or server MAY remove the TLS layer and leave the Either the client or server MAY remove the TLS layer and leave the
LDAP message layer intact by sending and receiving a TLS closure LDAP message layer intact by sending and receiving a TLS closure
alert. alert.
The initiating protocol peer sends the TLS closure alert. If it The initiating protocol peer sends the TLS closure alert. If it
wishes to leave the LDAP message layer intact, it then MUST cease to wishes to leave the LDAP message layer intact, it then MUST cease to
send further PDUs and MUST ignore any received LDAP PDUs until it send further PDUs and MUST ignore any received LDAP PDUs until it
receives a TLS closure alert from the other peer. receives a TLS closure alert from the other peer.
Once the initiating protocol peer receives a TLS closure alert from Once the initiating protocol peer receives a TLS closure alert from
the other peer it MAY send and receive LDAP PDUs. the other peer it MAY send and receive LDAP PDUs.
Lightweight Directory Access Protocol Version 3
When a protocol peer receives the initial TLS closure alert, it may When a protocol peer receives the initial TLS closure alert, it may
choose to allow the LDAP message layer to remain intact. In this choose to allow the LDAP message layer to remain intact. In this
Lightweight Directory Access Protocol Version 3
case, it MUST immediately transmit a TLS closure alert. Following case, it MUST immediately transmit a TLS closure alert. Following
this, it MAY send and receive LDAP PDUs. this, it MAY send and receive LDAP PDUs.
Protocol peers MAY close the transport connection after sending or Protocol peers MAY terminate the LDAP session after sending or
receiving a TLS closure alert. receiving a TLS closure alert.
After the TLS layer has been removed, the server MUST NOT send After the TLS layer has been removed, the server MUST NOT send
responses to any request message received before the TLS closure responses to any request message received before the TLS closure
alert. Thus, clients wishing to receive responses to messages sent alert. Thus, clients wishing to receive responses to messages sent
while the TLS layer is intact MUST wait for those message responses while the TLS layer is intact MUST wait for those message responses
before sending the TLS closure alert. before sending the TLS closure alert.
4.14.3.2. Abrupt Removal
Either the client or server MAY abruptly remove the TLS layer by
closing the transport connection. In this circumstance, a server MAY
send the client a Notice of Disconnection before closing the
transport connection.
5. Protocol Encoding, Connection, and Transfer 5. Protocol Encoding, Connection, and Transfer
This protocol is designed to run over connection-oriented, reliable This protocol is designed to run over connection-oriented, reliable
transports, where the data stream is divided into octets (8-bit transports, where the data stream is divided into octets (8-bit
units), with each octet and each bit being significant. units), with each octet and each bit being significant.
One underlying service, LDAP over TCP, is defined in Section One underlying service, LDAP over TCP, is defined in Section
5.2. This service is generally applicable to applications providing 5.2. This service is generally applicable to applications providing
or consuming X.500-based directory services on the Internet. This or consuming X.500-based directory services on the Internet. This
specification was generally written with the TCP mapping in mind. specification was generally written with the TCP mapping in mind.
skipping to change at line 2062 skipping to change at line 2026
| LDAP message layer | | LDAP message layer |
+----------------------+ > LDAP PDUs +----------------------+ > LDAP PDUs
+----------------------+ < data +----------------------+ < data
| SASL layer | | SASL layer |
+----------------------+ > SASL-protected data +----------------------+ > SASL-protected data
+----------------------+ < data +----------------------+ < data
| TLS layer | | TLS layer |
Application +----------------------+ > TLS-protected data Application +----------------------+ > TLS-protected data
------------+----------------------+ < data ------------+----------------------+ < data
Transport | transport connection | Transport | transport connection |
Lightweight Directory Access Protocol Version 3
+----------------------+ +----------------------+
5.1. Protocol Encoding 5.1. Protocol Encoding
The protocol elements of LDAP SHALL be encoded for exchange using the The protocol elements of LDAP SHALL be encoded for exchange using the
Basic Encoding Rules [BER] of [ASN.1] with the following Basic Encoding Rules [BER] of [ASN.1] with the following
restrictions: restrictions:
- Only the definite form of length encoding is used. - Only the definite form of length encoding is used.
Lightweight Directory Access Protocol Version 3
- OCTET STRING values are encoded in the primitive form only. - OCTET STRING values are encoded in the primitive form only.
- If the value of a BOOLEAN type is true, the encoding of the value - If the value of a BOOLEAN type is true, the encoding of the value
octet is set to hex "FF". octet is set to hex "FF".
- If a value of a type is its default value, it is absent. Only some - If a value of a type is its default value, it is absent. Only some
BOOLEAN and INTEGER types have default values in this protocol BOOLEAN and INTEGER types have default values in this protocol
definition. definition.
These restrictions are meant to ease the overhead of encoding and These restrictions are meant to ease the overhead of encoding and
skipping to change at line 2101 skipping to change at line 2064
5.2. Transmission Control Protocol (TCP) 5.2. Transmission Control Protocol (TCP)
The encoded LDAPMessage PDUs are mapped directly onto the [TCP] The encoded LDAPMessage PDUs are mapped directly onto the [TCP]
bytestream using the BER-based encoding described in Section 5.1. It bytestream using the BER-based encoding described in Section 5.1. It
is recommended that server implementations running over the TCP is recommended that server implementations running over the TCP
provide a protocol listener on the Internet Assigned Numbers provide a protocol listener on the Internet Assigned Numbers
Authority (IANA)-assigned LDAP port, 389 [PortReg]. Servers may Authority (IANA)-assigned LDAP port, 389 [PortReg]. Servers may
instead provide a listener on a different port number. Clients MUST instead provide a listener on a different port number. Clients MUST
support contacting servers on any valid TCP port. support contacting servers on any valid TCP port.
5.3. Termination of the LDAP session
Termination of the LDAP session is typically initiated by the client
sending an UnbindRequst (Section 4.3), or by the server sending a
Notice of Disconnection (Section 4.4.1). In these cases each protocol
peer gracefully terminates the LDAP session by ceasing exchanges at
the LDAP message layer, tearing down any SASL layer, tearing down any
TLS layer, and closing the transport connection.
A protocol peer may determine that the continuation of any
communication would be pernicious, and in this case may abruptly
terminate the session by ceasing communication and closing the
transport connection.
In either case, when the LDAP session is terminated, uncompleted
operations are handled as specified in Section 3.1.
6. Security Considerations 6. Security Considerations
This version of the protocol provides facilities for simple This version of the protocol provides facilities for simple
authentication using a cleartext password, as well as any [SASL] authentication using a cleartext password, as well as any [SASL]
mechanism. Installing SASL and/or TLS layers can provide integrity mechanism. Installing SASL and/or TLS layers can provide integrity
and other data security services. and other data security services.
Lightweight Directory Access Protocol Version 3
It is also permitted that the server can return its credentials to It is also permitted that the server can return its credentials to
the client, if it chooses to do so. the client, if it chooses to do so.
Use of cleartext password is strongly discouraged where the Use of cleartext password is strongly discouraged where the
underlying transport service cannot guarantee confidentiality and may underlying transport service cannot guarantee confidentiality and may
result in disclosure of the password to unauthorized parties. result in disclosure of the password to unauthorized parties.
Lightweight Directory Access Protocol Version 3
Servers are encouraged to prevent directory modifications by clients Servers are encouraged to prevent directory modifications by clients
that have authenticated anonymously [AuthMeth]. that have authenticated anonymously [AuthMeth].
Security considerations for authentication methods, SASL mechanisms, Security considerations for authentication methods, SASL mechanisms,
and TLS are described in [AuthMeth]. and TLS are described in [AuthMeth].
It should be noted that SASL authentication exchanges do not provide It should be noted that SASL authentication exchanges do not provide
data confidentiality nor integrity protection for the version or name data confidentiality nor integrity protection for the version or name
fields of the BindRequest nor the resultCode, diagnosticMessage, or fields of the BindRequest nor the resultCode, diagnosticMessage, or
referral fields of the BindResponse nor of any information contained referral fields of the BindResponse nor of any information contained
skipping to change at line 2164 skipping to change at line 2144
reject referrals from the StartTLS operation. reject referrals from the StartTLS operation.
The matchedDN and diagnosticMessage fields, as well as some The matchedDN and diagnosticMessage fields, as well as some
resultCode values (e.g., attributeOrValueExists and resultCode values (e.g., attributeOrValueExists and
entryAlreadyExists), could disclose the presence or absence of entryAlreadyExists), could disclose the presence or absence of
specific data in the directory which is subject to access and other specific data in the directory which is subject to access and other
administrative controls. Server implementations should restrict administrative controls. Server implementations should restrict
access to protected information equally under both normal and error access to protected information equally under both normal and error
conditions. conditions.
Lightweight Directory Access Protocol Version 3
Protocol peers MUST be prepared to handle invalid and arbitrary Protocol peers MUST be prepared to handle invalid and arbitrary
length protocol encodings. Invalid protocol encodings include: BER length protocol encodings. Invalid protocol encodings include: BER
encoding exceptions, format string and UTF-8 encoding exceptions, encoding exceptions, format string and UTF-8 encoding exceptions,
overflow exceptions, integer value exceptions, and binary mode on/off overflow exceptions, integer value exceptions, and binary mode on/off
flag exceptions. The LDAPv3 PROTOS [PROTOS-LDAP] test suite provides flag exceptions. The LDAPv3 PROTOS [PROTOS-LDAP] test suite provides
excellent examples of these exceptions and test cases used to excellent examples of these exceptions and test cases used to
discover flaws. discover flaws.
Lightweight Directory Access Protocol Version 3 In the event that a protocol peer senses an attack which in its
nature could cause damage due to further communication at any layer
in the LDAP session, the protocol peer should abruptly terminate the
LDAP session as described in Section 5.3.
7. Acknowledgements 7. Acknowledgements
This document is based on RFC 2251 by Mark Wahl, Tim Howes, and Steve This document is based on RFC 2251 by Mark Wahl, Tim Howes, and Steve
Kille. RFC 2251 was a product of the IETF ASID Working Group. Kille. RFC 2251 was a product of the IETF ASID Working Group.
It is also based on RFC 2830 by Jeff Hodges, RL "Bob" Morgan, and It is also based on RFC 2830 by Jeff Hodges, RL "Bob" Morgan, and
Mark Wahl. RFC 2830 was a product of the IETF LDAPEXT Working Group. Mark Wahl. RFC 2830 was a product of the IETF LDAPEXT Working Group.
It is also based on RFC 3771 by Roger Harrison, and Kurt Zeilenga. It is also based on RFC 3771 by Roger Harrison, and Kurt Zeilenga.
skipping to change at line 2210 skipping to change at line 2195
xx.txt, (a work in progress). xx.txt, (a work in progress).
[BER] ITU-T Rec. X.690 (07/2002) | ISO/IEC 8825-1:2002, [BER] ITU-T Rec. X.690 (07/2002) | ISO/IEC 8825-1:2002,
"Information technology - ASN.1 encoding rules: "Information technology - ASN.1 encoding rules:
Specification of Basic Encoding Rules (BER), Canonical Specification of Basic Encoding Rules (BER), Canonical
Encoding Rules (CER) and Distinguished Encoding Rules Encoding Rules (CER) and Distinguished Encoding Rules
(DER)", 2002. (DER)", 2002.
[IP] Postel, J., "Internet Protocol", STD5 and RFC 791, [IP] Postel, J., "Internet Protocol", STD5 and RFC 791,
September 1981 September 1981
Lightweight Directory Access Protocol Version 3
[ISO10646] Universal Multiple-Octet Coded Character Set (UCS) - [ISO10646] Universal Multiple-Octet Coded Character Set (UCS) -
Architecture and Basic Multilingual Plane, ISO/IEC 10646-1 Architecture and Basic Multilingual Plane, ISO/IEC 10646-1
: 1993. : 1993.
[Keyword] Bradner, S., "Key words for use in RFCs to Indicate [Keyword] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", RFC 2119, March 1997. Requirement Levels", RFC 2119, March 1997.
[LDAPDN] Zeilenga, K., "LDAP: String Representation of [LDAPDN] Zeilenga, K., "LDAP: String Representation of
Distinguished Names", draft-ietf-ldapbis-dn-xx.txt, (a Distinguished Names", draft-ietf-ldapbis-dn-xx.txt, (a
work in progress). work in progress).
[LDAPIANA] Zeilenga, K., "IANA Considerations for LDAP", draft-ietf- [LDAPIANA] Zeilenga, K., "IANA Considerations for LDAP", draft-ietf-
ldapbis-bcp64-xx.txt, (a work in progress). ldapbis-bcp64-xx.txt, (a work in progress).
Lightweight Directory Access Protocol Version 3
[LDAPURL] Smith, M., "LDAP: Uniform Resource Locator", draft-ietf- [LDAPURL] Smith, M., "LDAP: Uniform Resource Locator", draft-ietf-
ldapbis-url-xx.txt, (a work in progress). ldapbis-url-xx.txt, (a work in progress).
[Models] Zeilenga, K., "LDAP: Directory Information Models", draft- [Models] Zeilenga, K., "LDAP: Directory Information Models", draft-
ietf-ldapbis-models-xx.txt (a work in progress). ietf-ldapbis-models-xx.txt (a work in progress).
[Roadmap] Zeilenga, K., "LDAP: Technical Specification Road Map", [Roadmap] Zeilenga, K., "LDAP: Technical Specification Road Map",
draft-ietf-ldapbis-roadmap-xx.txt (a work in progress). draft-ietf-ldapbis-roadmap-xx.txt (a work in progress).
[SASL] Melnikov, A., "Simple Authentication and Security Layer", [SASL] Melnikov, A., "Simple Authentication and Security Layer",
skipping to change at line 2265 skipping to change at line 2249
draft-ietf-tls-rfc2246-bis-xx.txt, a work in progress. draft-ietf-tls-rfc2246-bis-xx.txt, a work in progress.
[Unicode] The Unicode Consortium, "The Unicode Standard, Version [Unicode] The Unicode Consortium, "The Unicode Standard, Version
3.2.0" is defined by "The Unicode Standard, Version 3.0" 3.2.0" is defined by "The Unicode Standard, Version 3.0"
(Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5), (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
as amended by the "Unicode Standard Annex #27: Unicode as amended by the "Unicode Standard Annex #27: Unicode
3.1" (http://www.unicode.org/reports/tr27/) and by the 3.1" (http://www.unicode.org/reports/tr27/) and by the
"Unicode Standard Annex #28: Unicode 3.2" "Unicode Standard Annex #28: Unicode 3.2"
(http://www.unicode.org/reports/tr28/). (http://www.unicode.org/reports/tr28/).
Lightweight Directory Access Protocol Version 3
[URI] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [URI] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifiers (URI): Generic Syntax", RFC 2396, Resource Identifiers (URI): Generic Syntax", RFC 2396,
August 1998. August 1998.
[UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD63 and RFC3629, November 2003. 10646", STD63 and RFC3629, November 2003.
[X.500] ITU-T Rec. X.500, "The Directory: Overview of Concepts, [X.500] ITU-T Rec. X.500, "The Directory: Overview of Concepts,
Models and Service", 1993. Models and Service", 1993.
[X.501] ITU-T Rec. X.501, "The Directory: Models", 1993. [X.501] ITU-T Rec. X.501, "The Directory: Models", 1993.
[X.511] ITU-T Rec. X.511, "The Directory: Abstract Service [X.511] ITU-T Rec. X.511, "The Directory: Abstract Service
Definition", 1993. Definition", 1993.
Lightweight Directory Access Protocol Version 3
9. Informative References 9. Informative References
[Glossary] The Unicode Consortium, "Unicode Glossary", [Glossary] The Unicode Consortium, "Unicode Glossary",
<http://www.unicode.org/glossary/>. <http://www.unicode.org/glossary/>.
[CharModel] Whistler, K. and M. Davis, "Unicode Technical Report [CharModel] Whistler, K. and M. Davis, "Unicode Technical Report
#17, Character Encoding Model", UTR17, #17, Character Encoding Model", UTR17,
<http://www.unicode.org/unicode/reports/tr17/>, August <http://www.unicode.org/unicode/reports/tr17/>, August
2000. 2000.
skipping to change at line 2318 skipping to change at line 2302
definitive technical specification for the StartTLS definitive technical specification for the StartTLS
(1.3.6.1.4.1.1466.20037) Extended operation. (1.3.6.1.4.1.1466.20037) Extended operation.
It is requested that the IANA update the occurrence of "RFC XXXX" in It is requested that the IANA update the occurrence of "RFC XXXX" in
Appendix B with this RFC number at publication. Appendix B with this RFC number at publication.
11. Editor's Address 11. Editor's Address
Jim Sermersheim Jim Sermersheim
Novell, Inc. Novell, Inc.
Lightweight Directory Access Protocol Version 3
1800 South Novell Place 1800 South Novell Place
Provo, Utah 84606, USA Provo, Utah 84606, USA
jimse@novell.com jimse@novell.com
+1 801 861-3088 +1 801 861-3088
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
Appendix A - LDAP Result Codes Appendix A - LDAP Result Codes
This normative appendix details additional considerations regarding This normative appendix details additional considerations regarding
LDAP result codes and provides a brief, general description of each LDAP result codes and provides a brief, general description of each
LDAP result code enumerated in Section 4.1.9. LDAP result code enumerated in Section 4.1.9.
Additional result codes MAY be defined for use with extensions Additional result codes MAY be defined for use with extensions
[LDAPIANA]. Client implementations SHALL treat any result code which [LDAPIANA]. Client implementations SHALL treat any result code which
skipping to change at line 2412 skipping to change at line 2398
Undefined. Undefined.
compareTrue (6) compareTrue (6)
Indicates that the Compare operation has successfully Indicates that the Compare operation has successfully
completed and the assertion has evaluated to TRUE. completed and the assertion has evaluated to TRUE.
authMethodNotSupported (7) authMethodNotSupported (7)
Indicates that the authentication method or mechanism is not Indicates that the authentication method or mechanism is not
supported. supported.
strongAuthRequired (8) strongerAuthRequired (8)
Indicates the server requires the client to authenticate Indicates the server requires strong(er) authentication in
using a strong(er) mechanism. order to complete the operation.
When used with the Notice of Disconnection operation, this When used with the Notice of Disconnection operation, this
code indicates that the server has detected that an code indicates that the server has detected that an
established security association between the client and established security association between the client and
server has unexpectedly failed or been compromised. server has unexpectedly failed or been compromised.
referral (10) referral (10)
Indicates that a referral needs to be chased to complete the Indicates that a referral needs to be chased to complete the
operation (see Section 4.1.10). operation (see Section 4.1.10).
skipping to change at line 2652 skipping to change at line 2636
LDAPResult ::= SEQUENCE { LDAPResult ::= SEQUENCE {
resultCode ENUMERATED { resultCode ENUMERATED {
success (0), success (0),
operationsError (1), operationsError (1),
protocolError (2), protocolError (2),
timeLimitExceeded (3), timeLimitExceeded (3),
sizeLimitExceeded (4), sizeLimitExceeded (4),
compareFalse (5), compareFalse (5),
compareTrue (6), compareTrue (6),
authMethodNotSupported (7), authMethodNotSupported (7),
strongAuthRequired (8), strongerAuthRequired (8),
-- 9 reserved -- -- 9 reserved --
referral (10), referral (10),
adminLimitExceeded (11), adminLimitExceeded (11),
unavailableCriticalExtension (12), unavailableCriticalExtension (12),
confidentialityRequired (13), confidentialityRequired (13),
saslBindInProgress (14), saslBindInProgress (14),
noSuchAttribute (16), noSuchAttribute (16),
undefinedAttributeType (17), undefinedAttributeType (17),
inappropriateMatching (18), inappropriateMatching (18),
constraintViolation (19), constraintViolation (19),
skipping to change at line 2753 skipping to change at line 2735
derefFindingBaseObj (2), derefFindingBaseObj (2),
derefAlways (3) }, derefAlways (3) },
sizeLimit INTEGER (0 .. maxInt), sizeLimit INTEGER (0 .. maxInt),
timeLimit INTEGER (0 .. maxInt), timeLimit INTEGER (0 .. maxInt),
typesOnly BOOLEAN, typesOnly BOOLEAN,
filter Filter, filter Filter,
attributes AttributeSelection } attributes AttributeSelection }
AttributeSelection ::= SEQUENCE OF selector LDAPString AttributeSelection ::= SEQUENCE OF selector LDAPString
-- The LDAPString is constrained to -- The LDAPString is constrained to
-- <attributeSelection> in Section 4.5.1 -- <attributeSelector> in Section 4.5.1.7
Filter ::= CHOICE { Filter ::= CHOICE {
and [0] SET SIZE (1..MAX) OF filter Filter, and [0] SET SIZE (1..MAX) OF filter Filter,
or [1] SET SIZE (1..MAX) OF filter Filter, or [1] SET SIZE (1..MAX) OF filter Filter,
not [2] Filter, not [2] Filter,
equalityMatch [3] AttributeValueAssertion, equalityMatch [3] AttributeValueAssertion,
substrings [4] SubstringFilter, substrings [4] SubstringFilter,
greaterOrEqual [5] AttributeValueAssertion, greaterOrEqual [5] AttributeValueAssertion,
lessOrEqual [6] AttributeValueAssertion, lessOrEqual [6] AttributeValueAssertion,
present [7] AttributeDescription, present [7] AttributeDescription,
skipping to change at line 2898 skipping to change at line 2877
- Removed the requirement that servers which implement version 3 or - Removed the requirement that servers which implement version 3 or
later MUST provide the 'supportedLDAPVersion' attribute. This later MUST provide the 'supportedLDAPVersion' attribute. This
statement provided no interoperability advantages. statement provided no interoperability advantages.
C.1.4 Section 4.1.1 (Message Envelope) C.1.4 Section 4.1.1 (Message Envelope)
- There was a mandatory requirement for the server to return a - There was a mandatory requirement for the server to return a
Notice of Disconnection and drop the transport connection when a Notice of Disconnection and drop the transport connection when a
PDU is malformed in a certain way. This has been updated such that PDU is malformed in a certain way. This has been updated such that
the server SHOULD return the Notice of Disconnection, and MUST the server SHOULD return the Notice of Disconnection, and MUST
drop the transport connection. terminate the LDAP Session.
C.1.5 Section 4.1.1.1 (Message ID) C.1.5 Section 4.1.1.1 (Message ID)
- Required that the messageID of requests MUST be non-zero as the - Required that the messageID of requests MUST be non-zero as the
zero is reserved for Notice of Disconnection. zero is reserved for Notice of Disconnection.
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
- Specified when it is and isn't appropriate to return an already - Specified when it is and isn't appropriate to return an already
used message id. RFC 2251 accidentally imposed synchronous server used message id. RFC 2251 accidentally imposed synchronous server
skipping to change at line 2934 skipping to change at line 2913
- Combined the definitions of PartialAttribute and Attribute here, - Combined the definitions of PartialAttribute and Attribute here,
and defined Attribute in terms of PartialAttribute. and defined Attribute in terms of PartialAttribute.
C.1.9 Section 4.1.10 (Result Message) C.1.9 Section 4.1.10 (Result Message)
- Renamed "errorMessage" to "diagnosticMessage" as it is allowed to - Renamed "errorMessage" to "diagnosticMessage" as it is allowed to
be sent for non-error results. be sent for non-error results.
- Moved some language into Appendix A, and refer the reader there. - Moved some language into Appendix A, and refer the reader there.
- Allowed matchedDN to be present for other result codes than those - Allowed matchedDN to be present for other result codes than those
listed in RFC 2251. listed in RFC 2251.
- renamed the code "strongAuthRequired" to "strongerAuthRequired" to
clarify that this code may often be returned to indicate that a
stronger authentication is needed to perform a given operation.
C.1.10 Section 4.1.11 (Referral) C.1.10 Section 4.1.11 (Referral)
- Defined referrals in terms of URIs rather than URLs. - Defined referrals in terms of URIs rather than URLs.
- Removed the requirement that all referral URIs MUST be equally - Removed the requirement that all referral URIs MUST be equally
capable of progressing the operation. The statement was ambiguous capable of progressing the operation. The statement was ambiguous
and provided no instructions on how to carry it out. and provided no instructions on how to carry it out.
- Added the requirement that clients MUST NOT loop between servers. - Added the requirement that clients MUST NOT loop between servers.
- Clarified the instructions for using LDAPURLs in referrals, and in - Clarified the instructions for using LDAPURLs in referrals, and in
doing so added a recommendation that the scope part be present. doing so added a recommendation that the scope part be present.
- Removed imperatives which required clients to use URLs in specific - Removed imperatives which required clients to use URLs in specific
ways to progress an operation. These did nothing for ways to progress an operation. These did nothing for
interoperability. interoperability.
C.1.11 Section 4.1.12 (Controls) C.1.11 Section 4.1.12 (Controls)
- Specified how control values defined in terms of ASN.1 are to be - Specified how control values defined in terms of ASN.1 are to be
encoded. encoded.
- Noted that the criticality field is only applied to request
messages (except UnbindRequest), and must be ignored when present
on response messages and UnbindRequest.
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
- Noted that the criticality field is only applied to request
messages (except UnbindRequest), and must be ignored when present
on response messages and UnbindRequest.
- Added language regarding combinations of controls and the ordering - Added language regarding combinations of controls and the ordering
of controls on a message. of controls on a message.
- Specified that when the semantics of the combination of controls - Specified that when the semantics of the combination of controls
is undefined or unknown, it results in a protocolError. is undefined or unknown, it results in a protocolError.
- Changed "The server MUST be prepared" to "Implementations MUST be - Changed "The server MUST be prepared" to "Implementations MUST be
prepared" in the eighth paragraph to reflect that both client and prepared" in the eighth paragraph to reflect that both client and
server implementations must be able to handle this (as both parse server implementations must be able to handle this (as both parse
controls). controls).
C.1.12 Section 4.2 (Bind Operation) C.1.12 Section 4.2 (Bind Operation)
skipping to change at line 3005 skipping to change at line 2987
- Mandated that clients not send non-Bind operations while a Bind is - Mandated that clients not send non-Bind operations while a Bind is
in progress, and suggested that servers not process them if they in progress, and suggested that servers not process them if they
are received. This is needed to ensure proper sequencing of the are received. This is needed to ensure proper sequencing of the
Bind in relationship to other operations. Bind in relationship to other operations.
C.1.14 Section 4.2.3 (Bind Response) C.1.14 Section 4.2.3 (Bind Response)
- Moved most error-related text to Appendix A, and added text - Moved most error-related text to Appendix A, and added text
regarding certain errors used in conjunction with the Bind regarding certain errors used in conjunction with the Bind
operation. operation.
- Prohibited the server from specifying serverSaslCreds when not
appropriate.
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
- Prohibited the server from specifying serverSaslCreds when not
appropriate.
C.1.15 Section 4.3 (Unbind Operation) C.1.15 Section 4.3 (Unbind Operation)
- Specified that both peers are to cease transmission and close the - Specified that both peers are to cease transmission and terminate
transport connection for the Unbind operation. the LDAP session for the Unbind operation.
C.1.16 Section 4.4 (Unsolicited Notification) C.1.16 Section 4.4 (Unsolicited Notification)
- Added instructions for future specifications of Unsolicited - Added instructions for future specifications of Unsolicited
Notifications. Notifications.
C.1.17 Section 4.5.1 (Search Request) C.1.17 Section 4.5.1 (Search Request)
- SearchRequest attributes is now defined as an AttributeSelection - SearchRequest attributes is now defined as an AttributeSelection
type rather than AttributeDescriptionList, and an ABNF is type rather than AttributeDescriptionList, and an ABNF is
skipping to change at line 3054 skipping to change at line 3037
- Recommended that servers not use attribute short names when it - Recommended that servers not use attribute short names when it
knows they are ambiguous or may cause interoperability problems. knows they are ambiguous or may cause interoperability problems.
- Removed all mention of ExtendedResponse due to lack of - Removed all mention of ExtendedResponse due to lack of
implementation. implementation.
C.1.19 Section 4.5.3 (Continuation References in the Search Result) C.1.19 Section 4.5.3 (Continuation References in the Search Result)
- Made changes similar to those made to Section 4.1.11. - Made changes similar to those made to Section 4.1.11.
C.1.20 Section 4.5.3.1 (Example) C.1.20 Section 4.5.3.1 (Example)
Lightweight Directory Access Protocol Version 3
- Fixed examples to adhere to changes made to Section 4.5.3. - Fixed examples to adhere to changes made to Section 4.5.3.
C.1.21 Section 4.6 (Modify Operation) C.1.21 Section 4.6 (Modify Operation)
Lightweight Directory Access Protocol Version 3
- Replaced AttributeTypeAndValues with Attribute as they are - Replaced AttributeTypeAndValues with Attribute as they are
equivalent. equivalent.
- Spcified the types of modification changes which might temporarily - Specified the types of modification changes which might
violate schema. Some readers were under the impression that any temporarily violate schema. Some readers were under the impression
temporary schema violation was allowed. that any temporary schema violation was allowed.
C.1.22 Section 4.7 (Add Operation) C.1.22 Section 4.7 (Add Operation)
- Aligned Add operation with X.511 in that the attributes of the RDN - Aligned Add operation with X.511 in that the attributes of the RDN
are used in conjunction with the listed attributes to create the are used in conjunction with the listed attributes to create the
entry. Previously, Add required that the distinguished values be entry. Previously, Add required that the distinguished values be
present in the listed attributes. present in the listed attributes.
- Removed requirement that the objectclass attribute MUST be - Removed requirement that the objectClass attribute MUST be
specified as some DSE types do not require this attribute. specified as some DSE types do not require this attribute.
Instead, generic wording was added, requiring the added entry to Instead, generic wording was added, requiring the added entry to
adhere to the data model. adhere to the data model.
- Removed recommendation regarding placement of objects. This is - Removed recommendation regarding placement of objects. This is
covered in the data model document. covered in the data model document.
C.1.23 Section 4.9 (Modify DN Operation) C.1.23 Section 4.9 (Modify DN Operation)
- Required servers to not dereference aliases for Modify DN. This - Required servers to not dereference aliases for Modify DN. This
was added for consistency with other operations and to help ensure was added for consistency with other operations and to help ensure
skipping to change at line 3105 skipping to change at line 3087
added for consistency with other operations and to help ensure added for consistency with other operations and to help ensure
data consistency. data consistency.
C.1.25 Section 4.11 (Abandon Operation) C.1.25 Section 4.11 (Abandon Operation)
- Explained that since Abandon returns no response, clients should - Explained that since Abandon returns no response, clients should
not use it if they need to know the outcome. not use it if they need to know the outcome.
- Specified that Abandon and Unbind cannot be abandoned. - Specified that Abandon and Unbind cannot be abandoned.
C.1.26 Section 4.12 (Extended Operation) C.1.26 Section 4.12 (Extended Operation)
Lightweight Directory Access Protocol Version 3
- Specified how values of Extended operations defined in terms of - Specified how values of Extended operations defined in terms of
ASN.1 are to be encoded. ASN.1 are to be encoded.
Lightweight Directory Access Protocol Version 3
- Added instructions on what Extended operation specifications - Added instructions on what Extended operation specifications
consist of. consist of.
- Added a recommendation that servers advertise supported Extended - Added a recommendation that servers advertise supported Extended
operations. operations.
C.1.27 Section 5.2 (Transfer Protocols) C.1.27 Section 5.2 (Transfer Protocols)
- Moved referral-specific instructions into referral-related - Moved referral-specific instructions into referral-related
sections. sections.
skipping to change at line 3156 skipping to change at line 3136
to other sections. to other sections.
C.2.1 Section 2.3 (Response other than "success") C.2.1 Section 2.3 (Response other than "success")
- Removed wording indicating that referrals can be returned from - Removed wording indicating that referrals can be returned from
StartTLS. StartTLS.
- Removed requirement that only a narrow set of result codes can be - Removed requirement that only a narrow set of result codes can be
returned. Some result codes are required in certain scenarios, but returned. Some result codes are required in certain scenarios, but
any other may be returned if appropriate. any other may be returned if appropriate.
C.2.1 Section 4 (Closing a TLS Connection)
Lightweight Directory Access Protocol Version 3 Lightweight Directory Access Protocol Version 3
C.2.1 Section 4 (Closing a TLS Connection)
- Reworded most of this section and added the requirement that after - Reworded most of this section and added the requirement that after
the TLS connection has been closed, the server MUST NOT send the TLS connection has been closed, the server MUST NOT send
responses to any request message received before the TLS closure. responses to any request message received before the TLS closure.
- Removed instructions on abrupt closure as this is covered in other
areas of the document (specifically, Section 5.3)
C.3 Changes made to RFC 3771: C.3 Changes made to RFC 3771:
- Rewrote to fit into this document. In general, semantics were - Rewrote to fit into this document. In general, semantics were
preserved. Supporting and background language seen as redundant preserved. Supporting and background language seen as redundant
due to its presence in this document was omitted. due to its presence in this document was omitted.
- Specified that Intermediate responses to a request may be of - Specified that Intermediate responses to a request may be of
different types, and one of the response types may be specified to different types, and one of the response types may be specified to
have no response value. have no response value.
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/