idnits 2.17.1 draft-ietf-ldapbis-protocol-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == There is 1 instance of lines with non-ascii characters in the document. == The page length should not exceed 58 lines per page, but there was 10 longer pages, the longest (page 17) being 209 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** There are 354 instances of too long lines in the document, the longest one being 11 characters in excess of 72. == The 'Obsoletes: ' line in the draft header should list only the _numbers_ of the RFCs which will be obsoleted by this document (if approved); it should not include the word 'RFC' in the list. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (Oct 2002) is 7862 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '0' on line 2910 -- Looks like a reference, but probably isn't: '3' on line 2847 == Missing Reference: 'APPLICATION 0' is mentioned on line 2783, but not defined == Missing Reference: 'APPLICATION 1' is mentioned on line 2798, but not defined -- Looks like a reference, but probably isn't: '7' on line 2831 == Missing Reference: 'APPLICATION 2' is mentioned on line 2802, but not defined == Missing Reference: 'APPLICATION 3' is mentioned on line 2804, but not defined -- Looks like a reference, but probably isn't: '1' on line 2911 -- Looks like a reference, but probably isn't: '2' on line 2846 -- Looks like a reference, but probably isn't: '4' on line 2848 -- Looks like a reference, but probably isn't: '5' on line 2829 -- Looks like a reference, but probably isn't: '6' on line 2830 -- Looks like a reference, but probably isn't: '8' on line 2832 -- Looks like a reference, but probably isn't: '9' on line 2833 == Missing Reference: 'APPLICATION 4' is mentioned on line 2850, but not defined == Missing Reference: 'APPLICATION 19' is mentioned on line 2858, but not defined == Missing Reference: 'APPLICATION 5' is mentioned on line 2860, but not defined == Missing Reference: 'APPLICATION 6' is mentioned on line 2862, but not defined == Missing Reference: 'APPLICATION 7' is mentioned on line 2877, but not defined == Missing Reference: 'APPLICATION 8' is mentioned on line 2879, but not defined == Missing Reference: 'APPLICATION 9' is mentioned on line 2887, but not defined == Missing Reference: 'APPLICATION 10' is mentioned on line 2889, but not defined == Missing Reference: 'APPLICATION 11' is mentioned on line 2891, but not defined == Missing Reference: 'APPLICATION 12' is mentioned on line 2893, but not defined == Missing Reference: 'APPLICATION 13' is mentioned on line 2899, but not defined == Missing Reference: 'APPLICATION 14' is mentioned on line 2901, but not defined == Missing Reference: 'APPLICATION 15' is mentioned on line 2905, but not defined == Missing Reference: 'APPLICATION 16' is mentioned on line 2907, but not defined == Missing Reference: 'APPLICATION 23' is mentioned on line 2909, but not defined == Missing Reference: 'APPLICATION 24' is mentioned on line 2913, but not defined -- Looks like a reference, but probably isn't: '10' on line 2915 -- Looks like a reference, but probably isn't: '11' on line 2916 == Missing Reference: 'X511' is mentioned on line 2324, but not defined == Missing Reference: 'RFC2830' is mentioned on line 3530, but not defined ** Obsolete undefined reference: RFC 2830 (Obsoleted by RFC 4510, RFC 4511, RFC 4513) == Missing Reference: 'RFC2829' is mentioned on line 3536, but not defined ** Obsolete undefined reference: RFC 2829 (Obsoleted by RFC 4510, RFC 4513) -- No information found for draft-ietf-ldapbis-roadmap-xx - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'Roadmap' -- No information found for draft-ietf-ldapbis-xx - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'LDAPIANA' -- Possible downref: Non-RFC (?) normative reference: ref. 'ISO10646' ** Obsolete normative reference: RFC 2044 (Obsoleted by RFC 2279) -- No information found for draft-ietf-ldapbis-models-xx - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'Models' -- No information found for draft-ietf-ldapbis-dn-xx - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'LDAPDN' -- No information found for draft-ietf-ldapbis-syntaxes-xx - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'Syntaxes' ** Obsolete normative reference: RFC 2396 (Obsoleted by RFC 3986) -- No information found for draft-ietf-ldapbis-authmeth-xx - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'AuthMeth' ** Obsolete normative reference: RFC 2222 (Obsoleted by RFC 4422, RFC 4752) Summary: 8 errors (**), 0 flaws (~~), 28 warnings (==), 27 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet-Draft Editor: J. Sermersheim 3 Intended Category: Standard Track Novell, Inc 4 Document: draft-ietf-ldapbis-protocol-09.txt Oct 2002 5 Obsoletes: RFC 2251 7 LDAP: The Protocol 9 Status of this Memo 11 This document is an Internet-Draft and is in full conformance with 12 all provisions of Section 10 of RFC2026. 14 Internet-Drafts are working documents of the Internet Engineering 15 Task Force (IETF), its areas, and its working groups. Note that other 16 groups may also distribute working documents as Internet-Drafts. 17 Internet-Drafts are draft documents valid for a maximum of six months 18 and may be updated, replaced, or obsoleted by other documents at any 19 time. It is inappropriate to use Internet-Drafts as reference 20 material or to cite them other than as "work in progress." 22 The list of current Internet-Drafts can be accessed at 23 http://www.ietf.org/ietf/1id-abstracts.txt 25 The list of Internet-Draft Shadow Directories can be accessed at 26 http://www.ietf.org/shadow.html. 28 Distribution of this memo is unlimited. Technical discussion of this 29 document will take place on the IETF LDAP Revision Working Group 30 (LDAPbis) mailing list . Please send 31 editorial comments directly to the editor . 33 Abstract 35 This document describes the protocol elements, along with their 36 semantics and encodings, for the Lightweight Directory Access 37 Protocol (LDAP). LDAP provides access to distributed directory 38 services that act in accordance with X.500 data and service models. 39 These protocol elements are based on those described in the X.500 40 Directory Access Protocol (DAP). 42 Table of Contents 44 1. Introduction.....................................................2 45 2. Conventions......................................................3 46 3. Protocol Model...................................................3 47 4. Elements of Protocol.............................................3 48 4.1. Common Elements................................................4 49 4.1.1. Message Envelope.............................................4 50 4.1.2. String Types.................................................5 51 4.1.3. Distinguished Name and Relative Distinguished Name...........6 52 Lightweight Directory Access Protocol Version 3 54 4.1.4. Attribute Descriptions.......................................6 55 4.1.5. Attribute Value..............................................7 56 4.1.6. Attribute Value Assertion....................................7 57 4.1.7. Attribute....................................................7 58 4.1.8. Matching Rule Identifier.....................................8 59 4.1.9. Result Message...............................................8 60 4.1.10. Referral...................................................10 61 4.1.11. Controls...................................................11 62 4.2. Bind Operation................................................12 63 4.3. Unbind Operation..............................................15 64 4.4. Unsolicited Notification......................................15 65 4.5. Search Operation..............................................16 66 4.6. Modify Operation..............................................23 67 4.7. Add Operation.................................................25 68 4.8. Delete Operation..............................................26 69 4.9. Modify DN Operation...........................................26 70 4.10. Compare Operation............................................27 71 4.11. Abandon Operation............................................28 72 4.12. Extended Operation...........................................29 73 5. Protocol Element Encodings and Transfer.........................29 74 5.1. Protocol Encoding.............................................29 75 5.2. Transfer Protocols............................................30 76 6. Implementation Guidelines.......................................30 77 6.1. Server Implementations........................................30 78 6.2. Client Implementations........................................30 79 7. Security Considerations.........................................31 80 8. Acknowledgements................................................31 81 9. Normative References............................................31 82 10. Editor's Address...............................................32 83 Appendix A - LDAP Result Codes.....................................33 84 A.1 Non-Error Result Codes.........................................33 85 A.2 Error Result Codes.............................................33 86 A.3 Classes and Precedence of Error Result Codes...................33 87 Appendix C - Change History........................................44 88 C.1 Changes made to RFC 2251:......................................44 89 C.2 Changes made to draft-ietf-ldapbis-protocol-00.txt:............44 90 C.3 Changes made to draft-ietf-ldapbis-protocol-01.txt:............45 91 C.4 Changes made to draft-ietf-ldapbis-protocol-02.txt:............45 92 C.5 Changes made to draft-ietf-ldapbis-protocol-03.txt:............47 93 C.6 Changes made to draft-ietf-ldapbis-protocol-04.txt:............49 94 C.7 Changes made to draft-ietf-ldapbis-protocol-05.txt:............49 95 C.8 Changes made to draft-ietf-ldapbis-protocol-06.txt:............50 96 C.9 Changes made to draft-ietf-ldapbis-protocol-07.txt:............53 97 C.10 Changes made to draft-ietf-ldapbis-protocol-07.txt:...........53 98 Appendix D - Outstanding Work Items................................53 100 1. Introduction 102 The Directory is "a collection of open systems cooperating to provide 103 directory services" [X.500]. A Directory user, which may be a human 104 or other entity, accesses the Directory through a client (or 105 Directory User Agent (DUA)). The client, on behalf of the directory 106 user, interacts with one or more servers (or Directory System Agents 107 Lightweight Directory Access Protocol Version 3 109 (DSA)). Clients interact with servers using a directory access 110 protocol. 112 This document details the protocol elements of Lightweight Directory 113 Access Protocol, along with their semantic meanings. Following the 114 description of protocol elements, it describes the way in which the 115 protocol is encoded and transferred. 117 This document is an integral part of the LDAP Technical Specification 118 [Roadmap]. 120 This document replaces RFC 2251. Appendix C holds a detailed log of 121 changes to RFC 2251. At publication time, this appendix will be 122 distilled to a summary of changes to RFC 2251. 124 2. Conventions 126 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 127 "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in this document 128 are to be interpreted as described in [RFC2119]. 130 3. Protocol Model 132 The general model adopted by this protocol is one of clients 133 performing protocol operations against servers. In this model, a 134 client transmits a protocol request describing the operation to be 135 performed to a server. The server is then responsible for performing 136 the necessary operation(s) in the directory. Upon completion of the 137 operation(s), the server returns a response containing any results or 138 errors to the requesting client. 140 Note that although servers are required to return responses whenever 141 such responses are defined in the protocol, there is no requirement 142 for synchronous behavior on the part of either clients or servers. 143 Requests and responses for multiple operations may be exchanged 144 between a client and server in any order, provided the client 145 eventually receives a response for every request that requires one. 147 Note that the core protocol operations defined in this document can 148 be mapped to a subset of the X.500(1997) directory abstract service. 149 However there is not a one-to-one mapping between LDAP protocol 150 operations and DAP operations. Server implementations acting as a 151 gateway to X.500 directories may need to make multiple DAP requests. 153 4. Elements of Protocol 155 The LDAP protocol is described using Abstract Syntax Notation 1 156 (ASN.1) [X.680], and is transferred using a subset of ASN.1 Basic 157 Encoding Rules [X.690]. Section 5.1 specifies how the protocol is 158 encoded and transferred. 160 Lightweight Directory Access Protocol Version 3 162 In order to support future Standards Track extensions to this 163 protocol, extensibility is implied where it is allowed (per ASN.1). 164 In addition, ellipses (...) have been supplied in ASN.1 types that 165 are explicitly extensible as discussed in [LDAPIANA]. Because of the 166 implied extensibility, clients and servers MUST ignore trailing 167 SEQUENCE elements whose tags they do not recognize. 169 Changes to the LDAP protocol other than those described in [LDAPIANA] 170 Comment 171 : 173 I 174 s 176 t 177 h 178 i 179 s 181 t 182 r 183 u 184 e 185 ? 186 require a different version number. A client indicates the version it 187 is using as part of the bind request, described in section 4.2. If a 188 client has not sent a bind, the server MUST assume the client is 189 using version 3 or later. 191 Clients may determine the protocol versions a server supports by 192 reading the supportedLDAPVersion attribute from the root DSE 193 [Models]. Servers which implement version 3 or later MUST provide 194 this attribute. 196 4.1. Common Elements 198 This section describes the LDAPMessage envelope PDU (Protocol Data 199 Unit) format, as well as data type definitions, which are used in the 200 protocol operations. 202 4.1.1. Message Envelope 204 For the purposes of protocol exchanges, all protocol operations are 205 encapsulated in a common envelope, the LDAPMessage, which is defined 206 as follows: 208 LDAPMessage ::= SEQUENCE { 209 messageID MessageID, 210 protocolOp CHOICE { 211 bindRequest BindRequest, 212 bindResponse BindResponse, 213 unbindRequest UnbindRequest, 214 searchRequest SearchRequest, 215 searchResEntry SearchResultEntry, 216 searchResDone SearchResultDone, 217 searchResRef SearchResultReference, 218 modifyRequest ModifyRequest, 219 modifyResponse ModifyResponse, 220 addRequest AddRequest, 221 addResponse AddResponse, 222 delRequest DelRequest, 223 delResponse DelResponse, 224 modDNRequest ModifyDNRequest, 225 modDNResponse ModifyDNResponse, 226 compareRequest CompareRequest, 227 compareResponse CompareResponse, 228 abandonRequest AbandonRequest, 229 extendedReq ExtendedRequest, 230 Lightweight Directory Access Protocol Version 3 232 extendedResp ExtendedResponse, 233 ... }, 234 controls [0] Controls OPTIONAL } 236 MessageID ::= INTEGER (0 .. maxInt) 238 maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- 240 The function of the LDAPMessage is to provide an envelope containing 241 common fields required in all protocol exchanges. At this time the 242 only common fields are the message ID and the controls. 244 If the server receives a PDU from the client in which the LDAPMessage 245 SEQUENCE tag cannot be recognized, the messageID cannot be parsed, 246 the tag of the protocolOp is not recognized as a request, or the 247 encoding structures or lengths of data fields are found to be 248 incorrect, then the server MAY return the Notice of Disconnection 249 described in section 4.4.1, with resultCode protocolError, and MUST 250 immediately close the connection. 252 In other cases where the client or server cannot parse a PDU, it 253 SHOULD abruptly close the connection where further communication 254 (including providing notice) would be pernicious. Otherwise, server 255 implementations MUST return an appropriate response to the request, 256 with the resultCode set to protocolError. 258 The ASN.1 type Controls is defined in section 4.1.11. 260 4.1.1.1. Message ID 262 All LDAPMessage envelopes encapsulating responses contain the 263 messageID value of the corresponding request LDAPMessage. 265 The message ID of a request MUST have a non-zero value different from 266 the values of any other requests outstanding in the LDAP session of 267 which this message is a part. The zero value is reserved for the 268 unsolicited notification message. 270 Typical clients increment a counter for each request. 272 A client MUST NOT send a request with the same message ID as an 273 earlier request on the same connection unless it can be determined 274 that the server is no longer servicing the earlier request. Otherwise 275 the behavior is undefined. For operations that do not return 276 responses (unbind, abandon, and abandoned operations), the client 277 SHOULD assumes the operation is in progress until a subsequent bind 278 request completes. 280 4.1.2. String Types 282 The LDAPString is a notational convenience to indicate that, although 283 strings of LDAPString type encode as OCTET STRING types, the 284 Lightweight Directory Access Protocol Version 3 286 [ISO10646] character set (a superset of Unicode) is used, encoded 287 following the UTF-8 algorithm [RFC2044]. Note that in the UTF-8 288 algorithm characters which are the same as ASCII (0x0000 through 289 0x007F) are represented as that same ASCII character in a single 290 byte. The other byte values are used to form a variable-length 291 encoding of an arbitrary character. 293 LDAPString ::= OCTET STRING -- UTF-8 encoded, 294 -- ISO 10646 characters 296 The LDAPOID is a notational convenience to indicate that the 297 permitted value of this string is a (UTF-8 encoded) dotted-decimal 298 representation of an OBJECT IDENTIFIER. Although an LDAPOID is 299 encoded as an OCTET STRING, values are limited to the definition of 300 numericoid given in Section 1.3 of [Models]. 302 LDAPOID ::= OCTET STRING -- Constrained to numericoid [Models] 304 For example, 306 1.3.6.1.4.1.1466.1.2.3 308 4.1.3. Distinguished Name and Relative Distinguished Name 310 An LDAPDN and a RelativeLDAPDN are respectively defined to be the 311 representation of a distinguished-name and a relative-distinguished- 312 name after encoding according to the specification in [LDAPDN]. 314 LDAPDN ::= LDAPString 315 -- Constrained to distinguishedName [LDAPDN] 317 RelativeLDAPDN ::= LDAPString 318 -- Constrained to name-component [LDAPDN] 320 4.1.4. Attribute Descriptions 322 The definition and encoding rules for attribute descriptions are 323 defined in Section 2.5 of [Models]. Briefly, an attribute description 324 is an attribute type and zero or more options. 326 AttributeDescription ::= LDAPString 327 -- Constrained to attributedescription 328 -- [Models] 330 Not all options can be associated with attributes held in the 331 directory. A server will treat an AttributeDescription with any 332 options it does not implement or support as unrecognized. The order 333 in which options appear in the list MUST NOT be used to impart any 334 semantic meaning. Servers MUST treat any two AttributeDescription 335 with the same attribute type and options as equivalent. 337 Lightweight Directory Access Protocol Version 3 339 AttributeDescriptionList describes a list of 0 or more attribute 340 descriptions. (A list of zero elements has special significance in 341 the Search request.) 343 AttributeDescriptionList ::= SEQUENCE OF 344 AttributeDescription 346 4.1.5. Attribute Value 348 A field of type AttributeValue is an OCTET STRING containing an 349 encoded attribute value data type. The value is encoded according to 350 its LDAP-specific encoding definition. The LDAP-specific encoding 351 definitions for different syntaxes and attribute types may be found 352 in other documents, and in particular [Syntaxes]. 354 AttributeValue ::= OCTET STRING 356 Note that there is no defined limit on the size of this encoding; 357 thus protocol values may include multi-megabyte attributes (e.g. 358 photographs). 360 Attributes may be defined which have arbitrary and non-printable 361 syntax. Implementations MUST NOT display nor attempt to decode as 362 ASN.1, a value if its syntax is not known. The implementation may 363 attempt to discover the subschema of the source entry, and retrieve 364 the values of attributeTypes from it. 366 Clients MUST NOT send attribute values in a request that are not 367 valid according to the syntax defined for the attributes. 369 4.1.6. Attribute Value Assertion 371 The AttributeValueAssertion type definition is similar to the one in 372 the X.500 directory standards. It contains an attribute description 373 and a matching rule assertion value suitable for that type. 375 AttributeValueAssertion ::= SEQUENCE { 376 attributeDesc AttributeDescription, 377 assertionValue AssertionValue } 379 AssertionValue ::= OCTET STRING 381 The syntax of the AssertionValue depends on the context of the LDAP 382 operation being performed. For example, the syntax of the EQUALITY 383 matching rule for an attribute is used when performing a Compare 384 operation. Often this is the same syntax used for values of the 385 attribute type, but in some cases the assertion syntax differs from 386 the value syntax. See objectIdentiferFirstComponentMatch in 387 [Syntaxes] for an example. 389 4.1.7. Attribute 390 Lightweight Directory Access Protocol Version 3 392 An attribute consists of an attribute description and one or more 393 values of that attribute description. (Though attributes MUST have at 394 least one value when stored, due to access control restrictions the 395 set may be empty when transferred from the server to the client. This 396 is described in section 4.5.2, concerning the PartialAttributeList 397 type.) 399 Attribute ::= SEQUENCE { 400 type AttributeDescription, 401 vals SET OF AttributeValue } 403 Each attribute value is distinct in the set (no duplicates). The set 404 of attribute values is unordered. Implementations MUST NOT reply upon 405 any apparent ordering being repeatable. 407 4.1.8. Matching Rule Identifier 409 Matching rules are defined in 4.1.3 of [Models]. A matching rule is 410 identified in the LDAP protocol by the printable representation of 411 either its numericoid, or one of its short name descriptors, e.g. 412 "caseIgnoreIA5Match" or "1.3.6.1.4.1.453.33.33". 414 MatchingRuleId ::= LDAPString 416 Servers which support matching rules for use in the extensibleMatch 417 search filter MUST list the matching rules they implement in 418 subschema entries, using the matchingRules attributes. The server 419 SHOULD also list there, using the matchingRuleUse attribute, the 420 attribute types with which each matching rule can be used. More 421 Comment 422 : 424 mov 425 e 427 t 428 o 429 mo 430 d 431 e 432 l 433 s 434 information is given in section 4.5 of [Syntaxes]. 436 4.1.9. Result Message 438 The LDAPResult is the construct used in this protocol to return 439 success or failure indications from servers to clients. To various 440 requests, servers will return responses of LDAPResult or responses 441 containing the components of LDAPResponse to indicate the final 442 status of a protocol operation request. 444 LDAPResult ::= SEQUENCE { 445 resultCode ENUMERATED { 446 success (0), 447 operationsError (1), 448 protocolError (2), 449 timeLimitExceeded (3), 450 sizeLimitExceeded (4), 451 compareFalse (5), 452 compareTrue (6), 453 authMethodNotSupported (7), 454 strongAuthRequired (8), 455 -- 9 reserved -- 456 Lightweight Directory Access Protocol Version 3 458 referral (10), 459 adminLimitExceeded (11), 460 unavailableCriticalExtension (12), 461 confidentialityRequired (13), 462 saslBindInProgress (14), 463 noSuchAttribute (16), 464 undefinedAttributeType (17), 465 inappropriateMatching (18), 466 constraintViolation (19), 467 attributeOrValueExists (20), 468 invalidAttributeSyntax (21), 469 -- 22-31 unused -- 470 noSuchObject (32), 471 aliasProblem (33), 472 invalidDNSyntax (34), 473 -- 35 reserved for undefined isLeaf -- 474 aliasDereferencingProblem (36), 475 -- 37-47 unused -- 476 inappropriateAuthentication (48), 477 invalidCredentials (49), 478 insufficientAccessRights (50), 479 busy (51), 480 unavailable (52), 481 unwillingToPerform (53), 482 loopDetect (54), 483 -- 55-63 unused -- 484 namingViolation (64), 485 objectClassViolation (65), 486 notAllowedOnNonLeaf (66), 487 notAllowedOnRDN (67), 488 entryAlreadyExists (68), 489 objectClassModsProhibited (69), 490 -- 70 reserved for CLDAP -- 491 affectsMultipleDSAs (71), 492 -- 72-79 unused -- 493 other (80), 494 ... }, 495 -- 81-90 reserved for APIs -- 496 matchedDN LDAPDN, 497 errorMessage LDAPString, 498 referral [3] Referral OPTIONAL } 500 The result codes enumeration is extensible as defined in Section 3.5 501 of [LDAPIANA]. The meanings of the result codes are given in Appendix 502 A. 504 The errorMessage field of this construct may, at the server's option, 505 be used to return a string containing a textual, human-readable 506 (terminal control and page formatting characters should be avoided) 507 error diagnostic. As this error diagnostic is not standardized, 508 implementations MUST NOT rely on the values returned. If the server 509 chooses not to return a textual diagnostic, the errorMessage field of 510 the LDAPResult type MUST contain a zero length string. 512 Lightweight Directory Access Protocol Version 3 514 For result codes of noSuchObject, aliasProblem, invalidDNSyntax and 515 aliasDereferencingProblem, the matchedDN field is set to the name of 516 the lowest entry (object or alias) in the directory that was matched. 517 If no aliases were dereferenced while attempting to locate the entry, 518 this will be a truncated form of the name provided, or if aliases 519 were dereferenced, of the resulting name, as defined in section 12.5 520 of [X.511]. The matchedDN field contains a zero length string with 521 all other result codes. 523 4.1.10. Referral 525 The referral result code indicates that the contacted server does not 526 hold the target entry of the request. The referral field is present 527 in an LDAPResult if the LDAPResult.resultCode field value is 528 referral, and absent with all other result codes. It contains one or 529 more references to one or more servers or services that may be 530 accessed via LDAP or other protocols. Referrals can be returned in 531 response to any operation request (except unbind and abandon which do 532 not have responses). At least one URL MUST be present in the 533 Referral. 535 During a search operation, after the baseObject is located, and 536 entries are being evaluated, the referral is not returned. Instead, 537 continuation references, described in section 4.5.3, are returned 538 when the search scope spans multiple naming contexts, and several 539 different servers would need to be contacted to complete the 540 operation. 542 Referral ::= SEQUENCE OF LDAPURL -- one or more 544 LDAPURL ::= LDAPString -- limited to characters permitted in 545 -- URLs 547 If the client wishes to progress the operation, it MUST follow the 548 referral by contacting one of the servers. If multiple URLs are 549 present, the client assumes that any URL may be used to progress the 550 operation. 552 URLs for servers implementing the LDAP protocol are written according 553 to [LDAPDN]. If an alias was dereferenced, the part of the URL 554 MUST be present, with the new target object name. If the part is 555 present, the client MUST use this name in its next request to 556 progress the operation, and if it is not present the client will use 557 the same name as in the original request. Some servers (e.g. 558 participating in distributed indexing) may provide a different filter 559 in a referral for a search operation. If the filter part of the URL 560 is present in an LDAPURL, the client MUST use this filter in its next 561 request to progress this search, and if it is not present the client 562 MUST use the same filter as it used for that search. Other aspects of 563 the new request may be the same or different as the request which 564 generated the referral. 566 Lightweight Directory Access Protocol Version 3 568 Note that UTF-8 characters appearing in a DN or search filter may not 569 be legal for URLs (e.g. spaces) and MUST be escaped using the % 570 method in [RFC2396]. 572 Other kinds of URLs may be returned, so long as the operation could 573 be performed using that protocol. 575 4.1.11. Controls 577 A control is a way to specify extension information for an LDAP 578 message. A control only alters the semantics of the message it is 579 attached to. 581 Controls ::= SEQUENCE OF Control 583 Control ::= SEQUENCE { 584 controlType LDAPOID, 585 criticality BOOLEAN DEFAULT FALSE, 586 controlValue OCTET STRING OPTIONAL } 588 The controlType field MUST be a UTF-8 encoded dotted-decimal 589 representation of an OBJECT IDENTIFIER which uniquely identifies the 590 control. This prevents conflicts between control names. 592 The criticality field is either TRUE or FALSE and only applies to 593 request messages that have a corresponding response message. For all 594 other messages (such as abandonRequest, unbindRequest and all 595 response messages), the criticality field is treated as FALSE. 597 If the server recognizes the control type and it is appropriate for 598 the operation, the server will make use of the control when 599 performing the operation. 601 If the server does not recognize the control type or it is not 602 appropriate for the operation, and the criticality field is TRUE, the 603 server MUST NOT perform the operation, and MUST instead return the 604 resultCode unavailableCriticalExtension. 606 If the control is unrecognized or inappropriate but the criticality 607 field is FALSE, the server MUST ignore the control. 609 The controlValue contains any information associated with the 610 control, and its format is defined for the control. Implementations 611 MUST be prepared to handle arbitrary contents of the controlValue 612 octet string, including zero bytes. It is absent only if there is no 613 value information which is associated with a control of its type. 615 This document does not specify any controls. Controls may be 616 specified in other documents. The specification of a control consists 617 of: 619 - the OBJECT IDENTIFIER assigned to the control, 620 Lightweight Directory Access Protocol Version 3 622 - whether the control is always noncritical, always critical, or 623 critical at the client's option, 625 - the format of the controlValue contents of the control, 627 - the semantics of the control, 629 - and optionally, semantics regarding the combination of the control 630 with other controls. 632 Servers list the controlType of all controls they recognize in the 633 supportedControl attribute [Models] in the root DSE. 635 Controls should not be combined unless the semantics of the 636 combination has been specified. The semantics of control 637 combinations, if specified, are generally found in the control 638 specification most recently published. In the absence of combination 639 semantics, the behavior of the operation is undefined. 640 Additionally, the order of a combination of controls in the SEQUENCE 641 is ignored unless the control specification(s) describe(s) 642 combination semantics. 644 4.2. Bind Operation 646 The function of the Bind Operation is to allow authentication 647 information to be exchanged between the client and server. Prior to 648 the BindRequest, the implied identity is anonymous. Refer to 649 [AuthMeth] for the authentication-related semantics of this 650 operation. 652 The Bind Request is defined as follows: 654 BindRequest ::= [APPLICATION 0] SEQUENCE { 655 version INTEGER (1 .. 127), 656 name LDAPDN, 657 authentication AuthenticationChoice } 659 AuthenticationChoice ::= CHOICE { 660 simple [0] OCTET STRING, 661 -- 1 and 2 reserved 662 sasl [3] SaslCredentials, 663 ... } 665 SaslCredentials ::= SEQUENCE { 666 mechanism LDAPString, 667 credentials OCTET STRING OPTIONAL } 669 Parameters of the Bind Request are: 671 - version: A version number indicating the version of the protocol 672 to be used in this protocol session. This document describes 673 version 3 of the LDAP protocol. Note that there is no version 674 negotiation, and the client just sets this parameter to the 675 Lightweight Directory Access Protocol Version 3 677 version it desires. If the server does not support the specified 678 version, it responds with protocolError in the resultCode field of 679 the BindResponse. 681 - name: The name of the directory object that the client wishes to 682 bind as. This field may take on a null value (a zero length 683 string) for the purposes of anonymous binds, when authentication 684 has been performed at a lower layer, or when using SASL 685 credentials with a mechanism that includes the name in the 686 credentials. Server behavior is undefined when the name is a null 687 value, simple authentication is used, and a password is specified. 688 The server SHOULD NOT perform any alias dereferencing in 689 determining the object to bind as. 691 - authentication: information used to authenticate the name, if any, 692 provided in the Bind Request. This type is extensible as defined 693 in Section 3.6 of [LDAPIANA]. Servers that do not support a choice 694 supplied by a client will return authMethodNotSupported in the 695 result code of the BindResponse. 697 Upon receipt of a Bind Request, a protocol server will authenticate 698 the requesting client, if necessary. The server will then return a 699 Bind Response to the client indicating the status of the 700 authentication. 702 Authorization is the use of this authentication information when 703 performing operations. Authorization MAY be affected by factors 704 outside of the LDAP Bind request, such as lower layer security 705 services. 707 4.2.1. Sequencing of the Bind Request 709 For some SASL authentication mechanisms, it may be necessary for the 710 client to invoke the BindRequest multiple times. If at any stage the 711 client wishes to abort the bind process it MAY unbind and then drop 712 the underlying connection. Clients MUST NOT invoke operations between 713 two Bind requests made as part of a multi-stage bind. 715 A client may abort a SASL bind negotiation by sending a BindRequest 716 with a different value in the mechanism field of SaslCredentials, or 717 an AuthenticationChoice other than sasl. 719 If the client sends a BindRequest with the sasl mechanism field as an 720 empty string, the server MUST return a BindResponse with 721 authMethodNotSupported as the resultCode. This will allow clients to 722 abort a negotiation if it wishes to try again with the same SASL 723 mechanism. 725 If the client did not bind before sending a request and receives an 726 operationsError, it may then send a Bind Request. If this also fails 727 or the client chooses not to bind on the existing connection, it will 728 close the connection, reopen it and begin again by first sending a 729 Lightweight Directory Access Protocol Version 3 731 PDU with a Bind Request. This will aid in interoperating with servers 732 implementing other versions of LDAP. 734 4.2.2. Bind Response 736 The Bind Response is defined as follows. 738 BindResponse ::= [APPLICATION 1] SEQUENCE { 739 COMPONENTS OF LDAPResult, 740 serverSaslCreds [7] OCTET STRING OPTIONAL } 742 BindResponse consists simply of an indication from the server of the 743 status of the client's request for authentication. 745 If the bind was successful, the resultCode will be success, otherwise 746 Comment 747 : 749 Re 750 c 751 o 752 n 753 c 754 i 755 l 756 e 758 w 759 i 760 t 761 h 763 r 764 e 765 s 766 u 767 l 768 t 770 c 771 o 772 d 773 e 774 s 776 it MAY be one of: 777 d 778 r 779 a 780 f 781 t 782 . 784 - operationsError: server encountered an internal error. 786 - protocolError: unrecognized version number or incorrect PDU 787 structure. 789 - authMethodNotSupported: unrecognized SASL mechanism name. 791 - strongAuthRequired: the server requires authentication be 792 performed with a SASL mechanism. 794 - referral: this server cannot accept this bind and the client 795 should try another. 797 - saslBindInProgress: the server requires the client to send a new 798 bind request, with the same sasl mechanism, to continue the 799 authentication process. 801 - inappropriateAuthentication: the server requires the client which 802 had attempted to bind anonymously or without supplying credentials 803 to provide some form of credentials. 805 - invalidCredentials: the wrong password was supplied or the SASL 806 credentials could not be processed. 808 - unavailable: the server is shutting down. 810 If the server does not support the client's requested protocol 811 version, it MUST set the resultCode to protocolError. 813 If the client receives a BindResponse response where the resultCode 814 was protocolError, it MUST close the connection as the server will be 815 unwilling to accept further operations. (This is for compatibility 816 with earlier versions of LDAP, in which the bind was always the first 817 operation, and there was no negotiation.) 818 Lightweight Directory Access Protocol Version 3 820 The serverSaslCreds are used as part of a SASL-defined bind mechanism 821 to allow the client to authenticate the server to which it is 822 communicating, or to perform "challenge-response" authentication. If 823 the client bound with the simple choice, or the SASL mechanism does 824 not require the server to return information to the client, then this 825 field is not to be included in the result. 827 4.3. Unbind Operation 829 The function of the Unbind Operation is to terminate a protocol 830 session. The Unbind Operation is defined as follows: 832 UnbindRequest ::= [APPLICATION 2] NULL 834 The Unbind Operation has no response defined. Upon transmission of an 835 UnbindRequest, a protocol client MUST assume that the protocol 836 session is terminated. Upon receipt of an UnbindRequest, a protocol 837 server MUST assume that the requesting client has terminated the 838 session and that all outstanding requests may be discarded, and MUST 839 close the connection. 841 4.4. Unsolicited Notification 843 An unsolicited notification is an LDAPMessage sent from the server to 844 the client which is not in response to any LDAPMessage received by 845 the server. It is used to signal an extraordinary condition in the 846 server or in the connection between the client and the server. The 847 notification is of an advisory nature, and the server will not expect 848 any response to be returned from the client. 850 The unsolicited notification is structured as an LDAPMessage in which 851 the messageID is 0 and protocolOp is of the extendedResp form. The 852 responseName field of the ExtendedResponse is present. The LDAPOID 853 value MUST be unique for this notification, and not be used in any 854 other situation. 856 One unsolicited notification (Notice of Disconnection) is defined in 857 this document. 859 4.4.1. Notice of Disconnection 861 This notification may be used by the server to advise the client that 862 the server is about to close the connection due to an error 863 condition. Note that this notification is NOT a response to an unbind 864 requested by the client: the server MUST follow the procedures of 865 section 4.3. This notification is intended to assist clients in 866 distinguishing between an error condition and a transient network 867 failure. As with a connection close due to network failure, the 868 client MUST NOT assume that any outstanding requests which modified 869 the directory have succeeded or failed. 871 Lightweight Directory Access Protocol Version 3 873 The responseName is 1.3.6.1.4.1.1466.20036, the response field is 874 absent, and the resultCode is used to indicate the reason for the 875 disconnection. 877 Comment 878 : 880 mov 881 e 883 t 884 o 886 r 887 e 888 s 889 u 890 l 891 t 893 c 894 o 895 d 896 e 898 The following resultCode values are to be used in this notification: 899 a 900 p 901 p 902 e 903 n 904 d 905 i 906 x 907 ? 909 - protocolError: The server has received data from the client in 910 which the LDAPMessage structure could not be parsed. 912 - strongAuthRequired: The server has detected that an established 913 underlying security association protecting communication between 914 the client and server has unexpectedly failed or been compromised. 916 - unavailable: This server will stop accepting new connections and 917 operations on all existing connections, and be unavailable for an 918 extended period of time. The client may make use of an alternative 919 server. 921 After sending this notice, the server MUST close the connection. 922 After receiving this notice, the client MUST NOT transmit any further 923 on the connection, and may abruptly close the connection. 925 4.5. Search Operation 927 The Search Operation allows a client to request that a search be 928 performed on its behalf by a server. This can be used to read 929 attributes from a single entry, from entries immediately below a 930 particular entry, or a whole subtree of entries. 932 4.5.1. Search Request 934 The Search Request is defined as follows: 936 SearchRequest ::= [APPLICATION 3] SEQUENCE { 937 baseObject LDAPDN, 938 scope ENUMERATED { 939 baseObject (0), 940 singleLevel (1), 941 wholeSubtree (2) }, 942 derefAliases ENUMERATED { 943 neverDerefAliases (0), 944 derefInSearching (1), 945 derefFindingBaseObj (2), 946 derefAlways (3) }, 947 sizeLimit INTEGER (0 .. maxInt), 948 timeLimit INTEGER (0 .. maxInt), 949 typesOnly BOOLEAN, 950 filter Filter, 951 attributes AttributeDescriptionList } 953 Filter ::= CHOICE { 954 and [0] SET SIZE (1..MAX) OF Filter, 955 Lightweight Directory Access Protocol Version 3 957 or [1] SET SIZE (1..MAX) OF Filter, 958 not [2] Filter, 959 equalityMatch [3] AttributeValueAssertion, 960 substrings [4] SubstringFilter, 961 greaterOrEqual [5] AttributeValueAssertion, 962 lessOrEqual [6] AttributeValueAssertion, 963 present [7] AttributeDescription, 964 approxMatch [8] AttributeValueAssertion, 965 extensibleMatch [9] MatchingRuleAssertion } 967 SubstringFilter ::= SEQUENCE { 968 type AttributeDescription, 969 -- at least one must be present, 970 -- initial and final can occur at most once 971 substrings SEQUENCE OF CHOICE { 972 initial [0] AssertionValue, 973 any [1] AssertionValue, 974 final [2] AssertionValue } } 976 MatchingRuleAssertion ::= SEQUENCE { 977 matchingRule [1] MatchingRuleId OPTIONAL, 978 type [2] AttributeDescription OPTIONAL, 979 matchValue [3] AssertionValue, 980 dnAttributes [4] BOOLEAN DEFAULT FALSE } 982 Parameters of the Search Request are: 984 - baseObject: An LDAPDN that is the base object entry relative to 985 which the search is to be performed. 987 - scope: An indicator of the scope of the search to be performed. 988 The semantics of the possible values of this field are identical 989 to the semantics of the scope field in the X.511 Search Operation. 991 - derefAliases: An indicator as to how alias objects (as defined in 992 X.501) are to be handled in searching. The semantics of the 993 possible values of this field are: 995 neverDerefAliases: do not dereference aliases in searching 996 or in locating the base object of the search; 998 derefInSearching: dereference aliases in subordinates of 999 the base object in searching, but not in locating the base 1000 Comment 1001 : 1003 When 1005 s 1006 c 1007 o 1008 p 1009 e 1011 i 1012 s 1014 b 1015 a 1016 s 1017 e 1019 o 1020 r 1022 object of the search; 1023 s 1024 u 1025 b 1026 t 1027 r 1028 e 1029 e 1030 , 1032 t 1033 h 1034 e 1036 b 1037 a 1038 s 1039 e 1041 o 1042 b 1043 j 1044 e 1045 c 1046 t 1048 i 1049 s 1051 b 1052 o 1053 t 1054 h 1056 l 1057 o 1058 c 1059 a 1060 t 1061 e 1062 d 1063 , 1065 a 1066 n 1067 d 1069 s 1070 e 1071 a 1072 r 1073 c 1074 h 1075 e 1076 d 1077 . 1079 " 1080 s 1081 u 1082 b 1083 o 1084 r 1085 d 1086 i 1087 n 1088 a 1089 t 1090 e 1091 s 1092 " 1094 p 1095 r 1096 e 1097 v 1098 e 1099 n 1100 t 1101 s 1103 derefFindingBaseObj: dereference aliases in locating the 1104 t 1105 h 1106 i 1107 s 1109 o 1110 b 1111 j 1112 e 1113 c 1114 t 1116 f 1117 r 1118 om 1120 b 1121 e 1122 i 1123 n 1124 g 1126 d 1127 e 1128 r 1129 e 1130 f 1131 e 1132 r 1133 e 1134 n 1135 c 1136 e 1137 d 1138 wh 1139 i 1140 l 1141 e 1143 s 1144 e 1145 a 1146 r 1147 c 1148 h 1149 i 1150 n 1151 g 1152 . 1153 base object of the search, but not when searching 1154 subordinates of the base object; 1156 derefAlways: dereference aliases both in searching and in 1157 locating the base object of the search. 1159 - sizeLimit: A size limit that restricts the maximum number of 1160 entries to be returned as a result of the search. A value of 0 in 1161 Lightweight Directory Access Protocol Version 3 1163 this field indicates that no client-requested size limit 1164 restrictions are in effect for the search. Servers may enforce a 1165 maximum number of entries to return. 1167 - timeLimit: A time limit that restricts the maximum time (in 1168 seconds) allowed for a search. A value of 0 in this field 1169 indicates that no client-requested time limit restrictions are in 1170 effect for the search. 1172 - typesOnly: An indicator as to whether search results will contain 1173 both attribute types and values, or just attribute types. Setting 1174 this field to TRUE causes only attribute types (no values) to be 1175 returned. Setting this field to FALSE causes both attribute types 1176 and values to be returned. 1178 - filter: A filter that defines the conditions that must be 1179 fulfilled in order for the search to match a given entry. 1181 The 'and', 'or' and 'not' choices can be used to form combinations 1182 of filters. At least one filter element MUST be present in an 1183 'and' or 'or' choice. The others match against individual 1184 attribute values of entries in the scope of the search. 1185 (Implementor's note: the 'not' filter is an example of a tagged 1186 choice in an implicitly-tagged module. In BER this is treated as 1187 if the tag was explicit.) 1189 A server MUST evaluate filters according to the three-valued logic 1190 of X.511 (1993) section 7.8.1. In summary, a filter is evaluated 1191 to either "TRUE", "FALSE" or "Undefined". If the filter evaluates 1192 to TRUE for a particular entry, then the attributes of that entry 1193 are returned as part of the search result (subject to any 1194 applicable access control restrictions). If the filter evaluates 1195 to FALSE or Undefined, then the entry is ignored for the search. 1197 A filter of the "and" choice is TRUE if all the filters in the SET 1198 OF evaluate to TRUE, FALSE if at least one filter is FALSE, and 1199 otherwise Undefined. A filter of the "or" choice is FALSE if all 1200 of the filters in the SET OF evaluate to FALSE, TRUE if at least 1201 one filter is TRUE, and Undefined otherwise. A filter of the "not" 1202 choice is TRUE if the filter being negated is FALSE, FALSE if it 1203 is TRUE, and Undefined if it is Undefined. 1205 The present match evaluates to TRUE where there is an attribute or 1206 subtype of the specified attribute description present in an 1207 entry, and FALSE otherwise (including a presence test with an 1208 unrecognized attribute description.) 1210 The matching rule and assertion syntax for equalityMatch filter 1211 items is defined by the EQUALITY matching rule for the attribute 1212 type. 1214 The matching rule and assertion syntax for AssertionValues in a 1215 substrings filter item is defined by the SUBSTR matching rule for 1216 the attribute type. 1218 Lightweight Directory Access Protocol Version 3 1220 The matching rule and assertion syntax for greaterOrEqual and 1221 lessOrEqual filter items is defined by the ORDERING matching rule 1222 for the attribute type. 1224 The matching rule and assertion syntax for approxMatch filter 1225 items is implementation-defined. If approximate matching is not 1226 supported by the server, the filter item should be treated as an 1227 equalityMatch. 1229 The extensibleMatch is new in this version of LDAP. If the 1230 matchingRule field is absent, the type field MUST be present, and 1231 the equality match is performed for that type. If the type field 1232 is absent and matchingRule is present, the matchValue is compared 1233 against all attributes in an entry which support that 1234 matchingRule, and the matchingRule determines the syntax for the 1235 assertion value (the filter item evaluates to TRUE if it matches 1236 with at least one attribute in the entry, FALSE if it does not 1237 match any attribute in the entry, and Undefined if the 1238 matchingRule is not recognized or the assertionValue cannot be 1239 parsed.) If the type field is present and matchingRule is present, 1240 the matchingRule MUST be one permitted for use with that type, 1241 otherwise the filter item is undefined. If the dnAttributes field 1242 is set to TRUE, the match is applied against all the attributes in 1243 an entry's distinguished name as well, and also evaluates to TRUE 1244 if there is at least one attribute in the distinguished name for 1245 which the filter item evaluates to TRUE. (Editors note: The 1246 dnAttributes field is present so that there does not need to be 1247 multiple versions of generic matching rules such as for word 1248 matching, one to apply to entries and another to apply to entries 1249 and dn attributes as well). 1251 A filter item evaluates to Undefined when the server would not be 1252 able to determine whether the assertion value matches an entry. If 1253 an attribute description in an equalityMatch, substrings, 1254 greaterOrEqual, lessOrEqual, approxMatch or extensibleMatch filter 1255 is not recognized by the server, a matching rule id in the 1256 extensibleMatch is not recognized by the server, the assertion 1257 value cannot be parsed, or the type of filtering requested is not 1258 implemented, then the filter is Undefined. Thus for example if a 1259 server did not recognize the attribute type shoeSize, a filter of 1260 (shoeSize=*) would evaluate to FALSE, and the filters 1261 (shoeSize=12), (shoeSize>=12) and (shoeSize<=12) would evaluate to 1262 Undefined. 1264 Servers MUST NOT return errors if attribute descriptions or 1265 matching rule ids are not recognized, or assertion values cannot 1266 be parsed. More details of filter processing are given in section 1267 7.8 of [X.511]. 1269 - attributes: A list of the attributes to be returned from each 1270 entry which matches the search filter. There are two special 1271 values which may be used: an empty list with no attributes, and 1272 the attribute description string "*". Both of these signify that 1273 Lightweight Directory Access Protocol Version 3 1275 all user attributes are to be returned. (The "*" allows the client 1276 to request all user attributes in addition to any specified 1277 operational attributes). 1279 Attributes MUST be named at most once in the list, and are 1280 returned at most once in an entry. If there are attribute 1281 descriptions in the list which are not recognized, they are 1282 ignored by the server. 1284 If the client does not want any attributes returned, it can 1285 specify a list containing only the attribute with OID "1.1". This 1286 OID was chosen arbitrarily and does not correspond to any 1287 attribute in use. 1289 Client implementors should note that even if all user attributes 1290 are requested, some attributes of the entry may not be included in 1291 search results due to access controls or other restrictions. 1292 Furthermore, servers will not return operational attributes, such 1293 as objectClasses or attributeTypes, unless they are listed by 1294 name, since there may be extremely large number of values for 1295 certain operational attributes. (A list of operational attributes 1296 for use in LDAP is given in [Syntaxes].) 1298 Note that an X.500 "list"-like operation can be emulated by the 1299 client requesting a one-level LDAP search operation with a filter 1300 checking for the presence of the objectClass attribute, and that an 1301 X.500 "read"-like operation can be emulated by a base object LDAP 1302 search operation with the same filter. A server which provides a 1303 gateway to X.500 is not required to use the Read or List operations, 1304 although it may choose to do so, and if it does, it must provide the 1305 same semantics as the X.500 search operation. 1307 4.5.2. Search Result 1309 The results of the search attempted by the server upon receipt of a 1310 Search Request are returned in Search Responses, which are LDAP 1311 messages containing either SearchResultEntry, SearchResultReference, 1312 or SearchResultDone data types. 1314 SearchResultEntry ::= [APPLICATION 4] SEQUENCE { 1315 objectName LDAPDN, 1316 attributes PartialAttributeList } 1318 PartialAttributeList ::= SEQUENCE OF SEQUENCE { 1319 type AttributeDescription, 1320 vals SET OF AttributeValue } 1321 -- implementors should note that the PartialAttributeList may 1322 -- have zero elements (if none of the attributes of that entry 1323 -- were requested, or could be returned), and that the vals set 1324 -- may also have zero elements (if types only was requested, or 1325 -- all values were excluded from the result.) 1327 SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 1328 Lightweight Directory Access Protocol Version 3 1330 -- at least one LDAPURL element must be present 1332 SearchResultDone ::= [APPLICATION 5] LDAPResult 1334 Upon receipt of a Search Request, a server will perform the necessary 1335 search of the DIT. 1337 If the LDAP session is operating over a connection-oriented transport 1338 such as TCP, the server will return to the client a sequence of 1339 responses in separate LDAP messages. There may be zero or more 1340 responses containing SearchResultEntry, one for each entry found 1341 during the search. There may also be zero or more responses 1342 containing SearchResultReference, one for each area not explored by 1343 this server during the search. The SearchResultEntry and 1344 SearchResultReference PDUs may come in any order. Following all the 1345 SearchResultReference responses and all SearchResultEntry responses 1346 to be returned by the server, the server will return a response 1347 containing the SearchResultDone, which contains an indication of 1348 success, or detailing any errors that have occurred. 1350 Each entry returned in a SearchResultEntry will contain all 1351 attributes, complete with associated values if necessary, as 1352 specified in the attributes field of the Search Request. Return of 1353 attributes is subject to access control and other administrative 1354 policy. 1356 Some attributes may be constructed by the server and appear in a 1357 SearchResultEntry attribute list, although they are not stored 1358 attributes of an entry. Clients SHOULD NOT assume that all attributes 1359 can be modified, even if permitted by access control. 1361 If the server�s schema defines a textual name for an attribute type, 1362 it MUST use a textual name for attributes of that attribute type by 1363 specifying one of the textual names as the value of the attribute 1364 type. Otherwise, the server uses the object identifier for the 1365 attribute type by specifying the object identifier, in ldapOID form, 1366 as the value of attribute type. 1368 4.5.3. Continuation References in the Search Result 1370 If the server was able to locate the entry referred to by the 1371 baseObject but was unable to search all the entries in the scope at 1372 and under the baseObject, the server may return one or more 1373 SearchResultReference entries, each containing a reference to another 1374 set of servers for continuing the operation. A server MUST NOT return 1375 any SearchResultReference if it has not located the baseObject and 1376 thus has not searched any entries; in this case it would return a 1377 SearchResultDone containing a referral resultCode. 1379 In the absence of indexing information provided to a server from 1380 servers holding subordinate naming contexts, SearchResultReference 1381 responses are not affected by search filters and are always returned 1382 when in scope. 1384 Lightweight Directory Access Protocol Version 3 1386 The SearchResultReference is of the same data type as the Referral. 1387 URLs for servers implementing the LDAP protocol are written according 1388 to [LDAPDN]. The part MUST be present in the URL, with the new 1389 target object name. The client MUST use this name in its next 1390 request. Some servers (e.g. part of a distributed index exchange 1391 system) may provide a different filter in the URLs of the 1392 SearchResultReference. If the filter part of the URL is present in an 1393 LDAP URL, the client MUST use the new filter in its next request to 1394 progress the search, and if the filter part is absent the client will 1395 use again the same filter. If the originating search scope was 1396 singleLevel, the scope part of the URL will be baseObject. Other 1397 aspects of the new search request may be the same or different as the 1398 search which generated the continuation references. 1399 Other kinds of URLs may be returned so long as the operation could be 1400 performed using that protocol. 1402 Comment 1403 : 1405 why 1407 n 1408 o 1409 t 1410 ? 1412 P 1413 r 1414 o 1415 b 1416 a 1417 b 1418 l 1419 y 1421 b 1422 e 1423 c 1424 a 1425 u 1426 s 1427 e 1429 The name of an unexplored subtree in a SearchResultReference need not 1430 o 1431 f 1433 a 1434 l 1435 i 1436 a 1437 s 1439 d 1440 e 1441 r 1442 e 1443 f 1444 e 1445 r 1446 e 1447 n 1448 c 1449 i 1450 n 1451 g 1452 be subordinate to the base object. 1454 In order to complete the search, the client MUST issue a new search 1455 operation for each SearchResultReference that is returned. Note that 1456 the abandon operation described in section 4.11 applies only to a 1457 particular operation sent on a connection between a client and 1458 server, and if the client has multiple outstanding search operations, 1459 it MUST abandon each operation individually. 1461 4.5.3.1. Example 1463 For example, suppose the contacted server (hosta) holds the entry 1464 "DC=Example,DC=NET" and the entry "CN=Manager,DC=Example,DC=NET". It 1465 knows that either LDAP-capable servers (hostb) or (hostc) hold 1466 "OU=People,DC=Example,DC=NET" (one is the master and the other server 1467 a shadow), and that LDAP-capable server (hostd) holds the subtree 1468 "OU=Roles,DC=Example,DC=NET". If a subtree search of 1469 "DC=Example,DC=NET" is requested to the contacted server, it may 1470 return the following: 1472 SearchResultEntry for DC=Example,DC=NET 1473 SearchResultEntry for CN=Manager,DC=Example,DC=NET 1474 SearchResultReference { 1475 ldap://hostb/OU=People,DC=Example,DC=NET 1476 ldap://hostc/OU=People,DC=Example,DC=NET 1477 } 1478 SearchResultReference { 1479 ldap://hostd/OU=Roles,DC=Example,DC=NET 1480 } 1481 SearchResultDone (success) 1483 Client implementors should note that when following a 1484 SearchResultReference, additional SearchResultReference may be 1485 generated. Continuing the example, if the client contacted the server 1486 Lightweight Directory Access Protocol Version 3 1488 (hostb) and issued the search for the subtree 1489 "OU=People,DC=Example,DC=NET", the server might respond as follows: 1491 SearchResultEntry for OU=People,DC=Example,DC=NET 1492 SearchResultReference { 1493 ldap://hoste/OU=Managers,OU=People,DC=Example,DC=NET 1494 } 1495 SearchResultReference { 1496 ldap://hostf/OU=Consultants,OU=People,DC=Example,DC=NET 1497 } 1498 SearchResultDone (success) 1500 If the contacted server does not hold the base object for the search, 1501 then it will return a referral to the client. For example, if the 1502 client requests a subtree search of "DC=Example,DC=ORG" to hosta, the 1503 server may return only a SearchResultDone containing a referral. 1505 SearchResultDone (referral) { 1506 ldap://hostg/ 1507 } 1509 4.6. Modify Operation 1511 The Modify Operation allows a client to request that a modification 1512 of an entry be performed on its behalf by a server. The Modify 1513 Request is defined as follows: 1515 ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1516 object LDAPDN, 1517 modification SEQUENCE OF SEQUENCE { 1518 operation ENUMERATED { 1519 add (0), 1520 delete (1), 1521 replace (2) }, 1522 modification AttributeTypeAndValues } } 1524 AttributeTypeAndValues ::= SEQUENCE { 1525 type AttributeDescription, 1526 vals SET OF AttributeValue } 1528 Parameters of the Modify Request are: 1530 - object: The object to be modified. The value of this field 1531 contains the DN of the entry to be modified. The server will not 1532 perform any alias dereferencing in determining the object to be 1533 modified. 1535 - modification: A list of modifications to be performed on the 1536 entry. The entire list of entry modifications MUST be performed in 1537 the order they are listed, as a single atomic operation. While 1538 individual modifications may violate the directory schema, the 1539 resulting entry after the entire list of modifications is 1540 performed MUST conform to the requirements of the directory 1541 Lightweight Directory Access Protocol Version 3 1543 schema. The values that may be taken on by the 'operation' field 1544 in each modification construct have the following semantics 1545 respectively: 1547 add: add values listed to the given attribute, creating the 1548 attribute if necessary; 1550 delete: delete values listed from the given attribute, 1551 removing the entire attribute if no values are listed, or 1552 if all current values of the attribute are listed for 1553 deletion; 1555 replace: replace all existing values of the given attribute 1556 with the new values listed, creating the attribute if it 1557 did not already exist. A replace with no value will delete 1558 the entire attribute if it exists, and is ignored if the 1559 Comment 1560 : 1562 Doe 1563 s 1565 n 1566 o 1567 t 1569 e 1570 x 1571 i 1572 s 1573 t 1575 o 1576 n 1578 t 1579 h 1580 e 1582 e 1583 n 1584 t 1585 r 1586 y 1587 , 1589 attribute does not exist. 1590 t 1591 h 1592 e 1594 o 1595 b 1596 j 1597 e 1598 c 1599 t 1600 c 1601 l 1602 a 1603 s 1604 s 1605 , 1607 o 1608 r 1610 t 1611 h 1612 e 1614 s 1615 c 1616 h 1617 ema 1618 ? 1619 App 1620 l 1621 y 1623 s 1624 ame 1626 t 1627 o 1629 d 1630 e 1631 l 1632 e 1633 t 1634 e 1636 The result of the modification attempted by the server upon receipt 1637 of a Modify Request is returned in a Modify Response, defined as 1638 follows: 1640 ModifyResponse ::= [APPLICATION 7] LDAPResult 1642 Upon receipt of a Modify Request, a server will perform the necessary 1643 modifications to the DIT. 1645 The server will return to the client a single Modify Response 1646 indicating either the successful completion of the DIT modification, 1647 or the reason that the modification failed. Note that due to the 1648 requirement for atomicity in applying the list of modifications in 1649 the Modify Request, the client may expect that no modifications of 1650 the DIT have been performed if the Modify Response received indicates 1651 any sort of error, and that all requested modifications have been 1652 performed if the Modify Response indicates successful completion of 1653 the Modify Operation. If the connection fails, whether the 1654 modification occurred or not is indeterminate. 1656 The Modify Operation cannot be used to remove from an entry any of 1657 its distinguished values, those values which form the entry's 1658 relative distinguished name. An attempt to do so will result in the 1659 server returning the error notAllowedOnRDN. The Modify DN Operation 1660 described in section 4.9 is used to rename an entry. 1662 If an EQUALITY matching rule has not been defined for an attribute 1663 type, clients MUST NOT attempt to add or delete individual values of 1664 that attribute from an entry using the "add" or "delete" form of a 1665 modification, and MUST instead use the "replace" form. 1667 Note that due to the simplifications made in LDAP, there is not a 1668 direct mapping of the modifications in an LDAP ModifyRequest onto the 1669 EntryModifications of a DAP ModifyEntry operation, and different 1670 implementations of LDAP-DAP gateways may use different means of 1671 Lightweight Directory Access Protocol Version 3 1673 representing the change. If successful, the final effect of the 1674 operations on the entry MUST be identical. 1676 4.7. Add Operation 1678 The Add Operation allows a client to request the addition of an entry 1679 into the directory. The Add Request is defined as follows: 1681 AddRequest ::= [APPLICATION 8] SEQUENCE { 1682 entry LDAPDN, 1683 attributes AttributeList } 1685 AttributeList ::= SEQUENCE OF SEQUENCE { 1686 type AttributeDescription, 1687 vals SET OF AttributeValue } 1689 Parameters of the Add Request are: 1691 - entry: the Distinguished Name of the entry to be added. Note that 1692 the server will not dereference any aliases in locating the entry 1693 to be added. 1695 - attributes: the list of attributes that make up the content of the 1696 entry being added. Clients MUST include distinguished values 1697 (those forming the entry's own RDN) in this list, the objectClass 1698 attribute, and values of any mandatory attributes of the listed 1699 object classes. Clients MUST NOT supply NO-USER-MODIFICATION 1700 attributes such as the createTimestamp or creatorsName attributes, 1701 since the server maintains these automatically. 1703 The entry named in the entry field of the AddRequest MUST NOT exist 1704 for the AddRequest to succeed. The parent of the entry to be added 1705 MUST exist. For example, if the client attempted to add 1706 "CN=JS,DC=Example,DC=NET", the "DC=Example,DC=NET" entry did not 1707 exist, and the "DC=NET" entry did exist, then the server would return 1708 the error noSuchObject with the matchedDN field containing "DC=NET". 1709 If the parent entry exists but is not in a naming context held by the 1710 server, the server SHOULD return a referral to the server holding the 1711 parent entry. 1713 Servers implementations SHOULD NOT restrict where entries can be 1714 located in the directory unless DIT structure rules are in place. 1715 Some servers MAY allow the administrator to restrict the classes of 1716 entries which can be added to the directory. 1718 Upon receipt of an Add Request, a server will attempt to perform the 1719 add requested. The result of the add attempt will be returned to the 1720 client in the Add Response, defined as follows: 1722 AddResponse ::= [APPLICATION 9] LDAPResult 1724 A response of success indicates that the new entry is present in the 1725 directory. 1727 Lightweight Directory Access Protocol Version 3 1729 4.8. Delete Operation 1731 The Delete Operation allows a client to request the removal of an 1732 entry from the directory. The Delete Request is defined as follows: 1734 DelRequest ::= [APPLICATION 10] LDAPDN 1736 The Delete Request consists of the Distinguished Name of the entry to 1737 be deleted. Note that the server will not dereference aliases while 1738 resolving the name of the target entry to be removed, and that only 1739 leaf entries (those with no subordinate entries) can be deleted with 1740 this operation. 1742 The result of the delete attempted by the server upon receipt of a 1743 Delete Request is returned in the Delete Response, defined as 1744 follows: 1746 DelResponse ::= [APPLICATION 11] LDAPResult 1748 Upon receipt of a Delete Request, a server will attempt to perform 1749 the entry removal requested. The result of the delete attempt will be 1750 returned to the client in the Delete Response. 1752 4.9. Modify DN Operation 1754 The Modify DN Operation allows a client to change the leftmost (least 1755 significant) component of the name of an entry in the directory, or 1756 to move a subtree of entries to a new location in the directory. The 1757 Modify DN Request is defined as follows: 1759 ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { 1760 entry LDAPDN, 1761 newrdn RelativeLDAPDN, 1762 deleteoldrdn BOOLEAN, 1763 newSuperior [0] LDAPDN OPTIONAL } 1765 Parameters of the Modify DN Request are: 1767 - entry: the Distinguished Name of the entry to be changed. This 1768 entry may or may not have subordinate entries. Note that the 1769 server will not dereference any aliases in locating the entry to 1770 be changed. 1772 - newrdn: the RDN that will form the leftmost component of the new 1773 name of the entry. 1775 - deleteoldrdn: a boolean parameter that controls whether the old 1776 RDN attribute values are to be retained as attributes of the 1777 entry, or deleted from the entry. 1779 Lightweight Directory Access Protocol Version 3 1781 - newSuperior: if present, this is the Distinguished Name of the 1782 entry which becomes the immediate superior of the existing entry. 1784 The result of the name change attempted by the server upon receipt of 1785 a Modify DN Request is returned in the Modify DN Response, defined as 1786 follows: 1788 ModifyDNResponse ::= [APPLICATION 13] LDAPResult 1790 Upon receipt of a ModifyDNRequest, a server will attempt to perform 1791 the name change. The result of the name change attempt will be 1792 returned to the client in the Modify DN Response. 1794 For example, if the entry named in the "entry" parameter was "cn=John 1795 Smith,c=US", the newrdn parameter was "cn=John Cougar Smith", and the 1796 newSuperior parameter was absent, then this operation would attempt 1797 to rename the entry to be "cn=John Cougar Smith,c=US". If there was 1798 already an entry with that name, the operation would fail with error 1799 code entryAlreadyExists. 1801 If the deleteoldrdn parameter is TRUE, the values forming the old RDN 1802 are deleted from the entry. If the deleteoldrdn parameter is FALSE, 1803 the values forming the old RDN will be retained as non-distinguished 1804 attribute values of the entry. The server may not perform the 1805 operation and return an error code if the setting of the deleteoldrdn 1806 parameter would cause a schema inconsistency in the entry. 1808 Note that X.500 restricts the ModifyDN operation to only affect 1809 entries that are contained within a single server. If the LDAP server 1810 is mapped onto DAP, then this restriction will apply, and the 1811 resultCode affectsMultipleDSAs will be returned if this error 1812 occurred. In general clients MUST NOT expect to be able to perform 1813 arbitrary movements of entries and subtrees between servers. 1815 4.10. Compare Operation 1817 The Compare Operation allows a client to compare an assertion 1818 provided with an entry in the directory. The Compare Request is 1819 defined as follows: 1821 CompareRequest ::= [APPLICATION 14] SEQUENCE { 1822 entry LDAPDN, 1823 ava AttributeValueAssertion } 1825 Parameters of the Compare Request are: 1827 - entry: the name of the entry to be compared with. Note that the 1828 server SHOULD NOT dereference any aliases in locating the entry to 1829 be compared with. 1831 - ava: the assertion with which an attribute in the entry is to be 1832 compared. 1834 Lightweight Directory Access Protocol Version 3 1836 The result of the compare attempted by the server upon receipt of a 1837 Compare Request is returned in the Compare Response, defined as 1838 follows: 1840 CompareResponse ::= [APPLICATION 15] LDAPResult 1842 Upon receipt of a Compare Request, a server will attempt to perform 1843 the requested comparison using the EQUALITY matching rule for the 1844 attribute type. The result of the comparison will be returned to the 1845 Comment 1846 : 1848 s 1849 h 1850 o 1851 u 1852 l 1853 d 1854 w 1855 e 1857 t 1858 a 1859 l 1860 k 1862 a 1863 b 1864 o 1865 u 1866 t 1867 w 1868 h 1869 a 1870 t 1872 client in the Compare Response. Note that errors and the result of 1873 t 1874 o 1876 d 1877 o 1878 w 1879 h 1880 e 1881 n 1883 t 1884 e 1885 h 1887 a 1888 t 1889 t 1890 r 1892 i 1893 s 1894 m 1895 i 1896 s 1897 s 1898 i 1899 n 1900 g 1902 v 1903 s 1905 a 1906 t 1907 t 1908 r 1910 i 1911 s 1912 n 1913 ' 1914 t 1916 comparison are all returned in the same construct. 1917 i 1918 n 1920 s 1921 c 1922 h 1923 ema 1924 ? 1926 Shou 1927 l 1928 d 1929 w 1930 e 1932 d 1933 e 1934 s 1935 c 1936 r 1937 i 1938 b 1939 e 1940 w 1941 h 1942 a 1943 t 1945 h 1946 a 1947 p 1948 p 1949 e 1950 n 1951 s 1953 i 1954 f 1956 t 1957 h 1958 e 1959 r 1960 e 1961 ' 1962 s 1964 n 1965 o 1967 e 1968 q 1969 u 1970 a 1971 l 1972 i 1973 t 1974 y 1975 m 1976 a 1977 t 1978 c 1979 h 1980 i 1981 n 1982 g 1984 r 1985 u 1986 l 1987 e 1988 ? 1989 Note that some directory systems may establish access controls which 1990 permit the values of certain attributes (such as userPassword) to be 1991 compared but not read. 1993 4.11. Abandon Operation 1995 The function of the Abandon Operation is to allow a client to request 1996 that the server abandon an outstanding operation. The Abandon Request 1997 is defined as follows: 1999 AbandonRequest ::= [APPLICATION 16] MessageID 2001 The MessageID MUST be that of an operation which was requested 2002 earlier in this connection. The abandon request itself has its own 2003 message id. This is distinct from the id of the earlier operation 2004 being abandoned. 2006 There is no response defined in the Abandon Operation. Upon 2007 transmission of an Abandon Operation, the server MAY abandon the 2008 operation identified by the Message ID in the Abandon Request. 2009 Operation responses are not sent for successfully abandoned 2010 operations. Clients can determine that an operation has been 2011 abandoned by performing a subsequent bind operation. 2013 Abandon and Unbind operations cannot be abandoned. The ability to 2014 abandon other (particularly update) operations is at the discretion 2015 of the server. 2017 In the event that a server receives an Abandon Request on a Search 2018 Operation in the midst of transmitting responses to the search, that 2019 server MUST cease transmitting entry responses to the abandoned 2020 request immediately, and MUST NOT send the SearchResponseDone. Of 2021 course, the server MUST ensure that only properly encoded LDAPMessage 2022 PDUs are transmitted. 2024 Clients MUST NOT send abandon requests for the same operation 2025 multiple times, and MUST also be prepared to receive results from 2026 operations it has abandoned (since these may have been in transit 2027 when the abandon was requested, or are not able to be abandoned). 2029 Lightweight Directory Access Protocol Version 3 2031 Servers MUST discard abandon requests for message IDs they do not 2032 recognize, for operations which cannot be abandoned, and for 2033 operations which have already been abandoned. 2035 4.12. Extended Operation 2037 An extension mechanism has been added in this version of LDAP, in 2038 order to allow additional operations to be defined for services not 2039 available elsewhere in this protocol, for instance digitally signed 2040 operations and results. 2042 The extended operation allows clients to make requests and receive 2043 responses with predefined syntaxes and semantics. These may be 2044 defined in RFCs or be private to particular implementations. Each 2045 request MUST have a unique OBJECT IDENTIFIER assigned to it. 2047 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 2048 requestName [0] LDAPOID, 2049 requestValue [1] OCTET STRING OPTIONAL } 2051 The requestName is a dotted-decimal representation of the OBJECT 2052 IDENTIFIER corresponding to the request. The requestValue is 2053 information in a form defined by that request, encapsulated inside an 2054 OCTET STRING. 2056 The server will respond to this with an LDAPMessage containing the 2057 ExtendedResponse. 2059 ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 2060 COMPONENTS OF LDAPResult, 2061 responseName [10] LDAPOID OPTIONAL, 2062 response [11] OCTET STRING OPTIONAL } 2064 If the server does not recognize the request name, it MUST return 2065 only the response fields from LDAPResult, containing the 2066 protocolError result code. 2068 5. Protocol Element Encodings and Transfer 2070 One underlying service is defined here. Clients and servers SHOULD 2071 implement the mapping of LDAP over TCP described in 5.2.1. 2073 5.1. Protocol Encoding 2075 The protocol elements of LDAP are encoded for exchange using the 2076 Basic Encoding Rules (BER) [X.690] of ASN.1 [X.680]. However, due to 2077 the high overhead involved in using certain elements of the BER, the 2078 following additional restrictions are placed on BER-encodings of LDAP 2079 protocol elements: 2081 (1) Only the definite form of length encoding will be used. 2083 Lightweight Directory Access Protocol Version 3 2085 (2) OCTET STRING values will be encoded in the primitive form only. 2087 (3) If the value of a BOOLEAN type is true, the encoding MUST have 2088 its contents octets set to hex "FF". 2090 (4) If a value of a type is its default value, it MUST be absent. 2091 Only some BOOLEAN and INTEGER types have default values in this 2092 protocol definition. 2094 These restrictions do not apply to ASN.1 types encapsulated inside of 2095 OCTET STRING values, such as attribute values, unless otherwise 2096 Comment 2097 : 2099 Wha 2100 t 2102 a 2103 b 2104 o 2105 u 2106 t 2108 c 2109 o 2110 n 2111 t 2112 r 2113 o 2114 l 2116 v 2117 a 2118 l 2119 u 2120 e 2121 s 2123 noted. 2124 a 2125 n 2126 d 2128 e 2129 x 2130 t 2131 e 2132 n 2133 s 2134 i 2135 o 2136 n 2138 v 2139 a 2140 l 2141 u 2142 e 2143 s 2144 ? 2146 5.2. Transfer Protocols 2148 This protocol is designed to run over connection-oriented, reliable 2149 transports, with all 8 bits in an octet being significant in the data 2150 stream. 2152 5.2.1. Transmission Control Protocol (TCP) 2154 The encoded LDAPMessage PDUs are mapped directly onto the TCP 2155 bytestream using the BER-based encoding described in section 5.1. It 2156 is recommended that server implementations running over the TCP 2157 provide a protocol listener on the assigned port, 389. Servers may 2158 instead provide a listener on a different port number. Clients MUST 2159 support contacting servers on any valid TCP port. 2161 6. Implementation Guidelines 2163 This document describes an Internet protocol. 2165 6.1. Server Implementations 2167 The server MUST be capable of recognizing all the mandatory attribute 2168 type names and implement the syntaxes specified in [Syntaxes]. 2169 Servers MAY also recognize additional attribute type names. 2171 6.2. Client Implementations 2173 Clients which request referrals MUST ensure that they do not loop 2174 between servers. They MUST NOT repeatedly contact the same server for 2175 the same request with the same target entry name, scope and filter. 2176 Some clients may be using a counter that is incremented each time 2177 referral handling occurs for an operation, and these kinds of clients 2178 MUST be able to handle a DIT with at least ten layers of naming 2179 contexts between the root and a leaf entry. 2181 Lightweight Directory Access Protocol Version 3 2183 In the absence of prior agreements with servers, clients SHOULD NOT 2184 assume that servers support any particular schemas beyond those 2185 referenced in section 6.1. Different schemas can have different 2186 attribute types with the same names. The client can retrieve the 2187 subschema entries referenced by the subschemaSubentry attribute in 2188 the server's root DSE or in entries held by the server. 2190 7. Security Considerations 2192 When used with a connection-oriented transport, this version of the 2193 protocol provides facilities for simple authentication using a 2194 cleartext password, as well as any SASL mechanism [RFC2222]. SASL 2195 allows for integrity and privacy services to be negotiated. 2197 It is also permitted that the server can return its credentials to 2198 the client, if it chooses to do so. 2200 Use of cleartext password is strongly discouraged where the 2201 underlying transport service cannot guarantee confidentiality and may 2202 result in disclosure of the password to unauthorized parties. 2204 When used with SASL, it should be noted that the name field of the 2205 BindRequest is not protected against modification. Thus if the 2206 distinguished name of the client (an LDAPDN) is agreed through the 2207 negotiation of the credentials, it takes precedence over any value in 2208 the unprotected name field. 2210 Implementations which cache attributes and entries obtained via LDAP 2211 MUST ensure that access controls are maintained if that information 2212 is to be provided to multiple clients, since servers may have access 2213 control policies which prevent the return of entries or attributes in 2214 search results except to particular authenticated clients. For 2215 example, caches could serve result information only to the client 2216 whose request caused it to be in the cache. 2218 8. Acknowledgements 2220 This document is an update to RFC 2251, by Mark Wahl, Tim Howes, and 2221 Steve Kille. Their work along with the input of individuals of the 2222 IETF LDAPEXT, LDUP, LDAPBIS, and other Working Groups is gratefully 2223 acknowledged. 2225 9. Normative References 2227 [X.500] ITU-T Rec. X.500, "The Directory: Overview of Concepts, 2228 Models and Service", 1993. 2230 [Roadmap] K. Zeilenga (editor), "LDAP: Technical Specification Road 2231 Map", draft-ietf-ldapbis-roadmap-xx.txt (a work in 2232 progress). 2234 Lightweight Directory Access Protocol Version 3 2236 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2237 Requirement Levels", RFC 2119, March 1997. 2239 [X.680] ITU-T Recommendation X.680 (1997) | ISO/IEC 8824-1:1998 2240 Information Technology - Abstract Syntax Notation One 2241 (ASN.1): Specification of basic notation 2243 [X.690] ITU-T Rec. X.690, "Specification of ASN.1 encoding rules: 2244 Basic, Canonical, and Distinguished Encoding Rules", 1994. 2246 [LDAPIANA] K. Zeilenga, "IANA Considerations for LDAP", draft-ietf- 2247 ldapbis-xx.txt (a work in progress). 2249 [ISO10646] Universal Multiple-Octet Coded Character Set (UCS) - 2250 Architecture and Basic Multilingual Plane, ISO/IEC 10646-1 2251 : 1993. 2253 [RFC2044] Yergeau, F., "UTF-8, a transformation format of Unicode 2254 and ISO 10646", RFC 2044, October 1996. 2256 [Models] K. Zeilenga, "LDAP: The Models", draft-ietf-ldapbis- 2257 models-xx.txt (a work in progress). 2259 [LDAPDN] K. Zeilenga (editor), "LDAP: String Representation of 2260 Distinguished Names", draft-ietf-ldapbis-dn-xx.txt, (a 2261 work in progress). 2263 [Syntaxes] K. Dally (editor), "LDAP: Syntaxes", draft-ietf-ldapbis- 2264 syntaxes-xx.txt, (a work in progress). 2266 [X.501] ITU-T Rec. X.501, "The Directory: Models", 1993. 2268 [X.511] ITU-T Rec. X.511, "The Directory: Abstract Service 2269 Definition", 1993. 2271 [RFC2396] Berners-Lee, T., Fielding, R., and L. Masinter Uniform 2272 Resource Identifiers (URI): Generic Syntax", RFC 2396, 2273 August 1998. 2275 [AuthMeth] R. Harrison (editor), "LDAP: Authentication Methods", 2276 draft-ietf-ldapbis-authmeth-xx.txt, (a work in progress). 2278 [RFC2222] Meyers, J., "Simple Authentication and Security Layer", 2279 RFC 2222, October 1997. 2281 10. Editor's Address 2283 Jim Sermersheim 2284 Novell, Inc. 2285 1800 South Novell Place 2286 Provo, Utah 84606, USA 2287 jimse@novell.com 2288 +1 801 861-3088 2289 Lightweight Directory Access Protocol Version 3 2291 Appendix A - LDAP Result Codes 2293 This normative appendix details additional considerations regarding 2294 LDAP result codes and provides a brief, general description of each 2295 LDAP result code enumerated in Section 4.1.10. 2297 Additional result codes MAY be defined for use with extensions. 2298 Client implementations SHALL treat any result code which they do not 2299 recognize as an unknown error condition. 2301 A.1 Non-Error Result Codes 2302 These result codes (called "non-error" result codes) do not indicate 2303 an error condition: 2304 success(0), 2305 compareTrue(6), 2306 compareFalse(7), 2307 referral(10), and 2308 saslBindInProgress(14). 2310 The success(0), compareTrue(6), and compare(7) result codes indicate 2311 successful completion (and, hence, are called to as "successful" 2312 result codes). 2314 The referral(10) and saslBindInProgress(14) indicate the client is 2315 required to take additional action to complete the operation 2317 A.2 Error Result Codes 2319 A.3 Classes and Precedence of Error Result Codes 2321 Result codes that indicate error conditions (and, hence, are called 2322 "error" result codes) fall into 6 classes. The following list 2323 specifies the precedence of error classes to be used when more than 2324 one error is detected [X511]: 2325 1) Name Errors (codes 32 - 34, 36) 2326 - a problem related to a name (DN or RDN), 2327 2) Update Errors (codes 64 - 69, 71) 2328 - a problem related to an update operation, 2329 3) Attribute Errors (codes 16 - 21) 2330 - a problem related to a supplied attribute, 2331 4) Security Errors (codes 8, 13, 48 - 50) 2332 - a security related problem, 2333 5) Service Problem (codes 3, 4, 7, 11, 12, 51 - 54, 80) 2334 - a problem related to the provision of the service, and 2335 6) Protocol Problem (codes 1, 2) 2336 - a problem related to protocol structure or semantics. 2338 Server implementations SHALL NOT continue processing an operation 2339 after it has determined that an error is to be reported. If the 2340 server detects multiple errors simultaneously, the server SHOULD 2341 report the error with the highest precedence. 2343 Existing LDAP result codes are described as follows: 2345 Lightweight Directory Access Protocol Version 3 2347 success (0) 2349 Indicates successful completion of an operation. 2351 This result code is normally not returned by the compare 2352 operation, see compareFalse (5) and compareTrue (6). 2354 operationsError (1) 2356 Indicates that the operation is not properly sequenced with 2357 relation to other operations (of same or different type). 2359 For example, this code is returned if the client attempts to 2360 Start TLS [RFC2830] while there are other operations 2361 outstanding or if TLS was already established. 2363 For the bind operation only, the code indicates the server 2364 Comment 2365 : 2367 Do 2368 w 2369 e 2371 r 2372 e 2373 a 2374 l 2375 l 2376 y 2377 w 2378 a 2379 n 2380 t 2382 t 2383 o 2385 c 2386 a 2387 r 2388 r 2389 y 2391 encountered an internal error. 2392 t 2393 h 2394 i 2395 s 2397 o 2398 n 2399 ? 2401 protocolError (2) 2403 Indicates the server received data which has incorrect 2404 structure. 2406 For bind operation only, the code may be resulted to indicate 2407 Comment 2408 : 2410 Do 2411 w 2412 e 2414 r 2415 e 2416 a 2417 l 2418 l 2419 y 2420 w 2421 a 2422 n 2423 t 2425 t 2426 o 2428 c 2429 a 2430 r 2431 r 2432 y 2434 the server does not support the requested protocol version. 2435 t 2436 h 2437 i 2438 s 2440 o 2441 n 2442 ? 2444 timeLimitExceeded (3) 2446 Indicates that the time limit specified by the client was 2447 exceeded before the operation could be completed. 2449 sizeLimitExceeded (4) 2451 Indicates that the size limit specified by the client was 2452 exceeded before the operation could be completed. 2454 compareFalse (5) 2456 Indicates that the operation successfully completes and the 2457 assertion has evaluated to TRUE. 2459 This result code is normally only returned by the compare 2460 operation. 2462 compareTrue (6) 2463 Lightweight Directory Access Protocol Version 3 2465 Indicates that the operation successfully completes and the 2466 assertion has evaluated to FALSE. 2468 This result code is normally only returned by the compare 2469 operation. 2471 authMethodNotSupported (7) 2473 Indicates that authentication method or mechanism is not 2474 supported. 2476 strongAuthRequired (8) 2478 Except when returned in a Notice of Disconnect (see section 2479 4.4.1), this indicates that the server requires the client to 2480 authentication using a strong(er) mechanism. 2482 referral (10) 2484 Indicates that a referral needs to be chased to complete the 2485 operation (see section 4.1.11). 2487 adminLimitExceeded (11) 2489 Indicates that an admnistrative limit has been exceeded. 2491 unavailableCriticalExtension (12) 2493 Indicates that server cannot perform a critical extension 2494 (see section 4.1.12). 2496 confidentialityRequired (13) 2498 Indicates that data confidentiality protections are required. 2500 saslBindInProgress (14) 2502 Indicates the server requires the client to send a new bind 2503 request, with the same sasl mechanism, to continue the 2504 authentication process (see section 4.2). 2506 noSuchAttribute (16) 2508 Indicates that the named entry does not contain the specified 2509 attribute or attribute value. 2511 Lightweight Directory Access Protocol Version 3 2513 undefinedAttributeType (17) 2515 Indicates that a request field contains an undefined 2516 attribute type. 2518 inappropriateMatching (18) 2520 Indicates that a request cannot be completed due to an 2521 inappropriate matching. 2523 constraintViolation (19) 2525 Indicates that the client supplied an attribute value which 2526 does not conform to constraints placed upon it by the data 2527 model. 2529 For example, this code is returned when the multiple values 2530 are supplied to an attribute which has a SINGLE-VALUE 2531 constraint. 2533 attributeOrValueExists (20) 2535 Indicates that the client supplied an attribute or value to 2536 be added to an entry already exists. 2538 invalidAttributeSyntax (21) 2540 Indicates that a purported attribute value does not conform 2541 to the syntax of the attribute. 2543 noSuchObject (32) 2545 Indicates that the object does not exist in the DIT. 2547 aliasProblem (33) 2549 Indicates that an alias problem has occurred. 2551 invalidDNSyntax (34) 2553 Indicates that a LDAPDN or RelativeLDAPDN field (e.g. search 2554 base, target entry, ModifyDN newrdn, etc.) of a request does 2555 not conform to the required syntax or contains attribute 2556 values which do not conform to the syntax of the attribute's 2557 type. 2559 Lightweight Directory Access Protocol Version 3 2561 aliasDereferencingProblem (36) 2563 Indicates that a problem in dereferencing an alias. 2565 inappropriateAuthentication (48) 2567 Indicates the server requires the client which had attempted 2568 to bind anonymously or without supplying credentials to 2569 provide some form of credentials, 2571 invalidCredentials (49) 2573 Indicates the supplied credentials are invalid. 2575 insufficientAccessRights (50) 2577 Indicates that the client does not have sufficient access 2578 rights to perform the operation. 2580 busy (51) 2582 Indicates that the server is busy. 2584 unavailable (52) 2586 Indicates that the server is shutting down or a subsystem 2587 necessary to complete the operation is offline. 2589 unwillingToPerform (53) 2591 Indicates that the server is unwilling to perform the 2592 operation. 2594 loopDetect (54) 2596 Indicates that the server has detected an internal loop. 2598 namingViolation (64) 2600 Indicates that the entry name violates naming restrictions. 2602 objectClassViolation (65) 2604 Indicates that the entry violates object class restrictions. 2606 Lightweight Directory Access Protocol Version 3 2608 notAllowedOnNonLeaf (66) 2610 Indicates that operation is inappropriately acting upon a 2611 non-leaf entry. 2613 notAllowedOnRDN (67) 2615 Indicates that the operation is inappropriately attempting to 2616 remove a value which forms the entry's relative distinguished 2617 name. 2619 entryAlreadyExists (68) 2621 Indicates that the request cannot be added fulfilled as the 2622 entry already exists. 2624 objectClassModsProhibited (69) 2626 Indicates that the attempt to modify the object class(es) of 2627 an entry objectClass attribute is prohibited. 2629 For example, this code is returned when a when a client 2630 attempts to modify the structural object class of an entry. 2632 affectsMultipleDSAs (71) 2634 Indicates that the operation cannot be completed as it 2635 affects multiple servers (DSAs). 2637 other (80) 2639 Indicates the server has encountered an internal error. 2641 Lightweight Directory Access Protocol Version 3 2643 Appendix B - Complete ASN.1 Definition 2645 This appendix is normative. 2647 Lightweight-Directory-Access-Protocol-V3 DEFINITIONS 2648 IMPLICIT TAGS 2649 EXTENSIBILITY IMPLIED ::= 2651 BEGIN 2653 LDAPMessage ::= SEQUENCE { 2654 messageID MessageID, 2655 protocolOp CHOICE { 2656 bindRequest BindRequest, 2657 bindResponse BindResponse, 2658 unbindRequest UnbindRequest, 2659 searchRequest SearchRequest, 2660 searchResEntry SearchResultEntry, 2661 searchResDone SearchResultDone, 2662 searchResRef SearchResultReference, 2663 modifyRequest ModifyRequest, 2664 modifyResponse ModifyResponse, 2665 addRequest AddRequest, 2666 addResponse AddResponse, 2667 delRequest DelRequest, 2668 delResponse DelResponse, 2669 modDNRequest ModifyDNRequest, 2670 modDNResponse ModifyDNResponse, 2671 compareRequest CompareRequest, 2672 compareResponse CompareResponse, 2673 abandonRequest AbandonRequest, 2674 extendedReq ExtendedRequest, 2675 extendedResp ExtendedResponse, 2676 ... }, 2677 controls [0] Controls OPTIONAL } 2679 MessageID ::= INTEGER (0 .. maxInt) 2681 maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- 2683 LDAPString ::= OCTET STRING -- UTF-8 encoded, 2684 -- [ISO10646] characters 2686 LDAPOID ::= OCTET STRING -- Constrained to numericoid [Models] 2688 LDAPDN ::= LDAPString 2690 RelativeLDAPDN ::= LDAPString 2692 AttributeDescription ::= LDAPString 2693 -- Constrained to attributedescription 2694 -- [Models] 2696 AttributeDescriptionList ::= SEQUENCE OF 2697 Lightweight Directory Access Protocol Version 3 2699 AttributeDescription 2701 AttributeValue ::= OCTET STRING 2703 AttributeValueAssertion ::= SEQUENCE { 2704 attributeDesc AttributeDescription, 2705 assertionValue AssertionValue } 2707 AssertionValue ::= OCTET STRING 2709 Attribute ::= SEQUENCE { 2710 type AttributeDescription, 2711 vals SET OF AttributeValue } 2713 MatchingRuleId ::= LDAPString 2715 LDAPResult ::= SEQUENCE { 2716 resultCode ENUMERATED { 2717 success (0), 2718 operationsError (1), 2719 protocolError (2), 2720 timeLimitExceeded (3), 2721 sizeLimitExceeded (4), 2722 compareFalse (5), 2723 compareTrue (6), 2724 authMethodNotSupported (7), 2725 strongAuthRequired (8), 2726 -- 9 reserved -- 2727 referral (10), 2728 adminLimitExceeded (11), 2729 unavailableCriticalExtension (12), 2730 confidentialityRequired (13), 2731 saslBindInProgress (14), 2732 noSuchAttribute (16), 2733 undefinedAttributeType (17), 2734 inappropriateMatching (18), 2735 constraintViolation (19), 2736 attributeOrValueExists (20), 2737 invalidAttributeSyntax (21), 2738 -- 22-31 unused -- 2739 noSuchObject (32), 2740 aliasProblem (33), 2741 invalidDNSyntax (34), 2742 -- 35 reserved for undefined isLeaf -- 2743 aliasDereferencingProblem (36), 2744 -- 37-47 unused -- 2745 inappropriateAuthentication (48), 2746 invalidCredentials (49), 2747 insufficientAccessRights (50), 2748 busy (51), 2749 unavailable (52), 2750 unwillingToPerform (53), 2751 loopDetect (54), 2752 -- 55-63 unused -- 2753 Lightweight Directory Access Protocol Version 3 2755 namingViolation (64), 2756 objectClassViolation (65), 2757 notAllowedOnNonLeaf (66), 2758 notAllowedOnRDN (67), 2759 entryAlreadyExists (68), 2760 objectClassModsProhibited (69), 2761 -- 70 reserved for CLDAP -- 2762 affectsMultipleDSAs (71), 2763 -- 72-79 unused -- 2764 other (80), 2765 ... }, 2766 -- 81-90 reserved for APIs -- 2767 matchedDN LDAPDN, 2768 errorMessage LDAPString, 2769 referral [3] Referral OPTIONAL } 2771 Referral ::= SEQUENCE OF LDAPURL 2773 LDAPURL ::= LDAPString -- limited to characters permitted in 2774 -- URLs 2776 Controls ::= SEQUENCE OF Control 2778 Control ::= SEQUENCE { 2779 controlType LDAPOID, 2780 criticality BOOLEAN DEFAULT FALSE, 2781 controlValue OCTET STRING OPTIONAL } 2783 BindRequest ::= [APPLICATION 0] SEQUENCE { 2784 version INTEGER (1 .. 127), 2785 name LDAPDN, 2786 authentication AuthenticationChoice } 2788 AuthenticationChoice ::= CHOICE { 2789 simple [0] OCTET STRING, 2790 -- 1 and 2 reserved 2791 sasl [3] SaslCredentials, 2792 ... } 2794 SaslCredentials ::= SEQUENCE { 2795 mechanism LDAPString, 2796 credentials OCTET STRING OPTIONAL } 2798 BindResponse ::= [APPLICATION 1] SEQUENCE { 2799 COMPONENTS OF LDAPResult, 2800 serverSaslCreds [7] OCTET STRING OPTIONAL } 2802 UnbindRequest ::= [APPLICATION 2] NULL 2804 SearchRequest ::= [APPLICATION 3] SEQUENCE { 2805 baseObject LDAPDN, 2806 scope ENUMERATED { 2807 baseObject (0), 2808 singleLevel (1), 2809 Lightweight Directory Access Protocol Version 3 2811 wholeSubtree (2) }, 2812 derefAliases ENUMERATED { 2813 neverDerefAliases (0), 2814 derefInSearching (1), 2815 derefFindingBaseObj (2), 2816 derefAlways (3) }, 2817 sizeLimit INTEGER (0 .. maxInt), 2818 timeLimit INTEGER (0 .. maxInt), 2819 typesOnly BOOLEAN, 2820 filter Filter, 2821 attributes AttributeDescriptionList } 2823 Filter ::= CHOICE { 2824 and [0] SET SIZE (1..MAX) OF Filter, 2825 or [1] SET SIZE (1..MAX) OF Filter, 2826 not [2] Filter, 2827 equalityMatch [3] AttributeValueAssertion, 2828 substrings [4] SubstringFilter, 2829 greaterOrEqual [5] AttributeValueAssertion, 2830 lessOrEqual [6] AttributeValueAssertion, 2831 present [7] AttributeDescription, 2832 approxMatch [8] AttributeValueAssertion, 2833 extensibleMatch [9] MatchingRuleAssertion } 2835 SubstringFilter ::= SEQUENCE { 2836 type AttributeDescription, 2837 -- at least one must be present, 2838 -- initial and final can occur at most once 2839 substrings SEQUENCE OF CHOICE { 2840 initial [0] AssertionValue, 2841 any [1] AssertionValue, 2842 final [2] AssertionValue } } 2844 MatchingRuleAssertion ::= SEQUENCE { 2845 matchingRule [1] MatchingRuleId OPTIONAL, 2846 type [2] AttributeDescription OPTIONAL, 2847 matchValue [3] AssertionValue, 2848 dnAttributes [4] BOOLEAN DEFAULT FALSE } 2850 SearchResultEntry ::= [APPLICATION 4] SEQUENCE { 2851 objectName LDAPDN, 2852 attributes PartialAttributeList } 2854 PartialAttributeList ::= SEQUENCE OF SEQUENCE { 2855 type AttributeDescription, 2856 vals SET OF AttributeValue } 2858 SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 2860 SearchResultDone ::= [APPLICATION 5] LDAPResult 2862 ModifyRequest ::= [APPLICATION 6] SEQUENCE { 2863 object LDAPDN, 2864 modification SEQUENCE OF SEQUENCE { 2865 Lightweight Directory Access Protocol Version 3 2867 operation ENUMERATED { 2868 add (0), 2869 delete (1), 2870 replace (2) }, 2871 modification AttributeTypeAndValues } } 2873 AttributeTypeAndValues ::= SEQUENCE { 2874 type AttributeDescription, 2875 vals SET OF AttributeValue } 2877 ModifyResponse ::= [APPLICATION 7] LDAPResult 2879 AddRequest ::= [APPLICATION 8] SEQUENCE { 2880 entry LDAPDN, 2881 attributes AttributeList } 2883 AttributeList ::= SEQUENCE OF SEQUENCE { 2884 type AttributeDescription, 2885 vals SET OF AttributeValue } 2887 AddResponse ::= [APPLICATION 9] LDAPResult 2889 DelRequest ::= [APPLICATION 10] LDAPDN 2891 DelResponse ::= [APPLICATION 11] LDAPResult 2893 ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { 2894 entry LDAPDN, 2895 newrdn RelativeLDAPDN, 2896 deleteoldrdn BOOLEAN, 2897 newSuperior [0] LDAPDN OPTIONAL } 2899 ModifyDNResponse ::= [APPLICATION 13] LDAPResult 2901 CompareRequest ::= [APPLICATION 14] SEQUENCE { 2902 entry LDAPDN, 2903 ava AttributeValueAssertion } 2905 CompareResponse ::= [APPLICATION 15] LDAPResult 2907 AbandonRequest ::= [APPLICATION 16] MessageID 2909 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 2910 requestName [0] LDAPOID, 2911 requestValue [1] OCTET STRING OPTIONAL } 2913 ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 2914 COMPONENTS OF LDAPResult, 2915 responseName [10] LDAPOID OPTIONAL, 2916 response [11] OCTET STRING OPTIONAL } 2918 END 2919 Lightweight Directory Access Protocol Version 3 2921 Appendix C - Change History 2922 2925 C.1 Changes made to RFC 2251: 2927 C.1.1 Editorial 2929 - Bibliography References: Changed all bibliography references to 2930 use a long name form for readability. 2931 - Changed occurrences of "unsupportedCriticalExtension" 2932 "unavailableCriticalExtension" 2933 - Fixed a small number of misspellings (mostly dropped letters). 2935 C.1.2 Section 1 2937 - Removed IESG note. 2939 C.1.3 Section 9 2941 - Added references to RFCs 1823, 2234, 2829 and 2830. 2943 C.2 Changes made to draft-ietf-ldapbis-protocol-00.txt: 2945 C.2.1 Section 4.1.6 2947 - In the first paragraph, clarified what the contents of an 2948 AttributeValue are. There was confusion regarding whether or not 2949 an AttributeValue that is BER encoded (due to the "binary" option) 2950 is to be wrapped in an extra OCTET STRING. 2951 - To the first paragraph, added wording that doesn't restrict other 2952 transfer encoding specifiers from being used. The previous wording 2953 only allowed for the string encoding and the ;binary encoding. 2954 - To the first paragraph, added a statement restricting multiple 2955 options that specify transfer encoding from being present. This 2956 was never specified in the previous version and was seen as a 2957 potential interoperability problem. 2958 - Added a third paragraph stating that the ;binary option is 2959 currently the only option defined that specifies the transfer 2960 encoding. This is for completeness. 2962 C.2.2 Section 4.1.7 2964 - Generalized the second paragraph to read "If an option specifying 2965 the transfer encoding is present in attributeDesc, the 2966 AssertionValue is encoded as specified by the option...". 2967 Previously, only the ;binary option was mentioned. 2969 C.2.3 Sections 4.2, 4.9, 4.10 2971 - Added alias dereferencing specifications. In the case of modDN, 2972 followed precedent set on other update operations (... alias is 2973 not dereferenced...) In the case of bind and compare stated that 2974 Lightweight Directory Access Protocol Version 3 2976 servers SHOULD NOT dereference aliases. Specifications were added 2977 because they were missing from the previous version and caused 2978 interoperability problems. Concessions were made for bind and 2979 compare (neither should have ever allowed alias dereferencing) by 2980 using SHOULD NOT language, due to the behavior of some existing 2981 implementations. 2983 C.2.4 Sections 4.5 and Appendix A 2985 - Changed SubstringFilter.substrings.initial, any, and all from 2986 LDAPString to AssertionValue. This was causing an incompatibility 2987 with X.500 and confusion among other TS RFCs. 2989 C.3 Changes made to draft-ietf-ldapbis-protocol-01.txt: 2991 C.3.1 Section 3.4 2993 - Reworded text surrounding subschemaSubentry to reflect that it is 2994 a single-valued attribute that holds the schema for the root DSE. 2995 Also noted that if the server masters entries that use differing 2996 schema, each entry's subschemaSubentry attribute must be 2997 interrogated. This may change as further fine-tuning is done to 2998 the data model. 3000 C.3.2 Section 4.1.12 3002 - Specified that the criticality field is only used for requests and 3003 not for unbind or abandon. Noted that it is ignored for all other 3004 operations. 3006 C.3.3 Section 4.2 3008 - Noted that Server behavior is undefined when the name is a null 3009 value, simple authentication is used, and a password is specified. 3011 C.3.4 Section 4.2.(various) 3013 - Changed "unauthenticated" to "anonymous" and "DN" and "LDAPDN" to 3014 "name" 3016 C.3.5 Section 4.2.2 3018 - Changed "there is no authentication or encryption being performed 3019 by a lower layer" to "the underlying transport service cannot 3020 guarantee confidentiality" 3022 C.3.6 Section 4.5.2 3024 - Removed all mention of ExtendedResponse due to lack of 3025 implementation. 3027 C.4 Changes made to draft-ietf-ldapbis-protocol-02.txt: 3029 Lightweight Directory Access Protocol Version 3 3031 C.4.1 Section 4 3033 - Removed "typically" from "and is typically transferred" in the 3034 first paragraph. We know of no (and can conceive of no) case where 3035 this isn't true. 3036 - Added "Section 5.1 specifies how the LDAP protocol is encoded." To 3037 the first paragraph. Added this cross reference for readability. 3038 - Changed "version 3 " to "version 3 or later" in the second 3039 paragraph. This was added to clarify the original intent. 3040 - Changed "protocol version" to "protocol versions" in the third 3041 paragraph. This attribute is multi-valued with the intent of 3042 holding all supported versions, not just one. 3044 C.4.2 Section 4.1.8 3046 - Changed "when transferred in protocol" to "when transferred from 3047 the server to the client" in the first paragraph. This is to 3048 clarify that this behavior only happens when attributes are being 3049 sent from the server. 3051 C.4.3 Section 4.1.10 3053 - Changed "servers will return responses containing fields of type 3054 LDAPResult" to "servers will return responses of LDAPResult or 3055 responses containing the components of LDAPResponse". This 3056 statement was incorrect and at odds with the ASN.1. The fix here 3057 reflects the original intent. 3058 - Dropped '--new' from result codes ASN.1. This simplification in 3059 comments just reduces unneeded verbiage. 3061 C.4.4 Section 4.1.11 3063 - Changed "It contains a reference to another server (or set of 3064 servers)" to "It contains one or more references to one or more 3065 servers or services" in the first paragraph. This reflects the 3066 original intent and clarifies that the URL may point to non-LDAP 3067 services. 3069 C.4.5 Section 4.1.12 3071 - Changed "The server MUST be prepared" to "Implementations MUST be 3072 prepared" in the eighth paragraph to reflect that both client and 3073 server implementations must be able to handle this (as both parse 3074 controls). 3076 C.4.6 Section 4.4 3078 - Changed "One unsolicited notification is defined" to "One 3079 unsolicited notification (Notice of Disconnection) is defined" in 3080 the third paragraph. For clarity and readability. 3082 C.4.7 Section 4.5.1 3083 Lightweight Directory Access Protocol Version 3 3085 - Changed "checking for the existence of the objectClass attribute" 3086 to "checking for the presence of the objectClass attribute" in the 3087 last paragraph. This was done as a measure of consistency (we use 3088 the terms present and presence rather than exists and existence in 3089 search filters). 3091 C.4.8 Section 4.5.3 3093 - Changed "outstanding search operations to different servers," to 3094 "outstanding search operations" in the fifth paragraph as they may 3095 be to the same server. This is a point of clarification. 3097 C.4.9 Section 4.6 3099 - Changed "clients MUST NOT attempt to delete" to "clients MUST NOT 3100 attempt to add or delete" in the second to last paragraph. 3101 - Change "using the "delete" form" to "using the "add" or "delete" 3102 form" in the second to last paragraph. 3104 C.4.10 Section 4.7 3106 - Changed "Clients MUST NOT supply the createTimestamp or 3107 creatorsName attributes, since these will be generated 3108 automatically by the server." to "Clients MUST NOT supply NO-USER- 3109 MODIFICATION attributes such as createTimestamp or creatorsName 3110 attributes, since these are provided by the server." in the 3111 definition of the attributes field. This tightens the language to 3112 reflect the original intent and to not leave a hole in which one 3113 could interpret the two attributes mentioned as the only non- 3114 writable attributes. 3116 C.4.11 Section 4.11 3118 - Changed "has been" to "will be" in the fourth paragraph. This 3119 clarifies that the server will (not has) abandon the operation. 3121 C.5 Changes made to draft-ietf-ldapbis-protocol-03.txt: 3123 C.5.1 Section 3.2.1 3125 - Changed "An attribute is a type with one or more associated 3126 values. The attribute type is identified by a short descriptive 3127 name and an OID (object identifier). The attribute type governs 3128 whether there can be more than one value of an attribute of that 3129 type in an entry, the syntax to which the values must conform, the 3130 kinds of matching which can be performed on values of that 3131 attribute, and other functions." to " An attribute is a 3132 description (a type and zero or more options) with one or more 3133 associated values. The attribute type governs whether the 3134 attribute can have multiple values, the syntax and matching rules 3135 used to construct and compare values of that attribute, and other 3136 functions. Options indicate modes of transfer and other 3137 Lightweight Directory Access Protocol Version 3 3139 functions.". This points out that an attribute consists of both 3140 the type and options. 3142 C.5.2 Section 4 3144 - Changed "Section 5.1 specifies the encoding rules for the LDAP 3145 protocol" to "Section 5.1 specifies how the protocol is encoded 3146 and transferred." 3148 C.5.3 Section 4.1.2 3150 - Added ABNF for the textual representation of LDAPOID. Previously, 3151 there was no formal BNF for this construct. 3153 C.5.4 Section 4.1.4 3155 - Changed "This identifier may be written as decimal digits with 3156 components separated by periods, e.g. "2.5.4.10"" to "may be 3157 written as defined by ldapOID in section 4.1.2" in the second 3158 paragraph. This was done because we now have a formal BNF 3159 definition of an oid. 3161 C.5.5 Section 4.1.5 3163 - Changed the BNF for AttributeDescription to ABNF. This was done 3164 for readability and consistency (no functional changes involved). 3165 - Changed "Options present in an AttributeDescription are never 3166 mutually exclusive." to "Options MAY be mutually exclusive. An 3167 AttributeDescription with mutually exclusive options is treated as 3168 an undefined attribute type." for clarity. It is generally 3169 understood that this is the original intent, but the wording could 3170 be easily misinterpreted. 3171 - Changed "Any option could be associated with any AttributeType, 3172 although not all combinations may be supported by a server." to 3173 "Though any option or set of options could be associated with any 3174 AttributeType, the server support for certain combinations may be 3175 restricted by attribute type, syntaxes, or other factors.". This 3176 is to clarify the meaning of 'combination' (it applies both to 3177 combination of attribute type and options, and combination of 3178 options). It also gives examples of *why* they might be 3179 unsupported. 3181 C.5.6 Section 4.1.11 3183 - Changed the wording regarding 'equally capable' referrals to "If 3184 multiple URLs are present, the client assumes that any URL may be 3185 used to progress the operation.". The previous language implied 3186 that the server MUST enforce rules that it was practically 3187 incapable of. The new language highlights the original intent-- 3188 that is, that any of the referrals may be used to progress the 3189 operation, there is no inherent 'weighting' mechanism. 3191 C.5.7 Section 4.5.1 and Appendix A 3192 Lightweight Directory Access Protocol Version 3 3194 - Added the comment "-- initial and final can occur at most once", 3195 to clarify this restriction. 3197 C.5.8 Section 5.1 3199 - Changed heading from "Mapping Onto BER-based Transport Services" 3200 to "Protocol Encoding". 3202 C.5.9 Section 5.2.1 3204 - Changed "The LDAPMessage PDUs" to "The encoded LDAPMessage PDUs" 3205 to point out that the PDUs are encoded before being streamed to 3206 TCP. 3208 C.6 Changes made to draft-ietf-ldapbis-protocol-04.txt: 3210 C.6.1 Section 4.5.1 and Appendix A 3212 - Changed the ASN.1 for the and and or choices of Filter to have a 3213 lower range of 1. This was an omission in the original ASN.1 3215 C.6.2 Various 3217 - Fixed various typo's 3219 C.7 Changes made to draft-ietf-ldapbis-protocol-05.txt: 3221 C.7.1 Section 3.2.1 3223 - Added "(as defined in Section 12.4.1 of [X.501])" to the fifth 3224 paragraph when talking about "operational attributes". This is 3225 because the term "operational attributes" is never defined. 3226 Alternately, we could drag a definition into the spec, for now, 3227 I'm just pointing to the reference in X.501. 3229 C.7.2 Section 4.1.5 3231 - Changed "And is also case insensitive" to "The entire 3232 AttributeDescription is case insensitive". This is to clarify 3233 whether we're talking about the entire attribute description, or 3234 just the options. 3236 - Expounded on the definition of attribute description options. This 3237 doc now specifies a difference between transfer and tagging 3238 options and describes the semantics of each, and how and when 3239 subtyping rules apply. Now allow options to be transmitted in any 3240 order but disallow any ordering semantics to be implied. These 3241 changes are the result of ongoing input from an engineering team 3242 designed to deal with ambiguity issues surrounding attribute 3243 options. 3245 C.7.3 Sections 4.1.5.1 and 4.1.6 3246 Lightweight Directory Access Protocol Version 3 3248 - Refer to non "binary" transfer encodings as "native encoding" 3249 rather than "string" encoding to clarify and avoid confusion. 3251 C.8 Changes made to draft-ietf-ldapbis-protocol-06.txt: 3253 C.8.1 Title 3255 - Changed to "LDAP: The Protocol" to be consisted with other working 3256 group documents 3258 C.8.2 Abstract 3260 - Moved above TOC to conform to new guidelines 3262 - Reworded to make consistent with other WG documents. 3264 - Moved 2119 conventions to "Conventions" section 3266 C.8.3 Introduction 3268 - Created to conform to new guidelines 3270 C.8.4 Models 3272 - Removed section. There is only one model in this document 3273 (Protocol Model) 3275 C.8.5 Protocol Model 3277 - Removed antiquated paragraph: "In keeping with the goal of easing 3278 the costs associated with use of the directory, it is an objective 3279 of this protocol to minimize the complexity of clients so as to 3280 facilitate widespread deployment of applications capable of using 3281 the directory." 3283 - Removed antiquated paragraph concerning LDAP v1 and v2 and 3284 referrals. 3286 C.8.6 Data Model 3288 - Removed Section 3.2 and subsections. These have been moved to 3289 [Models] 3291 C.8.7 Relationship to X.500 3293 - Removed section. It has been moved to [Roadmap] 3295 C.8.8 Server Specific Data Requirements 3297 - Removed section. It has been moved to [Models] 3299 C.8.9 Elements of Protocol 3300 Lightweight Directory Access Protocol Version 3 3302 - Added "Section 5.1 specifies how the protocol is encoded and 3303 transferred." to the end of the first paragraph for reference. 3305 - Reworded notes about extensibility, and now talk about implied 3306 extensibility and the use of ellipses in the ASN.1 3308 - Removed references to LDAPv2 in third and fourth paragraphs. 3310 C.8.10 Message ID 3312 - Reworded second paragraph to "The message ID of a request MUST 3313 have a non-zero value different from the values of any other 3314 requests outstanding in the LDAP session of which this message is 3315 a part. The zero value is reserved for the unsolicited 3316 notification message." (Added notes about non-zero and the zero 3317 value). 3319 C.8.11 String Types 3321 - Removed ABNF for LDAPOID and added "Although an LDAPOID is encoded 3322 as an OCTET STRING, values are limited to the definition of 3323 numericoid given in Section 1.3 of [Models]." 3325 C.8.12 Distinguished Name and Relative Distinguished Name 3327 - Removed ABNF and referred to [Models] and [LDAPDN] where this is 3328 defined. 3330 C.8.13 Attribute Type 3332 - Removed sections. It's now in the [Models] doc. 3334 C.8.14 Attribute Description 3336 - Removed ABNF and aligned section with [Models] 3338 - Moved AttributeDescriptionList here. 3340 C.8.15 Transfer Options 3342 - Added section and consumed much of old options language (while 3343 aligning with [Models] 3345 C.8.16 Binary Transfer Option 3347 - Clarified intent regarding exactly what is to be BER encoded. 3349 - Clarified that clients must not expect ;binary when not asking for 3350 it (;binary, as opposed to ber encoded data). 3352 C.8.17 Attribute 3354 - Use the term "attribute description" in lieu of "type" 3355 Lightweight Directory Access Protocol Version 3 3357 - Clarified the fact that clients cannot rely on any apparent 3358 ordering of attribute values. 3360 C.8.18 LDAPResult 3362 - To resultCode, added ellipses "..." to the enumeration to indicate 3363 extensibility. and added a note, pointing to [LDAPIANA] 3365 - Removed error groupings ad refer to Appendix A. 3367 C.8.19 Bind Operation 3369 - Added "Prior to the BindRequest, the implied identity is 3370 anonymous. Refer to [AuthMeth] for the authentication-related 3371 semantics of this operation." to the first paragraph. 3373 - Added ellipses "..." to AuthenticationChoice and added a note 3374 "This type is extensible as defined in Section 3.6 of [LDAPIANA]. 3375 Servers that do not support a choice supplied by a client will 3376 return authMethodNotSupported in the result code of the 3377 BindResponse." 3379 - Simplified text regarding how the server handles unknown versions. 3380 Removed references to LDAPv2 3382 C.8.20 Sequencing of the Bind Request 3384 - Aligned with [AuthMeth] In particular, paragraphs 4 and 6 were 3385 removed, while a portion of 4 was retained (see C.8.9) 3387 C.8.21 Authentication and other Security Service 3389 - Section was removed. Now in [AuthMeth] 3391 C.8.22 Continuation References in the Search Result 3393 - Added "If the originating search scope was singleLevel, the scope 3394 part of the URL will be baseObject." 3396 C.8.23 Security Considerations 3398 - Removed reference to LDAPv2 3400 C.8.24 Result Codes 3402 - Added as normative appendix A 3404 C.8.25 ASN.1 3406 - Added EXTENSIBILITY IMPLIED 3408 - Added a number of comments holding referenced to [Models] and 3409 [ISO10646]. 3411 Lightweight Directory Access Protocol Version 3 3413 - Removed AttributeType. It is not used. 3415 C.9 Changes made to draft-ietf-ldapbis-protocol-07.txt: 3417 - Removed all mention of transfer encodings and the binary attribute 3418 option 3420 - Further alignment with [Models]. 3422 - Added extensibility ellipsis to protocol op choice 3424 - In 4.1.1, clarified when connections may be dropped due to 3425 malformed PDUs 3427 - Specified which matching rules and syntaxes are used for various 3428 filter items 3430 C.10 Changes made to draft-ietf-ldapbis-protocol-07.txt: 3432 C.10.1 Section 4.1.1.1: 3434 - Clarified when it is and isn't appropriate to return an already 3435 used result code. 3437 C.10.2 Section 4.1.11: 3439 - Clarified that a control only applies to the message it's attached 3440 to. 3442 - Explained that the criticality field is only applicable to certain 3443 request messages. 3445 - Added language regarding the combination of controls. 3447 C.10.3 Section 4.11: 3449 - Explained that Abandon and Unbind cannot be abandoned, and 3450 illustrated how to determine whether an operation has been 3451 abandoned. 3453 Appendix D - Outstanding Work Items 3455 D.0 Integrate notational consistency agreements 3456 - WG will discuss notation consistency. Once agreement happens, 3457 reconcile draft. 3459 D.1 Integrate result codes draft. 3461 - The result codes draft should be reconciled with this draft. 3462 Operation-specific instructions will reside with operations while 3463 the error-specific sections will be added as an appendix. Note 3464 Lightweight Directory Access Protocol Version 3 3466 that there is a result codes appendix now. Still need to reconcile 3467 with each operation. 3469 D.2 Verify references. 3471 - Many referenced documents have changed. Ensure references and 3472 section numbers are correct. 3474 D.3 Usage of Naming Context 3476 - Make sure occurrences of "namingcontext" and "naming context" are 3477 consistent with [Models]. 3479 D.14 Section 4.1.12 3481 - Specify whether or not servers are to advertise the OIDs of known 3482 response controls. 3484 D.18 Section 4.2.3 3486 - Change "operationsError" to "other" as a bind result code. 3488 D.21 Section 4.5.1 3490 - Make sure the use of "subordinates" in the derefInSearching 3491 definition is correct. See "derefInSearching" on list. 3493 D.23 Section 4.5.3 3495 - Add "Similarly, a server MUST NOT return a SearchResultReference 3496 when the scope of the search is baseObject. If a client receives 3497 such a SearchResultReference it MUST interpret is as a protocol 3498 error and MUST NOT follow it." to the first paragraph. 3500 - Add "If the scope part of the LDAP URL is present, the client MUST 3501 use the new scope in its next request to progress the search. If 3502 the scope part is absent the client MUST use subtree scope to 3503 complete subtree searches and base scope to complete one level 3504 searches." to the third paragraph. 3506 D.25 Section 4.6 3508 - Resolve the meaning of "and is ignored if the attribute does not 3509 exist". See "modify: "non-existent attribute"" on the list. 3511 D.27 Section 4.10 3513 - Specify what happens when the attr is missing vs. attr isn't in 3514 schema. Also what happens if there's no equality matching rule. 3516 D.30 Section 5.1 3517 Lightweight Directory Access Protocol Version 3 3519 - Add "control and extended operation values" to last paragraph. See 3520 "LBER (BER Restrictions)" on list. 3522 D.32 Section 6.1 3524 - Add "that are used by those attributes" to the first paragraph. 3525 - Add "Servers which support update operations MUST, and other 3526 servers SHOULD, support strong authentication mechanisms described 3527 in [RFC2829]." as a second paragraph. 3528 - Add "Servers which provide access to sensitive information MUST, 3529 and other servers SHOULD support privacy protections such as those 3530 described in [RFC2829] and [RFC2830]." as a third paragraph. 3532 D.33 Section 7 3534 - Add "Servers which support update operations MUST, and other 3535 servers SHOULD, support strong authentication mechanisms described 3536 in [RFC2829]." as a fourth paragraph. 3537 - Add "In order to automatically follow referrals, clients may need 3538 to hold authentication secrets. This poses significant privacy and 3539 security concerns and SHOULD be avoided." as a sixth paragraph. 3540 - Add "This document provides a mechanism which clients may use to 3541 discover operational attributes. Those relying on security by 3542 obscurity should implement appropriate access controls to 3543 restricts access to operational attributes per local policy." as 3544 an eighth paragraph. 3545 - Add "This document provides a mechanism which clients may use to 3546 discover operational attributes. Those relying on security by 3547 obscurity should implement appropriate access controls to 3548 restricts access to operational attributes per local policy." as 3549 an eighth paragraph. 3550 - Add notes regarding DoS attack found by CERT advisories. 3552 Lightweight Directory Access Protocol Version 3 3554 Full Copyright Statement 3556 Copyright (C) The Internet Society (2002). All Rights Reserved. 3558 This document and translations of it may be copied and furnished to 3559 others, and derivative works that comment on or otherwise explain it 3560 or assist in its implementation may be prepared, copied, published 3561 and distributed, in whole or in part, without restriction of any 3562 kind, provided that the above copyright notice and this paragraph are 3563 included on all such copies and derivative works. However, this 3564 document itself may not be modified in any way, such as by removing 3565 the copyright notice or references to the Internet Society or other 3566 Internet organizations, except as needed for the purpose of 3567 developing Internet standards in which case the procedures for 3568 copyrights defined in the Internet Standards process must be 3569 followed, or as required to translate it into languages other than 3570 English. 3572 The limited permissions granted above are perpetual and will not be 3573 revoked by the Internet Society or its successors or assigns. 3575 This document and the information contained herein is provided on an 3576 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 3577 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 3578 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 3579 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 3580 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.