idnits 2.17.1 draft-ietf-ldapbis-protocol-08.txt: -(1111): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding 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. 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.) == 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 (June 2002) is 7980 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 2263 -- Looks like a reference, but probably isn't: '3' on line 2200 == Missing Reference: 'APPLICATION 0' is mentioned on line 2136, but not defined == Missing Reference: 'APPLICATION 1' is mentioned on line 2151, but not defined -- Looks like a reference, but probably isn't: '7' on line 2184 == Missing Reference: 'APPLICATION 2' is mentioned on line 2155, but not defined == Missing Reference: 'APPLICATION 3' is mentioned on line 2157, but not defined -- Looks like a reference, but probably isn't: '1' on line 2264 -- Looks like a reference, but probably isn't: '2' on line 2199 -- Looks like a reference, but probably isn't: '4' on line 2201 -- Looks like a reference, but probably isn't: '5' on line 2182 -- Looks like a reference, but probably isn't: '6' on line 2183 -- Looks like a reference, but probably isn't: '8' on line 2185 -- Looks like a reference, but probably isn't: '9' on line 2186 == Missing Reference: 'APPLICATION 4' is mentioned on line 2203, but not defined == Missing Reference: 'APPLICATION 19' is mentioned on line 2211, but not defined == Missing Reference: 'APPLICATION 5' is mentioned on line 2213, but not defined == Missing Reference: 'APPLICATION 6' is mentioned on line 2215, but not defined == Missing Reference: 'APPLICATION 7' is mentioned on line 2230, but not defined == Missing Reference: 'APPLICATION 8' is mentioned on line 2232, but not defined == Missing Reference: 'APPLICATION 9' is mentioned on line 2240, but not defined == Missing Reference: 'APPLICATION 10' is mentioned on line 2242, but not defined == Missing Reference: 'APPLICATION 11' is mentioned on line 2244, but not defined == Missing Reference: 'APPLICATION 12' is mentioned on line 2246, but not defined == Missing Reference: 'APPLICATION 13' is mentioned on line 2252, but not defined == Missing Reference: 'APPLICATION 14' is mentioned on line 2254, but not defined == Missing Reference: 'APPLICATION 15' is mentioned on line 2258, but not defined == Missing Reference: 'APPLICATION 16' is mentioned on line 2260, but not defined == Missing Reference: 'APPLICATION 23' is mentioned on line 2262, but not defined == Missing Reference: 'APPLICATION 24' is mentioned on line 2266, but not defined -- Looks like a reference, but probably isn't: '10' on line 2268 -- Looks like a reference, but probably isn't: '11' on line 2269 == Missing Reference: 'X511' is mentioned on line 1747, but not defined == Missing Reference: 'RFC2830' is mentioned on line 2886, but not defined ** Obsolete undefined reference: RFC 2830 (Obsoleted by RFC 4510, RFC 4511, RFC 4513) == Missing Reference: 'RFC2829' is mentioned on line 2892, 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: 7 errors (**), 0 flaws (~~), 27 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-08.txt June 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.1.1. Message ID.................................................5 51 4.1.2. String Types.................................................6 52 Lightweight Directory Access Protocol Version 3 54 4.1.3. Distinguished Name and Relative Distinguished Name...........6 55 4.1.4. Attribute Descriptions.......................................6 56 4.1.5. Attribute Value..............................................7 57 4.1.6. Attribute Value Assertion....................................7 58 4.1.7. Attribute....................................................8 59 4.1.8. Matching Rule Identifier.....................................8 60 4.1.9. Result Message...............................................8 61 4.1.10. Referral...................................................10 62 4.1.11. Controls...................................................11 63 4.2. Bind Operation................................................12 64 4.2.1. Sequencing of the Bind Request..............................13 65 4.2.2. Bind Response...............................................13 66 4.3. Unbind Operation..............................................15 67 4.4. Unsolicited Notification......................................15 68 4.4.1. Notice of Disconnection.....................................15 69 4.5. Search Operation..............................................16 70 4.5.1. Search Request..............................................16 71 4.5.2. Search Result...............................................20 72 4.5.3. Continuation References in the Search Result................21 73 4.6. Modify Operation..............................................23 74 4.7. Add Operation.................................................24 75 4.8. Delete Operation..............................................25 76 4.9. Modify DN Operation...........................................26 77 4.10. Compare Operation............................................27 78 4.11. Abandon Operation............................................28 79 4.12. Extended Operation...........................................28 80 5. Protocol Element Encodings and Transfer.........................29 81 5.1. Protocol Encoding.............................................29 82 5.2. Transfer Protocols............................................29 83 5.2.1. Transmission Control Protocol (TCP).........................30 84 6. Implementation Guidelines.......................................30 85 6.1. Server Implementations........................................30 86 6.2. Client Implementations........................................30 87 7. Security Considerations.........................................30 88 8. Acknowledgements................................................31 89 9. Normative References............................................31 90 10. Editor's Address...............................................32 91 Appendix A - LDAP Result Codes.....................................33 92 A.1 Non-Error Result Codes.........................................33 93 A.2 Error Result Codes.............................................33 94 A.3 Classes and Precedence of Error Result Codes...................33 95 Appendix C - Change History........................................44 96 C.1 Changes made to RFC 2251:......................................44 97 C.2 Changes made to draft-ietf-ldapbis-protocol-00.txt:............44 98 C.3 Changes made to draft-ietf-ldapbis-protocol-01.txt:............45 99 C.4 Changes made to draft-ietf-ldapbis-protocol-02.txt:............45 100 C.5 Changes made to draft-ietf-ldapbis-protocol-03.txt:............47 101 C.6 Changes made to draft-ietf-ldapbis-protocol-04.txt:............49 102 C.7 Changes made to draft-ietf-ldapbis-protocol-05.txt:............49 103 C.8 Changes made to draft-ietf-ldapbis-protocol-06.txt:............50 104 C.9 Changes made to draft-ietf-ldapbis-protocol-07.txt:............53 105 Appendix D - Outstanding Work Items................................53 107 1. Introduction 108 Lightweight Directory Access Protocol Version 3 110 The Directory is "a collection of open systems cooperating to provide 111 directory services" [X.500]. A Directory user, which may be a human 112 or other entity, accesses the Directory through a client (or 113 Directory User Agent (DUA)). The client, on behalf of the directory 114 user, interacts with one or more servers (or Directory System Agents 115 (DSA)). Clients interact with servers using a directory access 116 protocol. 118 This document details the protocol elements of Lightweight Directory 119 Access Protocol, along with their semantic meanings. Following the 120 description of protocol elements, it describes the way in which the 121 protocol is encoded and transferred. 123 This document is an integral part of the LDAP Technical Specification 124 [Roadmap]. 126 This document replaces RFC 2251. Appendix C holds a detailed log of 127 changes to RFC 2251. At publication time, this appendix will be 128 distilled to a summary of changes to RFC 2251. 130 2. Conventions 132 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 133 "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in this document 134 are to be interpreted as described in [RFC2119]. 136 3. Protocol Model 138 The general model adopted by this protocol is one of clients 139 performing protocol operations against servers. In this model, a 140 client transmits a protocol request describing the operation to be 141 performed to a server. The server is then responsible for performing 142 the necessary operation(s) in the directory. Upon completion of the 143 operation(s), the server returns a response containing any results or 144 errors to the requesting client. 146 Note that although servers are required to return responses whenever 147 such responses are defined in the protocol, there is no requirement 148 for synchronous behavior on the part of either clients or servers. 149 Requests and responses for multiple operations may be exchanged 150 between a client and server in any order, provided the client 151 eventually receives a response for every request that requires one. 153 Note that the core protocol operations defined in this document can 154 be mapped to a subset of the X.500(1997) directory abstract service. 155 However there is not a one-to-one mapping between LDAP protocol 156 operations and DAP operations. Server implementations acting as a 157 gateway to X.500 directories may need to make multiple DAP requests. 159 4. Elements of Protocol 160 Lightweight Directory Access Protocol Version 3 162 The LDAP protocol is described using Abstract Syntax Notation 1 163 (ASN.1) [X.680], and is transferred using a subset of ASN.1 Basic 164 Encoding Rules [X.690]. Section 5.1 specifies how the protocol is 165 encoded and transferred. 167 In order to support future Standards Track extensions to this 168 protocol, extensibility is implied where it is allowed (per ASN.1). 169 In addition, ellipses (...) have been supplied in ASN.1 types that 170 are explicitly extensible as discussed in [LDAPIANA]. Because of the 171 implied extensibility, clients and servers MUST ignore trailing 172 SEQUENCE elements whose tags they do not recognize. 174 Changes to the LDAP protocol other than those described in [LDAPIANA] 175 require a different version number. A client indicates the version it 176 is using as part of the bind request, described in section 4.2. If a 177 client has not sent a bind, the server MUST assume the client is 178 using version 3 or later. 180 Clients may determine the protocol versions a server supports by 181 reading the supportedLDAPVersion attribute from the root DSE 182 [Models]. Servers which implement version 3 or later MUST provide 183 this attribute. 185 4.1. Common Elements 187 This section describes the LDAPMessage envelope PDU (Protocol Data 188 Unit) format, as well as data type definitions, which are used in the 189 protocol operations. 191 4.1.1. Message Envelope 193 For the purposes of protocol exchanges, all protocol operations are 194 encapsulated in a common envelope, the LDAPMessage, which is defined 195 as follows: 197 LDAPMessage ::= SEQUENCE { 198 messageID MessageID, 199 protocolOp CHOICE { 200 bindRequest BindRequest, 201 bindResponse BindResponse, 202 unbindRequest UnbindRequest, 203 searchRequest SearchRequest, 204 searchResEntry SearchResultEntry, 205 searchResDone SearchResultDone, 206 searchResRef SearchResultReference, 207 modifyRequest ModifyRequest, 208 modifyResponse ModifyResponse, 209 addRequest AddRequest, 210 addResponse AddResponse, 211 delRequest DelRequest, 212 delResponse DelResponse, 213 Lightweight Directory Access Protocol Version 3 215 modDNRequest ModifyDNRequest, 216 modDNResponse ModifyDNResponse, 217 compareRequest CompareRequest, 218 compareResponse CompareResponse, 219 abandonRequest AbandonRequest, 220 extendedReq ExtendedRequest, 221 extendedResp ExtendedResponse, 222 ... }, 223 controls [0] Controls OPTIONAL } 225 MessageID ::= INTEGER (0 .. maxInt) 227 maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- 229 The function of the LDAPMessage is to provide an envelope containing 230 common fields required in all protocol exchanges. At this time the 231 only common fields are the message ID and the controls. 233 If the server receives a PDU from the client in which the LDAPMessage 234 SEQUENCE tag cannot be recognized, the messageID cannot be parsed, 235 the tag of the protocolOp is not recognized as a request, or the 236 encoding structures or lengths of data fields are found to be 237 incorrect, then the server MAY return the Notice of Disconnection 238 described in section 4.4.1, with resultCode protocolError, and MUST 239 immediately close the connection. 241 In other cases where the client or server cannot parse a PDU, it 242 SHOULD abruptly close the connection where further communication 243 (including providing notice) would be pernicious. Otherwise, server 244 implementations MUST return an appropriate response to the request, 245 with the resultCode set to protocolError. 247 The ASN.1 type Controls is defined in section 4.1.11. 249 4.1.1.1. Message ID 251 All LDAPMessage envelopes encapsulating responses contain the 252 messageID value of the corresponding request LDAPMessage. 254 The message ID of a request MUST have a non-zero value different from 255 the values of any other requests outstanding in the LDAP session of 256 which this message is a part. The zero value is reserved for the 257 unsolicited notification message. 259 A client MUST NOT send a second request with the same message ID as 260 an earlier request on the same connection if the client has not 261 received the final response from the earlier request. Otherwise the 262 behavior is undefined. Typical clients increment a counter for each 263 request. 265 A client MUST NOT reuse the message id of an abandonRequest or of the 266 abandoned operation until it has received a response from the server 267 Lightweight Directory Access Protocol Version 3 269 for another request invoked subsequent to the abandonRequest, as the 270 abandonRequest itself does not have a response. 272 4.1.2. String Types 274 The LDAPString is a notational convenience to indicate that, although 275 strings of LDAPString type encode as OCTET STRING types, the 276 [ISO10646] character set (a superset of Unicode) is used, encoded 277 following the UTF-8 algorithm [RFC2044]. Note that in the UTF-8 278 algorithm characters which are the same as ASCII (0x0000 through 279 0x007F) are represented as that same ASCII character in a single 280 byte. The other byte values are used to form a variable-length 281 encoding of an arbitrary character. 283 LDAPString ::= OCTET STRING -- UTF-8 encoded, 284 -- ISO 10646 characters 286 The LDAPOID is a notational convenience to indicate that the 287 permitted value of this string is a (UTF-8 encoded) dotted-decimal 288 representation of an OBJECT IDENTIFIER. Although an LDAPOID is 289 encoded as an OCTET STRING, values are limited to the definition of 290 numericoid given in Section 1.3 of [Models]. 292 LDAPOID ::= OCTET STRING -- Constrained to numericoid [Models] 294 For example, 296 1.3.6.1.4.1.1466.1.2.3 298 4.1.3. Distinguished Name and Relative Distinguished Name 300 An LDAPDN and a RelativeLDAPDN are respectively defined to be the 301 representation of a distinguished-name and a relative-distinguished- 302 name after encoding according to the specification in [LDAPDN]. 304 LDAPDN ::= LDAPString 305 -- Constrained to distinguishedName [LDAPDN] 307 RelativeLDAPDN ::= LDAPString 308 -- Constrained to name-component [LDAPDN] 310 4.1.4. Attribute Descriptions 312 The definition and encoding rules for attribute descriptions are 313 defined in Section 2.5 of [Models]. Briefly, an attribute description 314 is an attribute type and zero or more options. 316 AttributeDescription ::= LDAPString 317 -- Constrained to attributedescription 318 -- [Models] 319 Lightweight Directory Access Protocol Version 3 321 Not all options can be associated with attributes held in the 322 directory. A server will treat an AttributeDescription with any 323 options it does not implement or support as unrecognized. The order 324 in which options appear in the list MUST NOT be used to impart any 325 semantic meaning. Servers MUST treat any two AttributeDescription 326 with the same attribute type and options as equivalent. 328 AttributeDescriptionList describes a list of 0 or more attribute 329 descriptions. (A list of zero elements has special significance in 330 the Search request.) 332 AttributeDescriptionList ::= SEQUENCE OF 333 AttributeDescription 335 4.1.5. Attribute Value 337 A field of type AttributeValue is an OCTET STRING containing an 338 encoded attribute value data type. The value is encoded according to 339 its LDAP-specific encoding definition. The LDAP-specific encoding 340 definitions for different syntaxes and attribute types may be found 341 in other documents, and in particular [Syntaxes]. 343 AttributeValue ::= OCTET STRING 345 Note that there is no defined limit on the size of this encoding; 346 thus protocol values may include multi-megabyte attributes (e.g. 347 photographs). 349 Attributes may be defined which have arbitrary and non-printable 350 syntax. Implementations MUST NOT display nor attempt to decode as 351 ASN.1, a value if its syntax is not known. The implementation may 352 attempt to discover the subschema of the source entry, and retrieve 353 the values of attributeTypes from it. 355 Clients MUST NOT send attribute values in a request that are not 356 valid according to the syntax defined for the attributes. 358 4.1.6. Attribute Value Assertion 360 The AttributeValueAssertion type definition is similar to the one in 361 the X.500 directory standards. It contains an attribute description 362 and a matching rule assertion value suitable for that type. 364 AttributeValueAssertion ::= SEQUENCE { 365 attributeDesc AttributeDescription, 366 assertionValue AssertionValue } 368 AssertionValue ::= OCTET STRING 370 The syntax of the AssertionValue depends on the context of the LDAP 371 operation being performed. For example, the syntax of the EQUALITY 372 Lightweight Directory Access Protocol Version 3 374 matching rule for an attribute is used when performing a Compare 375 operation. Often this is the same syntax used for values of the 376 attribute type, but in some cases the assertion syntax differs from 377 the value syntax. See objectIdentiferFirstComponentMatch in 378 [Syntaxes] for an example. 380 4.1.7. Attribute 382 An attribute consists of an attribute description and one or more 383 values of that attribute description. (Though attributes MUST have at 384 least one value when stored, due to access control restrictions the 385 set may be empty when transferred from the server to the client. This 386 is described in section 4.5.2, concerning the PartialAttributeList 387 type.) 389 Attribute ::= SEQUENCE { 390 type AttributeDescription, 391 vals SET OF AttributeValue } 393 Each attribute value is distinct in the set (no duplicates). The set 394 of attribute values is unordered. Implementations MUST NOT reply upon 395 any apparent ordering being repeatable. 397 4.1.8. Matching Rule Identifier 399 Matching rules are defined in 4.1.3 of [Models]. A matching rule is 400 identified in the LDAP protocol by the printable representation of 401 either its numericoid, or one of its short name descriptors, e.g. 402 "caseIgnoreIA5Match" or "1.3.6.1.4.1.453.33.33". 404 MatchingRuleId ::= LDAPString 406 Servers which support matching rules for use in the extensibleMatch 407 search filter MUST list the matching rules they implement in 408 subschema entries, using the matchingRules attributes. The server 409 SHOULD also list there, using the matchingRuleUse attribute, the 410 attribute types with which each matching rule can be used. More 411 information is given in section 4.5 of [Syntaxes]. 413 4.1.9. Result Message 415 The LDAPResult is the construct used in this protocol to return 416 success or failure indications from servers to clients. To various 417 requests, servers will return responses of LDAPResult or responses 418 containing the components of LDAPResponse to indicate the final 419 status of a protocol operation request. 421 LDAPResult ::= SEQUENCE { 422 resultCode ENUMERATED { 423 success (0), 424 operationsError (1), 425 Lightweight Directory Access Protocol Version 3 427 protocolError (2), 428 timeLimitExceeded (3), 429 sizeLimitExceeded (4), 430 compareFalse (5), 431 compareTrue (6), 432 authMethodNotSupported (7), 433 strongAuthRequired (8), 434 -- 9 reserved -- 435 referral (10), 436 adminLimitExceeded (11), 437 unavailableCriticalExtension (12), 438 confidentialityRequired (13), 439 saslBindInProgress (14), 440 noSuchAttribute (16), 441 undefinedAttributeType (17), 442 inappropriateMatching (18), 443 constraintViolation (19), 444 attributeOrValueExists (20), 445 invalidAttributeSyntax (21), 446 -- 22-31 unused -- 447 noSuchObject (32), 448 aliasProblem (33), 449 invalidDNSyntax (34), 450 -- 35 reserved for undefined isLeaf -- 451 aliasDereferencingProblem (36), 452 -- 37-47 unused -- 453 inappropriateAuthentication (48), 454 invalidCredentials (49), 455 insufficientAccessRights (50), 456 busy (51), 457 unavailable (52), 458 unwillingToPerform (53), 459 loopDetect (54), 460 -- 55-63 unused -- 461 namingViolation (64), 462 objectClassViolation (65), 463 notAllowedOnNonLeaf (66), 464 notAllowedOnRDN (67), 465 entryAlreadyExists (68), 466 objectClassModsProhibited (69), 467 -- 70 reserved for CLDAP -- 468 affectsMultipleDSAs (71), 469 -- 72-79 unused -- 470 other (80), 471 ... }, 472 -- 81-90 reserved for APIs -- 473 matchedDN LDAPDN, 474 errorMessage LDAPString, 475 referral [3] Referral OPTIONAL } 477 The result codes enumeration is extensible as defined in Section 3.5 478 of [LDAPIANA]. The meanings of the result codes are given in Appendix 479 A. 481 Lightweight Directory Access Protocol Version 3 483 The errorMessage field of this construct may, at the server's option, 484 be used to return a string containing a textual, human-readable 485 (terminal control and page formatting characters should be avoided) 486 error diagnostic. As this error diagnostic is not standardized, 487 implementations MUST NOT rely on the values returned. If the server 488 chooses not to return a textual diagnostic, the errorMessage field of 489 the LDAPResult type MUST contain a zero length string. 491 For result codes of noSuchObject, aliasProblem, invalidDNSyntax and 492 aliasDereferencingProblem, the matchedDN field is set to the name of 493 the lowest entry (object or alias) in the directory that was matched. 494 If no aliases were dereferenced while attempting to locate the entry, 495 this will be a truncated form of the name provided, or if aliases 496 were dereferenced, of the resulting name, as defined in section 12.5 497 of [X.511]. The matchedDN field contains a zero length string with 498 all other result codes. 500 4.1.10. Referral 502 The referral result code indicates that the contacted server does not 503 hold the target entry of the request. The referral field is present 504 in an LDAPResult if the LDAPResult.resultCode field value is 505 referral, and absent with all other result codes. It contains one or 506 more references to one or more servers or services that may be 507 accessed via LDAP or other protocols. Referrals can be returned in 508 response to any operation request (except unbind and abandon which do 509 not have responses). At least one URL MUST be present in the 510 Referral. 512 During a search operation, after the baseObject is located, and 513 entries are being evaluated, the referral is not returned. Instead, 514 continuation references, described in section 4.5.3, are returned 515 when the search scope spans multiple naming contexts, and several 516 different servers would need to be contacted to complete the 517 operation. 519 Referral ::= SEQUENCE OF LDAPURL -- one or more 521 LDAPURL ::= LDAPString -- limited to characters permitted in 522 -- URLs 524 If the client wishes to progress the operation, it MUST follow the 525 referral by contacting one of the servers. If multiple URLs are 526 present, the client assumes that any URL may be used to progress the 527 operation. 529 URLs for servers implementing the LDAP protocol are written according 530 to [LDAPDN]. If an alias was dereferenced, the part of the URL 531 MUST be present, with the new target object name. If the part is 532 present, the client MUST use this name in its next request to 533 progress the operation, and if it is not present the client will use 534 the same name as in the original request. Some servers (e.g. 535 participating in distributed indexing) may provide a different filter 536 Lightweight Directory Access Protocol Version 3 538 in a referral for a search operation. If the filter part of the URL 539 is present in an LDAPURL, the client MUST use this filter in its next 540 request to progress this search, and if it is not present the client 541 MUST use the same filter as it used for that search. Other aspects of 542 the new request may be the same or different as the request which 543 generated the referral. 545 Note that UTF-8 characters appearing in a DN or search filter may not 546 be legal for URLs (e.g. spaces) and MUST be escaped using the % 547 method in [RFC2396]. 549 Other kinds of URLs may be returned, so long as the operation could 550 be performed using that protocol. 552 4.1.11. Controls 554 A control is a way to specify extension information. Controls which 555 are sent as part of a request apply only to that request and are not 556 saved. 558 Controls ::= SEQUENCE OF Control 560 Control ::= SEQUENCE { 561 controlType LDAPOID, 562 criticality BOOLEAN DEFAULT FALSE, 563 controlValue OCTET STRING OPTIONAL } 565 The controlType field MUST be a UTF-8 encoded dotted-decimal 566 representation of an OBJECT IDENTIFIER which uniquely identifies the 567 control. This prevents conflicts between control names. 569 The criticality field is either TRUE or FALSE and is only used when a 570 control accompanies one of the following requests: bindRequest, 571 searchRequest, modifyRequest, addRequest, delRequest, modDNRequest, 572 compareRequest, or extendedReq. The use of the criticality field for 573 a control that is part of any other operation is ignored and treated 574 as FALSE. 576 If the server recognizes the control type and it is appropriate for 577 the operation, the server will make use of the control when 578 performing the operation. 580 If the server does not recognize the control type or it is not 581 appropriate for the operation, and the criticality field is TRUE, the 582 server MUST NOT perform the operation, and MUST instead return the 583 resultCode unavailableCriticalExtension. 585 If the control is unrecognized or inappropriate but the criticality 586 field is FALSE, the server MUST ignore the control. 588 The controlValue contains any information associated with the 589 control, and its format is defined for the control. Implementations 590 MUST be prepared to handle arbitrary contents of the controlValue 591 Lightweight Directory Access Protocol Version 3 593 octet string, including zero bytes. It is absent only if there is no 594 value information which is associated with a control of its type. 596 This document does not define any controls. Controls may be defined 597 in other documents. The definition of a control consists of: 599 - the OBJECT IDENTIFIER assigned to the control, 601 - whether the control is always noncritical, always critical, or 602 critical at the client's option, 604 - the format of the controlValue contents of the control. 606 Servers list the controlType of all recognized controls in the 607 supportedControl attribute in the root DSE. 609 4.2. Bind Operation 611 The function of the Bind Operation is to allow authentication 612 information to be exchanged between the client and server. Prior to 613 the BindRequest, the implied identity is anonymous. Refer to 614 [AuthMeth] for the authentication-related semantics of this 615 operation. 617 The Bind Request is defined as follows: 619 BindRequest ::= [APPLICATION 0] SEQUENCE { 620 version INTEGER (1 .. 127), 621 name LDAPDN, 622 authentication AuthenticationChoice } 624 AuthenticationChoice ::= CHOICE { 625 simple [0] OCTET STRING, 626 -- 1 and 2 reserved 627 sasl [3] SaslCredentials, 628 ... } 630 SaslCredentials ::= SEQUENCE { 631 mechanism LDAPString, 632 credentials OCTET STRING OPTIONAL } 634 Parameters of the Bind Request are: 636 - version: A version number indicating the version of the protocol 637 to be used in this protocol session. This document describes 638 version 3 of the LDAP protocol. Note that there is no version 639 negotiation, and the client just sets this parameter to the 640 version it desires. If the server does not support the specified 641 version, it responds with protocolError in the resultCode field of 642 the BindResponse. 644 - name: The name of the directory object that the client wishes to 645 bind as. This field may take on a null value (a zero length 646 Lightweight Directory Access Protocol Version 3 648 string) for the purposes of anonymous binds, when authentication 649 has been performed at a lower layer, or when using SASL 650 credentials with a mechanism that includes the name in the 651 credentials. Server behavior is undefined when the name is a null 652 value, simple authentication is used, and a password is specified. 653 The server SHOULD NOT perform any alias dereferencing in 654 determining the object to bind as. 656 - authentication: information used to authenticate the name, if any, 657 provided in the Bind Request. This type is extensible as defined 658 in Section 3.6 of [LDAPIANA]. Servers that do not support a choice 659 supplied by a client will return authMethodNotSupported in the 660 result code of the BindResponse. 662 Upon receipt of a Bind Request, a protocol server will authenticate 663 the requesting client, if necessary. The server will then return a 664 Bind Response to the client indicating the status of the 665 authentication. 667 Authorization is the use of this authentication information when 668 performing operations. Authorization MAY be affected by factors 669 outside of the LDAP Bind request, such as lower layer security 670 services. 672 4.2.1. Sequencing of the Bind Request 674 For some SASL authentication mechanisms, it may be necessary for the 675 client to invoke the BindRequest multiple times. If at any stage the 676 client wishes to abort the bind process it MAY unbind and then drop 677 the underlying connection. Clients MUST NOT invoke operations between 678 two Bind requests made as part of a multi-stage bind. 680 A client may abort a SASL bind negotiation by sending a BindRequest 681 with a different value in the mechanism field of SaslCredentials, or 682 an AuthenticationChoice other than sasl. 684 If the client sends a BindRequest with the sasl mechanism field as an 685 empty string, the server MUST return a BindResponse with 686 authMethodNotSupported as the resultCode. This will allow clients to 687 abort a negotiation if it wishes to try again with the same SASL 688 mechanism. 690 If the client did not bind before sending a request and receives an 691 operationsError, it may then send a Bind Request. If this also fails 692 or the client chooses not to bind on the existing connection, it will 693 close the connection, reopen it and begin again by first sending a 694 PDU with a Bind Request. This will aid in interoperating with servers 695 implementing other versions of LDAP. 697 4.2.2. Bind Response 699 The Bind Response is defined as follows. 701 Lightweight Directory Access Protocol Version 3 703 BindResponse ::= [APPLICATION 1] SEQUENCE { 704 COMPONENTS OF LDAPResult, 705 serverSaslCreds [7] OCTET STRING OPTIONAL } 707 BindResponse consists simply of an indication from the server of the 708 status of the client's request for authentication. 710 If the bind was successful, the resultCode will be success, otherwise 711 it will be one of: 713 - operationsError: server encountered an internal error. 715 - protocolError: unrecognized version number or incorrect PDU 716 structure. 718 - authMethodNotSupported: unrecognized SASL mechanism name. 720 - strongAuthRequired: the server requires authentication be 721 performed with a SASL mechanism. 723 - referral: this server cannot accept this bind and the client 724 should try another. 726 - saslBindInProgress: the server requires the client to send a new 727 bind request, with the same sasl mechanism, to continue the 728 authentication process. 730 - inappropriateAuthentication: the server requires the client which 731 had attempted to bind anonymously or without supplying credentials 732 to provide some form of credentials. 734 - invalidCredentials: the wrong password was supplied or the SASL 735 credentials could not be processed. 737 - unavailable: the server is shutting down. 739 If the server does not support the client's requested protocol 740 version, it MUST set the resultCode to protocolError. 742 If the client receives a BindResponse response where the resultCode 743 was protocolError, it MUST close the connection as the server will be 744 unwilling to accept further operations. (This is for compatibility 745 with earlier versions of LDAP, in which the bind was always the first 746 operation, and there was no negotiation.) 748 The serverSaslCreds are used as part of a SASL-defined bind mechanism 749 to allow the client to authenticate the server to which it is 750 communicating, or to perform "challenge-response" authentication. If 751 the client bound with the simple choice, or the SASL mechanism does 752 not require the server to return information to the client, then this 753 field is not to be included in the result. 755 Lightweight Directory Access Protocol Version 3 757 4.3. Unbind Operation 759 The function of the Unbind Operation is to terminate a protocol 760 session. The Unbind Operation is defined as follows: 762 UnbindRequest ::= [APPLICATION 2] NULL 764 The Unbind Operation has no response defined. Upon transmission of an 765 UnbindRequest, a protocol client MUST assume that the protocol 766 session is terminated. Upon receipt of an UnbindRequest, a protocol 767 server MUST assume that the requesting client has terminated the 768 session and that all outstanding requests may be discarded, and MUST 769 close the connection. 771 4.4. Unsolicited Notification 773 An unsolicited notification is an LDAPMessage sent from the server to 774 the client which is not in response to any LDAPMessage received by 775 the server. It is used to signal an extraordinary condition in the 776 server or in the connection between the client and the server. The 777 notification is of an advisory nature, and the server will not expect 778 any response to be returned from the client. 780 The unsolicited notification is structured as an LDAPMessage in which 781 the messageID is 0 and protocolOp is of the extendedResp form. The 782 responseName field of the ExtendedResponse is present. The LDAPOID 783 value MUST be unique for this notification, and not be used in any 784 other situation. 786 One unsolicited notification (Notice of Disconnection) is defined in 787 this document. 789 4.4.1. Notice of Disconnection 791 This notification may be used by the server to advise the client that 792 the server is about to close the connection due to an error 793 condition. Note that this notification is NOT a response to an unbind 794 requested by the client: the server MUST follow the procedures of 795 section 4.3. This notification is intended to assist clients in 796 distinguishing between an error condition and a transient network 797 failure. As with a connection close due to network failure, the 798 client MUST NOT assume that any outstanding requests which modified 799 the directory have succeeded or failed. 801 The responseName is 1.3.6.1.4.1.1466.20036, the response field is 802 absent, and the resultCode is used to indicate the reason for the 803 disconnection. 805 The following resultCode values are to be used in this notification: 807 - protocolError: The server has received data from the client in 808 which the LDAPMessage structure could not be parsed. 810 Lightweight Directory Access Protocol Version 3 812 - strongAuthRequired: The server has detected that an established 813 underlying security association protecting communication between 814 the client and server has unexpectedly failed or been compromised. 816 - unavailable: This server will stop accepting new connections and 817 operations on all existing connections, and be unavailable for an 818 extended period of time. The client may make use of an alternative 819 server. 821 After sending this notice, the server MUST close the connection. 822 After receiving this notice, the client MUST NOT transmit any further 823 on the connection, and may abruptly close the connection. 825 4.5. Search Operation 827 The Search Operation allows a client to request that a search be 828 performed on its behalf by a server. This can be used to read 829 attributes from a single entry, from entries immediately below a 830 particular entry, or a whole subtree of entries. 832 4.5.1. Search Request 834 The Search Request is defined as follows: 836 SearchRequest ::= [APPLICATION 3] SEQUENCE { 837 baseObject LDAPDN, 838 scope ENUMERATED { 839 baseObject (0), 840 singleLevel (1), 841 wholeSubtree (2) }, 842 derefAliases ENUMERATED { 843 neverDerefAliases (0), 844 derefInSearching (1), 845 derefFindingBaseObj (2), 846 derefAlways (3) }, 847 sizeLimit INTEGER (0 .. maxInt), 848 timeLimit INTEGER (0 .. maxInt), 849 typesOnly BOOLEAN, 850 filter Filter, 851 attributes AttributeDescriptionList } 853 Filter ::= CHOICE { 854 and [0] SET SIZE (1..MAX) OF Filter, 855 or [1] SET SIZE (1..MAX) OF Filter, 856 not [2] Filter, 857 equalityMatch [3] AttributeValueAssertion, 858 substrings [4] SubstringFilter, 859 greaterOrEqual [5] AttributeValueAssertion, 860 lessOrEqual [6] AttributeValueAssertion, 861 present [7] AttributeDescription, 862 approxMatch [8] AttributeValueAssertion, 863 Lightweight Directory Access Protocol Version 3 865 extensibleMatch [9] MatchingRuleAssertion } 867 SubstringFilter ::= SEQUENCE { 868 type AttributeDescription, 869 -- at least one must be present, 870 -- initial and final can occur at most once 871 substrings SEQUENCE OF CHOICE { 872 initial [0] AssertionValue, 873 any [1] AssertionValue, 874 final [2] AssertionValue } } 876 MatchingRuleAssertion ::= SEQUENCE { 877 matchingRule [1] MatchingRuleId OPTIONAL, 878 type [2] AttributeDescription OPTIONAL, 879 matchValue [3] AssertionValue, 880 dnAttributes [4] BOOLEAN DEFAULT FALSE } 882 Parameters of the Search Request are: 884 - baseObject: An LDAPDN that is the base object entry relative to 885 which the search is to be performed. 887 - scope: An indicator of the scope of the search to be performed. 888 The semantics of the possible values of this field are identical 889 to the semantics of the scope field in the X.511 Search Operation. 891 - derefAliases: An indicator as to how alias objects (as defined in 892 X.501) are to be handled in searching. The semantics of the 893 possible values of this field are: 895 neverDerefAliases: do not dereference aliases in searching 896 or in locating the base object of the search; 898 derefInSearching: dereference aliases in subordinates of 899 the base object in searching, but not in locating the base 900 object of the search; 902 derefFindingBaseObj: dereference aliases in locating the 903 base object of the search, but not when searching 904 subordinates of the base object; 906 derefAlways: dereference aliases both in searching and in 907 locating the base object of the search. 909 - sizeLimit: A size limit that restricts the maximum number of 910 entries to be returned as a result of the search. A value of 0 in 911 this field indicates that no client-requested size limit 912 restrictions are in effect for the search. Servers may enforce a 913 maximum number of entries to return. 915 - timeLimit: A time limit that restricts the maximum time (in 916 seconds) allowed for a search. A value of 0 in this field 917 indicates that no client-requested time limit restrictions are in 918 effect for the search. 920 Lightweight Directory Access Protocol Version 3 922 - typesOnly: An indicator as to whether search results will contain 923 both attribute types and values, or just attribute types. Setting 924 this field to TRUE causes only attribute types (no values) to be 925 returned. Setting this field to FALSE causes both attribute types 926 and values to be returned. 928 - filter: A filter that defines the conditions that must be 929 fulfilled in order for the search to match a given entry. 931 The 'and', 'or' and 'not' choices can be used to form combinations 932 of filters. At least one filter element MUST be present in an 933 'and' or 'or' choice. The others match against individual 934 attribute values of entries in the scope of the search. 935 (Implementor's note: the 'not' filter is an example of a tagged 936 choice in an implicitly-tagged module. In BER this is treated as 937 if the tag was explicit.) 939 A server MUST evaluate filters according to the three-valued logic 940 of X.511 (1993) section 7.8.1. In summary, a filter is evaluated 941 to either "TRUE", "FALSE" or "Undefined". If the filter evaluates 942 to TRUE for a particular entry, then the attributes of that entry 943 are returned as part of the search result (subject to any 944 applicable access control restrictions). If the filter evaluates 945 to FALSE or Undefined, then the entry is ignored for the search. 947 A filter of the "and" choice is TRUE if all the filters in the SET 948 OF evaluate to TRUE, FALSE if at least one filter is FALSE, and 949 otherwise Undefined. A filter of the "or" choice is FALSE if all 950 of the filters in the SET OF evaluate to FALSE, TRUE if at least 951 one filter is TRUE, and Undefined otherwise. A filter of the "not" 952 choice is TRUE if the filter being negated is FALSE, FALSE if it 953 is TRUE, and Undefined if it is Undefined. 955 The present match evaluates to TRUE where there is an attribute or 956 subtype of the specified attribute description present in an 957 entry, and FALSE otherwise (including a presence test with an 958 unrecognized attribute description.) 960 The matching rule and assertion syntax for equalityMatch filter 961 items is defined by the EQUALITY matching rule for the attribute 962 type. 964 The matching rule and assertion syntax for AssertionValues in a 965 substrings filter item is defined by the SUBSTR matching rule for 966 the attribute type. 968 The matching rule and assertion syntax for greaterOrEqual and 969 lessOrEqual filter items is defined by the ORDERING matching rule 970 for the attribute type. 972 The matching rule and assertion syntax for approxMatch filter 973 items is implementation-defined. If approximate matching is not 974 supported by the server, the filter item should be treated as an 975 Lightweight Directory Access Protocol Version 3 977 equalityMatch. 979 The extensibleMatch is new in this version of LDAP. If the 980 matchingRule field is absent, the type field MUST be present, and 981 the equality match is performed for that type. If the type field 982 is absent and matchingRule is present, the matchValue is compared 983 against all attributes in an entry which support that 984 matchingRule, and the matchingRule determines the syntax for the 985 assertion value (the filter item evaluates to TRUE if it matches 986 with at least one attribute in the entry, FALSE if it does not 987 match any attribute in the entry, and Undefined if the 988 matchingRule is not recognized or the assertionValue cannot be 989 parsed.) If the type field is present and matchingRule is present, 990 the matchingRule MUST be one permitted for use with that type, 991 otherwise the filter item is undefined. If the dnAttributes field 992 is set to TRUE, the match is applied against all the attributes in 993 an entry's distinguished name as well, and also evaluates to TRUE 994 if there is at least one attribute in the distinguished name for 995 which the filter item evaluates to TRUE. (Editors note: The 996 dnAttributes field is present so that there does not need to be 997 multiple versions of generic matching rules such as for word 998 matching, one to apply to entries and another to apply to entries 999 and dn attributes as well). 1001 A filter item evaluates to Undefined when the server would not be 1002 able to determine whether the assertion value matches an entry. If 1003 an attribute description in an equalityMatch, substrings, 1004 greaterOrEqual, lessOrEqual, approxMatch or extensibleMatch filter 1005 is not recognized by the server, a matching rule id in the 1006 extensibleMatch is not recognized by the server, the assertion 1007 value cannot be parsed, or the type of filtering requested is not 1008 implemented, then the filter is Undefined. Thus for example if a 1009 server did not recognize the attribute type shoeSize, a filter of 1010 (shoeSize=*) would evaluate to FALSE, and the filters 1011 (shoeSize=12), (shoeSize>=12) and (shoeSize<=12) would evaluate to 1012 Undefined. 1014 Servers MUST NOT return errors if attribute descriptions or 1015 matching rule ids are not recognized, or assertion values cannot 1016 be parsed. More details of filter processing are given in section 1017 7.8 of [X.511]. 1019 - attributes: A list of the attributes to be returned from each 1020 entry which matches the search filter. There are two special 1021 values which may be used: an empty list with no attributes, and 1022 the attribute description string "*". Both of these signify that 1023 all user attributes are to be returned. (The "*" allows the client 1024 to request all user attributes in addition to any specified 1025 operational attributes). 1027 Attributes MUST be named at most once in the list, and are 1028 returned at most once in an entry. If there are attribute 1029 descriptions in the list which are not recognized, they are 1030 ignored by the server. 1032 Lightweight Directory Access Protocol Version 3 1034 If the client does not want any attributes returned, it can 1035 specify a list containing only the attribute with OID "1.1". This 1036 OID was chosen arbitrarily and does not correspond to any 1037 attribute in use. 1039 Client implementors should note that even if all user attributes 1040 are requested, some attributes of the entry may not be included in 1041 search results due to access controls or other restrictions. 1042 Furthermore, servers will not return operational attributes, such 1043 as objectClasses or attributeTypes, unless they are listed by 1044 name, since there may be extremely large number of values for 1045 certain operational attributes. (A list of operational attributes 1046 for use in LDAP is given in [Syntaxes].) 1048 Note that an X.500 "list"-like operation can be emulated by the 1049 client requesting a one-level LDAP search operation with a filter 1050 checking for the presence of the objectClass attribute, and that an 1051 X.500 "read"-like operation can be emulated by a base object LDAP 1052 search operation with the same filter. A server which provides a 1053 gateway to X.500 is not required to use the Read or List operations, 1054 although it may choose to do so, and if it does, it must provide the 1055 same semantics as the X.500 search operation. 1057 4.5.2. Search Result 1059 The results of the search attempted by the server upon receipt of a 1060 Search Request are returned in Search Responses, which are LDAP 1061 messages containing either SearchResultEntry, SearchResultReference, 1062 or SearchResultDone data types. 1064 SearchResultEntry ::= [APPLICATION 4] SEQUENCE { 1065 objectName LDAPDN, 1066 attributes PartialAttributeList } 1068 PartialAttributeList ::= SEQUENCE OF SEQUENCE { 1069 type AttributeDescription, 1070 vals SET OF AttributeValue } 1071 -- implementors should note that the PartialAttributeList may 1072 -- have zero elements (if none of the attributes of that entry 1073 -- were requested, or could be returned), and that the vals set 1074 -- may also have zero elements (if types only was requested, or 1075 -- all values were excluded from the result.) 1077 SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 1078 -- at least one LDAPURL element must be present 1080 SearchResultDone ::= [APPLICATION 5] LDAPResult 1082 Upon receipt of a Search Request, a server will perform the necessary 1083 search of the DIT. 1085 Lightweight Directory Access Protocol Version 3 1087 If the LDAP session is operating over a connection-oriented transport 1088 such as TCP, the server will return to the client a sequence of 1089 responses in separate LDAP messages. There may be zero or more 1090 responses containing SearchResultEntry, one for each entry found 1091 during the search. There may also be zero or more responses 1092 containing SearchResultReference, one for each area not explored by 1093 this server during the search. The SearchResultEntry and 1094 SearchResultReference PDUs may come in any order. Following all the 1095 SearchResultReference responses and all SearchResultEntry responses 1096 to be returned by the server, the server will return a response 1097 containing the SearchResultDone, which contains an indication of 1098 success, or detailing any errors that have occurred. 1100 Each entry returned in a SearchResultEntry will contain all 1101 attributes, complete with associated values if necessary, as 1102 specified in the attributes field of the Search Request. Return of 1103 attributes is subject to access control and other administrative 1104 policy. 1106 Some attributes may be constructed by the server and appear in a 1107 SearchResultEntry attribute list, although they are not stored 1108 attributes of an entry. Clients SHOULD NOT assume that all attributes 1109 can be modified, even if permitted by access control. 1111 If the server�s schema defines a textual name for an attribute type, 1112 it MUST use a textual name for attributes of that attribute type by 1113 specifying one of the textual names as the value of the attribute 1114 type. Otherwise, the server uses the object identifier for the 1115 attribute type by specifying the object identifier, in ldapOID form, 1116 as the value of attribute type. 1118 4.5.3. Continuation References in the Search Result 1120 If the server was able to locate the entry referred to by the 1121 baseObject but was unable to search all the entries in the scope at 1122 and under the baseObject, the server may return one or more 1123 SearchResultReference entries, each containing a reference to another 1124 set of servers for continuing the operation. A server MUST NOT return 1125 any SearchResultReference if it has not located the baseObject and 1126 thus has not searched any entries; in this case it would return a 1127 SearchResultDone containing a referral resultCode. 1129 In the absence of indexing information provided to a server from 1130 servers holding subordinate naming contexts, SearchResultReference 1131 responses are not affected by search filters and are always returned 1132 when in scope. 1134 The SearchResultReference is of the same data type as the Referral. 1135 URLs for servers implementing the LDAP protocol are written according 1136 to [LDAPDN]. The part MUST be present in the URL, with the new 1137 target object name. The client MUST use this name in its next 1138 request. Some servers (e.g. part of a distributed index exchange 1139 system) may provide a different filter in the URLs of the 1140 Lightweight Directory Access Protocol Version 3 1142 SearchResultReference. If the filter part of the URL is present in an 1143 LDAP URL, the client MUST use the new filter in its next request to 1144 progress the search, and if the filter part is absent the client will 1145 use again the same filter. If the originating search scope was 1146 singleLevel, the scope part of the URL will be baseObject. Other 1147 aspects of the new search request may be the same or different as the 1148 search which generated the continuation references. 1149 Other kinds of URLs may be returned so long as the operation could be 1150 performed using that protocol. 1152 The name of an unexplored subtree in a SearchResultReference need not 1153 be subordinate to the base object. 1155 In order to complete the search, the client MUST issue a new search 1156 operation for each SearchResultReference that is returned. Note that 1157 the abandon operation described in section 4.11 applies only to a 1158 particular operation sent on a connection between a client and 1159 server, and if the client has multiple outstanding search operations, 1160 it MUST abandon each operation individually. 1162 4.5.3.1. Example 1164 For example, suppose the contacted server (hosta) holds the entry 1165 "DC=Example,DC=NET" and the entry "CN=Manager,DC=Example,DC=NET". It 1166 knows that either LDAP-capable servers (hostb) or (hostc) hold 1167 "OU=People,DC=Example,DC=NET" (one is the master and the other server 1168 a shadow), and that LDAP-capable server (hostd) holds the subtree 1169 "OU=Roles,DC=Example,DC=NET". If a subtree search of 1170 "DC=Example,DC=NET" is requested to the contacted server, it may 1171 return the following: 1173 SearchResultEntry for DC=Example,DC=NET 1174 SearchResultEntry for CN=Manager,DC=Example,DC=NET 1175 SearchResultReference { 1176 ldap://hostb/OU=People,DC=Example,DC=NET 1177 ldap://hostc/OU=People,DC=Example,DC=NET 1178 } 1179 SearchResultReference { 1180 ldap://hostd/OU=Roles,DC=Example,DC=NET 1181 } 1182 SearchResultDone (success) 1184 Client implementors should note that when following a 1185 SearchResultReference, additional SearchResultReference may be 1186 generated. Continuing the example, if the client contacted the server 1187 (hostb) and issued the search for the subtree 1188 "OU=People,DC=Example,DC=NET", the server might respond as follows: 1190 SearchResultEntry for OU=People,DC=Example,DC=NET 1191 SearchResultReference { 1192 ldap://hoste/OU=Managers,OU=People,DC=Example,DC=NET 1193 } 1194 SearchResultReference { 1195 Lightweight Directory Access Protocol Version 3 1197 ldap://hostf/OU=Consultants,OU=People,DC=Example,DC=NET 1198 } 1199 SearchResultDone (success) 1201 If the contacted server does not hold the base object for the search, 1202 then it will return a referral to the client. For example, if the 1203 client requests a subtree search of "DC=Example,DC=ORG" to hosta, the 1204 server may return only a SearchResultDone containing a referral. 1206 SearchResultDone (referral) { 1207 ldap://hostg/ 1208 } 1210 4.6. Modify Operation 1212 The Modify Operation allows a client to request that a modification 1213 of an entry be performed on its behalf by a server. The Modify 1214 Request is defined as follows: 1216 ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1217 object LDAPDN, 1218 modification SEQUENCE OF SEQUENCE { 1219 operation ENUMERATED { 1220 add (0), 1221 delete (1), 1222 replace (2) }, 1223 modification AttributeTypeAndValues } } 1225 AttributeTypeAndValues ::= SEQUENCE { 1226 type AttributeDescription, 1227 vals SET OF AttributeValue } 1229 Parameters of the Modify Request are: 1231 - object: The object to be modified. The value of this field 1232 contains the DN of the entry to be modified. The server will not 1233 perform any alias dereferencing in determining the object to be 1234 modified. 1236 - modification: A list of modifications to be performed on the 1237 entry. The entire list of entry modifications MUST be performed in 1238 the order they are listed, as a single atomic operation. While 1239 individual modifications may violate the directory schema, the 1240 resulting entry after the entire list of modifications is 1241 performed MUST conform to the requirements of the directory 1242 schema. The values that may be taken on by the 'operation' field 1243 in each modification construct have the following semantics 1244 respectively: 1246 add: add values listed to the given attribute, creating the 1247 attribute if necessary; 1248 Lightweight Directory Access Protocol Version 3 1250 delete: delete values listed from the given attribute, 1251 removing the entire attribute if no values are listed, or 1252 if all current values of the attribute are listed for 1253 deletion; 1255 replace: replace all existing values of the given attribute 1256 with the new values listed, creating the attribute if it 1257 did not already exist. A replace with no value will delete 1258 the entire attribute if it exists, and is ignored if the 1259 attribute does not exist. 1261 The result of the modify attempted by the server upon receipt of a 1262 Modify Request is returned in a Modify Response, defined as follows: 1264 ModifyResponse ::= [APPLICATION 7] LDAPResult 1266 Upon receipt of a Modify Request, a server will perform the necessary 1267 modifications to the DIT. 1269 The server will return to the client a single Modify Response 1270 indicating either the successful completion of the DIT modification, 1271 or the reason that the modification failed. Note that due to the 1272 requirement for atomicity in applying the list of modifications in 1273 the Modify Request, the client may expect that no modifications of 1274 the DIT have been performed if the Modify Response received indicates 1275 any sort of error, and that all requested modifications have been 1276 performed if the Modify Response indicates successful completion of 1277 the Modify Operation. If the connection fails, whether the 1278 modification occurred or not is indeterminate. 1280 The Modify Operation cannot be used to remove from an entry any of 1281 its distinguished values, those values which form the entry's 1282 relative distinguished name. An attempt to do so will result in the 1283 server returning the error notAllowedOnRDN. The Modify DN Operation 1284 described in section 4.9 is used to rename an entry. 1286 If an equality match filter has not been defined for an attribute 1287 type, clients MUST NOT attempt to add or delete individual values of 1288 that attribute from an entry using the "add" or "delete" form of a 1289 modification, and MUST instead use the "replace" form. 1291 Note that due to the simplifications made in LDAP, there is not a 1292 direct mapping of the modifications in an LDAP ModifyRequest onto the 1293 EntryModifications of a DAP ModifyEntry operation, and different 1294 implementations of LDAP-DAP gateways may use different means of 1295 representing the change. If successful, the final effect of the 1296 operations on the entry MUST be identical. 1298 4.7. Add Operation 1300 The Add Operation allows a client to request the addition of an entry 1301 into the directory. The Add Request is defined as follows: 1303 Lightweight Directory Access Protocol Version 3 1305 AddRequest ::= [APPLICATION 8] SEQUENCE { 1306 entry LDAPDN, 1307 attributes AttributeList } 1309 AttributeList ::= SEQUENCE OF SEQUENCE { 1310 type AttributeDescription, 1311 vals SET OF AttributeValue } 1313 Parameters of the Add Request are: 1315 - entry: the Distinguished Name of the entry to be added. Note that 1316 the server will not dereference any aliases in locating the entry 1317 to be added. 1319 - attributes: the list of attributes that make up the content of the 1320 entry being added. Clients MUST include distinguished values 1321 (those forming the entry's own RDN) in this list, the objectClass 1322 attribute, and values of any mandatory attributes of the listed 1323 object classes. Clients MUST NOT supply NO-USER-MODIFICATION 1324 attributes such as the createTimestamp or creatorsName attributes, 1325 since the server maintains these automatically. 1327 The entry named in the entry field of the AddRequest MUST NOT exist 1328 for the AddRequest to succeed. The parent of the entry to be added 1329 MUST exist. For example, if the client attempted to add 1330 "CN=JS,DC=Example,DC=NET", the "DC=Example,DC=NET" entry did not 1331 exist, and the "DC=NET" entry did exist, then the server would return 1332 the error noSuchObject with the matchedDN field containing "DC=NET". 1333 If the parent entry exists but is not in a naming context held by the 1334 server, the server SHOULD return a referral to the server holding the 1335 parent entry. 1337 Servers implementations SHOULD NOT restrict where entries can be 1338 located in the directory unless DIT structure rules are in place. 1339 Some servers MAY allow the administrator to restrict the classes of 1340 entries which can be added to the directory. 1342 Upon receipt of an Add Request, a server will attempt to perform the 1343 add requested. The result of the add attempt will be returned to the 1344 client in the Add Response, defined as follows: 1346 AddResponse ::= [APPLICATION 9] LDAPResult 1348 A response of success indicates that the new entry is present in the 1349 directory. 1351 4.8. Delete Operation 1353 The Delete Operation allows a client to request the removal of an 1354 entry from the directory. The Delete Request is defined as follows: 1356 DelRequest ::= [APPLICATION 10] LDAPDN 1357 Lightweight Directory Access Protocol Version 3 1359 The Delete Request consists of the Distinguished Name of the entry to 1360 be deleted. Note that the server will not dereference aliases while 1361 resolving the name of the target entry to be removed, and that only 1362 leaf entries (those with no subordinate entries) can be deleted with 1363 this operation. 1365 The result of the delete attempted by the server upon receipt of a 1366 Delete Request is returned in the Delete Response, defined as 1367 follows: 1369 DelResponse ::= [APPLICATION 11] LDAPResult 1371 Upon receipt of a Delete Request, a server will attempt to perform 1372 the entry removal requested. The result of the delete attempt will be 1373 returned to the client in the Delete Response. 1375 4.9. Modify DN Operation 1377 The Modify DN Operation allows a client to change the leftmost (least 1378 significant) component of the name of an entry in the directory, or 1379 to move a subtree of entries to a new location in the directory. The 1380 Modify DN Request is defined as follows: 1382 ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { 1383 entry LDAPDN, 1384 newrdn RelativeLDAPDN, 1385 deleteoldrdn BOOLEAN, 1386 newSuperior [0] LDAPDN OPTIONAL } 1388 Parameters of the Modify DN Request are: 1390 - entry: the Distinguished Name of the entry to be changed. This 1391 entry may or may not have subordinate entries. Note that the 1392 server will not dereference any aliases in locating the entry to 1393 be changed. 1395 - newrdn: the RDN that will form the leftmost component of the new 1396 name of the entry. 1398 - deleteoldrdn: a boolean parameter that controls whether the old 1399 RDN attribute values are to be retained as attributes of the 1400 entry, or deleted from the entry. 1402 - newSuperior: if present, this is the Distinguished Name of the 1403 entry which becomes the immediate superior of the existing entry. 1405 The result of the name change attempted by the server upon receipt of 1406 a Modify DN Request is returned in the Modify DN Response, defined as 1407 follows: 1409 ModifyDNResponse ::= [APPLICATION 13] LDAPResult 1410 Lightweight Directory Access Protocol Version 3 1412 Upon receipt of a ModifyDNRequest, a server will attempt to perform 1413 the name change. The result of the name change attempt will be 1414 returned to the client in the Modify DN Response. 1416 For example, if the entry named in the "entry" parameter was "cn=John 1417 Smith,c=US", the newrdn parameter was "cn=John Cougar Smith", and the 1418 newSuperior parameter was absent, then this operation would attempt 1419 to rename the entry to be "cn=John Cougar Smith,c=US". If there was 1420 already an entry with that name, the operation would fail with error 1421 code entryAlreadyExists. 1423 If the deleteoldrdn parameter is TRUE, the values forming the old RDN 1424 are deleted from the entry. If the deleteoldrdn parameter is FALSE, 1425 the values forming the old RDN will be retained as non-distinguished 1426 attribute values of the entry. The server may not perform the 1427 operation and return an error code if the setting of the deleteoldrdn 1428 parameter would cause a schema inconsistency in the entry. 1430 Note that X.500 restricts the ModifyDN operation to only affect 1431 entries that are contained within a single server. If the LDAP server 1432 is mapped onto DAP, then this restriction will apply, and the 1433 resultCode affectsMultipleDSAs will be returned if this error 1434 occurred. In general clients MUST NOT expect to be able to perform 1435 arbitrary movements of entries and subtrees between servers. 1437 4.10. Compare Operation 1439 The Compare Operation allows a client to compare an assertion 1440 provided with an entry in the directory. The Compare Request is 1441 defined as follows: 1443 CompareRequest ::= [APPLICATION 14] SEQUENCE { 1444 entry LDAPDN, 1445 ava AttributeValueAssertion } 1447 Parameters of the Compare Request are: 1449 - entry: the name of the entry to be compared with. Note that the 1450 server SHOULD NOT dereference any aliases in locating the entry to 1451 be compared with. 1453 - ava: the assertion with which an attribute in the entry is to be 1454 compared. 1456 The result of the compare attempted by the server upon receipt of a 1457 Compare Request is returned in the Compare Response, defined as 1458 follows: 1460 CompareResponse ::= [APPLICATION 15] LDAPResult 1462 Upon receipt of a Compare Request, a server will attempt to perform 1463 the requested comparison. The result of the comparison will be 1464 Lightweight Directory Access Protocol Version 3 1466 returned to the client in the Compare Response. Note that errors and 1467 the result of comparison are all returned in the same construct. 1469 Note that some directory systems may establish access controls which 1470 permit the values of certain attributes (such as userPassword) to be 1471 compared but not read. 1473 4.11. Abandon Operation 1475 The function of the Abandon Operation is to allow a client to request 1476 that the server abandon an outstanding operation. The Abandon Request 1477 is defined as follows: 1479 AbandonRequest ::= [APPLICATION 16] MessageID 1481 The MessageID MUST be that of an operation which was requested 1482 earlier in this connection. 1484 (The abandon request itself has its own message id. This is distinct 1485 from the id of the earlier operation being abandoned.) 1487 There is no response defined in the Abandon Operation. Upon 1488 transmission of an Abandon Operation, a client may expect that the 1489 operation identified by the Message ID in the Abandon Request will be 1490 abandoned. In the event that a server receives an Abandon Request on 1491 a Search Operation in the midst of transmitting responses to the 1492 search, that server MUST cease transmitting entry responses to the 1493 abandoned request immediately, and MUST NOT send the 1494 SearchResponseDone. Of course, the server MUST ensure that only 1495 properly encoded LDAPMessage PDUs are transmitted. 1497 Clients MUST NOT send abandon requests for the same operation 1498 multiple times, and MUST also be prepared to receive results from 1499 operations it has abandoned (since these may have been in transit 1500 when the abandon was requested). 1502 Servers MUST discard abandon requests for message IDs they do not 1503 recognize, for operations which cannot be abandoned, and for 1504 operations which have already been abandoned. 1506 4.12. Extended Operation 1508 An extension mechanism has been added in this version of LDAP, in 1509 order to allow additional operations to be defined for services not 1510 available elsewhere in this protocol, for instance digitally signed 1511 operations and results. 1513 The extended operation allows clients to make requests and receive 1514 responses with predefined syntaxes and semantics. These may be 1515 defined in RFCs or be private to particular implementations. Each 1516 request MUST have a unique OBJECT IDENTIFIER assigned to it. 1518 Lightweight Directory Access Protocol Version 3 1520 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 1521 requestName [0] LDAPOID, 1522 requestValue [1] OCTET STRING OPTIONAL } 1524 The requestName is a dotted-decimal representation of the OBJECT 1525 IDENTIFIER corresponding to the request. The requestValue is 1526 information in a form defined by that request, encapsulated inside an 1527 OCTET STRING. 1529 The server will respond to this with an LDAPMessage containing the 1530 ExtendedResponse. 1532 ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 1533 COMPONENTS OF LDAPResult, 1534 responseName [10] LDAPOID OPTIONAL, 1535 response [11] OCTET STRING OPTIONAL } 1537 If the server does not recognize the request name, it MUST return 1538 only the response fields from LDAPResult, containing the 1539 protocolError result code. 1541 5. Protocol Element Encodings and Transfer 1543 One underlying service is defined here. Clients and servers SHOULD 1544 implement the mapping of LDAP over TCP described in 5.2.1. 1546 5.1. Protocol Encoding 1548 The protocol elements of LDAP are encoded for exchange using the 1549 Basic Encoding Rules (BER) [X.690] of ASN.1 [X.680]. However, due to 1550 the high overhead involved in using certain elements of the BER, the 1551 following additional restrictions are placed on BER-encodings of LDAP 1552 protocol elements: 1554 (1) Only the definite form of length encoding will be used. 1556 (2) OCTET STRING values will be encoded in the primitive form only. 1558 (3) If the value of a BOOLEAN type is true, the encoding MUST have 1559 its contents octets set to hex "FF". 1561 (4) If a value of a type is its default value, it MUST be absent. 1562 Only some BOOLEAN and INTEGER types have default values in this 1563 protocol definition. 1565 These restrictions do not apply to ASN.1 types encapsulated inside of 1566 OCTET STRING values, such as attribute values, unless otherwise 1567 noted. 1569 5.2. Transfer Protocols 1570 Lightweight Directory Access Protocol Version 3 1572 This protocol is designed to run over connection-oriented, reliable 1573 transports, with all 8 bits in an octet being significant in the data 1574 stream. 1576 5.2.1. Transmission Control Protocol (TCP) 1578 The encoded LDAPMessage PDUs are mapped directly onto the TCP 1579 bytestream. It is recommended that server implementations running 1580 over the TCP provide a protocol listener on the assigned port, 389. 1581 Servers may instead provide a listener on a different port number. 1582 Clients MUST support contacting servers on any valid TCP port. 1584 6. Implementation Guidelines 1586 This document describes an Internet protocol. 1588 6.1. Server Implementations 1590 The server MUST be capable of recognizing all the mandatory attribute 1591 type names and implement the syntaxes specified in [Syntaxes]. 1592 Servers MAY also recognize additional attribute type names. 1594 6.2. Client Implementations 1596 Clients which request referrals MUST ensure that they do not loop 1597 between servers. They MUST NOT repeatedly contact the same server for 1598 the same request with the same target entry name, scope and filter. 1599 Some clients may be using a counter that is incremented each time 1600 referral handling occurs for an operation, and these kinds of clients 1601 MUST be able to handle a DIT with at least ten layers of naming 1602 contexts between the root and a leaf entry. 1604 In the absence of prior agreements with servers, clients SHOULD NOT 1605 assume that servers support any particular schemas beyond those 1606 referenced in section 6.1. Different schemas can have different 1607 attribute types with the same names. The client can retrieve the 1608 subschema entries referenced by the subschemaSubentry attribute in 1609 the server's root DSE or in entries held by the server. 1611 7. Security Considerations 1613 When used with a connection-oriented transport, this version of the 1614 protocol provides facilities for simple authentication using a 1615 cleartext password, as well as any SASL mechanism [RFC2222]. SASL 1616 allows for integrity and privacy services to be negotiated. 1618 It is also permitted that the server can return its credentials to 1619 the client, if it chooses to do so. 1621 Lightweight Directory Access Protocol Version 3 1623 Use of cleartext password is strongly discouraged where the 1624 underlying transport service cannot guarantee confidentiality and may 1625 result in disclosure of the password to unauthorized parties. 1627 When used with SASL, it should be noted that the name field of the 1628 BindRequest is not protected against modification. Thus if the 1629 distinguished name of the client (an LDAPDN) is agreed through the 1630 negotiation of the credentials, it takes precedence over any value in 1631 the unprotected name field. 1633 Implementations which cache attributes and entries obtained via LDAP 1634 MUST ensure that access controls are maintained if that information 1635 is to be provided to multiple clients, since servers may have access 1636 control policies which prevent the return of entries or attributes in 1637 search results except to particular authenticated clients. For 1638 example, caches could serve result information only to the client 1639 whose request caused it to be in the cache. 1641 8. Acknowledgements 1643 This document is an update to RFC 2251, by Mark Wahl, Tim Howes, and 1644 Steve Kille. Their work along with the input of individuals of the 1645 IETF LDAPEXT, LDUP, LDAPBIS, and other Working Groups is gratefully 1646 acknowledged. 1648 9. Normative References 1650 [X.500] ITU-T Rec. X.500, "The Directory: Overview of Concepts, 1651 Models and Service", 1993. 1653 [Roadmap] K. Zeilenga (editor), "LDAP: Technical Specification Road 1654 Map", draft-ietf-ldapbis-roadmap-xx.txt (a work in 1655 progress). 1657 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1658 Requirement Levels", RFC 2119, March 1997. 1660 [X.680] ITU-T Recommendation X.680 (1997) | ISO/IEC 8824-1:1998 1661 Information Technology - Abstract Syntax Notation One 1662 (ASN.1): Specification of basic notation 1664 [X.690] ITU-T Rec. X.690, "Specification of ASN.1 encoding rules: 1665 Basic, Canonical, and Distinguished Encoding Rules", 1994. 1667 [LDAPIANA] K. Zeilenga, "IANA Considerations for LDAP", draft-ietf- 1668 ldapbis-xx.txt (a work in progress). 1670 [ISO10646] Universal Multiple-Octet Coded Character Set (UCS) - 1671 Architecture and Basic Multilingual Plane, ISO/IEC 10646-1 1672 : 1993. 1674 Lightweight Directory Access Protocol Version 3 1676 [RFC2044] Yergeau, F., "UTF-8, a transformation format of Unicode 1677 and ISO 10646", RFC 2044, October 1996. 1679 [Models] K. Zeilenga, "LDAP: The Models", draft-ietf-ldapbis- 1680 models-xx.txt (a work in progress). 1682 [LDAPDN] K. Zeilenga (editor), "LDAP: String Representation of 1683 Distinguished Names", draft-ietf-ldapbis-dn-xx.txt, (a 1684 work in progress). 1686 [Syntaxes] K. Dally (editor), "LDAP: Syntaxes", draft-ietf-ldapbis- 1687 syntaxes-xx.txt, (a work in progress). 1689 [X.501] ITU-T Rec. X.501, "The Directory: Models", 1993. 1691 [X.511] ITU-T Rec. X.511, "The Directory: Abstract Service 1692 Definition", 1993. 1694 [RFC2396] Berners-Lee, T., Fielding, R., and L. Masinter Uniform 1695 Resource Identifiers (URI): Generic Syntax", RFC 2396, 1696 August 1998. 1698 [AuthMeth] R. Harrison (editor), "LDAP: Authentication Methods", 1699 draft-ietf-ldapbis-authmeth-xx.txt, (a work in progress). 1701 [RFC2222] Meyers, J., "Simple Authentication and Security Layer", 1702 RFC 2222, October 1997. 1704 10. Editor's Address 1706 Jim Sermersheim 1707 Novell, Inc. 1708 1800 South Novell Place 1709 Provo, Utah 84606, USA 1710 jimse@novell.com 1711 +1 801 861-3088 1712 Lightweight Directory Access Protocol Version 3 1714 Appendix A - LDAP Result Codes 1716 This normative appendix details additional considerations regarding 1717 LDAP result codes and provides a brief, general description of each 1718 LDAP result code enumerated in Section 4.1.10. 1720 Additional result codes MAY be defined for use with extensions. 1721 Client implementations SHALL treat any result code which they do not 1722 recognize as an unknown error condition. 1724 A.1 Non-Error Result Codes 1725 These result codes (called "non-error" result codes) do not indicate 1726 an error condition: 1727 success(0), 1728 compareTrue(6), 1729 compareFalse(7), 1730 referral(10), and 1731 saslBindInProgress(14). 1733 The success(0), compareTrue(6), and compare(7) result codes indicate 1734 successful completion (and, hence, are called to as "successful" 1735 result codes). 1737 The referral(10) and saslBindInProgress(14) indicate the client is 1738 required to take additional action to complete the operation 1740 A.2 Error Result Codes 1742 A.3 Classes and Precedence of Error Result Codes 1744 Result codes that indicate error conditions (and, hence, are called 1745 "error" result codes) fall into 6 classes. The following list 1746 specifies the precedence of error classes to be used when more than 1747 one error is detected [X511]: 1748 1) Name Errors (codes 32 - 34, 36) 1749 - a problem related to a name (DN or RDN), 1750 2) Update Errors (codes 64 - 69, 71) 1751 - a problem related to an update operation, 1752 3) Attribute Errors (codes 16 - 21) 1753 - a problem related to a supplied attribute, 1754 4) Security Errors (codes 8, 13, 48 - 50) 1755 - a security related problem, 1756 5) Service Problem (codes 3, 4, 7, 11, 12, 51 - 54, 80) 1757 - a problem related to the provision of the service, and 1758 6) Protocol Problem (codes 1, 2) 1759 - a problem related to protocol structure or semantics. 1761 Server implementations SHALL NOT continue processing an operation 1762 after it has determined that an error is to be reported. If the 1763 server detects multiple errors simultaneously, the server SHOULD 1764 report the error with the highest precedence. 1766 Existing LDAP result codes are described as follows: 1768 Lightweight Directory Access Protocol Version 3 1770 success (0) 1772 Indicates successful completion of an operation. 1774 This result code is normally not returned by the compare 1775 operation, see compareFalse (5) and compareTrue (6). 1777 operationsError (1) 1779 Indicates that the operation is not properly sequenced with 1780 relation to other operations (of same or different type). 1782 For example, this code is returned if the client attempts to 1783 Start TLS [RFC2830] while there are other operations 1784 outstanding or if TLS was already established. 1786 For the bind operation only, the code indicates the server 1787 encountered an internal error. 1789 protocolError (2) 1791 Indicates the server received data which has incorrect 1792 structure. 1794 For bind operation only, the code may be resulted to indicate 1795 the server does not support the requested protocol version. 1797 timeLimitExceeded (3) 1799 Indicates that the time limit specified by the client was 1800 exceeded before the operation could be completed. 1802 sizeLimitExceeded (4) 1804 Indicates that the size limit specified by the client was 1805 exceeded before the operation could be completed. 1807 compareFalse (5) 1809 Indicates that the operation successfully completes and the 1810 assertion has evaluated to TRUE. 1812 This result code is normally only returned by the compare 1813 operation. 1815 compareTrue (6) 1816 Lightweight Directory Access Protocol Version 3 1818 Indicates that the operation successfully completes and the 1819 assertion has evaluated to FALSE. 1821 This result code is normally only returned by the compare 1822 operation. 1824 authMethodNotSupported (7) 1826 Indicates that authentication method or mechanism is not 1827 supported. 1829 strongAuthRequired (8) 1831 Except when returned in a Notice of Disconnect (see section 1832 4.4.1), this indicates that the server requires the client to 1833 authentication using a strong(er) mechanism. 1835 referral (10) 1837 Indicates that a referral needs to be chased to complete the 1838 operation (see section 4.1.11). 1840 adminLimitExceeded (11) 1842 Indicates that an admnistrative limit has been exceeded. 1844 unavailableCriticalExtension (12) 1846 Indicates that server cannot perform a critical extension 1847 (see section 4.1.12). 1849 confidentialityRequired (13) 1851 Indicates that data confidentiality protections are required. 1853 saslBindInProgress (14) 1855 Indicates the server requires the client to send a new bind 1856 request, with the same sasl mechanism, to continue the 1857 authentication process (see section 4.2). 1859 noSuchAttribute (16) 1861 Indicates that the named entry does not contain the specified 1862 attribute or attribute value. 1864 Lightweight Directory Access Protocol Version 3 1866 undefinedAttributeType (17) 1868 Indicates that a request field contains an undefined 1869 attribute type. 1871 inappropriateMatching (18) 1873 Indicates that a request cannot be completed due to an 1874 inappropriate matching. 1876 constraintViolation (19) 1878 Indicates that the client supplied an attribute value which 1879 does not conform to constraints placed upon it by the data 1880 model. 1882 For example, this code is returned when the multiple values 1883 are supplied to an attribute which has a SINGLE-VALUE 1884 constraint. 1886 attributeOrValueExists (20) 1888 Indicates that the client supplied an attribute or value to 1889 be added to an entry already exists. 1891 invalidAttributeSyntax (21) 1893 Indicates that a purported attribute value does not conform 1894 to the syntax of the attribute. 1896 noSuchObject (32) 1898 Indicates that the object does not exist in the DIT. 1900 aliasProblem (33) 1902 Indicates that an alias problem has occurred. 1904 invalidDNSyntax (34) 1906 Indicates that a LDAPDN or RelativeLDAPDN field (e.g. search 1907 base, target entry, ModifyDN newrdn, etc.) of a request does 1908 not conform to the required syntax or contains attribute 1909 values which do not conform to the syntax of the attribute's 1910 type. 1912 Lightweight Directory Access Protocol Version 3 1914 aliasDereferencingProblem (36) 1916 Indicates that a problem in dereferencing an alias. 1918 inappropriateAuthentication (48) 1920 Indicates the server requires the client which had attempted 1921 to bind anonymously or without supplying credentials to 1922 provide some form of credentials, 1924 invalidCredentials (49) 1926 Indicates the supplied credentials are invalid. 1928 insufficientAccessRights (50) 1930 Indicates that the client does not have sufficient access 1931 rights to perform the operation. 1933 busy (51) 1935 Indicates that the server is busy. 1937 unavailable (52) 1939 Indicates that the server is shutting down or a subsystem 1940 necessary to complete the operation is offline. 1942 unwillingToPerform (53) 1944 Indicates that the server is unwilling to perform the 1945 operation. 1947 loopDetect (54) 1949 Indicates that the server has detected an internal loop. 1951 namingViolation (64) 1953 Indicates that the entry name violates naming restrictions. 1955 objectClassViolation (65) 1957 Indicates that the entry violates object class restrictions. 1959 Lightweight Directory Access Protocol Version 3 1961 notAllowedOnNonLeaf (66) 1963 Indicates that operation is inappropriately acting upon a 1964 non-leaf entry. 1966 notAllowedOnRDN (67) 1968 Indicates that the operation is inappropriately attempting to 1969 remove a value which forms the entry's relative distinguished 1970 name. 1972 entryAlreadyExists (68) 1974 Indicates that the request cannot be added fulfilled as the 1975 entry already exists. 1977 objectClassModsProhibited (69) 1979 Indicates that the attempt to modify the object class(es) of 1980 an entry objectClass attribute is prohibited. 1982 For example, this code is returned when a when a client 1983 attempts to modify the structural object class of an entry. 1985 affectsMultipleDSAs (71) 1987 Indicates that the operation cannot be completed as it 1988 affects multiple servers (DSAs). 1990 other (80) 1992 Indicates the server has encountered an internal error. 1994 Lightweight Directory Access Protocol Version 3 1996 Appendix B - Complete ASN.1 Definition 1998 This appendix is normative. 2000 Lightweight-Directory-Access-Protocol-V3 DEFINITIONS 2001 IMPLICIT TAGS 2002 EXTENSIBILITY IMPLIED ::= 2004 BEGIN 2006 LDAPMessage ::= SEQUENCE { 2007 messageID MessageID, 2008 protocolOp CHOICE { 2009 bindRequest BindRequest, 2010 bindResponse BindResponse, 2011 unbindRequest UnbindRequest, 2012 searchRequest SearchRequest, 2013 searchResEntry SearchResultEntry, 2014 searchResDone SearchResultDone, 2015 searchResRef SearchResultReference, 2016 modifyRequest ModifyRequest, 2017 modifyResponse ModifyResponse, 2018 addRequest AddRequest, 2019 addResponse AddResponse, 2020 delRequest DelRequest, 2021 delResponse DelResponse, 2022 modDNRequest ModifyDNRequest, 2023 modDNResponse ModifyDNResponse, 2024 compareRequest CompareRequest, 2025 compareResponse CompareResponse, 2026 abandonRequest AbandonRequest, 2027 extendedReq ExtendedRequest, 2028 extendedResp ExtendedResponse, 2029 ... }, 2030 controls [0] Controls OPTIONAL } 2032 MessageID ::= INTEGER (0 .. maxInt) 2034 maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- 2036 LDAPString ::= OCTET STRING -- UTF-8 encoded, 2037 -- [ISO10646] characters 2039 LDAPOID ::= OCTET STRING -- Constrained to numericoid [Models] 2041 LDAPDN ::= LDAPString 2043 RelativeLDAPDN ::= LDAPString 2045 AttributeDescription ::= LDAPString 2046 -- Constrained to attributedescription 2047 -- [Models] 2049 AttributeDescriptionList ::= SEQUENCE OF 2050 Lightweight Directory Access Protocol Version 3 2052 AttributeDescription 2054 AttributeValue ::= OCTET STRING 2056 AttributeValueAssertion ::= SEQUENCE { 2057 attributeDesc AttributeDescription, 2058 assertionValue AssertionValue } 2060 AssertionValue ::= OCTET STRING 2062 Attribute ::= SEQUENCE { 2063 type AttributeDescription, 2064 vals SET OF AttributeValue } 2066 MatchingRuleId ::= LDAPString 2068 LDAPResult ::= SEQUENCE { 2069 resultCode ENUMERATED { 2070 success (0), 2071 operationsError (1), 2072 protocolError (2), 2073 timeLimitExceeded (3), 2074 sizeLimitExceeded (4), 2075 compareFalse (5), 2076 compareTrue (6), 2077 authMethodNotSupported (7), 2078 strongAuthRequired (8), 2079 -- 9 reserved -- 2080 referral (10), 2081 adminLimitExceeded (11), 2082 unavailableCriticalExtension (12), 2083 confidentialityRequired (13), 2084 saslBindInProgress (14), 2085 noSuchAttribute (16), 2086 undefinedAttributeType (17), 2087 inappropriateMatching (18), 2088 constraintViolation (19), 2089 attributeOrValueExists (20), 2090 invalidAttributeSyntax (21), 2091 -- 22-31 unused -- 2092 noSuchObject (32), 2093 aliasProblem (33), 2094 invalidDNSyntax (34), 2095 -- 35 reserved for undefined isLeaf -- 2096 aliasDereferencingProblem (36), 2097 -- 37-47 unused -- 2098 inappropriateAuthentication (48), 2099 invalidCredentials (49), 2100 insufficientAccessRights (50), 2101 busy (51), 2102 unavailable (52), 2103 unwillingToPerform (53), 2104 loopDetect (54), 2105 -- 55-63 unused -- 2106 Lightweight Directory Access Protocol Version 3 2108 namingViolation (64), 2109 objectClassViolation (65), 2110 notAllowedOnNonLeaf (66), 2111 notAllowedOnRDN (67), 2112 entryAlreadyExists (68), 2113 objectClassModsProhibited (69), 2114 -- 70 reserved for CLDAP -- 2115 affectsMultipleDSAs (71), 2116 -- 72-79 unused -- 2117 other (80), 2118 ... }, 2119 -- 81-90 reserved for APIs -- 2120 matchedDN LDAPDN, 2121 errorMessage LDAPString, 2122 referral [3] Referral OPTIONAL } 2124 Referral ::= SEQUENCE OF LDAPURL 2126 LDAPURL ::= LDAPString -- limited to characters permitted in 2127 -- URLs 2129 Controls ::= SEQUENCE OF Control 2131 Control ::= SEQUENCE { 2132 controlType LDAPOID, 2133 criticality BOOLEAN DEFAULT FALSE, 2134 controlValue OCTET STRING OPTIONAL } 2136 BindRequest ::= [APPLICATION 0] SEQUENCE { 2137 version INTEGER (1 .. 127), 2138 name LDAPDN, 2139 authentication AuthenticationChoice } 2141 AuthenticationChoice ::= CHOICE { 2142 simple [0] OCTET STRING, 2143 -- 1 and 2 reserved 2144 sasl [3] SaslCredentials, 2145 ... } 2147 SaslCredentials ::= SEQUENCE { 2148 mechanism LDAPString, 2149 credentials OCTET STRING OPTIONAL } 2151 BindResponse ::= [APPLICATION 1] SEQUENCE { 2152 COMPONENTS OF LDAPResult, 2153 serverSaslCreds [7] OCTET STRING OPTIONAL } 2155 UnbindRequest ::= [APPLICATION 2] NULL 2157 SearchRequest ::= [APPLICATION 3] SEQUENCE { 2158 baseObject LDAPDN, 2159 scope ENUMERATED { 2160 baseObject (0), 2161 singleLevel (1), 2162 Lightweight Directory Access Protocol Version 3 2164 wholeSubtree (2) }, 2165 derefAliases ENUMERATED { 2166 neverDerefAliases (0), 2167 derefInSearching (1), 2168 derefFindingBaseObj (2), 2169 derefAlways (3) }, 2170 sizeLimit INTEGER (0 .. maxInt), 2171 timeLimit INTEGER (0 .. maxInt), 2172 typesOnly BOOLEAN, 2173 filter Filter, 2174 attributes AttributeDescriptionList } 2176 Filter ::= CHOICE { 2177 and [0] SET SIZE (1..MAX) OF Filter, 2178 or [1] SET SIZE (1..MAX) OF Filter, 2179 not [2] Filter, 2180 equalityMatch [3] AttributeValueAssertion, 2181 substrings [4] SubstringFilter, 2182 greaterOrEqual [5] AttributeValueAssertion, 2183 lessOrEqual [6] AttributeValueAssertion, 2184 present [7] AttributeDescription, 2185 approxMatch [8] AttributeValueAssertion, 2186 extensibleMatch [9] MatchingRuleAssertion } 2188 SubstringFilter ::= SEQUENCE { 2189 type AttributeDescription, 2190 -- at least one must be present, 2191 -- initial and final can occur at most once 2192 substrings SEQUENCE OF CHOICE { 2193 initial [0] AssertionValue, 2194 any [1] AssertionValue, 2195 final [2] AssertionValue } } 2197 MatchingRuleAssertion ::= SEQUENCE { 2198 matchingRule [1] MatchingRuleId OPTIONAL, 2199 type [2] AttributeDescription OPTIONAL, 2200 matchValue [3] AssertionValue, 2201 dnAttributes [4] BOOLEAN DEFAULT FALSE } 2203 SearchResultEntry ::= [APPLICATION 4] SEQUENCE { 2204 objectName LDAPDN, 2205 attributes PartialAttributeList } 2207 PartialAttributeList ::= SEQUENCE OF SEQUENCE { 2208 type AttributeDescription, 2209 vals SET OF AttributeValue } 2211 SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 2213 SearchResultDone ::= [APPLICATION 5] LDAPResult 2215 ModifyRequest ::= [APPLICATION 6] SEQUENCE { 2216 object LDAPDN, 2217 modification SEQUENCE OF SEQUENCE { 2218 Lightweight Directory Access Protocol Version 3 2220 operation ENUMERATED { 2221 add (0), 2222 delete (1), 2223 replace (2) }, 2224 modification AttributeTypeAndValues } } 2226 AttributeTypeAndValues ::= SEQUENCE { 2227 type AttributeDescription, 2228 vals SET OF AttributeValue } 2230 ModifyResponse ::= [APPLICATION 7] LDAPResult 2232 AddRequest ::= [APPLICATION 8] SEQUENCE { 2233 entry LDAPDN, 2234 attributes AttributeList } 2236 AttributeList ::= SEQUENCE OF SEQUENCE { 2237 type AttributeDescription, 2238 vals SET OF AttributeValue } 2240 AddResponse ::= [APPLICATION 9] LDAPResult 2242 DelRequest ::= [APPLICATION 10] LDAPDN 2244 DelResponse ::= [APPLICATION 11] LDAPResult 2246 ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { 2247 entry LDAPDN, 2248 newrdn RelativeLDAPDN, 2249 deleteoldrdn BOOLEAN, 2250 newSuperior [0] LDAPDN OPTIONAL } 2252 ModifyDNResponse ::= [APPLICATION 13] LDAPResult 2254 CompareRequest ::= [APPLICATION 14] SEQUENCE { 2255 entry LDAPDN, 2256 ava AttributeValueAssertion } 2258 CompareResponse ::= [APPLICATION 15] LDAPResult 2260 AbandonRequest ::= [APPLICATION 16] MessageID 2262 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 2263 requestName [0] LDAPOID, 2264 requestValue [1] OCTET STRING OPTIONAL } 2266 ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 2267 COMPONENTS OF LDAPResult, 2268 responseName [10] LDAPOID OPTIONAL, 2269 response [11] OCTET STRING OPTIONAL } 2271 END 2272 Lightweight Directory Access Protocol Version 3 2274 Appendix C - Change History 2275 2278 C.1 Changes made to RFC 2251: 2280 C.1.1 Editorial 2282 - Bibliography References: Changed all bibliography references to 2283 use a long name form for readability. 2284 - Changed occurrences of "unsupportedCriticalExtension" 2285 "unavailableCriticalExtension" 2286 - Fixed a small number of misspellings (mostly dropped letters). 2288 C.1.2 Section 1 2290 - Removed IESG note. 2292 C.1.3 Section 9 2294 - Added references to RFCs 1823, 2234, 2829 and 2830. 2296 C.2 Changes made to draft-ietf-ldapbis-protocol-00.txt: 2298 C.2.1 Section 4.1.6 2300 - In the first paragraph, clarified what the contents of an 2301 AttributeValue are. There was confusion regarding whether or not 2302 an AttributeValue that is BER encoded (due to the "binary" option) 2303 is to be wrapped in an extra OCTET STRING. 2304 - To the first paragraph, added wording that doesn't restrict other 2305 transfer encoding specifiers from being used. The previous wording 2306 only allowed for the string encoding and the ;binary encoding. 2307 - To the first paragraph, added a statement restricting multiple 2308 options that specify transfer encoding from being present. This 2309 was never specified in the previous version and was seen as a 2310 potential interoperability problem. 2311 - Added a third paragraph stating that the ;binary option is 2312 currently the only option defined that specifies the transfer 2313 encoding. This is for completeness. 2315 C.2.2 Section 4.1.7 2317 - Generalized the second paragraph to read "If an option specifying 2318 the transfer encoding is present in attributeDesc, the 2319 AssertionValue is encoded as specified by the option...". 2320 Previously, only the ;binary option was mentioned. 2322 C.2.3 Sections 4.2, 4.9, 4.10 2324 - Added alias dereferencing specifications. In the case of modDN, 2325 followed precedent set on other update operations (... alias is 2326 not dereferenced...) In the case of bind and compare stated that 2327 Lightweight Directory Access Protocol Version 3 2329 servers SHOULD NOT dereference aliases. Specifications were added 2330 because they were missing from the previous version and caused 2331 interoperability problems. Concessions were made for bind and 2332 compare (neither should have ever allowed alias dereferencing) by 2333 using SHOULD NOT language, due to the behavior of some existing 2334 implementations. 2336 C.2.4 Sections 4.5 and Appendix A 2338 - Changed SubstringFilter.substrings.initial, any, and all from 2339 LDAPString to AssertionValue. This was causing an incompatibility 2340 with X.500 and confusion among other TS RFCs. 2342 C.3 Changes made to draft-ietf-ldapbis-protocol-01.txt: 2344 C.3.1 Section 3.4 2346 - Reworded text surrounding subschemaSubentry to reflect that it is 2347 a single-valued attribute that holds the schema for the root DSE. 2348 Also noted that if the server masters entries that use differing 2349 schema, each entry's subschemaSubentry attribute must be 2350 interrogated. This may change as further fine-tuning is done to 2351 the data model. 2353 C.3.2 Section 4.1.12 2355 - Specified that the criticality field is only used for requests and 2356 not for unbind or abandon. Noted that it is ignored for all other 2357 operations. 2359 C.3.3 Section 4.2 2361 - Noted that Server behavior is undefined when the name is a null 2362 value, simple authentication is used, and a password is specified. 2364 C.3.4 Section 4.2.(various) 2366 - Changed "unauthenticated" to "anonymous" and "DN" and "LDAPDN" to 2367 "name" 2369 C.3.5 Section 4.2.2 2371 - Changed "there is no authentication or encryption being performed 2372 by a lower layer" to "the underlying transport service cannot 2373 guarantee confidentiality" 2375 C.3.6 Section 4.5.2 2377 - Removed all mention of ExtendedResponse due to lack of 2378 implementation. 2380 C.4 Changes made to draft-ietf-ldapbis-protocol-02.txt: 2382 Lightweight Directory Access Protocol Version 3 2384 C.4.1 Section 4 2386 - Removed "typically" from "and is typically transferred" in the 2387 first paragraph. We know of no (and can conceive of no) case where 2388 this isn't true. 2389 - Added "Section 5.1 specifies how the LDAP protocol is encoded." To 2390 the first paragraph. Added this cross reference for readability. 2391 - Changed "version 3 " to "version 3 or later" in the second 2392 paragraph. This was added to clarify the original intent. 2393 - Changed "protocol version" to "protocol versions" in the third 2394 paragraph. This attribute is multi-valued with the intent of 2395 holding all supported versions, not just one. 2397 C.4.2 Section 4.1.8 2399 - Changed "when transferred in protocol" to "when transferred from 2400 the server to the client" in the first paragraph. This is to 2401 clarify that this behavior only happens when attributes are being 2402 sent from the server. 2404 C.4.3 Section 4.1.10 2406 - Changed "servers will return responses containing fields of type 2407 LDAPResult" to "servers will return responses of LDAPResult or 2408 responses containing the components of LDAPResponse". This 2409 statement was incorrect and at odds with the ASN.1. The fix here 2410 reflects the original intent. 2411 - Dropped '--new' from result codes ASN.1. This simplification in 2412 comments just reduces unneeded verbiage. 2414 C.4.4 Section 4.1.11 2416 - Changed "It contains a reference to another server (or set of 2417 servers)" to "It contains one or more references to one or more 2418 servers or services" in the first paragraph. This reflects the 2419 original intent and clarifies that the URL may point to non-LDAP 2420 services. 2422 C.4.5 Section 4.1.12 2424 - Changed "The server MUST be prepared" to "Implementations MUST be 2425 prepared" in the eighth paragraph to reflect that both client and 2426 server implementations must be able to handle this (as both parse 2427 controls). 2429 C.4.6 Section 4.4 2431 - Changed "One unsolicited notification is defined" to "One 2432 unsolicited notification (Notice of Disconnection) is defined" in 2433 the third paragraph. For clarity and readability. 2435 C.4.7 Section 4.5.1 2436 Lightweight Directory Access Protocol Version 3 2438 - Changed "checking for the existence of the objectClass attribute" 2439 to "checking for the presence of the objectClass attribute" in the 2440 last paragraph. This was done as a measure of consistency (we use 2441 the terms present and presence rather than exists and existence in 2442 search filters). 2444 C.4.8 Section 4.5.3 2446 - Changed "outstanding search operations to different servers," to 2447 "outstanding search operations" in the fifth paragraph as they may 2448 be to the same server. This is a point of clarification. 2450 C.4.9 Section 4.6 2452 - Changed "clients MUST NOT attempt to delete" to "clients MUST NOT 2453 attempt to add or delete" in the second to last paragraph. 2454 - Change "using the "delete" form" to "using the "add" or "delete" 2455 form" in the second to last paragraph. 2457 C.4.10 Section 4.7 2459 - Changed "Clients MUST NOT supply the createTimestamp or 2460 creatorsName attributes, since these will be generated 2461 automatically by the server." to "Clients MUST NOT supply NO-USER- 2462 MODIFICATION attributes such as createTimestamp or creatorsName 2463 attributes, since these are provided by the server." in the 2464 definition of the attributes field. This tightens the language to 2465 reflect the original intent and to not leave a hole in which one 2466 could interpret the two attributes mentioned as the only non- 2467 writable attributes. 2469 C.4.11 Section 4.11 2471 - Changed "has been" to "will be" in the fourth paragraph. This 2472 clarifies that the server will (not has) abandon the operation. 2474 C.5 Changes made to draft-ietf-ldapbis-protocol-03.txt: 2476 C.5.1 Section 3.2.1 2478 - Changed "An attribute is a type with one or more associated 2479 values. The attribute type is identified by a short descriptive 2480 name and an OID (object identifier). The attribute type governs 2481 whether there can be more than one value of an attribute of that 2482 type in an entry, the syntax to which the values must conform, the 2483 kinds of matching which can be performed on values of that 2484 attribute, and other functions." to " An attribute is a 2485 description (a type and zero or more options) with one or more 2486 associated values. The attribute type governs whether the 2487 attribute can have multiple values, the syntax and matching rules 2488 used to construct and compare values of that attribute, and other 2489 functions. Options indicate modes of transfer and other 2490 Lightweight Directory Access Protocol Version 3 2492 functions.". This points out that an attribute consists of both 2493 the type and options. 2495 C.5.2 Section 4 2497 - Changed "Section 5.1 specifies the encoding rules for the LDAP 2498 protocol" to "Section 5.1 specifies how the protocol is encoded 2499 and transferred." 2501 C.5.3 Section 4.1.2 2503 - Added ABNF for the textual representation of LDAPOID. Previously, 2504 there was no formal BNF for this construct. 2506 C.5.4 Section 4.1.4 2508 - Changed "This identifier may be written as decimal digits with 2509 components separated by periods, e.g. "2.5.4.10"" to "may be 2510 written as defined by ldapOID in section 4.1.2" in the second 2511 paragraph. This was done because we now have a formal BNF 2512 definition of an oid. 2514 C.5.5 Section 4.1.5 2516 - Changed the BNF for AttributeDescription to ABNF. This was done 2517 for readability and consistency (no functional changes involved). 2518 - Changed "Options present in an AttributeDescription are never 2519 mutually exclusive." to "Options MAY be mutually exclusive. An 2520 AttributeDescription with mutually exclusive options is treated as 2521 an undefined attribute type." for clarity. It is generally 2522 understood that this is the original intent, but the wording could 2523 be easily misinterpreted. 2524 - Changed "Any option could be associated with any AttributeType, 2525 although not all combinations may be supported by a server." to 2526 "Though any option or set of options could be associated with any 2527 AttributeType, the server support for certain combinations may be 2528 restricted by attribute type, syntaxes, or other factors.". This 2529 is to clarify the meaning of 'combination' (it applies both to 2530 combination of attribute type and options, and combination of 2531 options). It also gives examples of *why* they might be 2532 unsupported. 2534 C.5.6 Section 4.1.11 2536 - Changed the wording regarding 'equally capable' referrals to "If 2537 multiple URLs are present, the client assumes that any URL may be 2538 used to progress the operation.". The previous language implied 2539 that the server MUST enforce rules that it was practically 2540 incapable of. The new language highlights the original intent-- 2541 that is, that any of the referrals may be used to progress the 2542 operation, there is no inherent 'weighting' mechanism. 2544 C.5.7 Section 4.5.1 and Appendix A 2545 Lightweight Directory Access Protocol Version 3 2547 - Added the comment "-- initial and final can occur at most once", 2548 to clarify this restriction. 2550 C.5.8 Section 5.1 2552 - Changed heading from "Mapping Onto BER-based Transport Services" 2553 to "Protocol Encoding". 2555 C.5.9 Section 5.2.1 2557 - Changed "The LDAPMessage PDUs" to "The encoded LDAPMessage PDUs" 2558 to point out that the PDUs are encoded before being streamed to 2559 TCP. 2561 C.6 Changes made to draft-ietf-ldapbis-protocol-04.txt: 2563 C.6.1 Section 4.5.1 and Appendix A 2565 - Changed the ASN.1 for the and and or choices of Filter to have a 2566 lower range of 1. This was an omission in the original ASN.1 2568 C.6.2 Various 2570 - Fixed various typo's 2572 C.7 Changes made to draft-ietf-ldapbis-protocol-05.txt: 2574 C.7.1 Section 3.2.1 2576 - Added "(as defined in Section 12.4.1 of [X.501])" to the fifth 2577 paragraph when talking about "operational attributes". This is 2578 because the term "operational attributes" is never defined. 2579 Alternately, we could drag a definition into the spec, for now, 2580 I'm just pointing to the reference in X.501. 2582 C.7.2 Section 4.1.5 2584 - Changed "And is also case insensitive" to "The entire 2585 AttributeDescription is case insensitive". This is to clarify 2586 whether we're talking about the entire attribute description, or 2587 just the options. 2589 - Expounded on the definition of attribute description options. This 2590 doc now specifies a difference between transfer and tagging 2591 options and describes the semantics of each, and how and when 2592 subtyping rules apply. Now allow options to be transmitted in any 2593 order but disallow any ordering semantics to be implied. These 2594 changes are the result of ongoing input from an engineering team 2595 designed to deal with ambiguity issues surrounding attribute 2596 options. 2598 C.7.3 Sections 4.1.5.1 and 4.1.6 2599 Lightweight Directory Access Protocol Version 3 2601 - Refer to non "binary" transfer encodings as "native encoding" 2602 rather than "string" encoding to clarify and avoid confusion. 2604 C.8 Changes made to draft-ietf-ldapbis-protocol-06.txt: 2606 C.8.1 Title 2608 - Changed to "LDAP: The Protocol" to be consisted with other working 2609 group documents 2611 C.8.2 Abstract 2613 - Moved above TOC to conform to new guidelines 2615 - Reworded to make consistent with other WG documents. 2617 - Moved 2119 conventions to "Conventions" section 2619 C.8.3 Introduction 2621 - Created to conform to new guidelines 2623 C.8.4 Models 2625 - Removed section. There is only one model in this document 2626 (Protocol Model) 2628 C.8.5 Protocol Model 2630 - Removed antiquated paragraph: "In keeping with the goal of easing 2631 the costs associated with use of the directory, it is an objective 2632 of this protocol to minimize the complexity of clients so as to 2633 facilitate widespread deployment of applications capable of using 2634 the directory." 2636 - Removed antiquated paragraph concerning LDAP v1 and v2 and 2637 referrals. 2639 C.8.6 Data Model 2641 - Removed Section 3.2 and subsections. These have been moved to 2642 [Models] 2644 C.8.7 Relationship to X.500 2646 - Removed section. It has been moved to [Roadmap] 2648 C.8.8 Server Specific Data Requirements 2650 - Removed section. It has been moved to [Models] 2652 C.8.9 Elements of Protocol 2653 Lightweight Directory Access Protocol Version 3 2655 - Added "Section 5.1 specifies how the protocol is encoded and 2656 transferred." to the end of the first paragraph for reference. 2658 - Reworded notes about extensibility, and now talk about implied 2659 extensibility and the use of ellipses in the ASN.1 2661 - Removed references to LDAPv2 in third and fourth paragraphs. 2663 C.8.10 Message ID 2665 - Reworded second paragraph to "The message ID of a request MUST 2666 have a non-zero value different from the values of any other 2667 requests outstanding in the LDAP session of which this message is 2668 a part. The zero value is reserved for the unsolicited 2669 notification message." (Added notes about non-zero and the zero 2670 value). 2672 C.8.11 String Types 2674 - Removed ABNF for LDAPOID and added "Although an LDAPOID is encoded 2675 as an OCTET STRING, values are limited to the definition of 2676 numericoid given in Section 1.3 of [Models]." 2678 C.8.12 Distinguished Name and Relative Distinguished Name 2680 - Removed ABNF and referred to [Models] and [LDAPDN] where this is 2681 defined. 2683 C.8.13 Attribute Type 2685 - Removed sections. It's now in the [Models] doc. 2687 C.8.14 Attribute Description 2689 - Removed ABNF and aligned section with [Models] 2691 - Moved AttributeDescriptionList here. 2693 C.8.15 Transfer Options 2695 - Added section and consumed much of old options language (while 2696 aligning with [Models] 2698 C.8.16 Binary Transfer Option 2700 - Clarified intent regarding exactly what is to be BER encoded. 2702 - Clarified that clients must not expect ;binary when not asking for 2703 it (;binary, as opposed to ber encoded data). 2705 C.8.17 Attribute 2707 - Use the term "attribute description" in lieu of "type" 2708 Lightweight Directory Access Protocol Version 3 2710 - Clarified the fact that clients cannot rely on any apparent 2711 ordering of attribute values. 2713 C.8.18 LDAPResult 2715 - To resultCode, added ellipses "..." to the enumeration to indicate 2716 extensibility. and added a note, pointing to [LDAPIANA] 2718 - Removed error groupings ad refer to Appendix A. 2720 C.8.19 Bind Operation 2722 - Added "Prior to the BindRequest, the implied identity is 2723 anonymous. Refer to [AuthMeth] for the authentication-related 2724 semantics of this operation." to the first paragraph. 2726 - Added ellipses "..." to AuthenticationChoice and added a note 2727 "This type is extensible as defined in Section 3.6 of [LDAPIANA]. 2728 Servers that do not support a choice supplied by a client will 2729 return authMethodNotSupported in the result code of the 2730 BindResponse." 2732 - Simplified text regarding how the server handles unknown versions. 2733 Removed references to LDAPv2 2735 C.8.20 Sequencing of the Bind Request 2737 - Aligned with [AuthMeth] In particular, paragraphs 4 and 6 were 2738 removed, while a portion of 4 was retained (see C.8.9) 2740 C.8.21 Authentication and other Security Service 2742 - Section was removed. Now in [AuthMeth] 2744 C.8.22 Continuation References in the Search Result 2746 - Added "If the originating search scope was singleLevel, the scope 2747 part of the URL will be baseObject." 2749 C.8.23 Security Considerations 2751 - Removed reference to LDAPv2 2753 C.8.24 Result Codes 2755 - Added as normative appendix A 2757 C.8.25 ASN.1 2759 - Added EXTENSIBILITY IMPLIED 2761 - Added a number of comments holding referenced to [Models] and 2762 [ISO10646]. 2764 Lightweight Directory Access Protocol Version 3 2766 - Removed AttributeType. It is not used. 2768 C.9 Changes made to draft-ietf-ldapbis-protocol-07.txt: 2770 - Removed all mention of transfer encodings and the binary attribute 2771 option 2773 - Further alignment with [Models]. 2775 - Added extensibility ellipsis to protocol op choice 2777 - In 4.1.1, clarified when connections may be dropped due to 2778 malformed PDUs 2780 - Specified which matching rules and syntaxes are used for various 2781 filter items 2783 Appendix D - Outstanding Work Items 2785 D.0 Integrate notational consistency agreements 2786 - WG will discuss notation consistency. Once agreement happens, 2787 reconcile draft. 2789 D.1 Integrate result codes draft. 2791 - The result codes draft should be reconciled with this draft. 2792 Operation-specific instructions will reside with operations while 2793 the error-specific sections will be added as an appendix. Note 2794 that there is a result codes appendix now. Still need to reconcile 2795 with each operation. 2797 D.2 Verify references. 2799 - Many referenced documents have changed. Ensure references and 2800 section numbers are correct. 2802 D.3 Usage of Naming Context 2804 - Make sure occurrences of "namingcontext" and "naming context" are 2805 consistent with [Models]. 2807 D.5 Section 4.1.1.1 2809 - Remove "or of the abandoned operation until it has received a 2810 response from the server for another request invoked subsequent to 2811 the abandonRequest," from the fourth paragraph as this imposes 2812 synchronous behavior on the server. 2814 D.14 Section 4.1.12 2815 Lightweight Directory Access Protocol Version 3 2817 - Specify whether or not servers are to advertise the OIDs of known 2818 response controls. 2820 D.18 Section 4.2.3 2822 - Change "If the bind was successful, the resultCode will be 2823 success, otherwise it will be one of" to "If the bind was 2824 successful, the resultCode will be success, otherwise it MAY be 2825 one of" in the third paragraph. . 2827 - Change "operationsError" to "other" as a result code. 2829 D.21 Section 4.5.1 2831 - Make sure the use of "subordinates" in the derefInSearching 2832 definition is correct. See "derefInSearching" on list. 2834 D.23 Section 4.5.3 2836 - Add "Similarly, a server MUST NOT return a SearchResultReference 2837 when the scope of the search is baseObject. If a client receives 2838 such a SearchResultReference it MUST interpret is as a protocol 2839 error and MUST NOT follow it." to the first paragraph. 2840 - Add "If the scope part of the LDAP URL is present, the client MUST 2841 use the new scope in its next request to progress the search. If 2842 the scope part is absent the client MUST use subtree scope to 2843 complete subtree searches and base scope to complete one level 2844 searches." to the third paragraph. 2846 D.25 Section 4.6 2848 - Resolve the meaning of "and is ignored if the attribute does not 2849 exist". See "modify: "non-existent attribute"" on the list. 2851 D.27 Section 4.10 2853 - Specify what happens when the attr is missing vs. attr isn't in 2854 schema. Also what happens if there's no equality matching rule. 2856 D.28 Section 4.11 2858 - Change "(since these may have been in transit when the abandon was 2859 requested)." to "(since these may either have been in transit when 2860 the abandon was requested, or are not able to be abandoned)." in 2861 the fifth paragraph. 2862 - Add "Abandon and Unbind operations are not able to be abandoned. 2863 Other operations, in particular update operations, or operations 2864 that have been chained, may not be abandonable (or immediately 2865 abandonable)." as the sixth paragraph. 2867 Lightweight Directory Access Protocol Version 3 2869 D.30 Section 5.1 2871 - Add "control and extended operation values" to last paragraph. See 2872 "LBER (BER Restrictions)" on list. 2874 D.31 Section 5.2.1 2876 - Add "using the BER-based described in section 5.1". 2878 D.32 Section 6.1 2880 - Add "that are used by those attributes" to the first paragraph. 2881 - Add "Servers which support update operations MUST, and other 2882 servers SHOULD, support strong authentication mechanisms described 2883 in [RFC2829]." as a second paragraph. 2884 - Add "Servers which provide access to sensitive information MUST, 2885 and other servers SHOULD support privacy protections such as those 2886 described in [RFC2829] and [RFC2830]." as a third paragraph. 2888 D.33 Section 7 2890 - Add "Servers which support update operations MUST, and other 2891 servers SHOULD, support strong authentication mechanisms described 2892 in [RFC2829]." as a fourth paragraph. 2893 - Add "In order to automatically follow referrals, clients may need 2894 to hold authentication secrets. This poses significant privacy and 2895 security concerns and SHOULD be avoided." as a sixth paragraph. 2896 - Add "This document provides a mechanism which clients may use to 2897 discover operational attributes. Those relying on security by 2898 obscurity should implement appropriate access controls to 2899 restricts access to operational attributes per local policy." as 2900 an eighth paragraph. 2901 - Add "This document provides a mechanism which clients may use to 2902 discover operational attributes. Those relying on security by 2903 obscurity should implement appropriate access controls to 2904 restricts access to operational attributes per local policy." as 2905 an eighth paragraph. 2906 - Add notes regarding DoS attack found by CERT advisories. 2908 Lightweight Directory Access Protocol Version 3 2910 Full Copyright Statement 2912 Copyright (C) The Internet Society (2002). All Rights Reserved. 2914 This document and translations of it may be copied and furnished to 2915 others, and derivative works that comment on or otherwise explain it 2916 or assist in its implementation may be prepared, copied, published 2917 and distributed, in whole or in part, without restriction of any 2918 kind, provided that the above copyright notice and this paragraph are 2919 included on all such copies and derivative works. However, this 2920 document itself may not be modified in any way, such as by removing 2921 the copyright notice or references to the Internet Society or other 2922 Internet organizations, except as needed for the purpose of 2923 developing Internet standards in which case the procedures for 2924 copyrights defined in the Internet Standards process must be 2925 followed, or as required to translate it into languages other than 2926 English. 2928 The limited permissions granted above are perpetual and will not be 2929 revoked by the Internet Society or its successors or assigns. 2931 This document and the information contained herein is provided on an 2932 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 2933 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 2934 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 2935 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 2936 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.