idnits 2.17.1 draft-ietf-ldapbis-protocol-10.txt: -(1118): 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 (Oct 2002) is 7864 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 2282 -- Looks like a reference, but probably isn't: '3' on line 2219 == Missing Reference: 'APPLICATION 0' is mentioned on line 2155, but not defined == Missing Reference: 'APPLICATION 1' is mentioned on line 2170, but not defined -- Looks like a reference, but probably isn't: '7' on line 2203 == Missing Reference: 'APPLICATION 2' is mentioned on line 2174, but not defined == Missing Reference: 'APPLICATION 3' is mentioned on line 2176, but not defined -- Looks like a reference, but probably isn't: '1' on line 2283 -- Looks like a reference, but probably isn't: '2' on line 2218 -- Looks like a reference, but probably isn't: '4' on line 2220 -- Looks like a reference, but probably isn't: '5' on line 2201 -- Looks like a reference, but probably isn't: '6' on line 2202 -- Looks like a reference, but probably isn't: '8' on line 2204 -- Looks like a reference, but probably isn't: '9' on line 2205 == Missing Reference: 'APPLICATION 4' is mentioned on line 2222, but not defined == Missing Reference: 'APPLICATION 19' is mentioned on line 2230, but not defined == Missing Reference: 'APPLICATION 5' is mentioned on line 2232, but not defined == Missing Reference: 'APPLICATION 6' is mentioned on line 2234, but not defined == Missing Reference: 'APPLICATION 7' is mentioned on line 2249, but not defined == Missing Reference: 'APPLICATION 8' is mentioned on line 2251, but not defined == Missing Reference: 'APPLICATION 9' is mentioned on line 2259, but not defined == Missing Reference: 'APPLICATION 10' is mentioned on line 2261, but not defined == Missing Reference: 'APPLICATION 11' is mentioned on line 2263, but not defined == Missing Reference: 'APPLICATION 12' is mentioned on line 2265, but not defined == Missing Reference: 'APPLICATION 13' is mentioned on line 2271, but not defined == Missing Reference: 'APPLICATION 14' is mentioned on line 2273, but not defined == Missing Reference: 'APPLICATION 15' is mentioned on line 2277, but not defined == Missing Reference: 'APPLICATION 16' is mentioned on line 2279, but not defined == Missing Reference: 'APPLICATION 23' is mentioned on line 2281, but not defined == Missing Reference: 'APPLICATION 24' is mentioned on line 2285, but not defined -- Looks like a reference, but probably isn't: '10' on line 2287 -- Looks like a reference, but probably isn't: '11' on line 2288 == Missing Reference: 'X511' is mentioned on line 1766, but not defined == Missing Reference: 'RFC2830' is mentioned on line 2906, but not defined ** Obsolete undefined reference: RFC 2830 (Obsoleted by RFC 4510, RFC 4511, RFC 4513) == Missing Reference: 'RFC2829' is mentioned on line 2912, 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-10.txt Oct 2002 5 Obsoletes: RFC 2251 7 LDAP: The Protocol 9 Status of this Memo 11 This document is an Internet-Draft and is in full conformance with 12 all provisions of Section 10 of RFC2026. 14 Internet-Drafts are working documents of the Internet Engineering 15 Task Force (IETF), its areas, and its working groups. Note that other 16 groups may also distribute working documents as Internet-Drafts. 17 Internet-Drafts are draft documents valid for a maximum of six months 18 and may be updated, replaced, or obsoleted by other documents at any 19 time. It is inappropriate to use Internet-Drafts as reference 20 material or to cite them other than as "work in progress." 22 The list of current Internet-Drafts can be accessed at 23 http://www.ietf.org/ietf/1id-abstracts.txt 25 The list of Internet-Draft Shadow Directories can be accessed at 26 http://www.ietf.org/shadow.html. 28 Distribution of this memo is unlimited. Technical discussion of this 29 document will take place on the IETF LDAP Revision Working Group 30 (LDAPbis) mailing list . Please send 31 editorial comments directly to the editor . 33 Abstract 35 This document describes the protocol elements, along with their 36 semantics and encodings, for the Lightweight Directory Access 37 Protocol (LDAP). LDAP provides access to distributed directory 38 services that act in accordance with X.500 data and service models. 39 These protocol elements are based on those described in the X.500 40 Directory Access Protocol (DAP). 42 Table of Contents 44 1. Introduction.....................................................2 45 2. Conventions......................................................3 46 3. Protocol Model...................................................3 47 4. Elements of Protocol.............................................3 48 4.1. Common Elements................................................4 49 4.1.1. Message Envelope.............................................4 50 4.1.2. String Types.................................................5 51 4.1.3. Distinguished Name and Relative Distinguished Name...........6 52 Lightweight Directory Access Protocol Version 3 54 4.1.4. Attribute Descriptions.......................................6 55 4.1.5. Attribute Value..............................................7 56 4.1.6. Attribute Value Assertion....................................7 57 4.1.7. Attribute....................................................8 58 4.1.8. Matching Rule Identifier.....................................8 59 4.1.9. Result Message...............................................8 60 4.1.10. Referral...................................................10 61 4.1.11. Controls...................................................11 62 4.2. Bind Operation................................................12 63 4.3. Unbind Operation..............................................15 64 4.4. Unsolicited Notification......................................15 65 4.5. Search Operation..............................................16 66 4.6. Modify Operation..............................................23 67 4.7. Add Operation.................................................25 68 4.8. Delete Operation..............................................26 69 4.9. Modify DN Operation...........................................26 70 4.10. Compare Operation............................................27 71 4.11. Abandon Operation............................................28 72 4.12. Extended Operation...........................................29 73 5. Protocol Element Encodings and Transfer.........................29 74 5.1. Protocol Encoding.............................................29 75 5.2. Transfer Protocols............................................30 76 6. Implementation Guidelines.......................................30 77 6.1. Server Implementations........................................30 78 6.2. Client Implementations........................................30 79 7. Security Considerations.........................................31 80 8. Acknowledgements................................................31 81 9. Normative References............................................31 82 10. Editor's Address...............................................32 83 Appendix A - LDAP Result Codes.....................................33 84 A.1 Non-Error Result Codes.........................................33 85 A.2 Error Result Codes.............................................33 86 A.3 Classes and Precedence of Error Result Codes...................33 87 Appendix C - Change History........................................44 88 C.1 Changes made to RFC 2251:......................................44 89 C.2 Changes made to draft-ietf-ldapbis-protocol-00.txt:............44 90 C.3 Changes made to draft-ietf-ldapbis-protocol-01.txt:............45 91 C.4 Changes made to draft-ietf-ldapbis-protocol-02.txt:............45 92 C.5 Changes made to draft-ietf-ldapbis-protocol-03.txt:............47 93 C.6 Changes made to draft-ietf-ldapbis-protocol-04.txt:............49 94 C.7 Changes made to draft-ietf-ldapbis-protocol-05.txt:............49 95 C.8 Changes made to draft-ietf-ldapbis-protocol-06.txt:............50 96 C.9 Changes made to draft-ietf-ldapbis-protocol-07.txt:............53 97 C.10 Changes made to draft-ietf-ldapbis-protocol-08.txt:...........53 98 C.11 Changes made to draft-ietf-ldapbis-protocol-09.txt:...........53 99 Appendix D - Outstanding Work Items................................53 101 1. Introduction 103 The Directory is "a collection of open systems cooperating to provide 104 directory services" [X.500]. A Directory user, which may be a human 105 or other entity, accesses the Directory through a client (or 106 Directory User Agent (DUA)). The client, on behalf of the directory 107 Lightweight Directory Access Protocol Version 3 109 user, interacts with one or more servers (or Directory System Agents 110 (DSA)). Clients interact with servers using a directory access 111 protocol. 113 This document details the protocol elements of Lightweight Directory 114 Access Protocol, along with their semantic meanings. Following the 115 description of protocol elements, it describes the way in which the 116 protocol is encoded and transferred. 118 This document is an integral part of the LDAP Technical Specification 119 [Roadmap]. 121 This document replaces RFC 2251. Appendix C holds a detailed log of 122 changes to RFC 2251. At publication time, this appendix will be 123 distilled to a summary of changes to RFC 2251. 125 2. Conventions 127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 128 "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in this document 129 are to be interpreted as described in [RFC2119]. 131 3. Protocol Model 133 The general model adopted by this protocol is one of clients 134 performing protocol operations against servers. In this model, a 135 client transmits a protocol request describing the operation to be 136 performed to a server. The server is then responsible for performing 137 the necessary operation(s) in the directory. Upon completion of the 138 operation(s), the server returns a response containing any results or 139 errors to the requesting client. 141 Note that although servers are required to return responses whenever 142 such responses are defined in the protocol, there is no requirement 143 for synchronous behavior on the part of either clients or servers. 144 Requests and responses for multiple operations may be exchanged 145 between a client and server in any order, provided the client 146 eventually receives a response for every request that requires one. 148 Note that the core protocol operations defined in this document can 149 be mapped to a subset of the X.500(1997) directory abstract service. 150 However there is not a one-to-one mapping between LDAP protocol 151 operations and DAP operations. Server implementations acting as a 152 gateway to X.500 directories may need to make multiple DAP requests. 154 4. Elements of Protocol 156 The LDAP protocol is described using Abstract Syntax Notation 1 157 (ASN.1) [X.680], and is transferred using a subset of ASN.1 Basic 158 Encoding Rules [X.690]. Section 5.1 specifies how the protocol is 159 encoded and transferred. 161 Lightweight Directory Access Protocol Version 3 163 In order to support future Standards Track extensions to this 164 protocol, extensibility is implied where it is allowed (per ASN.1). 165 In addition, ellipses (...) have been supplied in ASN.1 types that 166 are explicitly extensible as discussed in [LDAPIANA]. Because of the 167 implied extensibility, clients and servers MUST ignore trailing 168 SEQUENCE elements whose tags they do not recognize. 170 Changes to the LDAP protocol other than those described in [LDAPIANA] 171 require a different version number. A client indicates the version it 172 is using as part of the bind request, described in section 4.2. If a 173 client has not sent a bind, the server MUST assume the client is 174 using version 3 or later. 176 Clients may determine the protocol versions a server supports by 177 reading the supportedLDAPVersion attribute from the root DSE 178 [Models]. Servers which implement version 3 or later MUST provide 179 this attribute. 181 4.1. Common Elements 183 This section describes the LDAPMessage envelope PDU (Protocol Data 184 Unit) format, as well as data type definitions, which are used in the 185 protocol operations. 187 4.1.1. Message Envelope 189 For the purposes of protocol exchanges, all protocol operations are 190 encapsulated in a common envelope, the LDAPMessage, which is defined 191 as follows: 193 LDAPMessage ::= SEQUENCE { 194 messageID MessageID, 195 protocolOp CHOICE { 196 bindRequest BindRequest, 197 bindResponse BindResponse, 198 unbindRequest UnbindRequest, 199 searchRequest SearchRequest, 200 searchResEntry SearchResultEntry, 201 searchResDone SearchResultDone, 202 searchResRef SearchResultReference, 203 modifyRequest ModifyRequest, 204 modifyResponse ModifyResponse, 205 addRequest AddRequest, 206 addResponse AddResponse, 207 delRequest DelRequest, 208 delResponse DelResponse, 209 modDNRequest ModifyDNRequest, 210 modDNResponse ModifyDNResponse, 211 compareRequest CompareRequest, 212 compareResponse CompareResponse, 213 abandonRequest AbandonRequest, 214 Lightweight Directory Access Protocol Version 3 216 extendedReq ExtendedRequest, 217 extendedResp ExtendedResponse, 218 ... }, 219 controls [0] Controls OPTIONAL } 221 MessageID ::= INTEGER (0 .. maxInt) 223 maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- 225 The function of the LDAPMessage is to provide an envelope containing 226 common fields required in all protocol exchanges. At this time the 227 only common fields are the message ID and the controls. 229 If the server receives a PDU from the client in which the LDAPMessage 230 SEQUENCE tag cannot be recognized, the messageID cannot be parsed, 231 the tag of the protocolOp is not recognized as a request, or the 232 encoding structures or lengths of data fields are found to be 233 incorrect, then the server MAY return the Notice of Disconnection 234 described in section 4.4.1, with resultCode protocolError, and MUST 235 immediately close the connection. 237 In other cases where the client or server cannot parse a PDU, it 238 SHOULD abruptly close the connection where further communication 239 (including providing notice) would be pernicious. Otherwise, server 240 implementations MUST return an appropriate response to the request, 241 with the resultCode set to protocolError. 243 The ASN.1 type Controls is defined in section 4.1.11. 245 4.1.1.1. Message ID 247 All LDAPMessage envelopes encapsulating responses contain the 248 messageID value of the corresponding request LDAPMessage. 250 The message ID of a request MUST have a non-zero value different from 251 the values of any other requests outstanding in the LDAP session of 252 which this message is a part. The zero value is reserved for the 253 unsolicited notification message. 255 Typical clients increment a counter for each request. 257 A client MUST NOT send a request with the same message ID as an 258 earlier request on the same connection unless it can be determined 259 that the server is no longer servicing the earlier request. Otherwise 260 the behavior is undefined. For operations that do not return 261 responses (unbind, abandon, and abandoned operations), the client 262 SHOULD assumes the operation is in progress until a subsequent bind 263 request completes. 265 4.1.2. String Types 266 Lightweight Directory Access Protocol Version 3 268 The LDAPString is a notational convenience to indicate that, although 269 strings of LDAPString type encode as OCTET STRING types, the 270 [ISO10646] character set (a superset of Unicode) is used, encoded 271 following the UTF-8 algorithm [RFC2044]. Note that in the UTF-8 272 algorithm characters which are the same as ASCII (0x0000 through 273 0x007F) are represented as that same ASCII character in a single 274 byte. The other byte values are used to form a variable-length 275 encoding of an arbitrary character. 277 LDAPString ::= OCTET STRING -- UTF-8 encoded, 278 -- ISO 10646 characters 280 The LDAPOID is a notational convenience to indicate that the 281 permitted value of this string is a (UTF-8 encoded) dotted-decimal 282 representation of an OBJECT IDENTIFIER. Although an LDAPOID is 283 encoded as an OCTET STRING, values are limited to the definition of 284 numericoid given in Section 1.3 of [Models]. 286 LDAPOID ::= OCTET STRING -- Constrained to numericoid [Models] 288 For example, 290 1.3.6.1.4.1.1466.1.2.3 292 4.1.3. Distinguished Name and Relative Distinguished Name 294 An LDAPDN and a RelativeLDAPDN are respectively defined to be the 295 representation of a distinguished-name and a relative-distinguished- 296 name after encoding according to the specification in [LDAPDN]. 298 LDAPDN ::= LDAPString 299 -- Constrained to distinguishedName [LDAPDN] 301 RelativeLDAPDN ::= LDAPString 302 -- Constrained to name-component [LDAPDN] 304 4.1.4. Attribute Descriptions 306 The definition and encoding rules for attribute descriptions are 307 defined in Section 2.5 of [Models]. Briefly, an attribute description 308 is an attribute type and zero or more options. 310 AttributeDescription ::= LDAPString 311 -- Constrained to attributedescription 312 -- [Models] 314 Not all options can be associated with attributes held in the 315 directory. A server will treat an AttributeDescription with any 316 options it does not implement or support as unrecognized. The order 317 in which options appear in the list MUST NOT be used to impart any 318 Lightweight Directory Access Protocol Version 3 320 semantic meaning. Servers MUST treat any two AttributeDescription 321 with the same attribute type and options as equivalent. 323 AttributeDescriptionList describes a list of 0 or more attribute 324 descriptions. (A list of zero elements has special significance in 325 the Search request.) 327 AttributeDescriptionList ::= SEQUENCE OF 328 AttributeDescription 330 4.1.5. Attribute Value 332 A field of type AttributeValue is an OCTET STRING containing an 333 encoded attribute value data type. The value is encoded according to 334 its LDAP-specific encoding definition. The LDAP-specific encoding 335 definitions for different syntaxes and attribute types may be found 336 in other documents, and in particular [Syntaxes]. 338 AttributeValue ::= OCTET STRING 340 Note that there is no defined limit on the size of this encoding; 341 thus protocol values may include multi-megabyte attributes (e.g. 342 photographs). 344 Attributes may be defined which have arbitrary and non-printable 345 syntax. Implementations MUST NOT display nor attempt to decode as 346 ASN.1, a value if its syntax is not known. The implementation may 347 attempt to discover the subschema of the source entry, and retrieve 348 the values of attributeTypes from it. 350 Clients MUST NOT send attribute values in a request that are not 351 valid according to the syntax defined for the attributes. 353 4.1.6. Attribute Value Assertion 355 The AttributeValueAssertion type definition is similar to the one in 356 the X.500 directory standards. It contains an attribute description 357 and a matching rule assertion value suitable for that type. 359 AttributeValueAssertion ::= SEQUENCE { 360 attributeDesc AttributeDescription, 361 assertionValue AssertionValue } 363 AssertionValue ::= OCTET STRING 365 The syntax of the AssertionValue depends on the context of the LDAP 366 operation being performed. For example, the syntax of the EQUALITY 367 matching rule for an attribute is used when performing a Compare 368 operation. Often this is the same syntax used for values of the 369 attribute type, but in some cases the assertion syntax differs from 370 the value syntax. See objectIdentiferFirstComponentMatch in 371 [Syntaxes] for an example. 373 Lightweight Directory Access Protocol Version 3 375 4.1.7. Attribute 377 An attribute consists of an attribute description and one or more 378 values of that attribute description. (Though attributes MUST have at 379 least one value when stored, due to access control restrictions the 380 set may be empty when transferred from the server to the client. This 381 is described in section 4.5.2, concerning the PartialAttributeList 382 type.) 384 Attribute ::= SEQUENCE { 385 type AttributeDescription, 386 vals SET OF AttributeValue } 388 Each attribute value is distinct in the set (no duplicates). The set 389 of attribute values is unordered. Implementations MUST NOT reply upon 390 any apparent ordering being repeatable. 392 4.1.8. Matching Rule Identifier 394 Matching rules are defined in 4.1.3 of [Models]. A matching rule is 395 identified in the LDAP protocol by the printable representation of 396 either its numericoid, or one of its short name descriptors, e.g. 397 "caseIgnoreIA5Match" or "1.3.6.1.4.1.453.33.33". 399 MatchingRuleId ::= LDAPString 401 Servers which support matching rules for use in the extensibleMatch 402 search filter MUST list the matching rules they implement in 403 subschema entries, using the matchingRules attributes. The server 404 SHOULD also list there, using the matchingRuleUse attribute, the 405 attribute types with which each matching rule can be used. More 406 information is given in section 4.5 of [Syntaxes]. 408 4.1.9. Result Message 410 The LDAPResult is the construct used in this protocol to return 411 success or failure indications from servers to clients. To various 412 requests, servers will return responses of LDAPResult or responses 413 containing the components of LDAPResponse to indicate the final 414 status of a protocol operation request. 416 LDAPResult ::= SEQUENCE { 417 resultCode ENUMERATED { 418 success (0), 419 operationsError (1), 420 protocolError (2), 421 timeLimitExceeded (3), 422 sizeLimitExceeded (4), 423 compareFalse (5), 424 compareTrue (6), 425 Lightweight Directory Access Protocol Version 3 427 authMethodNotSupported (7), 428 strongAuthRequired (8), 429 -- 9 reserved -- 430 referral (10), 431 adminLimitExceeded (11), 432 unavailableCriticalExtension (12), 433 confidentialityRequired (13), 434 saslBindInProgress (14), 435 noSuchAttribute (16), 436 undefinedAttributeType (17), 437 inappropriateMatching (18), 438 constraintViolation (19), 439 attributeOrValueExists (20), 440 invalidAttributeSyntax (21), 441 -- 22-31 unused -- 442 noSuchObject (32), 443 aliasProblem (33), 444 invalidDNSyntax (34), 445 -- 35 reserved for undefined isLeaf -- 446 aliasDereferencingProblem (36), 447 -- 37-47 unused -- 448 inappropriateAuthentication (48), 449 invalidCredentials (49), 450 insufficientAccessRights (50), 451 busy (51), 452 unavailable (52), 453 unwillingToPerform (53), 454 loopDetect (54), 455 -- 55-63 unused -- 456 namingViolation (64), 457 objectClassViolation (65), 458 notAllowedOnNonLeaf (66), 459 notAllowedOnRDN (67), 460 entryAlreadyExists (68), 461 objectClassModsProhibited (69), 462 -- 70 reserved for CLDAP -- 463 affectsMultipleDSAs (71), 464 -- 72-79 unused -- 465 other (80), 466 ... }, 467 -- 81-90 reserved for APIs -- 468 matchedDN LDAPDN, 469 errorMessage LDAPString, 470 referral [3] Referral OPTIONAL } 472 The result codes enumeration is extensible as defined in Section 3.5 473 of [LDAPIANA]. The meanings of the result codes are given in Appendix 474 A. 476 The errorMessage field of this construct may, at the server's option, 477 be used to return a string containing a textual, human-readable 478 (terminal control and page formatting characters should be avoided) 479 error diagnostic. As this error diagnostic is not standardized, 480 implementations MUST NOT rely on the values returned. If the server 481 Lightweight Directory Access Protocol Version 3 483 chooses not to return a textual diagnostic, the errorMessage field of 484 the LDAPResult type MUST contain a zero length string. 486 For result codes of noSuchObject, aliasProblem, invalidDNSyntax and 487 aliasDereferencingProblem, the matchedDN field is set to the name of 488 the lowest entry (object or alias) in the directory that was matched. 489 If no aliases were dereferenced while attempting to locate the entry, 490 this will be a truncated form of the name provided, or if aliases 491 were dereferenced, of the resulting name, as defined in section 12.5 492 of [X.511]. The matchedDN field contains a zero length string with 493 all other result codes. 495 4.1.10. Referral 497 The referral result code indicates that the contacted server does not 498 hold the target entry of the request. The referral field is present 499 in an LDAPResult if the LDAPResult.resultCode field value is 500 referral, and absent with all other result codes. It contains one or 501 more references to one or more servers or services that may be 502 accessed via LDAP or other protocols. Referrals can be returned in 503 response to any operation request (except unbind and abandon which do 504 not have responses). At least one URL MUST be present in the 505 Referral. 507 During a search operation, after the baseObject is located, and 508 entries are being evaluated, the referral is not returned. Instead, 509 continuation references, described in section 4.5.3, are returned 510 when the search scope spans multiple naming contexts, and several 511 different servers would need to be contacted to complete the 512 operation. 514 Referral ::= SEQUENCE OF LDAPURL -- one or more 516 LDAPURL ::= LDAPString -- limited to characters permitted in 517 -- URLs 519 If the client wishes to progress the operation, it MUST follow the 520 referral by contacting one of the servers. If multiple URLs are 521 present, the client assumes that any URL may be used to progress the 522 operation. 524 URLs for servers implementing the LDAP protocol are written according 525 to [LDAPDN]. If an alias was dereferenced, the part of the URL 526 MUST be present, with the new target object name. If the part is 527 present, the client MUST use this name in its next request to 528 progress the operation, and if it is not present the client will use 529 the same name as in the original request. Some servers (e.g. 530 participating in distributed indexing) may provide a different filter 531 in a referral for a search operation. If the filter part of the URL 532 is present in an LDAPURL, the client MUST use this filter in its next 533 request to progress this search, and if it is not present the client 534 MUST use the same filter as it used for that search. Other aspects of 535 Lightweight Directory Access Protocol Version 3 537 the new request may be the same or different as the request which 538 generated the referral. 540 Note that UTF-8 characters appearing in a DN or search filter may not 541 be legal for URLs (e.g. spaces) and MUST be escaped using the % 542 method in [RFC2396]. 544 Other kinds of URLs may be returned, so long as the operation could 545 be performed using that protocol. 547 4.1.11. Controls 549 A control is a way to specify extension information for an LDAP 550 message. A control only alters the semantics of the message it is 551 attached to. 553 Controls ::= SEQUENCE OF Control 555 Control ::= SEQUENCE { 556 controlType LDAPOID, 557 criticality BOOLEAN DEFAULT FALSE, 558 controlValue OCTET STRING OPTIONAL } 560 The controlType field MUST be a UTF-8 encoded dotted-decimal 561 representation of an OBJECT IDENTIFIER which uniquely identifies the 562 control. This prevents conflicts between control names. 564 The criticality field is either TRUE or FALSE and only applies to 565 request messages that have a corresponding response message. For all 566 other messages (such as abandonRequest, unbindRequest and all 567 response messages), the criticality field is treated as FALSE. 569 If the server recognizes the control type and it is appropriate for 570 the operation, the server will make use of the control when 571 performing the operation. 573 If the server does not recognize the control type or it is not 574 appropriate for the operation, and the criticality field is TRUE, the 575 server MUST NOT perform the operation, and MUST instead return the 576 resultCode unavailableCriticalExtension. 578 If the control is unrecognized or inappropriate but the criticality 579 field is FALSE, the server MUST ignore the control. 581 The controlValue contains any information associated with the 582 control, and its format is defined for the control. Implementations 583 MUST be prepared to handle arbitrary contents of the controlValue 584 octet string, including zero bytes. It is absent only if there is no 585 value information which is associated with a control of its type. 587 This document does not specify any controls. Controls may be 588 specified in other documents. The specification of a control consists 589 of: 591 Lightweight Directory Access Protocol Version 3 593 - the OBJECT IDENTIFIER assigned to the control, 595 - whether the control is always noncritical, always critical, or 596 critical at the client's option, 598 - the format of the controlValue contents of the control, 600 - the semantics of the control, 602 - and optionally, semantics regarding the combination of the control 603 with other controls. 605 Servers list the controlType of all controls they recognize in the 606 supportedControl attribute [Models] in the root DSE. 608 Controls should not be combined unless the semantics of the 609 combination has been specified. The semantics of control 610 combinations, if specified, are generally found in the control 611 specification most recently published. In the absence of combination 612 semantics, the behavior of the operation is undefined. 613 Additionally, the order of a combination of controls in the SEQUENCE 614 is ignored unless the control specification(s) describe(s) 615 combination semantics. 617 4.2. Bind Operation 619 The function of the Bind Operation is to allow authentication 620 information to be exchanged between the client and server. Prior to 621 the BindRequest, the implied identity is anonymous. Refer to 622 [AuthMeth] for the authentication-related semantics of this 623 operation. 625 The Bind Request is defined as follows: 627 BindRequest ::= [APPLICATION 0] SEQUENCE { 628 version INTEGER (1 .. 127), 629 name LDAPDN, 630 authentication AuthenticationChoice } 632 AuthenticationChoice ::= CHOICE { 633 simple [0] OCTET STRING, 634 -- 1 and 2 reserved 635 sasl [3] SaslCredentials, 636 ... } 638 SaslCredentials ::= SEQUENCE { 639 mechanism LDAPString, 640 credentials OCTET STRING OPTIONAL } 642 Parameters of the Bind Request are: 644 Lightweight Directory Access Protocol Version 3 646 - version: A version number indicating the version of the protocol 647 to be used in this protocol session. This document describes 648 version 3 of the LDAP protocol. Note that there is no version 649 negotiation, and the client just sets this parameter to the 650 version it desires. If the server does not support the specified 651 version, it responds with protocolError in the resultCode field of 652 the BindResponse. 654 - name: The name of the directory object that the client wishes to 655 bind as. This field may take on a null value (a zero length 656 string) for the purposes of anonymous binds, when authentication 657 has been performed at a lower layer, or when using SASL 658 credentials with a mechanism that includes the name in the 659 credentials. Server behavior is undefined when the name is a null 660 value, simple authentication is used, and a password is specified. 661 The server SHOULD NOT perform any alias dereferencing in 662 determining the object to bind as. 664 - authentication: information used to authenticate the name, if any, 665 provided in the Bind Request. This type is extensible as defined 666 in Section 3.6 of [LDAPIANA]. Servers that do not support a choice 667 supplied by a client will return authMethodNotSupported in the 668 result code of the BindResponse. 670 Upon receipt of a Bind Request, a protocol server will authenticate 671 the requesting client, if necessary. The server will then return a 672 Bind Response to the client indicating the status of the 673 authentication. 675 Authorization is the use of this authentication information when 676 performing operations. Authorization MAY be affected by factors 677 outside of the LDAP Bind request, such as lower layer security 678 services. 680 4.2.1. Sequencing of the Bind Request 682 For some SASL authentication mechanisms, it may be necessary for the 683 client to invoke the BindRequest multiple times. If at any stage the 684 client wishes to abort the bind process it MAY unbind and then drop 685 the underlying connection. Clients MUST NOT invoke operations between 686 two Bind requests made as part of a multi-stage bind. 688 A client may abort a SASL bind negotiation by sending a BindRequest 689 with a different value in the mechanism field of SaslCredentials, or 690 an AuthenticationChoice other than sasl. 692 If the client sends a BindRequest with the sasl mechanism field as an 693 empty string, the server MUST return a BindResponse with 694 authMethodNotSupported as the resultCode. This will allow clients to 695 abort a negotiation if it wishes to try again with the same SASL 696 mechanism. 698 Lightweight Directory Access Protocol Version 3 700 If the client did not bind before sending a request and receives an 701 operationsError, it may then send a Bind Request. If this also fails 702 or the client chooses not to bind on the existing connection, it will 703 close the connection, reopen it and begin again by first sending a 704 PDU with a Bind Request. This will aid in interoperating with servers 705 implementing other versions of LDAP. 707 4.2.2. Bind Response 709 The Bind Response is defined as follows. 711 BindResponse ::= [APPLICATION 1] SEQUENCE { 712 COMPONENTS OF LDAPResult, 713 serverSaslCreds [7] OCTET STRING OPTIONAL } 715 BindResponse consists simply of an indication from the server of the 716 status of the client's request for authentication. 718 If the bind was successful, the resultCode will be success, otherwise 719 it MAY be one of: 721 - operationsError: server encountered an internal error. 723 - protocolError: unrecognized version number or incorrect PDU 724 structure. 726 - authMethodNotSupported: unrecognized SASL mechanism name. 728 - strongAuthRequired: the server requires authentication be 729 performed with a SASL mechanism. 731 - referral: this server cannot accept this bind and the client 732 should try another. 734 - saslBindInProgress: the server requires the client to send a new 735 bind request, with the same sasl mechanism, to continue the 736 authentication process. 738 - inappropriateAuthentication: the server requires the client which 739 had attempted to bind anonymously or without supplying credentials 740 to provide some form of credentials. 742 - invalidCredentials: the wrong password was supplied or the SASL 743 credentials could not be processed. 745 - unavailable: the server is shutting down. 747 If the server does not support the client's requested protocol 748 version, it MUST set the resultCode to protocolError. 750 If the client receives a BindResponse response where the resultCode 751 was protocolError, it MUST close the connection as the server will be 752 unwilling to accept further operations. (This is for compatibility 753 Lightweight Directory Access Protocol Version 3 755 with earlier versions of LDAP, in which the bind was always the first 756 operation, and there was no negotiation.) 758 The serverSaslCreds are used as part of a SASL-defined bind mechanism 759 to allow the client to authenticate the server to which it is 760 communicating, or to perform "challenge-response" authentication. If 761 the client bound with the simple choice, or the SASL mechanism does 762 not require the server to return information to the client, then this 763 field is not to be included in the result. 765 4.3. Unbind Operation 767 The function of the Unbind Operation is to terminate a protocol 768 session. The Unbind Operation is defined as follows: 770 UnbindRequest ::= [APPLICATION 2] NULL 772 The Unbind Operation has no response defined. Upon transmission of an 773 UnbindRequest, a protocol client MUST assume that the protocol 774 session is terminated. Upon receipt of an UnbindRequest, a protocol 775 server MUST assume that the requesting client has terminated the 776 session and that all outstanding requests may be discarded, and MUST 777 close the connection. 779 4.4. Unsolicited Notification 781 An unsolicited notification is an LDAPMessage sent from the server to 782 the client which is not in response to any LDAPMessage received by 783 the server. It is used to signal an extraordinary condition in the 784 server or in the connection between the client and the server. The 785 notification is of an advisory nature, and the server will not expect 786 any response to be returned from the client. 788 The unsolicited notification is structured as an LDAPMessage in which 789 the messageID is 0 and protocolOp is of the extendedResp form. The 790 responseName field of the ExtendedResponse is present. The LDAPOID 791 value MUST be unique for this notification, and not be used in any 792 other situation. 794 One unsolicited notification (Notice of Disconnection) is defined in 795 this document. 797 4.4.1. Notice of Disconnection 799 This notification may be used by the server to advise the client that 800 the server is about to close the connection due to an error 801 condition. Note that this notification is NOT a response to an unbind 802 requested by the client: the server MUST follow the procedures of 803 section 4.3. This notification is intended to assist clients in 804 distinguishing between an error condition and a transient network 805 failure. As with a connection close due to network failure, the 806 Lightweight Directory Access Protocol Version 3 808 client MUST NOT assume that any outstanding requests which modified 809 the directory have succeeded or failed. 811 The responseName is 1.3.6.1.4.1.1466.20036, the response field is 812 absent, and the resultCode is used to indicate the reason for the 813 disconnection. 815 The following resultCode values are to be used in this notification: 817 - protocolError: The server has received data from the client in 818 which the LDAPMessage structure could not be parsed. 820 - strongAuthRequired: The server has detected that an established 821 underlying security association protecting communication between 822 the client and server has unexpectedly failed or been compromised. 824 - unavailable: This server will stop accepting new connections and 825 operations on all existing connections, and be unavailable for an 826 extended period of time. The client may make use of an alternative 827 server. 829 After sending this notice, the server MUST close the connection. 830 After receiving this notice, the client MUST NOT transmit any further 831 on the connection, and may abruptly close the connection. 833 4.5. Search Operation 835 The Search Operation allows a client to request that a search be 836 performed on its behalf by a server. This can be used to read 837 attributes from a single entry, from entries immediately below a 838 particular entry, or a whole subtree of entries. 840 4.5.1. Search Request 842 The Search Request is defined as follows: 844 SearchRequest ::= [APPLICATION 3] SEQUENCE { 845 baseObject LDAPDN, 846 scope ENUMERATED { 847 baseObject (0), 848 singleLevel (1), 849 wholeSubtree (2) }, 850 derefAliases ENUMERATED { 851 neverDerefAliases (0), 852 derefInSearching (1), 853 derefFindingBaseObj (2), 854 derefAlways (3) }, 855 sizeLimit INTEGER (0 .. maxInt), 856 timeLimit INTEGER (0 .. maxInt), 857 typesOnly BOOLEAN, 858 filter Filter, 859 attributes AttributeDescriptionList } 860 Lightweight Directory Access Protocol Version 3 862 Filter ::= CHOICE { 863 and [0] SET SIZE (1..MAX) OF Filter, 864 or [1] SET SIZE (1..MAX) OF Filter, 865 not [2] Filter, 866 equalityMatch [3] AttributeValueAssertion, 867 substrings [4] SubstringFilter, 868 greaterOrEqual [5] AttributeValueAssertion, 869 lessOrEqual [6] AttributeValueAssertion, 870 present [7] AttributeDescription, 871 approxMatch [8] AttributeValueAssertion, 872 extensibleMatch [9] MatchingRuleAssertion } 874 SubstringFilter ::= SEQUENCE { 875 type AttributeDescription, 876 -- at least one must be present, 877 -- initial and final can occur at most once 878 substrings SEQUENCE OF CHOICE { 879 initial [0] AssertionValue, 880 any [1] AssertionValue, 881 final [2] AssertionValue } } 883 MatchingRuleAssertion ::= SEQUENCE { 884 matchingRule [1] MatchingRuleId OPTIONAL, 885 type [2] AttributeDescription OPTIONAL, 886 matchValue [3] AssertionValue, 887 dnAttributes [4] BOOLEAN DEFAULT FALSE } 889 Parameters of the Search Request are: 891 - baseObject: An LDAPDN that is the base object entry relative to 892 which the search is to be performed. 894 - scope: An indicator of the scope of the search to be performed. 895 The semantics of the possible values of this field are identical 896 to the semantics of the scope field in the X.511 Search Operation. 898 - derefAliases: An indicator as to how alias objects (as defined in 899 X.501) are to be handled in searching. The semantics of the 900 possible values of this field are: 902 neverDerefAliases: do not dereference aliases in searching 903 or in locating the base object of the search; 905 derefInSearching: dereference aliases in subordinates of 906 the base object in searching, but not in locating the base 907 object of the search; 909 derefFindingBaseObj: dereference aliases in locating the 910 base object of the search, but not when searching 911 subordinates of the base object; 913 derefAlways: dereference aliases both in searching and in 914 locating the base object of the search. 916 Lightweight Directory Access Protocol Version 3 918 - sizeLimit: A size limit that restricts the maximum number of 919 entries to be returned as a result of the search. A value of 0 in 920 this field indicates that no client-requested size limit 921 restrictions are in effect for the search. Servers may enforce a 922 maximum number of entries to return. 924 - timeLimit: A time limit that restricts the maximum time (in 925 seconds) allowed for a search. A value of 0 in this field 926 indicates that no client-requested time limit restrictions are in 927 effect for the search. 929 - typesOnly: An indicator as to whether search results will contain 930 both attribute types and values, or just attribute types. Setting 931 this field to TRUE causes only attribute types (no values) to be 932 returned. Setting this field to FALSE causes both attribute types 933 and values to be returned. 935 - filter: A filter that defines the conditions that must be 936 fulfilled in order for the search to match a given entry. 938 The 'and', 'or' and 'not' choices can be used to form combinations 939 of filters. At least one filter element MUST be present in an 940 'and' or 'or' choice. The others match against individual 941 attribute values of entries in the scope of the search. 942 (Implementor's note: the 'not' filter is an example of a tagged 943 choice in an implicitly-tagged module. In BER this is treated as 944 if the tag was explicit.) 946 A server MUST evaluate filters according to the three-valued logic 947 of X.511 (1993) section 7.8.1. In summary, a filter is evaluated 948 to either "TRUE", "FALSE" or "Undefined". If the filter evaluates 949 to TRUE for a particular entry, then the attributes of that entry 950 are returned as part of the search result (subject to any 951 applicable access control restrictions). If the filter evaluates 952 to FALSE or Undefined, then the entry is ignored for the search. 954 A filter of the "and" choice is TRUE if all the filters in the SET 955 OF evaluate to TRUE, FALSE if at least one filter is FALSE, and 956 otherwise Undefined. A filter of the "or" choice is FALSE if all 957 of the filters in the SET OF evaluate to FALSE, TRUE if at least 958 one filter is TRUE, and Undefined otherwise. A filter of the "not" 959 choice is TRUE if the filter being negated is FALSE, FALSE if it 960 is TRUE, and Undefined if it is Undefined. 962 The present match evaluates to TRUE where there is an attribute or 963 subtype of the specified attribute description present in an 964 entry, and FALSE otherwise (including a presence test with an 965 unrecognized attribute description.) 967 The matching rule and assertion syntax for equalityMatch filter 968 items is defined by the EQUALITY matching rule for the attribute 969 type. 971 Lightweight Directory Access Protocol Version 3 973 The matching rule and assertion syntax for AssertionValues in a 974 substrings filter item is defined by the SUBSTR matching rule for 975 the attribute type. 977 The matching rule and assertion syntax for greaterOrEqual and 978 lessOrEqual filter items is defined by the ORDERING matching rule 979 for the attribute type. 981 The matching rule and assertion syntax for approxMatch filter 982 items is implementation-defined. If approximate matching is not 983 supported by the server, the filter item should be treated as an 984 equalityMatch. 986 The extensibleMatch is new in this version of LDAP. If the 987 matchingRule field is absent, the type field MUST be present, and 988 the equality match is performed for that type. If the type field 989 is absent and matchingRule is present, the matchValue is compared 990 against all attributes in an entry which support that 991 matchingRule, and the matchingRule determines the syntax for the 992 assertion value (the filter item evaluates to TRUE if it matches 993 with at least one attribute in the entry, FALSE if it does not 994 match any attribute in the entry, and Undefined if the 995 matchingRule is not recognized or the assertionValue cannot be 996 parsed.) If the type field is present and matchingRule is present, 997 the matchingRule MUST be one permitted for use with that type, 998 otherwise the filter item is undefined. If the dnAttributes field 999 is set to TRUE, the match is applied against all the attributes in 1000 an entry's distinguished name as well, and also evaluates to TRUE 1001 if there is at least one attribute in the distinguished name for 1002 which the filter item evaluates to TRUE. (Editors note: The 1003 dnAttributes field is present so that there does not need to be 1004 multiple versions of generic matching rules such as for word 1005 matching, one to apply to entries and another to apply to entries 1006 and dn attributes as well). 1008 A filter item evaluates to Undefined when the server would not be 1009 able to determine whether the assertion value matches an entry. If 1010 an attribute description in an equalityMatch, substrings, 1011 greaterOrEqual, lessOrEqual, approxMatch or extensibleMatch filter 1012 is not recognized by the server, a matching rule id in the 1013 extensibleMatch is not recognized by the server, the assertion 1014 value cannot be parsed, or the type of filtering requested is not 1015 implemented, then the filter is Undefined. Thus for example if a 1016 server did not recognize the attribute type shoeSize, a filter of 1017 (shoeSize=*) would evaluate to FALSE, and the filters 1018 (shoeSize=12), (shoeSize>=12) and (shoeSize<=12) would evaluate to 1019 Undefined. 1021 Servers MUST NOT return errors if attribute descriptions or 1022 matching rule ids are not recognized, or assertion values cannot 1023 be parsed. More details of filter processing are given in section 1024 7.8 of [X.511]. 1026 Lightweight Directory Access Protocol Version 3 1028 - attributes: A list of the attributes to be returned from each 1029 entry which matches the search filter. There are two special 1030 values which may be used: an empty list with no attributes, and 1031 the attribute description string "*". Both of these signify that 1032 all user attributes are to be returned. (The "*" allows the client 1033 to request all user attributes in addition to any specified 1034 operational attributes). 1036 Attributes MUST be named at most once in the list, and are 1037 returned at most once in an entry. If there are attribute 1038 descriptions in the list which are not recognized, they are 1039 ignored by the server. 1041 If the client does not want any attributes returned, it can 1042 specify a list containing only the attribute with OID "1.1". This 1043 OID was chosen arbitrarily and does not correspond to any 1044 attribute in use. 1046 Client implementors should note that even if all user attributes 1047 are requested, some attributes of the entry may not be included in 1048 search results due to access controls or other restrictions. 1049 Furthermore, servers will not return operational attributes, such 1050 as objectClasses or attributeTypes, unless they are listed by 1051 name, since there may be extremely large number of values for 1052 certain operational attributes. (A list of operational attributes 1053 for use in LDAP is given in [Syntaxes].) 1055 Note that an X.500 "list"-like operation can be emulated by the 1056 client requesting a one-level LDAP search operation with a filter 1057 checking for the presence of the objectClass attribute, and that an 1058 X.500 "read"-like operation can be emulated by a base object LDAP 1059 search operation with the same filter. A server which provides a 1060 gateway to X.500 is not required to use the Read or List operations, 1061 although it may choose to do so, and if it does, it must provide the 1062 same semantics as the X.500 search operation. 1064 4.5.2. Search Result 1066 The results of the search attempted by the server upon receipt of a 1067 Search Request are returned in Search Responses, which are LDAP 1068 messages containing either SearchResultEntry, SearchResultReference, 1069 or SearchResultDone data types. 1071 SearchResultEntry ::= [APPLICATION 4] SEQUENCE { 1072 objectName LDAPDN, 1073 attributes PartialAttributeList } 1075 PartialAttributeList ::= SEQUENCE OF SEQUENCE { 1076 type AttributeDescription, 1077 vals SET OF AttributeValue } 1078 -- implementors should note that the PartialAttributeList may 1079 -- have zero elements (if none of the attributes of that entry 1080 -- were requested, or could be returned), and that the vals set 1081 Lightweight Directory Access Protocol Version 3 1083 -- may also have zero elements (if types only was requested, or 1084 -- all values were excluded from the result.) 1086 SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 1087 -- at least one LDAPURL element must be present 1089 SearchResultDone ::= [APPLICATION 5] LDAPResult 1091 Upon receipt of a Search Request, a server will perform the necessary 1092 search of the DIT. 1094 If the LDAP session is operating over a connection-oriented transport 1095 such as TCP, the server will return to the client a sequence of 1096 responses in separate LDAP messages. There may be zero or more 1097 responses containing SearchResultEntry, one for each entry found 1098 during the search. There may also be zero or more responses 1099 containing SearchResultReference, one for each area not explored by 1100 this server during the search. The SearchResultEntry and 1101 SearchResultReference PDUs may come in any order. Following all the 1102 SearchResultReference responses and all SearchResultEntry responses 1103 to be returned by the server, the server will return a response 1104 containing the SearchResultDone, which contains an indication of 1105 success, or detailing any errors that have occurred. 1107 Each entry returned in a SearchResultEntry will contain all 1108 attributes, complete with associated values if necessary, as 1109 specified in the attributes field of the Search Request. Return of 1110 attributes is subject to access control and other administrative 1111 policy. 1113 Some attributes may be constructed by the server and appear in a 1114 SearchResultEntry attribute list, although they are not stored 1115 attributes of an entry. Clients SHOULD NOT assume that all attributes 1116 can be modified, even if permitted by access control. 1118 If the server�s schema defines a textual name for an attribute type, 1119 it MUST use a textual name for attributes of that attribute type by 1120 specifying one of the textual names as the value of the attribute 1121 type. Otherwise, the server uses the object identifier for the 1122 attribute type by specifying the object identifier, in ldapOID form, 1123 as the value of attribute type. 1125 4.5.3. Continuation References in the Search Result 1127 If the server was able to locate the entry referred to by the 1128 baseObject but was unable to search all the entries in the scope at 1129 and under the baseObject, the server may return one or more 1130 SearchResultReference entries, each containing a reference to another 1131 set of servers for continuing the operation. A server MUST NOT return 1132 any SearchResultReference if it has not located the baseObject and 1133 thus has not searched any entries; in this case it would return a 1134 SearchResultDone containing a referral resultCode. 1136 Lightweight Directory Access Protocol Version 3 1138 In the absence of indexing information provided to a server from 1139 servers holding subordinate naming contexts, SearchResultReference 1140 responses are not affected by search filters and are always returned 1141 when in scope. 1143 The SearchResultReference is of the same data type as the Referral. 1144 URLs for servers implementing the LDAP protocol are written according 1145 to [LDAPDN]. The part MUST be present in the URL, with the new 1146 target object name. The client MUST use this name in its next 1147 request. Some servers (e.g. part of a distributed index exchange 1148 system) may provide a different filter in the URLs of the 1149 SearchResultReference. If the filter part of the URL is present in an 1150 LDAP URL, the client MUST use the new filter in its next request to 1151 progress the search, and if the filter part is absent the client will 1152 use again the same filter. If the originating search scope was 1153 singleLevel, the scope part of the URL will be baseObject. Other 1154 aspects of the new search request may be the same or different as the 1155 search which generated the continuation references. 1156 Other kinds of URLs may be returned so long as the operation could be 1157 performed using that protocol. 1159 The name of an unexplored subtree in a SearchResultReference need not 1160 be subordinate to the base object. 1162 In order to complete the search, the client MUST issue a new search 1163 operation for each SearchResultReference that is returned. Note that 1164 the abandon operation described in section 4.11 applies only to a 1165 particular operation sent on a connection between a client and 1166 server, and if the client has multiple outstanding search operations, 1167 it MUST abandon each operation individually. 1169 4.5.3.1. Example 1171 For example, suppose the contacted server (hosta) holds the entry 1172 "DC=Example,DC=NET" and the entry "CN=Manager,DC=Example,DC=NET". It 1173 knows that either LDAP-capable servers (hostb) or (hostc) hold 1174 "OU=People,DC=Example,DC=NET" (one is the master and the other server 1175 a shadow), and that LDAP-capable server (hostd) holds the subtree 1176 "OU=Roles,DC=Example,DC=NET". If a subtree search of 1177 "DC=Example,DC=NET" is requested to the contacted server, it may 1178 return the following: 1180 SearchResultEntry for DC=Example,DC=NET 1181 SearchResultEntry for CN=Manager,DC=Example,DC=NET 1182 SearchResultReference { 1183 ldap://hostb/OU=People,DC=Example,DC=NET 1184 ldap://hostc/OU=People,DC=Example,DC=NET 1185 } 1186 SearchResultReference { 1187 ldap://hostd/OU=Roles,DC=Example,DC=NET 1188 } 1189 SearchResultDone (success) 1190 Lightweight Directory Access Protocol Version 3 1192 Client implementors should note that when following a 1193 SearchResultReference, additional SearchResultReference may be 1194 generated. Continuing the example, if the client contacted the server 1195 (hostb) and issued the search for the subtree 1196 "OU=People,DC=Example,DC=NET", the server might respond as follows: 1198 SearchResultEntry for OU=People,DC=Example,DC=NET 1199 SearchResultReference { 1200 ldap://hoste/OU=Managers,OU=People,DC=Example,DC=NET 1201 } 1202 SearchResultReference { 1203 ldap://hostf/OU=Consultants,OU=People,DC=Example,DC=NET 1204 } 1205 SearchResultDone (success) 1207 If the contacted server does not hold the base object for the search, 1208 then it will return a referral to the client. For example, if the 1209 client requests a subtree search of "DC=Example,DC=ORG" to hosta, the 1210 server may return only a SearchResultDone containing a referral. 1212 SearchResultDone (referral) { 1213 ldap://hostg/ 1214 } 1216 4.6. Modify Operation 1218 The Modify Operation allows a client to request that a modification 1219 of an entry be performed on its behalf by a server. The Modify 1220 Request is defined as follows: 1222 ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1223 object LDAPDN, 1224 modification SEQUENCE OF SEQUENCE { 1225 operation ENUMERATED { 1226 add (0), 1227 delete (1), 1228 replace (2) }, 1229 modification AttributeTypeAndValues } } 1231 AttributeTypeAndValues ::= SEQUENCE { 1232 type AttributeDescription, 1233 vals SET OF AttributeValue } 1235 Parameters of the Modify Request are: 1237 - object: The object to be modified. The value of this field 1238 contains the DN of the entry to be modified. The server will not 1239 perform any alias dereferencing in determining the object to be 1240 modified. 1242 - modification: A list of modifications to be performed on the 1243 entry. The entire list of entry modifications MUST be performed in 1244 the order they are listed, as a single atomic operation. While 1245 Lightweight Directory Access Protocol Version 3 1247 individual modifications may violate the directory schema, the 1248 resulting entry after the entire list of modifications is 1249 performed MUST conform to the requirements of the directory 1250 schema. The values that may be taken on by the 'operation' field 1251 in each modification construct have the following semantics 1252 respectively: 1254 add: add values listed to the given attribute, creating the 1255 attribute if necessary; 1257 delete: delete values listed from the given attribute, 1258 removing the entire attribute if no values are listed, or 1259 if all current values of the attribute are listed for 1260 deletion; 1262 replace: replace all existing values of the given attribute 1263 with the new values listed, creating the attribute if it 1264 did not already exist. A replace with no value will delete 1265 the entire attribute if it exists, and is ignored if the 1266 attribute does not exist. 1268 The result of the modification attempted by the server upon receipt 1269 of a Modify Request is returned in a Modify Response, defined as 1270 follows: 1272 ModifyResponse ::= [APPLICATION 7] LDAPResult 1274 Upon receipt of a Modify Request, a server will perform the necessary 1275 modifications to the DIT. 1277 The server will return to the client a single Modify Response 1278 indicating either the successful completion of the DIT modification, 1279 or the reason that the modification failed. Note that due to the 1280 requirement for atomicity in applying the list of modifications in 1281 the Modify Request, the client may expect that no modifications of 1282 the DIT have been performed if the Modify Response received indicates 1283 any sort of error, and that all requested modifications have been 1284 performed if the Modify Response indicates successful completion of 1285 the Modify Operation. If the connection fails, whether the 1286 modification occurred or not is indeterminate. 1288 The Modify Operation cannot be used to remove from an entry any of 1289 its distinguished values, those values which form the entry's 1290 relative distinguished name. An attempt to do so will result in the 1291 server returning the error notAllowedOnRDN. The Modify DN Operation 1292 described in section 4.9 is used to rename an entry. 1294 If an EQUALITY matching rule has not been defined for an attribute 1295 type, clients MUST NOT attempt to add or delete individual values of 1296 that attribute from an entry using the "add" or "delete" form of a 1297 modification, and MUST instead use the "replace" form. 1299 Note that due to the simplifications made in LDAP, there is not a 1300 direct mapping of the modifications in an LDAP ModifyRequest onto the 1301 Lightweight Directory Access Protocol Version 3 1303 EntryModifications of a DAP ModifyEntry operation, and different 1304 implementations of LDAP-DAP gateways may use different means of 1305 representing the change. If successful, the final effect of the 1306 operations on the entry MUST be identical. 1308 4.7. Add Operation 1310 The Add Operation allows a client to request the addition of an entry 1311 into the directory. The Add Request is defined as follows: 1313 AddRequest ::= [APPLICATION 8] SEQUENCE { 1314 entry LDAPDN, 1315 attributes AttributeList } 1317 AttributeList ::= SEQUENCE OF SEQUENCE { 1318 type AttributeDescription, 1319 vals SET OF AttributeValue } 1321 Parameters of the Add Request are: 1323 - entry: the Distinguished Name of the entry to be added. Note that 1324 the server will not dereference any aliases in locating the entry 1325 to be added. 1327 - attributes: the list of attributes that make up the content of the 1328 entry being added. Clients MUST include distinguished values 1329 (those forming the entry's own RDN) in this list, the objectClass 1330 attribute, and values of any mandatory attributes of the listed 1331 object classes. Clients MUST NOT supply NO-USER-MODIFICATION 1332 attributes such as the createTimestamp or creatorsName attributes, 1333 since the server maintains these automatically. 1335 The entry named in the entry field of the AddRequest MUST NOT exist 1336 for the AddRequest to succeed. The parent of the entry to be added 1337 MUST exist. For example, if the client attempted to add 1338 "CN=JS,DC=Example,DC=NET", the "DC=Example,DC=NET" entry did not 1339 exist, and the "DC=NET" entry did exist, then the server would return 1340 the error noSuchObject with the matchedDN field containing "DC=NET". 1341 If the parent entry exists but is not in a naming context held by the 1342 server, the server SHOULD return a referral to the server holding the 1343 parent entry. 1345 Servers implementations SHOULD NOT restrict where entries can be 1346 located in the directory unless DIT structure rules are in place. 1347 Some servers MAY allow the administrator to restrict the classes of 1348 entries which can be added to the directory. 1350 Upon receipt of an Add Request, a server will attempt to perform the 1351 add requested. The result of the add attempt will be returned to the 1352 client in the Add Response, defined as follows: 1354 AddResponse ::= [APPLICATION 9] LDAPResult 1355 Lightweight Directory Access Protocol Version 3 1357 A response of success indicates that the new entry is present in the 1358 directory. 1360 4.8. Delete Operation 1362 The Delete Operation allows a client to request the removal of an 1363 entry from the directory. The Delete Request is defined as follows: 1365 DelRequest ::= [APPLICATION 10] LDAPDN 1367 The Delete Request consists of the Distinguished Name of the entry to 1368 be deleted. Note that the server will not dereference aliases while 1369 resolving the name of the target entry to be removed, and that only 1370 leaf entries (those with no subordinate entries) can be deleted with 1371 this operation. 1373 The result of the delete attempted by the server upon receipt of a 1374 Delete Request is returned in the Delete Response, defined as 1375 follows: 1377 DelResponse ::= [APPLICATION 11] LDAPResult 1379 Upon receipt of a Delete Request, a server will attempt to perform 1380 the entry removal requested. The result of the delete attempt will be 1381 returned to the client in the Delete Response. 1383 4.9. Modify DN Operation 1385 The Modify DN Operation allows a client to change the leftmost (least 1386 significant) component of the name of an entry in the directory, or 1387 to move a subtree of entries to a new location in the directory. The 1388 Modify DN Request is defined as follows: 1390 ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { 1391 entry LDAPDN, 1392 newrdn RelativeLDAPDN, 1393 deleteoldrdn BOOLEAN, 1394 newSuperior [0] LDAPDN OPTIONAL } 1396 Parameters of the Modify DN Request are: 1398 - entry: the Distinguished Name of the entry to be changed. This 1399 entry may or may not have subordinate entries. Note that the 1400 server will not dereference any aliases in locating the entry to 1401 be changed. 1403 - newrdn: the RDN that will form the leftmost component of the new 1404 name of the entry. 1406 - deleteoldrdn: a boolean parameter that controls whether the old 1407 RDN attribute values are to be retained as attributes of the 1408 entry, or deleted from the entry. 1410 Lightweight Directory Access Protocol Version 3 1412 - newSuperior: if present, this is the Distinguished Name of the 1413 entry which becomes the immediate superior of the existing entry. 1415 The result of the name change attempted by the server upon receipt of 1416 a Modify DN Request is returned in the Modify DN Response, defined as 1417 follows: 1419 ModifyDNResponse ::= [APPLICATION 13] LDAPResult 1421 Upon receipt of a ModifyDNRequest, a server will attempt to perform 1422 the name change. The result of the name change attempt will be 1423 returned to the client in the Modify DN Response. 1425 For example, if the entry named in the "entry" parameter was "cn=John 1426 Smith,c=US", the newrdn parameter was "cn=John Cougar Smith", and the 1427 newSuperior parameter was absent, then this operation would attempt 1428 to rename the entry to be "cn=John Cougar Smith,c=US". If there was 1429 already an entry with that name, the operation would fail with error 1430 code entryAlreadyExists. 1432 If the deleteoldrdn parameter is TRUE, the values forming the old RDN 1433 are deleted from the entry. If the deleteoldrdn parameter is FALSE, 1434 the values forming the old RDN will be retained as non-distinguished 1435 attribute values of the entry. The server may not perform the 1436 operation and return an error code if the setting of the deleteoldrdn 1437 parameter would cause a schema inconsistency in the entry. 1439 Note that X.500 restricts the ModifyDN operation to only affect 1440 entries that are contained within a single server. If the LDAP server 1441 is mapped onto DAP, then this restriction will apply, and the 1442 resultCode affectsMultipleDSAs will be returned if this error 1443 occurred. In general clients MUST NOT expect to be able to perform 1444 arbitrary movements of entries and subtrees between servers. 1446 4.10. Compare Operation 1448 The Compare Operation allows a client to compare an assertion 1449 provided with an entry in the directory. The Compare Request is 1450 defined as follows: 1452 CompareRequest ::= [APPLICATION 14] SEQUENCE { 1453 entry LDAPDN, 1454 ava AttributeValueAssertion } 1456 Parameters of the Compare Request are: 1458 - entry: the name of the entry to be compared with. Note that the 1459 server SHOULD NOT dereference any aliases in locating the entry to 1460 be compared with. 1462 - ava: the assertion with which an attribute in the entry is to be 1463 compared. 1465 Lightweight Directory Access Protocol Version 3 1467 The result of the compare attempted by the server upon receipt of a 1468 Compare Request is returned in the Compare Response, defined as 1469 follows: 1471 CompareResponse ::= [APPLICATION 15] LDAPResult 1473 Upon receipt of a Compare Request, a server will attempt to perform 1474 the requested comparison using the EQUALITY matching rule for the 1475 attribute type. The result of the comparison will be returned to the 1476 client in the Compare Response. Note that errors and the result of 1477 comparison are all returned in the same construct. 1479 Note that some directory systems may establish access controls which 1480 permit the values of certain attributes (such as userPassword) to be 1481 compared but not read. 1483 4.11. Abandon Operation 1485 The function of the Abandon Operation is to allow a client to request 1486 that the server abandon an outstanding operation. The Abandon Request 1487 is defined as follows: 1489 AbandonRequest ::= [APPLICATION 16] MessageID 1491 The MessageID MUST be that of an operation which was requested 1492 earlier in this connection. The abandon request itself has its own 1493 message id. This is distinct from the id of the earlier operation 1494 being abandoned. 1496 There is no response defined in the Abandon Operation. Upon 1497 transmission of an Abandon Operation, the server MAY abandon the 1498 operation identified by the Message ID in the Abandon Request. 1499 Operation responses are not sent for successfully abandoned 1500 operations. Clients can determine that an operation has been 1501 abandoned by performing a subsequent bind operation. 1503 Abandon and Unbind operations cannot be abandoned. The ability to 1504 abandon other (particularly update) operations is at the discretion 1505 of the server. 1507 In the event that a server receives an Abandon Request on a Search 1508 Operation in the midst of transmitting responses to the search, that 1509 server MUST cease transmitting entry responses to the abandoned 1510 request immediately, and MUST NOT send the SearchResponseDone. Of 1511 course, the server MUST ensure that only properly encoded LDAPMessage 1512 PDUs are transmitted. 1514 Clients MUST NOT send abandon requests for the same operation 1515 multiple times, and MUST also be prepared to receive results from 1516 operations it has abandoned (since these may have been in transit 1517 when the abandon was requested, or are not able to be abandoned). 1519 Lightweight Directory Access Protocol Version 3 1521 Servers MUST discard abandon requests for message IDs they do not 1522 recognize, for operations which cannot be abandoned, and for 1523 operations which have already been abandoned. 1525 4.12. Extended Operation 1527 An extension mechanism has been added in this version of LDAP, in 1528 order to allow additional operations to be defined for services not 1529 available elsewhere in this protocol, for instance digitally signed 1530 operations and results. 1532 The extended operation allows clients to make requests and receive 1533 responses with predefined syntaxes and semantics. These may be 1534 defined in RFCs or be private to particular implementations. Each 1535 request MUST have a unique OBJECT IDENTIFIER assigned to it. 1537 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 1538 requestName [0] LDAPOID, 1539 requestValue [1] OCTET STRING OPTIONAL } 1541 The requestName is a dotted-decimal representation of the OBJECT 1542 IDENTIFIER corresponding to the request. The requestValue is 1543 information in a form defined by that request, encapsulated inside an 1544 OCTET STRING. 1546 The server will respond to this with an LDAPMessage containing the 1547 ExtendedResponse. 1549 ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 1550 COMPONENTS OF LDAPResult, 1551 responseName [10] LDAPOID OPTIONAL, 1552 response [11] OCTET STRING OPTIONAL } 1554 If the server does not recognize the request name, it MUST return 1555 only the response fields from LDAPResult, containing the 1556 protocolError result code. 1558 5. Protocol Element Encodings and Transfer 1560 One underlying service is defined here. Clients and servers SHOULD 1561 implement the mapping of LDAP over TCP described in 5.2.1. 1563 5.1. Protocol Encoding 1565 The protocol elements of LDAP are encoded for exchange using the 1566 Basic Encoding Rules (BER) [X.690] of ASN.1 [X.680]. However, due to 1567 the high overhead involved in using certain elements of the BER, the 1568 following additional restrictions are placed on BER-encodings of LDAP 1569 protocol elements: 1571 (1) Only the definite form of length encoding will be used. 1573 Lightweight Directory Access Protocol Version 3 1575 (2) OCTET STRING values will be encoded in the primitive form only. 1577 (3) If the value of a BOOLEAN type is true, the encoding MUST have 1578 its contents octets set to hex "FF". 1580 (4) If a value of a type is its default value, it MUST be absent. 1581 Only some BOOLEAN and INTEGER types have default values in this 1582 protocol definition. 1584 These restrictions do not apply to ASN.1 types encapsulated inside of 1585 OCTET STRING values, such as attribute values, unless otherwise 1586 noted. 1588 5.2. Transfer Protocols 1590 This protocol is designed to run over connection-oriented, reliable 1591 transports, with all 8 bits in an octet being significant in the data 1592 stream. 1594 5.2.1. Transmission Control Protocol (TCP) 1596 The encoded LDAPMessage PDUs are mapped directly onto the TCP 1597 bytestream using the BER-based encoding described in section 5.1. It 1598 is recommended that server implementations running over the TCP 1599 provide a protocol listener on the assigned port, 389. Servers may 1600 instead provide a listener on a different port number. Clients MUST 1601 support contacting servers on any valid TCP port. 1603 6. Implementation Guidelines 1605 This document describes an Internet protocol. 1607 6.1. Server Implementations 1609 The server MUST be capable of recognizing all the mandatory attribute 1610 type names and implement the syntaxes specified in [Syntaxes]. 1611 Servers MAY also recognize additional attribute type names. 1613 6.2. Client Implementations 1615 Clients which request referrals MUST ensure that they do not loop 1616 between servers. They MUST NOT repeatedly contact the same server for 1617 the same request with the same target entry name, scope and filter. 1618 Some clients may be using a counter that is incremented each time 1619 referral handling occurs for an operation, and these kinds of clients 1620 MUST be able to handle a DIT with at least ten layers of naming 1621 contexts between the root and a leaf entry. 1623 Lightweight Directory Access Protocol Version 3 1625 In the absence of prior agreements with servers, clients SHOULD NOT 1626 assume that servers support any particular schemas beyond those 1627 referenced in section 6.1. Different schemas can have different 1628 attribute types with the same names. The client can retrieve the 1629 subschema entries referenced by the subschemaSubentry attribute in 1630 the server's root DSE or in entries held by the server. 1632 7. Security Considerations 1634 When used with a connection-oriented transport, this version of the 1635 protocol provides facilities for simple authentication using a 1636 cleartext password, as well as any SASL mechanism [RFC2222]. SASL 1637 allows for integrity and privacy services to be negotiated. 1639 It is also permitted that the server can return its credentials to 1640 the client, if it chooses to do so. 1642 Use of cleartext password is strongly discouraged where the 1643 underlying transport service cannot guarantee confidentiality and may 1644 result in disclosure of the password to unauthorized parties. 1646 When used with SASL, it should be noted that the name field of the 1647 BindRequest is not protected against modification. Thus if the 1648 distinguished name of the client (an LDAPDN) is agreed through the 1649 negotiation of the credentials, it takes precedence over any value in 1650 the unprotected name field. 1652 Implementations which cache attributes and entries obtained via LDAP 1653 MUST ensure that access controls are maintained if that information 1654 is to be provided to multiple clients, since servers may have access 1655 control policies which prevent the return of entries or attributes in 1656 search results except to particular authenticated clients. For 1657 example, caches could serve result information only to the client 1658 whose request caused it to be in the cache. 1660 8. Acknowledgements 1662 This document is an update to RFC 2251, by Mark Wahl, Tim Howes, and 1663 Steve Kille. Their work along with the input of individuals of the 1664 IETF LDAPEXT, LDUP, LDAPBIS, and other Working Groups is gratefully 1665 acknowledged. 1667 9. Normative References 1669 [X.500] ITU-T Rec. X.500, "The Directory: Overview of Concepts, 1670 Models and Service", 1993. 1672 [Roadmap] K. Zeilenga (editor), "LDAP: Technical Specification Road 1673 Map", draft-ietf-ldapbis-roadmap-xx.txt (a work in 1674 progress). 1676 Lightweight Directory Access Protocol Version 3 1678 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1679 Requirement Levels", RFC 2119, March 1997. 1681 [X.680] ITU-T Recommendation X.680 (1997) | ISO/IEC 8824-1:1998 1682 Information Technology - Abstract Syntax Notation One 1683 (ASN.1): Specification of basic notation 1685 [X.690] ITU-T Rec. X.690, "Specification of ASN.1 encoding rules: 1686 Basic, Canonical, and Distinguished Encoding Rules", 1994. 1688 [LDAPIANA] K. Zeilenga, "IANA Considerations for LDAP", draft-ietf- 1689 ldapbis-xx.txt (a work in progress). 1691 [ISO10646] Universal Multiple-Octet Coded Character Set (UCS) - 1692 Architecture and Basic Multilingual Plane, ISO/IEC 10646-1 1693 : 1993. 1695 [RFC2044] Yergeau, F., "UTF-8, a transformation format of Unicode 1696 and ISO 10646", RFC 2044, October 1996. 1698 [Models] K. Zeilenga, "LDAP: The Models", draft-ietf-ldapbis- 1699 models-xx.txt (a work in progress). 1701 [LDAPDN] K. Zeilenga (editor), "LDAP: String Representation of 1702 Distinguished Names", draft-ietf-ldapbis-dn-xx.txt, (a 1703 work in progress). 1705 [Syntaxes] K. Dally (editor), "LDAP: Syntaxes", draft-ietf-ldapbis- 1706 syntaxes-xx.txt, (a work in progress). 1708 [X.501] ITU-T Rec. X.501, "The Directory: Models", 1993. 1710 [X.511] ITU-T Rec. X.511, "The Directory: Abstract Service 1711 Definition", 1993. 1713 [RFC2396] Berners-Lee, T., Fielding, R., and L. Masinter Uniform 1714 Resource Identifiers (URI): Generic Syntax", RFC 2396, 1715 August 1998. 1717 [AuthMeth] R. Harrison (editor), "LDAP: Authentication Methods", 1718 draft-ietf-ldapbis-authmeth-xx.txt, (a work in progress). 1720 [RFC2222] Meyers, J., "Simple Authentication and Security Layer", 1721 RFC 2222, October 1997. 1723 10. Editor's Address 1725 Jim Sermersheim 1726 Novell, Inc. 1727 1800 South Novell Place 1728 Provo, Utah 84606, USA 1729 jimse@novell.com 1730 +1 801 861-3088 1731 Lightweight Directory Access Protocol Version 3 1733 Appendix A - LDAP Result Codes 1735 This normative appendix details additional considerations regarding 1736 LDAP result codes and provides a brief, general description of each 1737 LDAP result code enumerated in Section 4.1.10. 1739 Additional result codes MAY be defined for use with extensions. 1740 Client implementations SHALL treat any result code which they do not 1741 recognize as an unknown error condition. 1743 A.1 Non-Error Result Codes 1744 These result codes (called "non-error" result codes) do not indicate 1745 an error condition: 1746 success(0), 1747 compareTrue(6), 1748 compareFalse(7), 1749 referral(10), and 1750 saslBindInProgress(14). 1752 The success(0), compareTrue(6), and compare(7) result codes indicate 1753 successful completion (and, hence, are called to as "successful" 1754 result codes). 1756 The referral(10) and saslBindInProgress(14) indicate the client is 1757 required to take additional action to complete the operation 1759 A.2 Error Result Codes 1761 A.3 Classes and Precedence of Error Result Codes 1763 Result codes that indicate error conditions (and, hence, are called 1764 "error" result codes) fall into 6 classes. The following list 1765 specifies the precedence of error classes to be used when more than 1766 one error is detected [X511]: 1767 1) Name Errors (codes 32 - 34, 36) 1768 - a problem related to a name (DN or RDN), 1769 2) Update Errors (codes 64 - 69, 71) 1770 - a problem related to an update operation, 1771 3) Attribute Errors (codes 16 - 21) 1772 - a problem related to a supplied attribute, 1773 4) Security Errors (codes 8, 13, 48 - 50) 1774 - a security related problem, 1775 5) Service Problem (codes 3, 4, 7, 11, 12, 51 - 54, 80) 1776 - a problem related to the provision of the service, and 1777 6) Protocol Problem (codes 1, 2) 1778 - a problem related to protocol structure or semantics. 1780 Server implementations SHALL NOT continue processing an operation 1781 after it has determined that an error is to be reported. If the 1782 server detects multiple errors simultaneously, the server SHOULD 1783 report the error with the highest precedence. 1785 Existing LDAP result codes are described as follows: 1787 Lightweight Directory Access Protocol Version 3 1789 success (0) 1791 Indicates successful completion of an operation. 1793 This result code is normally not returned by the compare 1794 operation, see compareFalse (5) and compareTrue (6). 1796 operationsError (1) 1798 Indicates that the operation is not properly sequenced with 1799 relation to other operations (of same or different type). 1801 For example, this code is returned if the client attempts to 1802 Start TLS [RFC2830] while there are other operations 1803 outstanding or if TLS was already established. 1805 For the bind operation only, the code indicates the server 1806 encountered an internal error. 1808 protocolError (2) 1810 Indicates the server received data which has incorrect 1811 structure. 1813 For bind operation only, the code may be resulted to indicate 1814 the server does not support the requested protocol version. 1816 timeLimitExceeded (3) 1818 Indicates that the time limit specified by the client was 1819 exceeded before the operation could be completed. 1821 sizeLimitExceeded (4) 1823 Indicates that the size limit specified by the client was 1824 exceeded before the operation could be completed. 1826 compareFalse (5) 1828 Indicates that the operation successfully completes and the 1829 assertion has evaluated to TRUE. 1831 This result code is normally only returned by the compare 1832 operation. 1834 compareTrue (6) 1835 Lightweight Directory Access Protocol Version 3 1837 Indicates that the operation successfully completes and the 1838 assertion has evaluated to FALSE. 1840 This result code is normally only returned by the compare 1841 operation. 1843 authMethodNotSupported (7) 1845 Indicates that authentication method or mechanism is not 1846 supported. 1848 strongAuthRequired (8) 1850 Except when returned in a Notice of Disconnect (see section 1851 4.4.1), this indicates that the server requires the client to 1852 authentication using a strong(er) mechanism. 1854 referral (10) 1856 Indicates that a referral needs to be chased to complete the 1857 operation (see section 4.1.11). 1859 adminLimitExceeded (11) 1861 Indicates that an admnistrative limit has been exceeded. 1863 unavailableCriticalExtension (12) 1865 Indicates that server cannot perform a critical extension 1866 (see section 4.1.12). 1868 confidentialityRequired (13) 1870 Indicates that data confidentiality protections are required. 1872 saslBindInProgress (14) 1874 Indicates the server requires the client to send a new bind 1875 request, with the same sasl mechanism, to continue the 1876 authentication process (see section 4.2). 1878 noSuchAttribute (16) 1880 Indicates that the named entry does not contain the specified 1881 attribute or attribute value. 1883 Lightweight Directory Access Protocol Version 3 1885 undefinedAttributeType (17) 1887 Indicates that a request field contains an undefined 1888 attribute type. 1890 inappropriateMatching (18) 1892 Indicates that a request cannot be completed due to an 1893 inappropriate matching. 1895 constraintViolation (19) 1897 Indicates that the client supplied an attribute value which 1898 does not conform to constraints placed upon it by the data 1899 model. 1901 For example, this code is returned when the multiple values 1902 are supplied to an attribute which has a SINGLE-VALUE 1903 constraint. 1905 attributeOrValueExists (20) 1907 Indicates that the client supplied an attribute or value to 1908 be added to an entry already exists. 1910 invalidAttributeSyntax (21) 1912 Indicates that a purported attribute value does not conform 1913 to the syntax of the attribute. 1915 noSuchObject (32) 1917 Indicates that the object does not exist in the DIT. 1919 aliasProblem (33) 1921 Indicates that an alias problem has occurred. 1923 invalidDNSyntax (34) 1925 Indicates that a LDAPDN or RelativeLDAPDN field (e.g. search 1926 base, target entry, ModifyDN newrdn, etc.) of a request does 1927 not conform to the required syntax or contains attribute 1928 values which do not conform to the syntax of the attribute's 1929 type. 1931 Lightweight Directory Access Protocol Version 3 1933 aliasDereferencingProblem (36) 1935 Indicates that a problem in dereferencing an alias. 1937 inappropriateAuthentication (48) 1939 Indicates the server requires the client which had attempted 1940 to bind anonymously or without supplying credentials to 1941 provide some form of credentials, 1943 invalidCredentials (49) 1945 Indicates the supplied credentials are invalid. 1947 insufficientAccessRights (50) 1949 Indicates that the client does not have sufficient access 1950 rights to perform the operation. 1952 busy (51) 1954 Indicates that the server is busy. 1956 unavailable (52) 1958 Indicates that the server is shutting down or a subsystem 1959 necessary to complete the operation is offline. 1961 unwillingToPerform (53) 1963 Indicates that the server is unwilling to perform the 1964 operation. 1966 loopDetect (54) 1968 Indicates that the server has detected an internal loop. 1970 namingViolation (64) 1972 Indicates that the entry name violates naming restrictions. 1974 objectClassViolation (65) 1976 Indicates that the entry violates object class restrictions. 1978 Lightweight Directory Access Protocol Version 3 1980 notAllowedOnNonLeaf (66) 1982 Indicates that operation is inappropriately acting upon a 1983 non-leaf entry. 1985 notAllowedOnRDN (67) 1987 Indicates that the operation is inappropriately attempting to 1988 remove a value which forms the entry's relative distinguished 1989 name. 1991 entryAlreadyExists (68) 1993 Indicates that the request cannot be added fulfilled as the 1994 entry already exists. 1996 objectClassModsProhibited (69) 1998 Indicates that the attempt to modify the object class(es) of 1999 an entry objectClass attribute is prohibited. 2001 For example, this code is returned when a when a client 2002 attempts to modify the structural object class of an entry. 2004 affectsMultipleDSAs (71) 2006 Indicates that the operation cannot be completed as it 2007 affects multiple servers (DSAs). 2009 other (80) 2011 Indicates the server has encountered an internal error. 2013 Lightweight Directory Access Protocol Version 3 2015 Appendix B - Complete ASN.1 Definition 2017 This appendix is normative. 2019 Lightweight-Directory-Access-Protocol-V3 DEFINITIONS 2020 IMPLICIT TAGS 2021 EXTENSIBILITY IMPLIED ::= 2023 BEGIN 2025 LDAPMessage ::= SEQUENCE { 2026 messageID MessageID, 2027 protocolOp CHOICE { 2028 bindRequest BindRequest, 2029 bindResponse BindResponse, 2030 unbindRequest UnbindRequest, 2031 searchRequest SearchRequest, 2032 searchResEntry SearchResultEntry, 2033 searchResDone SearchResultDone, 2034 searchResRef SearchResultReference, 2035 modifyRequest ModifyRequest, 2036 modifyResponse ModifyResponse, 2037 addRequest AddRequest, 2038 addResponse AddResponse, 2039 delRequest DelRequest, 2040 delResponse DelResponse, 2041 modDNRequest ModifyDNRequest, 2042 modDNResponse ModifyDNResponse, 2043 compareRequest CompareRequest, 2044 compareResponse CompareResponse, 2045 abandonRequest AbandonRequest, 2046 extendedReq ExtendedRequest, 2047 extendedResp ExtendedResponse, 2048 ... }, 2049 controls [0] Controls OPTIONAL } 2051 MessageID ::= INTEGER (0 .. maxInt) 2053 maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- 2055 LDAPString ::= OCTET STRING -- UTF-8 encoded, 2056 -- [ISO10646] characters 2058 LDAPOID ::= OCTET STRING -- Constrained to numericoid [Models] 2060 LDAPDN ::= LDAPString 2062 RelativeLDAPDN ::= LDAPString 2064 AttributeDescription ::= LDAPString 2065 -- Constrained to attributedescription 2066 -- [Models] 2068 AttributeDescriptionList ::= SEQUENCE OF 2069 Lightweight Directory Access Protocol Version 3 2071 AttributeDescription 2073 AttributeValue ::= OCTET STRING 2075 AttributeValueAssertion ::= SEQUENCE { 2076 attributeDesc AttributeDescription, 2077 assertionValue AssertionValue } 2079 AssertionValue ::= OCTET STRING 2081 Attribute ::= SEQUENCE { 2082 type AttributeDescription, 2083 vals SET OF AttributeValue } 2085 MatchingRuleId ::= LDAPString 2087 LDAPResult ::= SEQUENCE { 2088 resultCode ENUMERATED { 2089 success (0), 2090 operationsError (1), 2091 protocolError (2), 2092 timeLimitExceeded (3), 2093 sizeLimitExceeded (4), 2094 compareFalse (5), 2095 compareTrue (6), 2096 authMethodNotSupported (7), 2097 strongAuthRequired (8), 2098 -- 9 reserved -- 2099 referral (10), 2100 adminLimitExceeded (11), 2101 unavailableCriticalExtension (12), 2102 confidentialityRequired (13), 2103 saslBindInProgress (14), 2104 noSuchAttribute (16), 2105 undefinedAttributeType (17), 2106 inappropriateMatching (18), 2107 constraintViolation (19), 2108 attributeOrValueExists (20), 2109 invalidAttributeSyntax (21), 2110 -- 22-31 unused -- 2111 noSuchObject (32), 2112 aliasProblem (33), 2113 invalidDNSyntax (34), 2114 -- 35 reserved for undefined isLeaf -- 2115 aliasDereferencingProblem (36), 2116 -- 37-47 unused -- 2117 inappropriateAuthentication (48), 2118 invalidCredentials (49), 2119 insufficientAccessRights (50), 2120 busy (51), 2121 unavailable (52), 2122 unwillingToPerform (53), 2123 loopDetect (54), 2124 -- 55-63 unused -- 2125 Lightweight Directory Access Protocol Version 3 2127 namingViolation (64), 2128 objectClassViolation (65), 2129 notAllowedOnNonLeaf (66), 2130 notAllowedOnRDN (67), 2131 entryAlreadyExists (68), 2132 objectClassModsProhibited (69), 2133 -- 70 reserved for CLDAP -- 2134 affectsMultipleDSAs (71), 2135 -- 72-79 unused -- 2136 other (80), 2137 ... }, 2138 -- 81-90 reserved for APIs -- 2139 matchedDN LDAPDN, 2140 errorMessage LDAPString, 2141 referral [3] Referral OPTIONAL } 2143 Referral ::= SEQUENCE OF LDAPURL 2145 LDAPURL ::= LDAPString -- limited to characters permitted in 2146 -- URLs 2148 Controls ::= SEQUENCE OF Control 2150 Control ::= SEQUENCE { 2151 controlType LDAPOID, 2152 criticality BOOLEAN DEFAULT FALSE, 2153 controlValue OCTET STRING OPTIONAL } 2155 BindRequest ::= [APPLICATION 0] SEQUENCE { 2156 version INTEGER (1 .. 127), 2157 name LDAPDN, 2158 authentication AuthenticationChoice } 2160 AuthenticationChoice ::= CHOICE { 2161 simple [0] OCTET STRING, 2162 -- 1 and 2 reserved 2163 sasl [3] SaslCredentials, 2164 ... } 2166 SaslCredentials ::= SEQUENCE { 2167 mechanism LDAPString, 2168 credentials OCTET STRING OPTIONAL } 2170 BindResponse ::= [APPLICATION 1] SEQUENCE { 2171 COMPONENTS OF LDAPResult, 2172 serverSaslCreds [7] OCTET STRING OPTIONAL } 2174 UnbindRequest ::= [APPLICATION 2] NULL 2176 SearchRequest ::= [APPLICATION 3] SEQUENCE { 2177 baseObject LDAPDN, 2178 scope ENUMERATED { 2179 baseObject (0), 2180 singleLevel (1), 2181 Lightweight Directory Access Protocol Version 3 2183 wholeSubtree (2) }, 2184 derefAliases ENUMERATED { 2185 neverDerefAliases (0), 2186 derefInSearching (1), 2187 derefFindingBaseObj (2), 2188 derefAlways (3) }, 2189 sizeLimit INTEGER (0 .. maxInt), 2190 timeLimit INTEGER (0 .. maxInt), 2191 typesOnly BOOLEAN, 2192 filter Filter, 2193 attributes AttributeDescriptionList } 2195 Filter ::= CHOICE { 2196 and [0] SET SIZE (1..MAX) OF Filter, 2197 or [1] SET SIZE (1..MAX) OF Filter, 2198 not [2] Filter, 2199 equalityMatch [3] AttributeValueAssertion, 2200 substrings [4] SubstringFilter, 2201 greaterOrEqual [5] AttributeValueAssertion, 2202 lessOrEqual [6] AttributeValueAssertion, 2203 present [7] AttributeDescription, 2204 approxMatch [8] AttributeValueAssertion, 2205 extensibleMatch [9] MatchingRuleAssertion } 2207 SubstringFilter ::= SEQUENCE { 2208 type AttributeDescription, 2209 -- at least one must be present, 2210 -- initial and final can occur at most once 2211 substrings SEQUENCE OF CHOICE { 2212 initial [0] AssertionValue, 2213 any [1] AssertionValue, 2214 final [2] AssertionValue } } 2216 MatchingRuleAssertion ::= SEQUENCE { 2217 matchingRule [1] MatchingRuleId OPTIONAL, 2218 type [2] AttributeDescription OPTIONAL, 2219 matchValue [3] AssertionValue, 2220 dnAttributes [4] BOOLEAN DEFAULT FALSE } 2222 SearchResultEntry ::= [APPLICATION 4] SEQUENCE { 2223 objectName LDAPDN, 2224 attributes PartialAttributeList } 2226 PartialAttributeList ::= SEQUENCE OF SEQUENCE { 2227 type AttributeDescription, 2228 vals SET OF AttributeValue } 2230 SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 2232 SearchResultDone ::= [APPLICATION 5] LDAPResult 2234 ModifyRequest ::= [APPLICATION 6] SEQUENCE { 2235 object LDAPDN, 2236 modification SEQUENCE OF SEQUENCE { 2237 Lightweight Directory Access Protocol Version 3 2239 operation ENUMERATED { 2240 add (0), 2241 delete (1), 2242 replace (2) }, 2243 modification AttributeTypeAndValues } } 2245 AttributeTypeAndValues ::= SEQUENCE { 2246 type AttributeDescription, 2247 vals SET OF AttributeValue } 2249 ModifyResponse ::= [APPLICATION 7] LDAPResult 2251 AddRequest ::= [APPLICATION 8] SEQUENCE { 2252 entry LDAPDN, 2253 attributes AttributeList } 2255 AttributeList ::= SEQUENCE OF SEQUENCE { 2256 type AttributeDescription, 2257 vals SET OF AttributeValue } 2259 AddResponse ::= [APPLICATION 9] LDAPResult 2261 DelRequest ::= [APPLICATION 10] LDAPDN 2263 DelResponse ::= [APPLICATION 11] LDAPResult 2265 ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { 2266 entry LDAPDN, 2267 newrdn RelativeLDAPDN, 2268 deleteoldrdn BOOLEAN, 2269 newSuperior [0] LDAPDN OPTIONAL } 2271 ModifyDNResponse ::= [APPLICATION 13] LDAPResult 2273 CompareRequest ::= [APPLICATION 14] SEQUENCE { 2274 entry LDAPDN, 2275 ava AttributeValueAssertion } 2277 CompareResponse ::= [APPLICATION 15] LDAPResult 2279 AbandonRequest ::= [APPLICATION 16] MessageID 2281 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 2282 requestName [0] LDAPOID, 2283 requestValue [1] OCTET STRING OPTIONAL } 2285 ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 2286 COMPONENTS OF LDAPResult, 2287 responseName [10] LDAPOID OPTIONAL, 2288 response [11] OCTET STRING OPTIONAL } 2290 END 2291 Lightweight Directory Access Protocol Version 3 2293 Appendix C - Change History 2294 2297 C.1 Changes made to RFC 2251: 2299 C.1.1 Editorial 2301 - Bibliography References: Changed all bibliography references to 2302 use a long name form for readability. 2303 - Changed occurrences of "unsupportedCriticalExtension" 2304 "unavailableCriticalExtension" 2305 - Fixed a small number of misspellings (mostly dropped letters). 2307 C.1.2 Section 1 2309 - Removed IESG note. 2311 C.1.3 Section 9 2313 - Added references to RFCs 1823, 2234, 2829 and 2830. 2315 C.2 Changes made to draft-ietf-ldapbis-protocol-00.txt: 2317 C.2.1 Section 4.1.6 2319 - In the first paragraph, clarified what the contents of an 2320 AttributeValue are. There was confusion regarding whether or not 2321 an AttributeValue that is BER encoded (due to the "binary" option) 2322 is to be wrapped in an extra OCTET STRING. 2323 - To the first paragraph, added wording that doesn't restrict other 2324 transfer encoding specifiers from being used. The previous wording 2325 only allowed for the string encoding and the ;binary encoding. 2326 - To the first paragraph, added a statement restricting multiple 2327 options that specify transfer encoding from being present. This 2328 was never specified in the previous version and was seen as a 2329 potential interoperability problem. 2330 - Added a third paragraph stating that the ;binary option is 2331 currently the only option defined that specifies the transfer 2332 encoding. This is for completeness. 2334 C.2.2 Section 4.1.7 2336 - Generalized the second paragraph to read "If an option specifying 2337 the transfer encoding is present in attributeDesc, the 2338 AssertionValue is encoded as specified by the option...". 2339 Previously, only the ;binary option was mentioned. 2341 C.2.3 Sections 4.2, 4.9, 4.10 2343 - Added alias dereferencing specifications. In the case of modDN, 2344 followed precedent set on other update operations (... alias is 2345 not dereferenced...) In the case of bind and compare stated that 2346 Lightweight Directory Access Protocol Version 3 2348 servers SHOULD NOT dereference aliases. Specifications were added 2349 because they were missing from the previous version and caused 2350 interoperability problems. Concessions were made for bind and 2351 compare (neither should have ever allowed alias dereferencing) by 2352 using SHOULD NOT language, due to the behavior of some existing 2353 implementations. 2355 C.2.4 Sections 4.5 and Appendix A 2357 - Changed SubstringFilter.substrings.initial, any, and all from 2358 LDAPString to AssertionValue. This was causing an incompatibility 2359 with X.500 and confusion among other TS RFCs. 2361 C.3 Changes made to draft-ietf-ldapbis-protocol-01.txt: 2363 C.3.1 Section 3.4 2365 - Reworded text surrounding subschemaSubentry to reflect that it is 2366 a single-valued attribute that holds the schema for the root DSE. 2367 Also noted that if the server masters entries that use differing 2368 schema, each entry's subschemaSubentry attribute must be 2369 interrogated. This may change as further fine-tuning is done to 2370 the data model. 2372 C.3.2 Section 4.1.12 2374 - Specified that the criticality field is only used for requests and 2375 not for unbind or abandon. Noted that it is ignored for all other 2376 operations. 2378 C.3.3 Section 4.2 2380 - Noted that Server behavior is undefined when the name is a null 2381 value, simple authentication is used, and a password is specified. 2383 C.3.4 Section 4.2.(various) 2385 - Changed "unauthenticated" to "anonymous" and "DN" and "LDAPDN" to 2386 "name" 2388 C.3.5 Section 4.2.2 2390 - Changed "there is no authentication or encryption being performed 2391 by a lower layer" to "the underlying transport service cannot 2392 guarantee confidentiality" 2394 C.3.6 Section 4.5.2 2396 - Removed all mention of ExtendedResponse due to lack of 2397 implementation. 2399 C.4 Changes made to draft-ietf-ldapbis-protocol-02.txt: 2401 Lightweight Directory Access Protocol Version 3 2403 C.4.1 Section 4 2405 - Removed "typically" from "and is typically transferred" in the 2406 first paragraph. We know of no (and can conceive of no) case where 2407 this isn't true. 2408 - Added "Section 5.1 specifies how the LDAP protocol is encoded." To 2409 the first paragraph. Added this cross reference for readability. 2410 - Changed "version 3 " to "version 3 or later" in the second 2411 paragraph. This was added to clarify the original intent. 2412 - Changed "protocol version" to "protocol versions" in the third 2413 paragraph. This attribute is multi-valued with the intent of 2414 holding all supported versions, not just one. 2416 C.4.2 Section 4.1.8 2418 - Changed "when transferred in protocol" to "when transferred from 2419 the server to the client" in the first paragraph. This is to 2420 clarify that this behavior only happens when attributes are being 2421 sent from the server. 2423 C.4.3 Section 4.1.10 2425 - Changed "servers will return responses containing fields of type 2426 LDAPResult" to "servers will return responses of LDAPResult or 2427 responses containing the components of LDAPResponse". This 2428 statement was incorrect and at odds with the ASN.1. The fix here 2429 reflects the original intent. 2430 - Dropped '--new' from result codes ASN.1. This simplification in 2431 comments just reduces unneeded verbiage. 2433 C.4.4 Section 4.1.11 2435 - Changed "It contains a reference to another server (or set of 2436 servers)" to "It contains one or more references to one or more 2437 servers or services" in the first paragraph. This reflects the 2438 original intent and clarifies that the URL may point to non-LDAP 2439 services. 2441 C.4.5 Section 4.1.12 2443 - Changed "The server MUST be prepared" to "Implementations MUST be 2444 prepared" in the eighth paragraph to reflect that both client and 2445 server implementations must be able to handle this (as both parse 2446 controls). 2448 C.4.6 Section 4.4 2450 - Changed "One unsolicited notification is defined" to "One 2451 unsolicited notification (Notice of Disconnection) is defined" in 2452 the third paragraph. For clarity and readability. 2454 C.4.7 Section 4.5.1 2455 Lightweight Directory Access Protocol Version 3 2457 - Changed "checking for the existence of the objectClass attribute" 2458 to "checking for the presence of the objectClass attribute" in the 2459 last paragraph. This was done as a measure of consistency (we use 2460 the terms present and presence rather than exists and existence in 2461 search filters). 2463 C.4.8 Section 4.5.3 2465 - Changed "outstanding search operations to different servers," to 2466 "outstanding search operations" in the fifth paragraph as they may 2467 be to the same server. This is a point of clarification. 2469 C.4.9 Section 4.6 2471 - Changed "clients MUST NOT attempt to delete" to "clients MUST NOT 2472 attempt to add or delete" in the second to last paragraph. 2473 - Change "using the "delete" form" to "using the "add" or "delete" 2474 form" in the second to last paragraph. 2476 C.4.10 Section 4.7 2478 - Changed "Clients MUST NOT supply the createTimestamp or 2479 creatorsName attributes, since these will be generated 2480 automatically by the server." to "Clients MUST NOT supply NO-USER- 2481 MODIFICATION attributes such as createTimestamp or creatorsName 2482 attributes, since these are provided by the server." in the 2483 definition of the attributes field. This tightens the language to 2484 reflect the original intent and to not leave a hole in which one 2485 could interpret the two attributes mentioned as the only non- 2486 writable attributes. 2488 C.4.11 Section 4.11 2490 - Changed "has been" to "will be" in the fourth paragraph. This 2491 clarifies that the server will (not has) abandon the operation. 2493 C.5 Changes made to draft-ietf-ldapbis-protocol-03.txt: 2495 C.5.1 Section 3.2.1 2497 - Changed "An attribute is a type with one or more associated 2498 values. The attribute type is identified by a short descriptive 2499 name and an OID (object identifier). The attribute type governs 2500 whether there can be more than one value of an attribute of that 2501 type in an entry, the syntax to which the values must conform, the 2502 kinds of matching which can be performed on values of that 2503 attribute, and other functions." to " An attribute is a 2504 description (a type and zero or more options) with one or more 2505 associated values. The attribute type governs whether the 2506 attribute can have multiple values, the syntax and matching rules 2507 used to construct and compare values of that attribute, and other 2508 functions. Options indicate modes of transfer and other 2509 Lightweight Directory Access Protocol Version 3 2511 functions.". This points out that an attribute consists of both 2512 the type and options. 2514 C.5.2 Section 4 2516 - Changed "Section 5.1 specifies the encoding rules for the LDAP 2517 protocol" to "Section 5.1 specifies how the protocol is encoded 2518 and transferred." 2520 C.5.3 Section 4.1.2 2522 - Added ABNF for the textual representation of LDAPOID. Previously, 2523 there was no formal BNF for this construct. 2525 C.5.4 Section 4.1.4 2527 - Changed "This identifier may be written as decimal digits with 2528 components separated by periods, e.g. "2.5.4.10"" to "may be 2529 written as defined by ldapOID in section 4.1.2" in the second 2530 paragraph. This was done because we now have a formal BNF 2531 definition of an oid. 2533 C.5.5 Section 4.1.5 2535 - Changed the BNF for AttributeDescription to ABNF. This was done 2536 for readability and consistency (no functional changes involved). 2537 - Changed "Options present in an AttributeDescription are never 2538 mutually exclusive." to "Options MAY be mutually exclusive. An 2539 AttributeDescription with mutually exclusive options is treated as 2540 an undefined attribute type." for clarity. It is generally 2541 understood that this is the original intent, but the wording could 2542 be easily misinterpreted. 2543 - Changed "Any option could be associated with any AttributeType, 2544 although not all combinations may be supported by a server." to 2545 "Though any option or set of options could be associated with any 2546 AttributeType, the server support for certain combinations may be 2547 restricted by attribute type, syntaxes, or other factors.". This 2548 is to clarify the meaning of 'combination' (it applies both to 2549 combination of attribute type and options, and combination of 2550 options). It also gives examples of *why* they might be 2551 unsupported. 2553 C.5.6 Section 4.1.11 2555 - Changed the wording regarding 'equally capable' referrals to "If 2556 multiple URLs are present, the client assumes that any URL may be 2557 used to progress the operation.". The previous language implied 2558 that the server MUST enforce rules that it was practically 2559 incapable of. The new language highlights the original intent-- 2560 that is, that any of the referrals may be used to progress the 2561 operation, there is no inherent 'weighting' mechanism. 2563 C.5.7 Section 4.5.1 and Appendix A 2564 Lightweight Directory Access Protocol Version 3 2566 - Added the comment "-- initial and final can occur at most once", 2567 to clarify this restriction. 2569 C.5.8 Section 5.1 2571 - Changed heading from "Mapping Onto BER-based Transport Services" 2572 to "Protocol Encoding". 2574 C.5.9 Section 5.2.1 2576 - Changed "The LDAPMessage PDUs" to "The encoded LDAPMessage PDUs" 2577 to point out that the PDUs are encoded before being streamed to 2578 TCP. 2580 C.6 Changes made to draft-ietf-ldapbis-protocol-04.txt: 2582 C.6.1 Section 4.5.1 and Appendix A 2584 - Changed the ASN.1 for the and and or choices of Filter to have a 2585 lower range of 1. This was an omission in the original ASN.1 2587 C.6.2 Various 2589 - Fixed various typo's 2591 C.7 Changes made to draft-ietf-ldapbis-protocol-05.txt: 2593 C.7.1 Section 3.2.1 2595 - Added "(as defined in Section 12.4.1 of [X.501])" to the fifth 2596 paragraph when talking about "operational attributes". This is 2597 because the term "operational attributes" is never defined. 2598 Alternately, we could drag a definition into the spec, for now, 2599 I'm just pointing to the reference in X.501. 2601 C.7.2 Section 4.1.5 2603 - Changed "And is also case insensitive" to "The entire 2604 AttributeDescription is case insensitive". This is to clarify 2605 whether we're talking about the entire attribute description, or 2606 just the options. 2608 - Expounded on the definition of attribute description options. This 2609 doc now specifies a difference between transfer and tagging 2610 options and describes the semantics of each, and how and when 2611 subtyping rules apply. Now allow options to be transmitted in any 2612 order but disallow any ordering semantics to be implied. These 2613 changes are the result of ongoing input from an engineering team 2614 designed to deal with ambiguity issues surrounding attribute 2615 options. 2617 C.7.3 Sections 4.1.5.1 and 4.1.6 2618 Lightweight Directory Access Protocol Version 3 2620 - Refer to non "binary" transfer encodings as "native encoding" 2621 rather than "string" encoding to clarify and avoid confusion. 2623 C.8 Changes made to draft-ietf-ldapbis-protocol-06.txt: 2625 C.8.1 Title 2627 - Changed to "LDAP: The Protocol" to be consisted with other working 2628 group documents 2630 C.8.2 Abstract 2632 - Moved above TOC to conform to new guidelines 2634 - Reworded to make consistent with other WG documents. 2636 - Moved 2119 conventions to "Conventions" section 2638 C.8.3 Introduction 2640 - Created to conform to new guidelines 2642 C.8.4 Models 2644 - Removed section. There is only one model in this document 2645 (Protocol Model) 2647 C.8.5 Protocol Model 2649 - Removed antiquated paragraph: "In keeping with the goal of easing 2650 the costs associated with use of the directory, it is an objective 2651 of this protocol to minimize the complexity of clients so as to 2652 facilitate widespread deployment of applications capable of using 2653 the directory." 2655 - Removed antiquated paragraph concerning LDAP v1 and v2 and 2656 referrals. 2658 C.8.6 Data Model 2660 - Removed Section 3.2 and subsections. These have been moved to 2661 [Models] 2663 C.8.7 Relationship to X.500 2665 - Removed section. It has been moved to [Roadmap] 2667 C.8.8 Server Specific Data Requirements 2669 - Removed section. It has been moved to [Models] 2671 C.8.9 Elements of Protocol 2672 Lightweight Directory Access Protocol Version 3 2674 - Added "Section 5.1 specifies how the protocol is encoded and 2675 transferred." to the end of the first paragraph for reference. 2677 - Reworded notes about extensibility, and now talk about implied 2678 extensibility and the use of ellipses in the ASN.1 2680 - Removed references to LDAPv2 in third and fourth paragraphs. 2682 C.8.10 Message ID 2684 - Reworded second paragraph to "The message ID of a request MUST 2685 have a non-zero value different from the values of any other 2686 requests outstanding in the LDAP session of which this message is 2687 a part. The zero value is reserved for the unsolicited 2688 notification message." (Added notes about non-zero and the zero 2689 value). 2691 C.8.11 String Types 2693 - Removed ABNF for LDAPOID and added "Although an LDAPOID is encoded 2694 as an OCTET STRING, values are limited to the definition of 2695 numericoid given in Section 1.3 of [Models]." 2697 C.8.12 Distinguished Name and Relative Distinguished Name 2699 - Removed ABNF and referred to [Models] and [LDAPDN] where this is 2700 defined. 2702 C.8.13 Attribute Type 2704 - Removed sections. It's now in the [Models] doc. 2706 C.8.14 Attribute Description 2708 - Removed ABNF and aligned section with [Models] 2710 - Moved AttributeDescriptionList here. 2712 C.8.15 Transfer Options 2714 - Added section and consumed much of old options language (while 2715 aligning with [Models] 2717 C.8.16 Binary Transfer Option 2719 - Clarified intent regarding exactly what is to be BER encoded. 2721 - Clarified that clients must not expect ;binary when not asking for 2722 it (;binary, as opposed to ber encoded data). 2724 C.8.17 Attribute 2726 - Use the term "attribute description" in lieu of "type" 2727 Lightweight Directory Access Protocol Version 3 2729 - Clarified the fact that clients cannot rely on any apparent 2730 ordering of attribute values. 2732 C.8.18 LDAPResult 2734 - To resultCode, added ellipses "..." to the enumeration to indicate 2735 extensibility. and added a note, pointing to [LDAPIANA] 2737 - Removed error groupings ad refer to Appendix A. 2739 C.8.19 Bind Operation 2741 - Added "Prior to the BindRequest, the implied identity is 2742 anonymous. Refer to [AuthMeth] for the authentication-related 2743 semantics of this operation." to the first paragraph. 2745 - Added ellipses "..." to AuthenticationChoice and added a note 2746 "This type is extensible as defined in Section 3.6 of [LDAPIANA]. 2747 Servers that do not support a choice supplied by a client will 2748 return authMethodNotSupported in the result code of the 2749 BindResponse." 2751 - Simplified text regarding how the server handles unknown versions. 2752 Removed references to LDAPv2 2754 C.8.20 Sequencing of the Bind Request 2756 - Aligned with [AuthMeth] In particular, paragraphs 4 and 6 were 2757 removed, while a portion of 4 was retained (see C.8.9) 2759 C.8.21 Authentication and other Security Service 2761 - Section was removed. Now in [AuthMeth] 2763 C.8.22 Continuation References in the Search Result 2765 - Added "If the originating search scope was singleLevel, the scope 2766 part of the URL will be baseObject." 2768 C.8.23 Security Considerations 2770 - Removed reference to LDAPv2 2772 C.8.24 Result Codes 2774 - Added as normative appendix A 2776 C.8.25 ASN.1 2778 - Added EXTENSIBILITY IMPLIED 2780 - Added a number of comments holding referenced to [Models] and 2781 [ISO10646]. 2783 Lightweight Directory Access Protocol Version 3 2785 - Removed AttributeType. It is not used. 2787 C.9 Changes made to draft-ietf-ldapbis-protocol-07.txt: 2789 - Removed all mention of transfer encodings and the binary attribute 2790 option 2792 - Further alignment with [Models]. 2794 - Added extensibility ellipsis to protocol op choice 2796 - In 4.1.1, clarified when connections may be dropped due to 2797 malformed PDUs 2799 - Specified which matching rules and syntaxes are used for various 2800 filter items 2802 C.10 Changes made to draft-ietf-ldapbis-protocol-08.txt: 2804 C.10.1 Section 4.1.1.1: 2806 - Clarified when it is and isn't appropriate to return an already 2807 used result code. 2809 C.10.2 Section 4.1.11: 2811 - Clarified that a control only applies to the message it's attached 2812 to. 2814 - Explained that the criticality field is only applicable to certain 2815 request messages. 2817 - Added language regarding the combination of controls. 2819 C.10.3 Section 4.11: 2821 - Explained that Abandon and Unbind cannot be abandoned, and 2822 illustrated how to determine whether an operation has been 2823 abandoned. 2825 C.11 Changes made to draft-ietf-ldapbis-protocol-09.txt: 2827 - Fixed formatting 2829 Appendix D - Outstanding Work Items 2831 D.0 Integrate notational consistency agreements 2832 - WG will discuss notation consistency. Once agreement happens, 2833 reconcile draft. 2835 D.1 Integrate result codes draft. 2837 Lightweight Directory Access Protocol Version 3 2839 - The result codes draft should be reconciled with this draft. 2840 Operation-specific instructions will reside with operations while 2841 the error-specific sections will be added as an appendix. Note 2842 that there is a result codes appendix now. Still need to reconcile 2843 with each operation. 2845 D.2 Verify references. 2847 - Many referenced documents have changed. Ensure references and 2848 section numbers are correct. 2850 D.3 Usage of Naming Context 2852 - Make sure occurrences of "namingcontext" and "naming context" are 2853 consistent with [Models]. 2855 D.14 Section 4.1.12 2857 - Specify whether or not servers are to advertise the OIDs of known 2858 response controls. 2860 D.18 Section 4.2.3 2862 - Change "operationsError" to "other" as a bind result code. 2864 D.21 Section 4.5.1 2866 - Make sure the use of "subordinates" in the derefInSearching 2867 definition is correct. See "derefInSearching" on list. 2869 D.23 Section 4.5.3 2871 - Add "Similarly, a server MUST NOT return a SearchResultReference 2872 when the scope of the search is baseObject. If a client receives 2873 such a SearchResultReference it MUST interpret is as a protocol 2874 error and MUST NOT follow it." to the first paragraph. 2876 - Add "If the scope part of the LDAP URL is present, the client MUST 2877 use the new scope in its next request to progress the search. If 2878 the scope part is absent the client MUST use subtree scope to 2879 complete subtree searches and base scope to complete one level 2880 searches." to the third paragraph. 2882 D.25 Section 4.6 2884 - Resolve the meaning of "and is ignored if the attribute does not 2885 exist". See "modify: "non-existent attribute"" on the list. 2887 D.27 Section 4.10 2888 Lightweight Directory Access Protocol Version 3 2890 - Specify what happens when the attr is missing vs. attr isn't in 2891 schema. Also what happens if there's no equality matching rule. 2893 D.30 Section 5.1 2895 - Add "control and extended operation values" to last paragraph. See 2896 "LBER (BER Restrictions)" on list. 2898 D.32 Section 6.1 2900 - Add "that are used by those attributes" to the first paragraph. 2901 - Add "Servers which support update operations MUST, and other 2902 servers SHOULD, support strong authentication mechanisms described 2903 in [RFC2829]." as a second paragraph. 2904 - Add "Servers which provide access to sensitive information MUST, 2905 and other servers SHOULD support privacy protections such as those 2906 described in [RFC2829] and [RFC2830]." as a third paragraph. 2908 D.33 Section 7 2910 - Add "Servers which support update operations MUST, and other 2911 servers SHOULD, support strong authentication mechanisms described 2912 in [RFC2829]." as a fourth paragraph. 2913 - Add "In order to automatically follow referrals, clients may need 2914 to hold authentication secrets. This poses significant privacy and 2915 security concerns and SHOULD be avoided." as a sixth paragraph. 2916 - Add "This document provides a mechanism which clients may use to 2917 discover operational attributes. Those relying on security by 2918 obscurity should implement appropriate access controls to 2919 restricts access to operational attributes per local policy." as 2920 an eighth paragraph. 2921 - Add "This document provides a mechanism which clients may use to 2922 discover operational attributes. Those relying on security by 2923 obscurity should implement appropriate access controls to 2924 restricts access to operational attributes per local policy." as 2925 an eighth paragraph. 2926 - Add notes regarding DoS attack found by CERT advisories. 2928 Lightweight Directory Access Protocol Version 3 2930 Full Copyright Statement 2932 Copyright (C) The Internet Society (2002). All Rights Reserved. 2934 This document and translations of it may be copied and furnished to 2935 others, and derivative works that comment on or otherwise explain it 2936 or assist in its implementation may be prepared, copied, published 2937 and distributed, in whole or in part, without restriction of any 2938 kind, provided that the above copyright notice and this paragraph are 2939 included on all such copies and derivative works. However, this 2940 document itself may not be modified in any way, such as by removing 2941 the copyright notice or references to the Internet Society or other 2942 Internet organizations, except as needed for the purpose of 2943 developing Internet standards in which case the procedures for 2944 copyrights defined in the Internet Standards process must be 2945 followed, or as required to translate it into languages other than 2946 English. 2948 The limited permissions granted above are perpetual and will not be 2949 revoked by the Internet Society or its successors or assigns. 2951 This document and the information contained herein is provided on an 2952 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 2953 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 2954 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 2955 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 2956 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.