idnits 2.17.1 draft-ietf-ldapbis-protocol-05.txt: ** The Abstract section seems to be numbered Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == There is 1 instance of lines with non-ascii characters in the document. == The page length should not exceed 58 lines per page, but there was 39 longer pages, the longest (page 2) being 59 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 54 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. (A line matching the expected section header was found, but with an unexpected indentation: ' scope ENUMERATED {' ) ** 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 abstract seems to contain references ([RFC1777], [RFC2119]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. ** The document seems to lack a both a reference to RFC 2119 and 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? RFC 2119 keyword, line 191: '...e distinguished name (RDN), which MUST...' RFC 2119 keyword, line 205: '...ing or shadowing MUST ensure that they...' RFC 2119 keyword, line 241: '... Each entry MUST have an objectClass...' RFC 2119 keyword, line 260: '... Servers MUST NOT permit clients to ...' RFC 2119 keyword, line 268: '... Entries MAY contain, among others, ...' (175 more instances...) == 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 exact meaning of the all-uppercase expression 'MAY NOT' is not defined in RFC 2119. If it is intended as a requirements expression, it should be rewritten using one of the combinations defined in RFC 2119; otherwise it should not be all-uppercase. == The expression 'MAY NOT', while looking like RFC 2119 requirements text, is not defined in RFC 2119, and should not be used. Consider using 'MUST NOT' instead (if that is what you mean). Found 'MAY NOT' in this paragraph: - Change "MUST ignore elements of SEQUENCE encodings whose tags they do not recognize" to "MUST ignore tagged elements of SEQUENCE encodings that they do not recognize" in the first paragraph. - Change "version 2 may not provide this attribute." to "version 2 MAY NOT provide this attribute, or a root DSE." in the third paragraph. -- 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 (October 2001) is 8228 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) -- Missing reference section? 'RFC2026' on line 13 looks like a reference -- Missing reference section? 'RFC2119' on line 2082 looks like a reference -- Missing reference section? 'RFC1777' on line 2071 looks like a reference -- Missing reference section? 'RFC2252' on line 2784 looks like a reference -- Missing reference section? '0' on line 2388 looks like a reference -- Missing reference section? 'ISO10646' on line 2053 looks like a reference -- Missing reference section? 'RFC2044' on line 2079 looks like a reference -- Missing reference section? 'RFC2234' on line 2088 looks like a reference -- Missing reference section? 'RFC2253' on line 2095 looks like a reference -- Missing reference section? '5' on line 2782 looks like a reference -- Missing reference section? '3' on line 2324 looks like a reference -- Missing reference section? 'RFC2255' on line 2099 looks like a reference -- Missing reference section? 'RFC2396' on line 2102 looks like a reference -- Missing reference section? 'APPLICATION 0' on line 2260 looks like a reference -- Missing reference section? 'RFC2222' on line 2085 looks like a reference -- Missing reference section? 'APPLICATION 1' on line 2274 looks like a reference -- Missing reference section? '7' on line 2308 looks like a reference -- Missing reference section? 'APPLICATION 2' on line 2278 looks like a reference -- Missing reference section? 'APPLICATION 3' on line 2280 looks like a reference -- Missing reference section? '1' on line 2389 looks like a reference -- Missing reference section? '2' on line 2323 looks like a reference -- Missing reference section? '4' on line 2325 looks like a reference -- Missing reference section? '6' on line 2307 looks like a reference -- Missing reference section? '8' on line 2309 looks like a reference -- Missing reference section? '9' on line 2310 looks like a reference -- Missing reference section? 'APPLICATION 4' on line 2327 looks like a reference -- Missing reference section? 'APPLICATION 19' on line 2335 looks like a reference -- Missing reference section? 'APPLICATION 5' on line 2337 looks like a reference -- Missing reference section? 'APPLICATION 6' on line 2339 looks like a reference -- Missing reference section? 'APPLICATION 7' on line 2355 looks like a reference -- Missing reference section? 'APPLICATION 8' on line 2357 looks like a reference -- Missing reference section? 'APPLICATION 9' on line 2365 looks like a reference -- Missing reference section? 'APPLICATION 10' on line 2367 looks like a reference -- Missing reference section? 'APPLICATION 11' on line 2369 looks like a reference -- Missing reference section? 'APPLICATION 12' on line 2371 looks like a reference -- Missing reference section? 'APPLICATION 13' on line 2377 looks like a reference -- Missing reference section? 'APPLICATION 14' on line 2379 looks like a reference -- Missing reference section? 'APPLICATION 15' on line 2383 looks like a reference -- Missing reference section? 'APPLICATION 16' on line 2385 looks like a reference -- Missing reference section? 'APPLICATION 23' on line 2387 looks like a reference -- Missing reference section? 'APPLICATION 24' on line 2391 looks like a reference -- Missing reference section? '10' on line 2393 looks like a reference -- Missing reference section? '11' on line 2394 looks like a reference -- Missing reference section? 'RFC1823' on line 2076 looks like a reference -- Missing reference section? 'RFC2829' on line 2935 looks like a reference -- Missing reference section? 'RFC2830' on line 2929 looks like a reference -- Missing reference section? 'RFC 1823' on line 2793 looks like a reference Summary: 6 errors (**), 0 flaws (~~), 6 warnings (==), 50 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-05.txt October 2001 5 Obsoletes: RFC 2251 7 Lightweight Directory Access Protocol (v3) 9 1. 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 Table of Contents 35 1. Status of this Memo..............................................1 36 2. Abstract.........................................................2 37 3. Models...........................................................3 38 3.1. Protocol Model.................................................3 39 3.2. Data Model.....................................................4 40 3.2.1. Attributes of Entries........................................4 41 3.2.2. Subschema Entries and Subentries.............................6 42 3.3. Relationship to X.500..........................................7 43 3.4. Server-specific Data Requirements..............................7 44 4. Elements of Protocol.............................................7 45 4.1. Common Elements................................................8 46 4.1.1. Message Envelope.............................................8 47 4.1.1.1. Message ID.................................................9 48 4.1.2. String Types.................................................9 49 4.1.3. Distinguished Name and Relative Distinguished Name..........10 50 4.1.4. Attribute Type..............................................10 51 4.1.5. Attribute Description.......................................11 52 4.1.5.1. Binary Option.............................................12 53 4.1.6. Attribute Value.............................................13 55 Lightweight Directory Access Protocol Version 3 57 4.1.7. Attribute Value Assertion...................................13 58 4.1.8. Attribute...................................................14 59 4.1.9. Matching Rule Identifier....................................14 60 4.1.10. Result Message.............................................14 61 4.1.11. Referral...................................................16 62 4.1.12. Controls...................................................17 63 4.2. Bind Operation................................................18 64 4.2.1. Sequencing of the Bind Request..............................19 65 4.2.2. Authentication and Other Security Services..................20 66 4.2.3. Bind Response...............................................20 67 4.3. Unbind Operation..............................................21 68 4.4. Unsolicited Notification......................................22 69 4.4.1. Notice of Disconnection.....................................22 70 4.5. Search Operation..............................................23 71 4.5.1. Search Request..............................................23 72 4.5.2. Search Result...............................................27 73 4.5.3. Continuation References in the Search Result................28 74 4.6. Modify Operation..............................................29 75 4.7. Add Operation.................................................31 76 4.8. Delete Operation..............................................32 77 4.9. Modify DN Operation...........................................32 78 4.10. Compare Operation............................................33 79 4.11. Abandon Operation............................................34 80 4.12. Extended Operation...........................................35 81 5. Protocol Element Encodings and Transfer.........................35 82 5.1. Protocol Encoding.............................................35 83 5.2. Transfer Protocols............................................36 84 5.2.1. Transmission Control Protocol (TCP).........................36 85 6. Implementation Guidelines.......................................36 86 6.1. Server Implementations........................................36 87 6.2. Client Implementations........................................36 88 7. Security Considerations.........................................36 89 8. Acknowledgements................................................37 90 9. Bibliography....................................................37 91 10. Editor's Address...............................................38 92 Appendix A - Complete ASN.1 Definition.............................39 93 Appendix B - Change History........................................44 94 B.1 Changes made to RFC 2251:......................................44 95 B.2 Changes made to draft-ietf-ldapbis-protocol-00.txt:............44 96 B.3 Changes made to draft-ietf-ldapbis-protocol-01.txt:............45 97 B.4 Changes made to draft-ietf-ldapbis-protocol-02.txt:............45 98 B.5 Changes made to draft-ietf-ldapbis-protocol-03.txt:............47 99 Appendix C - Outstanding Work Items................................49 101 2. Abstract 103 The protocol described in this document is designed to provide access 104 to directories supporting the [X.500] models, while not incurring the 105 resource requirements of the X.500 Directory Access Protocol (DAP). 106 This protocol is specifically targeted at management applications and 107 browser applications that provide read/write interactive access to 108 directories. When used with a directory supporting the X.500 109 protocols, it is intended to be a complement to the X.500 DAP. 111 Lightweight Directory Access Protocol Version 3 113 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 114 "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in this document are 115 to be interpreted as described in [RFC2119]. 117 Key aspects of this version of LDAP are: 119 - All protocol elements of LDAPv2 [RFC1777] are supported. The 120 protocol is carried directly over TCP or other transport, 121 bypassing much of the session/presentation overhead of X.500 DAP. 123 - Most protocol data elements can be encoded as ordinary strings 124 (e.g., Distinguished Names). 126 - Referrals to other servers may be returned. 128 - SASL mechanisms may be used with LDAP to provide association 129 security services. 131 - Attribute values and Distinguished Names have been 132 internationalized through the use of the ISO 10646 character set. 134 - The protocol can be extended to support new operations, and 135 controls may be used to extend existing operations. 137 - Schema is published in the directory to be used by clients. 139 3. Models 141 Interest in X.500 directory technologies in the Internet has led to 142 efforts to reduce the high cost of entry associated with use of these 143 technologies. This document continues the efforts to define directory 144 protocol alternatives, updating the LDAPv2 protocol specification. 146 3.1. Protocol Model 148 The general model adopted by this protocol is one of clients 149 performing protocol operations against servers. In this model, a 150 client transmits a protocol request describing the operation to be 151 performed to a server. The server is then responsible for performing 152 the necessary operation(s) in the directory. Upon completion of the 153 operation(s), the server returns a response containing any results or 154 errors to the requesting client. 156 In keeping with the goal of easing the costs associated with use of 157 the directory, it is an objective of this protocol to minimize the 158 complexity of clients so as to facilitate widespread deployment of 159 applications capable of using the directory. 161 Note that although servers are required to return responses whenever 162 such responses are defined in the protocol, there is no requirement 163 for synchronous behavior on the part of either clients or servers. 164 Requests and responses for multiple operations may be exchanged 165 between a client and server in any order, provided the client 166 eventually receives a response for every request that requires one. 168 Lightweight Directory Access Protocol Version 3 170 In LDAP versions 1 and 2, no provision was made for protocol servers 171 returning referrals to clients. However, for improved performance and 172 distribution, this version of the protocol permits servers to return 173 to clients, referrals to other servers. This allows servers to 174 offload the work of contacting other servers to progress operations. 176 Note that the core protocol operations defined in this document can 177 be mapped to a strict subset of the X.500(1997) directory abstract 178 service, so it can be cleanly provided by the DAP. However there is 179 not a one-to-one mapping between LDAP protocol operations and DAP 180 operations: server implementations acting as a gateway to X.500 181 directories may need to make multiple DAP requests. 183 3.2. Data Model 185 This section provides a brief introduction to the X.500 data model, 186 as used by LDAP. 188 The LDAP protocol assumes there are one or more servers which jointly 189 provide access to a Directory Information Tree (DIT). The tree is 190 made up of entries. Entries have names: one or more attribute values 191 from the entry form its relative distinguished name (RDN), which MUST 192 be unique among all its siblings. The concatenation of the relative 193 distinguished names of the sequence of entries from a particular 194 entry to an immediate subordinate of the root of the tree forms that 195 entry's Distinguished Name (DN), which is unique in the tree. An 196 example of a Distinguished Name is: 198 CN=Steve Kille, O=Isode Limited, C=GB 200 Some servers may hold cache or shadow copies of entries, which can be 201 used to answer search and comparison queries, but will return 202 referrals or contact other servers if modification operations are 203 requested. 205 Servers that perform caching or shadowing MUST ensure that they do 206 not violate any access control constraints placed on the data by the 207 originating server. 209 The largest collection of entries, starting at an entry that is 210 mastered by a particular server, and including all its subordinates 211 and their subordinates, down to the entries which are mastered by 212 different servers, is termed a naming context. The root of the DIT is 213 a DSA-specific Entry (DSE) and not part of any naming context: each 214 server has different attribute values in the root DSE. (DSA is an 215 X.500 term for the directory server). 217 3.2.1. Attributes of Entries 219 Entries consist of a set of attributes. An attribute is a description 220 (a type and zero or more options) with one or more associated values. 221 The attribute type governs whether the attribute can have multiple 222 values, the syntax and matching rules used to construct and compare 224 Lightweight Directory Access Protocol Version 3 226 values of that attribute, and other functions. Options indicate modes 227 of transfer and other functions. 229 An example of an attribute is "mail". There may be one or more values 230 of this attribute, they must be IA5 (ASCII) strings, and they are 231 case insensitive (e.g. "foo@bar.com" will match "FOO@BAR.COM"). 233 Schema is the collection of attribute type definitions, object class 234 definitions and other information which a server uses to determine 235 how to match a filter or attribute value assertion (in a compare 236 operation) against the attributes of an entry, and whether to permit 237 add and modify operations. The definition of schema for use with LDAP 238 is given in [RFC2252] and [X.501]. Additional schema elements may be 239 defined in other documents. 241 Each entry MUST have an objectClass attribute. The objectClass 242 attribute specifies the object classes of an entry, which along with 243 the system and user schema determine the permitted attributes of an 244 entry. Values of this attribute may be modified by clients, but the 245 objectClass attribute cannot be removed. Servers may restrict the 246 modifications of this attribute to prevent the basic structural class 247 of the entry from being changed (e.g. one cannot change a person into 248 a country). When creating an entry or adding an objectClass value to 249 an entry, all superclasses of the named classes are implicitly added 250 as well if not already present, and the client must supply values for 251 any mandatory attributes of new superclasses. 253 Some attributes, termed operational attributes, are used by servers 254 for administering the directory system itself. They are not returned 255 in search results unless explicitly requested by name. Attributes 256 which are not operational, such as "mail", will have their schema and 257 syntax constraints enforced by servers, but servers will generally 258 not make use of their values. 260 Servers MUST NOT permit clients to add attributes to an entry unless 261 those attributes are permitted by the object class definitions, the 262 schema controlling that entry (specified in the subschema � see 263 below), or are operational attributes known to that server and used 264 for administrative purposes. Note that there is a particular 265 objectClass 'extensibleObject' defined in [RFC2252] which permits all 266 user attributes to be present in an entry. 268 Entries MAY contain, among others, the following operational 269 attributes, defined in [RFC2252]. These attributes are maintained 270 automatically by the server and are not modifiable by clients: 272 - creatorsName: the Distinguished Name of the user who added this 273 entry to the directory. 275 - createTimestamp: the time this entry was added to the directory. 277 - modifiersName: the Distinguished Name of the user who last 278 modified this entry. 280 Lightweight Directory Access Protocol Version 3 282 - modifyTimestamp: the time this entry was last modified. 284 - subschemaSubentry: the Distinguished Name of the subschema entry 285 (or subentry) which controls the schema for this entry. 287 3.2.2. Subschema Entries and Subentries 289 Subschema entries are used for administering information about the 290 directory schema, in particular the object classes and attribute 291 types supported by directory servers. A single subschema entry 292 contains all schema definitions used by entries in a particular part 293 of the directory tree. 295 Servers which follow X.500(93) models SHOULD implement subschema 296 using the X.500 subschema mechanisms, and so these subschemas are not 297 ordinary entries. LDAP clients SHOULD NOT assume that servers 298 implement any of the other aspects of X.500 subschema. A server which 299 masters entries and permits clients to modify these entries MUST 300 implement and provide access to these subschema entries, so that its 301 clients may discover the attributes and object classes which are 302 permitted to be present. It is strongly recommended that all other 303 servers implement this as well. 305 The following four attributes MUST be present in all subschema 306 entries: 308 - cn: this attribute MUST be used to form the RDN of the subschema 309 entry. 311 - objectClass: the attribute MUST have at least the values "top" and 312 "subschema". 314 - objectClasses: each value of this attribute specifies an object 315 class known to the server. 317 - attributeTypes: each value of this attribute specifies an 318 attribute type known to the server. 320 These are defined in [RFC2252]. Other attributes MAY be present in 321 subschema entries, to reflect additional supported capabilities. 323 These include matchingRules, matchingRuleUse, dITStructureRules, 324 dITContentRules, nameForms and ldapSyntaxes. 326 Servers SHOULD provide the attributes createTimestamp and 327 modifyTimestamp in subschema entries, in order to allow clients to 328 maintain their caches of schema information. 330 Clients MUST only retrieve attributes from a subschema entry by 331 requesting a base object search of the entry, where the search filter 332 is "(objectClass=subschema)". This will allow LDAPv3 servers which 333 gateway to X.500(93) to detect that subentry information is being 334 requested. 336 Lightweight Directory Access Protocol Version 3 338 3.3. Relationship to X.500 340 This document defines LDAP in terms of X.500 as an X.500 access 341 mechanism. An LDAP server MUST act in accordance with the X.500(1993) 342 series of ITU recommendations when providing the service. However, it 343 is not required that an LDAP server make use of any X.500 protocols 344 in providing this service, e.g. LDAP can be mapped onto any other 345 directory system so long as the X.500 data and service model as used 346 in LDAP is not violated in the LDAP interface. 348 3.4. Server-specific Data Requirements 350 An LDAP server MUST provide information about itself and other 351 information that is specific to each server. This is represented as a 352 group of attributes located in the root DSE (DSA-Specific Entry), 353 which is named with the zero-length LDAPDN. These attributes are 354 retrievable if a client performs a base object search of the root 355 with filter "(objectClass=*)", however they are subject to access 356 control restrictions. The root DSE MUST NOT be included if the client 357 performs a subtree search starting from the root. 359 Servers may allow clients to modify these attributes. 361 The following attributes of the root DSE are defined in section 5 of 362 [RFC2252]. Additional attributes may be defined in other documents. 364 - namingContexts: naming contexts held in the server. Naming 365 contexts are defined in section 17 of [X.501]. 367 - subschemaSubentry: subschema entry (or subentry) holding the 368 schema for the root DSE. 370 - altServer: alternative servers in case this one is later 371 unavailable. 373 - supportedExtension: list of supported extended operations. 375 - supportedControl: list of supported controls. 377 - supportedSASLMechanisms: list of supported SASL security features. 379 - supportedLDAPVersion: LDAP versions implemented by the server. 381 If the server does not master entries and does not know the locations 382 of schema information, the subschemaSubentry attribute is not present 383 in the root DSE. If the server masters directory entries under one or 384 more schema rules, the schema for each entry is found by reading the 385 subschemaSubentry attribute for that entry. 387 4. Elements of Protocol 389 The LDAP protocol is described using Abstract Syntax Notation 1 390 (ASN.1) [X.680], and is transferred using a subset of ASN.1 Basic 391 Encoding Rules [X.690]. In order to support future extensions to this 393 Lightweight Directory Access Protocol Version 3 395 protocol, clients and servers MUST ignore elements of SEQUENCE 396 encodings whose tags they do not recognize. Section 5.1 specifies how 397 the protocol is encoded and transferred. 399 Note that unlike X.500, each change to the LDAP protocol other than 400 through the extension mechanisms will have a different version 401 number. A client will indicate the version it supports as part of the 402 bind request, described in section 4.2. If a client has not sent a 403 bind, the server MUST assume that version 3 or later is supported in 404 the client (since version 2 required that the client bind first). 406 Clients may determine the protocol versions a server supports by 407 reading the supportedLDAPVersion attribute from the root DSE. Servers 408 which implement version 3 or later versions MUST provide this 409 attribute. Servers which only implement version 2 may not provide 410 this attribute. 412 4.1. Common Elements 414 This section describes the LDAPMessage envelope PDU (Protocol Data 415 Unit) format, as well as data type definitions, which are used in the 416 protocol operations. 418 4.1.1. Message Envelope 420 For the purposes of protocol exchanges, all protocol operations are 421 encapsulated in a common envelope, the LDAPMessage, which is defined 422 as follows: 424 LDAPMessage ::= SEQUENCE { 425 messageID MessageID, 426 protocolOp CHOICE { 427 bindRequest BindRequest, 428 bindResponse BindResponse, 429 unbindRequest UnbindRequest, 430 searchRequest SearchRequest, 431 searchResEntry SearchResultEntry, 432 searchResDone SearchResultDone, 433 searchResRef SearchResultReference, 434 modifyRequest ModifyRequest, 435 modifyResponse ModifyResponse, 436 addRequest AddRequest, 437 addResponse AddResponse, 438 delRequest DelRequest, 439 delResponse DelResponse, 440 modDNRequest ModifyDNRequest, 441 modDNResponse ModifyDNResponse, 442 compareRequest CompareRequest, 443 compareResponse CompareResponse, 444 abandonRequest AbandonRequest, 445 extendedReq ExtendedRequest, 446 extendedResp ExtendedResponse }, 447 controls [0] Controls OPTIONAL } 449 Lightweight Directory Access Protocol Version 3 451 MessageID ::= INTEGER (0 .. maxInt) 453 maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- 455 The function of the LDAPMessage is to provide an envelope containing 456 common fields required in all protocol exchanges. At this time the 457 only common fields are the message ID and the controls. 459 If the server receives a PDU from the client in which the LDAPMessage 460 SEQUENCE tag cannot be recognized, the messageID cannot be parsed, 461 the tag of the protocolOp is not recognized as a request, or the 462 encoding structures or lengths of data fields are found to be 463 incorrect, then the server MUST return the notice of disconnection 464 described in section 4.4.1, with resultCode protocolError, and 465 immediately close the connection. In other cases that the server 466 cannot parse the request received by the client, the server MUST 467 return an appropriate response to the request, with the resultCode 468 set to protocolError. 470 If the client receives a PDU from the server, which cannot be parsed, 471 the client may discard the PDU, or may abruptly close the connection. 473 The ASN.1 type Controls is defined in section 4.1.12. 475 4.1.1.1. Message ID 477 All LDAPMessage envelopes encapsulating responses contain the 478 messageID value of the corresponding request LDAPMessage. 480 The message ID of a request MUST have a value different from the 481 values of any other requests outstanding in the LDAP session of which 482 this message is a part. 484 A client MUST NOT send a second request with the same message ID as 485 an earlier request on the same connection if the client has not 486 received the final response from the earlier request. Otherwise the 487 behavior is undefined. Typical clients increment a counter for each 488 request. 490 A client MUST NOT reuse the message id of an abandonRequest or of the 491 abandoned operation until it has received a response from the server 492 for another request invoked subsequent to the abandonRequest, as the 493 abandonRequest itself does not have a response. 495 4.1.2. String Types 497 The LDAPString is a notational convenience to indicate that, although 498 strings of LDAPString type encode as OCTET STRING types, the 499 [ISO10646] character set (a superset of Unicode) is used, encoded 500 following the UTF-8 algorithm [RFC2044]. Note that in the UTF-8 501 algorithm characters which are the same as ASCII (0x0000 through 502 0x007F) are represented as that same ASCII character in a single 503 byte. The other byte values are used to form a variable-length 504 encoding of an arbitrary character. 506 Lightweight Directory Access Protocol Version 3 508 LDAPString ::= OCTET STRING 510 The LDAPOID is a notational convenience to indicate that the 511 permitted value of this string is a (UTF-8 encoded) dotted-decimal 512 representation of an OBJECT IDENTIFIER. 514 LDAPOID ::= OCTET STRING 516 A value of LDAPOID is defined by the following ABNF [RFC2234]: 518 ldapOID = number *( DOT number ) 520 number = ( LDIGIT *DIGIT ) / DIGIT 522 DOT = %x2E ; "." 524 LDIGIT = %x31-39 ; 1-9 526 DIGIT = %x30 / LDIGIT ; 0-9 528 For example, 530 1.3.6.1.4.1.1466.1.2.3 532 4.1.3. Distinguished Name and Relative Distinguished Name 534 An LDAPDN and a RelativeLDAPDN are respectively defined to be the 535 representation of a Distinguished Name and a Relative Distinguished 536 Name after encoding according to the specification in [RFC2253], such 537 that: 539 distinguished-name = name 541 relative-distinguished-name = name-component 543 where name and name-component are as defined in [RFC2253]. 545 LDAPDN ::= LDAPString 547 RelativeLDAPDN ::= LDAPString 549 Only Attribute Types can be present in a relative distinguished name 550 component--the options of Attribute Descriptions (next section) MUST 551 NOT be used in specifying distinguished names. 553 4.1.4. Attribute Type 555 An AttributeType takes on as its value the textual string associated 556 with that AttributeType in its specification. 558 AttributeType ::= LDAPString 560 Lightweight Directory Access Protocol Version 3 562 Each attribute type has a unique OBJECT IDENTIFIER which has been 563 assigned to it. This identifier may be written as defined by ldapOID 564 in section 4.1.2. 566 A specification may also assign one or more textual names for an 567 attribute type. These names MUST begin with a letter, and only 568 contain ASCII letters, digit characters and hyphens. They are case 569 insensitive. These ASCII characters are identical to ISO 10646 570 characters whose UTF-8 encoding is a single byte between 0x00 and 571 0x7F. 573 If the server has a textual name for an attribute type, it MUST use a 574 textual name for attributes returned in search results. The dotted- 575 decimal OBJECT IDENTIFIER is only used if there is no textual name 576 for an attribute type. 578 Attribute type textual names are non-unique, as two different 579 specifications (neither in standards track RFCs) may choose the same 580 name. 582 A server which masters or shadows entries SHOULD list all the 583 attribute types it supports in the subschema entries, using the 584 attributeTypes attribute. Servers which support an open-ended set of 585 attributes SHOULD include at least the attributeTypes value for the 586 'objectClass' attribute. Clients MAY retrieve the attributeTypes 587 value from subschema entries in order to obtain the OBJECT IDENTIFIER 588 and other information associated with attribute types. 590 Some attribute type names which are used in this version of LDAP are 591 described in [RFC2252]. Servers may implement additional attribute 592 types. 594 4.1.5. Attribute Description 596 An AttributeDescription is a superset of the definition of the 597 AttributeType. It has the same ASN.1 definition, but allows 598 additional options to be specified. They are also case insensitive. 600 AttributeDescription ::= LDAPString 602 A value of AttributeDescription is based on the following ABNF: 604 attributeDescription = attributeType options 606 attributeType = AttributeType 607 ; as described in Section 4.1.4 609 options = *( SEMICOLON options ) 611 option = 1*opt-char 613 opt-char = ALPHA / DIGIT / HYPHEN 615 SEMICOLON = %x3B ; ";" 617 Lightweight Directory Access Protocol Version 3 619 ALPHA = %x41-5A / %x61-7A ; A-Z / a-z 621 HYPHEN = %x2D ; "-" 623 Examples of valid AttributeDescription: 625 cn 626 userCertificate;binary 628 One option, "binary", is defined in this document. Additional options 629 may be defined in IETF standards-track and experimental RFCs. Options 630 beginning with "x-" are reserved for private experiments. Though any 631 option or set of options could be associated with any AttributeType, 632 the server support for certain combinations may be restricted by 633 attribute type, syntaxes, or other factors. 635 An AttributeDescription with one or more options is treated as a 636 subtype of the attribute type without any options. Options MAY be 637 mutually exclusive. An AttributeDescription with mutually exclusive 638 options is treated as an undefined attribute type. Implementations 639 MUST generate the list sorted in ascending order, and 640 servers MUST treat any two AttributeDescription with the same 641 AttributeType and options as equivalent. A server will treat an 642 AttributeDescription with any options it does not implement as an 643 unrecognized attribute type. 645 The data type "AttributeDescriptionList" describes a list of 0 or 646 more attribute types. (A list of zero elements has special 647 significance in the Search request.) 649 AttributeDescriptionList ::= SEQUENCE OF 650 AttributeDescription 652 4.1.5.1. Binary Option 654 If the "binary" option is present in an AttributeDescription, it 655 overrides any string-based encoding representation defined for that 656 attribute in [RFC2252]. Instead the attribute is to be transferred as 657 a binary value encoded using the Basic Encoding Rules [X.690]. The 658 syntax of the binary value is an ASN.1 data type definition which is 659 referenced by the "SYNTAX" part of the attribute type definition. 661 The presence or absence of the "binary" option only affects the 662 transfer of attribute values in protocol; servers store any 663 particular attribute in a single format. If a client requests that a 664 server return an attribute in the binary format, but the server 665 cannot generate that format, the server MUST treat this attribute 666 type as an unrecognized attribute type. Similarly, clients MUST NOT 667 expect servers to return an attribute in binary format if the client 668 requested that attribute by name without the "binary" option. 670 This option is intended to be used with attributes whose syntax is a 671 complex ASN.1 data type, and the structure of values of that type is 673 Lightweight Directory Access Protocol Version 3 675 needed by clients. Examples of this kind of syntax are "Certificate" 676 and "CertificateList". 678 4.1.6. Attribute Value 680 A field of type AttributeValue is an OCTET STRING containing an 681 encoded value of an AttributeValue data type. The value is string 682 encoded unless an option specifying the transfer encoding is present 683 in the companion AttributeDescription to this AttributeValue (e.g. 684 "binary"). Multiple options specifying transfer encoding MUST NOT be 685 present. 687 The definition of string encodings for different syntaxes and types 688 may be found in other documents, and in particular [RFC2252]. 690 At the time of this writing, there is only one AttributeDescription 691 option used to specify transfer encoding--"binary", described in 692 section 4.1.5.1. 694 AttributeValue ::= OCTET STRING 696 Note that there is no defined limit on the size of this encoding; 697 thus protocol values may include multi-megabyte attributes (e.g. 698 photographs). 700 Attributes may be defined which have arbitrary and non-printable 701 syntax. Implementations MUST NEITHER simply display nor attempt to 702 decode as ASN.1 a value if its syntax is not known. The 703 implementation may attempt to discover the subschema of the source 704 entry, and retrieve the values of attributeTypes from it. 706 Clients MUST NOT send attribute values in a request which are not 707 valid according to the syntax defined for the attributes. 709 4.1.7. Attribute Value Assertion 711 The AttributeValueAssertion type definition is similar to the one in 712 the X.500 directory standards. It contains an attribute description 713 and a matching rule assertion value suitable for that type. 715 AttributeValueAssertion ::= SEQUENCE { 716 attributeDesc AttributeDescription, 717 assertionValue AssertionValue } 719 AssertionValue ::= OCTET STRING 721 If an option specifying the transfer encoding is present in 722 attributeDesc, the assertionValue is encoded as specified by the 723 option. For example, if the "binary" option is present in the 724 attributeDesc, the AssertionValue is BER encoded. 726 For all the string-valued user attributes described in [5], the 727 assertion value syntax is the same as the value syntax. Clients may 729 Lightweight Directory Access Protocol Version 3 731 use attribute values as assertion values in compare requests and 732 search filters. 734 Note however that the assertion syntax may be different from the 735 value syntax for other attributes or for non-equality matching rules. 736 These may have an assertion syntax which contains only part of the 737 value. See section 20.2.1.8 of [X.501] for examples. 739 4.1.8. Attribute 741 An attribute consists of a type and one or more values of that type. 742 (Though attributes MUST have at least one value when stored, due to 743 access control restrictions the set may be empty when transferred 744 from the server to the client. This is described in section 4.5.2, 745 concerning the PartialAttributeList type.) 747 Attribute ::= SEQUENCE { 748 type AttributeDescription, 749 vals SET OF AttributeValue } 751 Each attribute value is distinct in the set (no duplicates). The 752 order of attribute values within the vals set is undefined and 753 implementation-dependent, and MUST NOT be relied upon. 755 4.1.9. Matching Rule Identifier 757 A matching rule is a means of expressing how a server should compare 758 an AssertionValue received in a search filter with an abstract data 759 value. The matching rule defines the syntax of the assertion value 760 and the process to be performed in the server. 762 An X.501 (1993) Matching Rule is identified in the LDAP protocol by 763 the printable representation of its OBJECT IDENTIFIER, either as one 764 of the strings given in [RFC2252], or as decimal digits with 765 components separated by periods, e.g. "caseIgnoreIA5Match" or 766 "1.3.6.1.4.1.453.33.33". 768 MatchingRuleId ::= LDAPString 770 Servers which support matching rules for use in the extensibleMatch 771 search filter MUST list the matching rules they implement in 772 subschema entries, using the matchingRules attributes. The server 773 SHOULD also list there, using the matchingRuleUse attribute, the 774 attribute types with which each matching rule can be used. More 775 information is given in section 4.5 of [RFC2252]. 777 4.1.10. Result Message 779 The LDAPResult is the construct used in this protocol to return 780 success or failure indications from servers to clients. To various 781 requests, servers will return responses of LDAPResult or responses 782 containing the components of LDAPResponse to indicate the final 783 status of a protocol operation request. 785 Lightweight Directory Access Protocol Version 3 787 LDAPResult ::= SEQUENCE { 788 resultCode ENUMERATED { 789 success (0), 790 operationsError (1), 791 protocolError (2), 792 timeLimitExceeded (3), 793 sizeLimitExceeded (4), 794 compareFalse (5), 795 compareTrue (6), 796 authMethodNotSupported (7), 797 strongAuthRequired (8), 798 -- 9 reserved -- 799 referral (10), 800 adminLimitExceeded (11), 801 unavailableCriticalExtension (12), 802 confidentialityRequired (13), 803 saslBindInProgress (14), 804 noSuchAttribute (16), 805 undefinedAttributeType (17), 806 inappropriateMatching (18), 807 constraintViolation (19), 808 attributeOrValueExists (20), 809 invalidAttributeSyntax (21), 810 -- 22-31 unused -- 811 noSuchObject (32), 812 aliasProblem (33), 813 invalidDNSyntax (34), 814 -- 35 reserved for undefined isLeaf -- 815 aliasDereferencingProblem (36), 816 -- 37-47 unused -- 817 inappropriateAuthentication (48), 818 invalidCredentials (49), 819 insufficientAccessRights (50), 820 busy (51), 821 unavailable (52), 822 unwillingToPerform (53), 823 loopDetect (54), 824 -- 55-63 unused -- 825 namingViolation (64), 826 objectClassViolation (65), 827 notAllowedOnNonLeaf (66), 828 notAllowedOnRDN (67), 829 entryAlreadyExists (68), 830 objectClassModsProhibited (69), 831 -- 70 reserved for CLDAP -- 832 affectsMultipleDSAs (71), 833 -- 72-79 unused -- 834 other (80) }, 835 -- 81-90 reserved for APIs -- 836 matchedDN LDAPDN, 837 errorMessage LDAPString, 838 referral [3] Referral OPTIONAL } 840 Lightweight Directory Access Protocol Version 3 842 All the result codes with the exception of success, compareFalse and 843 compareTrue are to be treated as meaning the operation could not be 844 completed in its entirety. 846 Most of the result codes are based on problem indications from X.511 847 error data types. Result codes from 16 to 21 indicate an 848 AttributeProblem, codes 32, 33, 34 and 36 indicate a NameProblem, 849 codes 48, 49 and 50 indicate a SecurityProblem, codes 51 to 54 850 indicate a ServiceProblem, and codes 64 to 69 and 71 indicates an 851 UpdateProblem. 853 If a client receives a result code which is not listed above, it is 854 to be treated as an unknown error condition. 856 The errorMessage field of this construct may, at the server's option, 857 be used to return a string containing a textual, human-readable 858 (terminal control and page formatting characters should be avoided) 859 error diagnostic. As this error diagnostic is not standardized, 860 implementations MUST NOT rely on the values returned. If the server 861 chooses not to return a textual diagnostic, the errorMessage field of 862 the LDAPResult type MUST contain a zero length string. 864 For result codes of noSuchObject, aliasProblem, invalidDNSyntax and 865 aliasDereferencingProblem, the matchedDN field is set to the name of 866 the lowest entry (object or alias) in the directory that was matched. 867 If no aliases were dereferenced while attempting to locate the entry, 868 this will be a truncated form of the name provided, or if aliases 869 were dereferenced, of the resulting name, as defined in section 12.5 870 of [X.511]. The matchedDN field is to be set to a zero length string 871 with all other result codes. 873 4.1.11. Referral 875 The referral result code indicates that the contacted server does not 876 hold the target entry of the request. The referral field is present 877 in an LDAPResult if the LDAPResult.resultCode field value is 878 referral, and absent with all other result codes. It contains one or 879 more references to one or more servers or services that may be 880 accessed via LDAP or other protocols. Referrals can be returned in 881 response to any operation request (except unbind and abandon which do 882 not have responses). At least one URL MUST be present in the 883 Referral. 885 The referral is not returned for a singleLevel or wholeSubtree search 886 in which the search scope spans multiple naming contexts, and several 887 different servers would need to be contacted to complete the 888 operation. Instead, continuation references, described in section 889 4.5.3, are returned. 891 Referral ::= SEQUENCE OF LDAPURL -- one or more 893 LDAPURL ::= LDAPString -- limited to characters permitted in 894 -- URLs 896 Lightweight Directory Access Protocol Version 3 898 If the client wishes to progress the operation, it MUST follow the 899 referral by contacting one of the servers. If multiple URLs are 900 present, the client assumes that any URL may be used to progress the 901 operation. 903 URLs for servers implementing the LDAP protocol are written according 904 to [RFC2255]. If an alias was dereferenced, the part of the URL 905 MUST be present, with the new target object name. If the part is 906 present, the client MUST use this name in its next request to 907 progress the operation, and if it is not present the client will use 908 the same name as in the original request. Some servers (e.g. 909 participating in distributed indexing) may provide a different filter 910 in a referral for a search operation. If the filter part of the URL 911 is present in an LDAPURL, the client MUST use this filter in its next 912 request to progress this search, and if it is not present the client 913 MUST use the same filter as it used for that search. Other aspects of 914 the new request may be the same or different as the request which 915 generated the referral. 917 Note that UTF-8 characters appearing in a DN or search filter may not 918 be legal for URLs (e.g. spaces) and MUST be escaped using the % 919 method in [RFC2396]. 921 Other kinds of URLs may be returned, so long as the operation could 922 be performed using that protocol. 924 4.1.12. Controls 926 A control is a way to specify extension information. Controls which 927 are sent as part of a request apply only to that request and are not 928 saved. 930 Controls ::= SEQUENCE OF Control 932 Control ::= SEQUENCE { 933 controlType LDAPOID, 934 criticality BOOLEAN DEFAULT FALSE, 935 controlValue OCTET STRING OPTIONAL } 937 The controlType field MUST be a UTF-8 encoded dotted-decimal 938 representation of an OBJECT IDENTIFIER which uniquely identifies the 939 control. This prevents conflicts between control names. 941 The criticality field is either TRUE or FALSE and is only used when a 942 control accompanies one of the following requests: bindRequest, 943 searchRequest, modifyRequest, addRequest, delRequest, modDNRequest, 944 compareRequest, or extendedReq. The use of the criticality field for 945 a control that is part of any other operation is ignored and treated 946 as FALSE. 948 If the server recognizes the control type and it is appropriate for 949 the operation, the server will make use of the control when 950 performing the operation. 952 Lightweight Directory Access Protocol Version 3 954 If the server does not recognize the control type or it is not 955 appropriate for the operation, and the criticality field is TRUE, the 956 server MUST NOT perform the operation, and MUST instead return the 957 resultCode unavailableCriticalExtension. 959 If the control is unrecognized or inappropriate but the criticality 960 field is FALSE, the server MUST ignore the control. 962 The controlValue contains any information associated with the 963 control, and its format is defined for the control. Implementations 964 MUST be prepared to handle arbitrary contents of the controlValue 965 octet string, including zero bytes. It is absent only if there is no 966 value information which is associated with a control of its type. 968 This document does not define any controls. Controls may be defined 969 in other documents. The definition of a control consists of: 971 - the OBJECT IDENTIFIER assigned to the control, 973 - whether the control is always noncritical, always critical, or 974 critical at the client's option, 976 - the format of the controlValue contents of the control. 978 Servers list the controls which they recognize in the 979 supportedControl attribute in the root DSE. 981 4.2. Bind Operation 983 The function of the Bind Operation is to allow authentication 984 information to be exchanged between the client and server. 986 The Bind Request is defined as follows: 988 BindRequest ::= [APPLICATION 0] SEQUENCE { 989 version INTEGER (1 .. 127), 990 name LDAPDN, 991 authentication AuthenticationChoice } 993 AuthenticationChoice ::= CHOICE { 994 simple [0] OCTET STRING, 995 -- 1 and 2 reserved 996 sasl [3] SaslCredentials } 998 SaslCredentials ::= SEQUENCE { 999 mechanism LDAPString, 1000 credentials OCTET STRING OPTIONAL } 1002 Parameters of the Bind Request are: 1004 - version: A version number indicating the version of the protocol 1005 to be used in this protocol session. This document describes 1006 version 3 of the LDAP protocol. Note that there is no version 1007 negotiation, and the client just sets this parameter to the 1009 Lightweight Directory Access Protocol Version 3 1011 version it desires. If the client requests protocol version 2, a 1012 server that supports the version 2 protocol as described in 1013 [RFC1777] will not return any v3-specific protocol fields. (Note 1014 that not all LDAP servers will support protocol version 2, since 1015 they may be unable to generate the attribute syntaxes associated 1016 with version 2.) 1018 - name: The name of the directory object that the client wishes to 1019 bind as. This field may take on a null value (a zero length 1020 string) for the purposes of anonymous binds, when authentication 1021 has been performed at a lower layer, or when using SASL 1022 credentials with a mechanism that includes the name in the 1023 credentials. Server behavior is undefined when the name is a null 1024 value, simple authentication is used, and a password is specified. 1025 Note that the server SHOULD NOT perform any alias dereferencing in 1026 determining the object to bind as. 1028 - authentication: information used to authenticate the name, if any, 1029 provided in the Bind Request. 1031 Upon receipt of a Bind Request, a protocol server will authenticate 1032 the requesting client, if necessary. The server will then return a 1033 Bind Response to the client indicating the status of the 1034 authentication. 1036 Authorization is the use of this authentication information when 1037 performing operations. Authorization MAY be affected by factors 1038 outside of the LDAP Bind request, such as lower layer security 1039 services. 1041 4.2.1. Sequencing of the Bind Request 1043 For some SASL authentication mechanisms, it may be necessary for the 1044 client to invoke the BindRequest multiple times. If at any stage the 1045 client wishes to abort the bind process it MAY unbind and then drop 1046 the underlying connection. Clients MUST NOT invoke operations between 1047 two Bind requests made as part of a multi-stage bind. 1049 A client may abort a SASL bind negotiation by sending a BindRequest 1050 with a different value in the mechanism field of SaslCredentials, or 1051 an AuthenticationChoice other than sasl. 1053 If the client sends a BindRequest with the sasl mechanism field as an 1054 empty string, the server MUST return a BindResponse with 1055 authMethodNotSupported as the resultCode. This will allow clients to 1056 abort a negotiation if it wishes to try again with the same SASL 1057 mechanism. 1059 Unlike LDAP v2, the client need not send a Bind Request in the first 1060 PDU of the connection. The client may request any operations and the 1061 server MUST treat these as anonymous. If the server requires that the 1062 client bind before browsing or modifying the directory, the server 1063 MAY reject a request other than binding, unbinding or an extended 1064 request with the "operationsError" result. 1066 Lightweight Directory Access Protocol Version 3 1068 If the client did not bind before sending a request and receives an 1069 operationsError, it may then send a Bind Request. If this also fails 1070 or the client chooses not to bind on the existing connection, it will 1071 close the connection, reopen it and begin again by first sending a 1072 PDU with a Bind Request. This will aid in interoperating with servers 1073 implementing other versions of LDAP. 1075 Clients MAY send multiple bind requests on a connection to change 1076 their credentials. A subsequent bind process has the effect of 1077 abandoning all operations outstanding on the connection. (This 1078 simplifies server implementation.) Authentication from earlier binds 1079 are subsequently ignored, and so if the bind fails, the connection 1080 will be treated as anonymous. If a SASL transfer encryption or 1081 integrity mechanism has been negotiated, and that mechanism does not 1082 support the changing of credentials from one identity to another, 1083 then the client MUST instead establish a new connection. 1085 4.2.2. Authentication and Other Security Services 1087 The simple authentication option provides minimal authentication 1088 facilities, with the contents of the authentication field consisting 1089 only of a cleartext password. Note that the use of cleartext 1090 passwords is not recommended over open networks when the underlying 1091 transport service cannot guarantee confidentiality; see the "Security 1092 Considerations" section. 1094 If anonymous authentication is to be performed, then the simple 1095 authentication option MUST be chosen, and the password be of zero 1096 length. (This is often done by LDAPv2 clients.) Typically the name is 1097 also of zero length. 1099 The sasl choice allows for any mechanism defined for use with SASL 1100 [RFC2222]. The mechanism field contains the name of the mechanism. 1101 The credentials field contains the arbitrary data used for 1102 authentication, inside an OCTET STRING wrapper. Note that unlike some 1103 Internet application protocols where SASL is used, LDAP is not text- 1104 based, thus no base64 transformations are performed on the 1105 credentials. 1107 If any SASL-based integrity or confidentiality services are enabled, 1108 they take effect following the transmission by the server and 1109 reception by the client of the final BindResponse with resultCode 1110 success. 1112 The client can request that the server use authentication information 1113 from a lower layer protocol by using the SASL EXTERNAL mechanism. 1115 4.2.3. Bind Response 1117 The Bind Response is defined as follows. 1119 BindResponse ::= [APPLICATION 1] SEQUENCE { 1120 COMPONENTS OF LDAPResult, 1122 Lightweight Directory Access Protocol Version 3 1124 serverSaslCreds [7] OCTET STRING OPTIONAL } 1126 BindResponse consists simply of an indication from the server of the 1127 status of the client's request for authentication. 1129 If the bind was successful, the resultCode will be success, otherwise 1130 it will be one of: 1132 - operationsError: server encountered an internal error. 1134 - protocolError: unrecognized version number or incorrect PDU 1135 structure. 1137 - authMethodNotSupported: unrecognized SASL mechanism name. 1139 - strongAuthRequired: the server requires authentication be 1140 performed with a SASL mechanism. 1142 - referral: this server cannot accept this bind and the client 1143 should try another. 1145 - saslBindInProgress: the server requires the client to send a new 1146 bind request, with the same sasl mechanism, to continue the 1147 authentication process. 1149 - inappropriateAuthentication: the server requires the client which 1150 had attempted to bind anonymously or without supplying credentials 1151 to provide some form of credentials. 1153 - invalidCredentials: the wrong password was supplied or the SASL 1154 credentials could not be processed. 1156 - unavailable: the server is shutting down. 1158 If the server does not support the client's requested protocol 1159 version, it MUST set the resultCode to protocolError. 1161 If the client receives a BindResponse response where the resultCode 1162 was protocolError, it MUST close the connection as the server will be 1163 unwilling to accept further operations. (This is for compatibility 1164 with earlier versions of LDAP, in which the bind was always the first 1165 operation, and there was no negotiation.) 1167 The serverSaslCreds are used as part of a SASL-defined bind mechanism 1168 to allow the client to authenticate the server to which it is 1169 communicating, or to perform "challenge-response" authentication. If 1170 the client bound with the password choice, or the SASL mechanism does 1171 not require the server to return information to the client, then this 1172 field is not to be included in the result. 1174 4.3. Unbind Operation 1176 The function of the Unbind Operation is to terminate a protocol 1177 session. The Unbind Operation is defined as follows: 1179 Lightweight Directory Access Protocol Version 3 1181 UnbindRequest ::= [APPLICATION 2] NULL 1183 The Unbind Operation has no response defined. Upon transmission of an 1184 UnbindRequest, a protocol client may assume that the protocol session 1185 is terminated. Upon receipt of an UnbindRequest, a protocol server 1186 may assume that the requesting client has terminated the session and 1187 that all outstanding requests may be discarded, and may close the 1188 connection. 1190 4.4. Unsolicited Notification 1192 An unsolicited notification is an LDAPMessage sent from the server to 1193 the client which is not in response to any LDAPMessage received by 1194 the server. It is used to signal an extraordinary condition in the 1195 server or in the connection between the client and the server. The 1196 notification is of an advisory nature, and the server will not expect 1197 any response to be returned from the client. 1199 The unsolicited notification is structured as an LDAPMessage in which 1200 the messageID is 0 and protocolOp is of the extendedResp form. The 1201 responseName field of the ExtendedResponse is present. The LDAPOID 1202 value MUST be unique for this notification, and not be used in any 1203 other situation. 1205 One unsolicited notification (Notice of Disconnection) is defined in 1206 this document. 1208 4.4.1. Notice of Disconnection 1210 This notification may be used by the server to advise the client that 1211 the server is about to close the connection due to an error 1212 condition. Note that this notification is NOT a response to an unbind 1213 requested by the client: the server MUST follow the procedures of 1214 section 4.3. This notification is intended to assist clients in 1215 distinguishing between an error condition and a transient network 1216 failure. As with a connection close due to network failure, the 1217 client MUST NOT assume that any outstanding requests which modified 1218 the directory have succeeded or failed. 1220 The responseName is 1.3.6.1.4.1.1466.20036, the response field is 1221 absent, and the resultCode is used to indicate the reason for the 1222 disconnection. 1224 The following resultCode values are to be used in this notification: 1226 - protocolError: The server has received data from the client in 1227 which the LDAPMessage structure could not be parsed. 1229 - strongAuthRequired: The server has detected that an established 1230 underlying security association protecting communication between 1231 the client and server has unexpectedly failed or been compromised. 1233 Lightweight Directory Access Protocol Version 3 1235 - unavailable: This server will stop accepting new connections and 1236 operations on all existing connections, and be unavailable for an 1237 extended period of time. The client may make use of an alternative 1238 server. 1240 After sending this notice, the server MUST close the connection. 1241 After receiving this notice, the client MUST NOT transmit any further 1242 on the connection, and may abruptly close the connection. 1244 4.5. Search Operation 1246 The Search Operation allows a client to request that a search be 1247 performed on its behalf by a server. This can be used to read 1248 attributes from a single entry, from entries immediately below a 1249 particular entry, or a whole subtree of entries. 1251 4.5.1. Search Request 1253 The Search Request is defined as follows: 1255 SearchRequest ::= [APPLICATION 3] SEQUENCE { 1256 baseObject LDAPDN, 1257 scope ENUMERATED { 1258 baseObject (0), 1259 singleLevel (1), 1260 wholeSubtree (2) }, 1261 derefAliases ENUMERATED { 1262 neverDerefAliases (0), 1263 derefInSearching (1), 1264 derefFindingBaseObj (2), 1265 derefAlways (3) }, 1266 sizeLimit INTEGER (0 .. maxInt), 1267 timeLimit INTEGER (0 .. maxInt), 1268 typesOnly BOOLEAN, 1269 filter Filter, 1270 attributes AttributeDescriptionList } 1272 Filter ::= CHOICE { 1273 and [0] SET SIZE (1..MAX) OF Filter, 1274 or [1] SET SIZE (1..MAX) OF Filter, 1275 not [2] Filter, 1276 equalityMatch [3] AttributeValueAssertion, 1277 substrings [4] SubstringFilter, 1278 greaterOrEqual [5] AttributeValueAssertion, 1279 lessOrEqual [6] AttributeValueAssertion, 1280 present [7] AttributeDescription, 1281 approxMatch [8] AttributeValueAssertion, 1282 extensibleMatch [9] MatchingRuleAssertion } 1284 SubstringFilter ::= SEQUENCE { 1285 type AttributeDescription, 1286 -- at least one must be present, 1287 -- initial and final can occur at most once 1288 substrings SEQUENCE OF CHOICE { 1290 Lightweight Directory Access Protocol Version 3 1292 initial [0] AssertionValue, 1293 any [1] AssertionValue, 1294 final [2] AssertionValue } } 1296 MatchingRuleAssertion ::= SEQUENCE { 1297 matchingRule [1] MatchingRuleId OPTIONAL, 1298 type [2] AttributeDescription OPTIONAL, 1299 matchValue [3] AssertionValue, 1300 dnAttributes [4] BOOLEAN DEFAULT FALSE } 1302 Parameters of the Search Request are: 1304 - baseObject: An LDAPDN that is the base object entry relative to 1305 which the search is to be performed. 1307 - scope: An indicator of the scope of the search to be performed. 1308 The semantics of the possible values of this field are identical 1309 to the semantics of the scope field in the X.511 Search Operation. 1311 - derefAliases: An indicator as to how alias objects (as defined in 1312 X.501) are to be handled in searching. The semantics of the 1313 possible values of this field are: 1315 neverDerefAliases: do not dereference aliases in searching 1316 or in locating the base object of the search; 1318 derefInSearching: dereference aliases in subordinates of 1319 the base object in searching, but not in locating the base 1320 object of the search; 1322 derefFindingBaseObj: dereference aliases in locating the 1323 base object of the search, but not when searching 1324 subordinates of the base object; 1326 derefAlways: dereference aliases both in searching and in 1327 locating the base object of the search. 1329 - sizeLimit: A size limit that restricts the maximum number of 1330 entries to be returned as a result of the search. A value of 0 in 1331 this field indicates that no client-requested size limit 1332 restrictions are in effect for the search. Servers may enforce a 1333 maximum number of entries to return. 1335 - timeLimit: A time limit that restricts the maximum time (in 1336 seconds) allowed for a search. A value of 0 in this field 1337 indicates that no client-requested time limit restrictions are in 1338 effect for the search. 1340 - typesOnly: An indicator as to whether search results will contain 1341 both attribute types and values, or just attribute types. Setting 1342 this field to TRUE causes only attribute types (no values) to be 1343 returned. Setting this field to FALSE causes both attribute types 1344 and values to be returned. 1346 Lightweight Directory Access Protocol Version 3 1348 - filter: A filter that defines the conditions that must be 1349 fulfilled in order for the search to match a given entry. 1351 The 'and', 'or' and 'not' choices can be used to form combinations 1352 of filters. At least one filter element MUST be present in an 1353 'and' or 'or' choice. The others match against individual 1354 attribute values of entries in the scope of the search. 1355 (Implementor's note: the 'not' filter is an example of a tagged 1356 choice in an implicitly-tagged module. In BER this is treated as 1357 if the tag was explicit.) 1359 A server MUST evaluate filters according to the three-valued logic 1360 of X.511 (1993) section 7.8.1. In summary, a filter is evaluated 1361 to either "TRUE", "FALSE" or "Undefined". If the filter evaluates 1362 to TRUE for a particular entry, then the attributes of that entry 1363 are returned as part of the search result (subject to any 1364 applicable access control restrictions). If the filter evaluates 1365 to FALSE or Undefined, then the entry is ignored for the search. 1367 A filter of the "and" choice is TRUE if all the filters in the SET 1368 OF evaluate to TRUE, FALSE if at least one filter is FALSE, and 1369 otherwise Undefined. A filter of the "or" choice is FALSE if all 1370 of the filters in the SET OF evaluate to FALSE, TRUE if at least 1371 one filter is TRUE, and Undefined otherwise. A filter of the "not" 1372 choice is TRUE if the filter being negated is FALSE, FALSE if it 1373 is TRUE, and Undefined if it is Undefined. 1375 The present match evaluates to TRUE where there is an attribute or 1376 subtype of the specified attribute description present in an 1377 entry, and FALSE otherwise (including a presence test with an 1378 unrecognized attribute description.) 1380 The extensibleMatch is new in this version of LDAP. If the 1381 matchingRule field is absent, the type field MUST be present, and 1382 the equality match is performed for that type. If the type field 1383 is absent and matchingRule is present, the matchValue is compared 1384 against all attributes in an entry which support that 1385 matchingRule, and the matchingRule determines the syntax for the 1386 assertion value (the filter item evaluates to TRUE if it matches 1387 with at least one attribute in the entry, FALSE if it does not 1388 match any attribute in the entry, and Undefined if the 1389 matchingRule is not recognized or the assertionValue cannot be 1390 parsed.) If the type field is present and matchingRule is present, 1391 the matchingRule MUST be one permitted for use with that type, 1392 otherwise the filter item is undefined. If the dnAttributes field 1393 is set to TRUE, the match is applied against all the attributes in 1394 an entry's distinguished name as well, and also evaluates to TRUE 1395 if there is at least one attribute in the distinguished name for 1396 which the filter item evaluates to TRUE. (Editors note: The 1397 dnAttributes field is present so that there does not need to be 1398 multiple versions of generic matching rules such as for word 1399 matching, one to apply to entries and another to apply to entries 1400 and dn attributes as well). 1402 Lightweight Directory Access Protocol Version 3 1404 A filter item evaluates to Undefined when the server would not be 1405 able to determine whether the assertion value matches an entry. If 1406 an attribute description in an equalityMatch, substrings, 1407 greaterOrEqual, lessOrEqual, approxMatch or extensibleMatch filter 1408 is not recognized by the server, a matching rule id in the 1409 extensibleMatch is not recognized by the server, the assertion 1410 value cannot be parsed, or the type of filtering requested is not 1411 implemented, then the filter is Undefined. Thus for example if a 1412 server did not recognize the attribute type shoeSize, a filter of 1413 (shoeSize=*) would evaluate to FALSE, and the filters 1414 (shoeSize=12), (shoeSize>=12) and (shoeSize<=12) would evaluate to 1415 Undefined. 1417 Servers MUST NOT return errors if attribute descriptions or 1418 matching rule ids are not recognized, or assertion values cannot 1419 be parsed. More details of filter processing are given in section 1420 7.8 of [X.511]. 1422 - attributes: A list of the attributes to be returned from each 1423 entry which matches the search filter. There are two special 1424 values which may be used: an empty list with no attributes, and 1425 the attribute description string "*". Both of these signify that 1426 all user attributes are to be returned. (The "*" allows the 1427 client to request all user attributes in addition to specific 1428 operational attributes). 1430 Attributes MUST be named at most once in the list, and are 1431 returned at most once in an entry. If there are attribute 1432 descriptions in the list which are not recognized, they are 1433 ignored by the server. 1435 If the client does not want any attributes returned, it can 1436 specify a list containing only the attribute with OID "1.1". This 1437 OID was chosen arbitrarily and does not correspond to any 1438 attribute in use. 1440 Client implementors should note that even if all user attributes 1441 are requested, some attributes of the entry may not be included in 1442 search results due to access controls or other restrictions. 1443 Furthermore, servers will not return operational attributes, such 1444 as objectClasses or attributeTypes, unless they are listed by 1445 name, since there may be extremely large number of values for 1446 certain operational attributes. (A list of operational attributes 1447 for use in LDAP is given in [RFC2252].) 1449 Note that an X.500 "list"-like operation can be emulated by the 1450 client requesting a one-level LDAP search operation with a filter 1451 checking for the presence of the objectClass attribute, and that an 1452 X.500 "read"-like operation can be emulated by a base object LDAP 1453 search operation with the same filter. A server which provides a 1454 gateway to X.500 is not required to use the Read or List operations, 1455 although it may choose to do so, and if it does, it must provide the 1456 same semantics as the X.500 search operation. 1458 Lightweight Directory Access Protocol Version 3 1460 4.5.2. Search Result 1462 The results of the search attempted by the server upon receipt of a 1463 Search Request are returned in Search Responses, which are LDAP 1464 messages containing either SearchResultEntry, SearchResultReference, 1465 or SearchResultDone data types. 1467 SearchResultEntry ::= [APPLICATION 4] SEQUENCE { 1468 objectName LDAPDN, 1469 attributes PartialAttributeList } 1471 PartialAttributeList ::= SEQUENCE OF SEQUENCE { 1472 type AttributeDescription, 1473 vals SET OF AttributeValue } 1474 -- implementors should note that the PartialAttributeList may 1475 -- have zero elements (if none of the attributes of that entry 1476 -- were requested, or could be returned), and that the vals set 1477 -- may also have zero elements (if types only was requested, or 1478 -- all values were excluded from the result.) 1480 SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 1481 -- at least one LDAPURL element must be present 1483 SearchResultDone ::= [APPLICATION 5] LDAPResult 1485 Upon receipt of a Search Request, a server will perform the necessary 1486 search of the DIT. 1488 If the LDAP session is operating over a connection-oriented transport 1489 such as TCP, the server will return to the client a sequence of 1490 responses in separate LDAP messages. There may be zero or more 1491 responses containing SearchResultEntry, one for each entry found 1492 during the search. There may also be zero or more responses 1493 containing SearchResultReference, one for each area not explored by 1494 this server during the search. The SearchResultEntry and 1495 SearchResultReference PDUs may come in any order. Following all the 1496 SearchResultReference responses and all SearchResultEntry responses 1497 to be returned by the server, the server will return a response 1498 containing the SearchResultDone, which contains an indication of 1499 success, or detailing any errors that have occurred. 1501 Each entry returned in a SearchResultEntry will contain all 1502 attributes, complete with associated values if necessary, as 1503 specified in the attributes field of the Search Request. Return of 1504 attributes is subject to access control and other administrative 1505 policy. Some attributes may be returned in binary format (indicated 1506 by the AttributeDescription in the response having the "binary" 1507 option present). 1509 Some attributes may be constructed by the server and appear in a 1510 SearchResultEntry attribute list, although they are not stored 1511 attributes of an entry. Clients MUST NOT assume that all attributes 1512 can be modified, even if permitted by access control. 1514 Lightweight Directory Access Protocol Version 3 1516 4.5.3. Continuation References in the Search Result 1518 If the server was able to locate the entry referred to by the 1519 baseObject but was unable to search all the entries in the scope at 1520 and under the baseObject, the server may return one or more 1521 SearchResultReference entries, each containing a reference to another 1522 set of servers for continuing the operation. A server MUST NOT return 1523 any SearchResultReference if it has not located the baseObject and 1524 thus has not searched any entries; in this case it would return a 1525 SearchResultDone containing a referral resultCode. 1527 In the absence of indexing information provided to a server from 1528 servers holding subordinate naming contexts, SearchResultReference 1529 responses are not affected by search filters and are always returned 1530 when in scope. 1532 The SearchResultReference is of the same data type as the Referral. 1533 URLs for servers implementing the LDAP protocol are written according 1534 to [RFC2255]. The part MUST be present in the URL, with the new 1535 target object name. The client MUST use this name in its next 1536 request. Some servers (e.g. part of a distributed index exchange 1537 system) may provide a different filter in the URLs of the 1538 SearchResultReference. If the filter part of the URL is present in an 1539 LDAP URL, the client MUST use the new filter in its next request to 1540 progress the search, and if the filter part is absent the client will 1541 use again the same filter. Other aspects of the new search request 1542 may be the same or different as the search which generated the 1543 continuation references. 1544 Other kinds of URLs may be returned so long as the operation could be 1545 performed using that protocol. 1547 The name of an unexplored subtree in a SearchResultReference need not 1548 be subordinate to the base object. 1550 In order to complete the search, the client MUST issue a new search 1551 operation for each SearchResultReference that is returned. Note that 1552 the abandon operation described in section 4.11 applies only to a 1553 particular operation sent on a connection between a client and 1554 server, and if the client has multiple outstanding search operations, 1555 it MUST abandon each operation individually. 1557 4.5.3.1. Example 1559 For example, suppose the contacted server (hosta) holds the entry 1560 "O=MNN,C=WW" and the entry "CN=Manager,O=MNN,C=WW". It knows that 1561 either LDAP-capable servers (hostb) or (hostc) hold 1562 "OU=People,O=MNN,C=WW" (one is the master and the other server a 1563 shadow), and that LDAP-capable server (hostd) holds the subtree 1564 "OU=Roles,O=MNN,C=WW". If a subtree search of "O=MNN,C=WW" is 1565 requested to the contacted server, it may return the following: 1567 SearchResultEntry for O=MNN,C=WW 1568 SearchResultEntry for CN=Manager,O=MNN,C=WW 1569 SearchResultReference { 1571 Lightweight Directory Access Protocol Version 3 1573 ldap://hostb/OU=People,O=MNN,C=WW 1574 ldap://hostc/OU=People,O=MNN,C=WW 1575 } 1576 SearchResultReference { 1577 ldap://hostd/OU=Roles,O=MNN,C=WW 1578 } 1579 SearchResultDone (success) 1581 Client implementors should note that when following a 1582 SearchResultReference, additional SearchResultReference may be 1583 generated. Continuing the example, if the client contacted the server 1584 (hostb) and issued the search for the subtree "OU=People,O=MNN,C=WW", 1585 the server might respond as follows: 1587 SearchResultEntry for OU=People,O=MNN,C=WW 1588 SearchResultReference { 1589 ldap://hoste/OU=Managers,OU=People,O=MNN,C=WW 1590 } 1591 SearchResultReference { 1592 ldap://hostf/OU=Consultants,OU=People,O=MNN,C=WW 1593 } 1594 SearchResultDone (success) 1596 If the contacted server does not hold the base object for the search, 1597 then it will return a referral to the client. For example, if the 1598 client requests a subtree search of "O=XYZ,C=US" to hosta, the server 1599 may return only a SearchResultDone containing a referral. 1601 SearchResultDone (referral) { 1602 ldap://hostg/ 1603 } 1605 4.6. Modify Operation 1607 The Modify Operation allows a client to request that a modification 1608 of an entry be performed on its behalf by a server. The Modify 1609 Request is defined as follows: 1611 ModifyRequest ::= [APPLICATION 6] SEQUENCE { 1612 object LDAPDN, 1613 modification SEQUENCE OF SEQUENCE { 1614 operation ENUMERATED { 1615 add (0), 1616 delete (1), 1617 replace (2) }, 1618 modification AttributeTypeAndValues } } 1620 AttributeTypeAndValues ::= SEQUENCE { 1621 type AttributeDescription, 1622 vals SET OF AttributeValue } 1624 Parameters of the Modify Request are: 1626 Lightweight Directory Access Protocol Version 3 1628 - object: The object to be modified. The value of this field 1629 contains the DN of the entry to be modified. The server will not 1630 perform any alias dereferencing in determining the object to be 1631 modified. 1633 - modification: A list of modifications to be performed on the 1634 entry. The entire list of entry modifications MUST be performed in 1635 the order they are listed, as a single atomic operation. While 1636 individual modifications may violate the directory schema, the 1637 resulting entry after the entire list of modifications is 1638 performed MUST conform to the requirements of the directory 1639 schema. The values that may be taken on by the 'operation' field 1640 in each modification construct have the following semantics 1641 respectively: 1643 add: add values listed to the given attribute, creating the 1644 attribute if necessary; 1646 delete: delete values listed from the given attribute, 1647 removing the entire attribute if no values are listed, or 1648 if all current values of the attribute are listed for 1649 deletion; 1651 replace: replace all existing values of the given attribute 1652 with the new values listed, creating the attribute if it 1653 did not already exist. A replace with no value will delete 1654 the entire attribute if it exists, and is ignored if the 1655 attribute does not exist. 1657 The result of the modify attempted by the server upon receipt of a 1658 Modify Request is returned in a Modify Response, defined as follows: 1660 ModifyResponse ::= [APPLICATION 7] LDAPResult 1662 Upon receipt of a Modify Request, a server will perform the necessary 1663 modifications to the DIT. 1665 The server will return to the client a single Modify Response 1666 indicating either the successful completion of the DIT modification, 1667 or the reason that the modification failed. Note that due to the 1668 requirement for atomicity in applying the list of modifications in 1669 the Modify Request, the client may expect that no modifications of 1670 the DIT have been performed if the Modify Response received indicates 1671 any sort of error, and that all requested modifications have been 1672 performed if the Modify Response indicates successful completion of 1673 the Modify Operation. If the connection fails, whether the 1674 modification occurred or not is indeterminate. 1676 The Modify Operation cannot be used to remove from an entry any of 1677 its distinguished values, those values which form the entry's 1678 relative distinguished name. An attempt to do so will result in the 1679 server returning the error notAllowedOnRDN. The Modify DN Operation 1680 described in section 4.9 is used to rename an entry. 1682 Lightweight Directory Access Protocol Version 3 1684 If an equality match filter has not been defined for an attribute 1685 type, clients MUST NOT attempt to add or delete individual values of 1686 that attribute from an entry using the "add" or "delete" form of a 1687 modification, and MUST instead use the "replace" form. 1689 Note that due to the simplifications made in LDAP, there is not a 1690 direct mapping of the modifications in an LDAP ModifyRequest onto the 1691 EntryModifications of a DAP ModifyEntry operation, and different 1692 implementations of LDAP-DAP gateways may use different means of 1693 representing the change. If successful, the final effect of the 1694 operations on the entry MUST be identical. 1696 4.7. Add Operation 1698 The Add Operation allows a client to request the addition of an entry 1699 into the directory. The Add Request is defined as follows: 1701 AddRequest ::= [APPLICATION 8] SEQUENCE { 1702 entry LDAPDN, 1703 attributes AttributeList } 1705 AttributeList ::= SEQUENCE OF SEQUENCE { 1706 type AttributeDescription, 1707 vals SET OF AttributeValue } 1709 Parameters of the Add Request are: 1711 - entry: the Distinguished Name of the entry to be added. Note that 1712 the server will not dereference any aliases in locating the entry 1713 to be added. 1715 - attributes: the list of attributes that make up the content of the 1716 entry being added. Clients MUST include distinguished values 1717 (those forming the entry's own RDN) in this list, the objectClass 1718 attribute, and values of any mandatory attributes of the listed 1719 object classes. Clients MUST NOT supply NO-USER-MODIFICATION 1720 attributes such as the createTimestamp or creatorsName attributes, 1721 since the server maintains these automatically. 1723 The entry named in the entry field of the AddRequest MUST NOT exist 1724 for the AddRequest to succeed. The parent of the entry to be added 1725 MUST exist. For example, if the client attempted to add 1726 "CN=JS,O=Foo,C=US", the "O=Foo,C=US" entry did not exist, and the 1727 "C=US" entry did exist, then the server would return the error 1728 noSuchObject with the matchedDN field containing "C=US". If the 1729 parent entry exists but is not in a naming context held by the 1730 server, the server SHOULD return a referral to the server holding the 1731 parent entry. 1733 Servers implementations SHOULD NOT restrict where entries can be 1734 located in the directory. Some servers MAY allow the administrator to 1735 restrict the classes of entries which can be added to the directory. 1737 Lightweight Directory Access Protocol Version 3 1739 Upon receipt of an Add Request, a server will attempt to perform the 1740 add requested. The result of the add attempt will be returned to the 1741 client in the Add Response, defined as follows: 1743 AddResponse ::= [APPLICATION 9] LDAPResult 1745 A response of success indicates that the new entry is present in the 1746 directory. 1748 4.8. Delete Operation 1750 The Delete Operation allows a client to request the removal of an 1751 entry from the directory. The Delete Request is defined as follows: 1753 DelRequest ::= [APPLICATION 10] LDAPDN 1755 The Delete Request consists of the Distinguished Name of the entry to 1756 be deleted. Note that the server will not dereference aliases while 1757 resolving the name of the target entry to be removed, and that only 1758 leaf entries (those with no subordinate entries) can be deleted with 1759 this operation. 1761 The result of the delete attempted by the server upon receipt of a 1762 Delete Request is returned in the Delete Response, defined as 1763 follows: 1765 DelResponse ::= [APPLICATION 11] LDAPResult 1767 Upon receipt of a Delete Request, a server will attempt to perform 1768 the entry removal requested. The result of the delete attempt will be 1769 returned to the client in the Delete Response. 1771 4.9. Modify DN Operation 1773 The Modify DN Operation allows a client to change the leftmost (least 1774 significant) component of the name of an entry in the directory, or 1775 to move a subtree of entries to a new location in the directory. The 1776 Modify DN Request is defined as follows: 1778 ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { 1779 entry LDAPDN, 1780 newrdn RelativeLDAPDN, 1781 deleteoldrdn BOOLEAN, 1782 newSuperior [0] LDAPDN OPTIONAL } 1784 Parameters of the Modify DN Request are: 1786 - entry: the Distinguished Name of the entry to be changed. This 1787 entry may or may not have subordinate entries. Note that the 1788 server will not dereference any aliases in locating the entry to 1789 be changed. 1791 - newrdn: the RDN that will form the leftmost component of the new 1792 name of the entry. 1794 Lightweight Directory Access Protocol Version 3 1796 - deleteoldrdn: a boolean parameter that controls whether the old 1797 RDN attribute values are to be retained as attributes of the 1798 entry, or deleted from the entry. 1800 - newSuperior: if present, this is the Distinguished Name of the 1801 entry which becomes the immediate superior of the existing entry. 1803 The result of the name change attempted by the server upon receipt of 1804 a Modify DN Request is returned in the Modify DN Response, defined as 1805 follows: 1807 ModifyDNResponse ::= [APPLICATION 13] LDAPResult 1809 Upon receipt of a ModifyDNRequest, a server will attempt to perform 1810 the name change. The result of the name change attempt will be 1811 returned to the client in the Modify DN Response. 1813 For example, if the entry named in the "entry" parameter was "cn=John 1814 Smith,c=US", the newrdn parameter was "cn=John Cougar Smith", and the 1815 newSuperior parameter was absent, then this operation would attempt 1816 to rename the entry to be "cn=John Cougar Smith,c=US". If there was 1817 already an entry with that name, the operation would fail with error 1818 code entryAlreadyExists. 1820 If the deleteoldrdn parameter is TRUE, the values forming the old RDN 1821 are deleted from the entry. If the deleteoldrdn parameter is FALSE, 1822 the values forming the old RDN will be retained as non-distinguished 1823 attribute values of the entry. The server may not perform the 1824 operation and return an error code if the setting of the deleteoldrdn 1825 parameter would cause a schema inconsistency in the entry. 1827 Note that X.500 restricts the ModifyDN operation to only affect 1828 entries that are contained within a single server. If the LDAP server 1829 is mapped onto DAP, then this restriction will apply, and the 1830 resultCode affectsMultipleDSAs will be returned if this error 1831 occurred. In general clients MUST NOT expect to be able to perform 1832 arbitrary movements of entries and subtrees between servers. 1834 4.10. Compare Operation 1836 The Compare Operation allows a client to compare an assertion 1837 provided with an entry in the directory. The Compare Request is 1838 defined as follows: 1840 CompareRequest ::= [APPLICATION 14] SEQUENCE { 1841 entry LDAPDN, 1842 ava AttributeValueAssertion } 1844 Parameters of the Compare Request are: 1846 - entry: the name of the entry to be compared with. Note that the 1847 server SHOULD NOT dereference any aliases in locating the entry to 1848 be compared with. 1850 Lightweight Directory Access Protocol Version 3 1852 - ava: the assertion with which an attribute in the entry is to be 1853 compared. 1855 The result of the compare attempted by the server upon receipt of a 1856 Compare Request is returned in the Compare Response, defined as 1857 follows: 1859 CompareResponse ::= [APPLICATION 15] LDAPResult 1861 Upon receipt of a Compare Request, a server will attempt to perform 1862 the requested comparison. The result of the comparison will be 1863 returned to the client in the Compare Response. Note that errors and 1864 the result of comparison are all returned in the same construct. 1866 Note that some directory systems may establish access controls which 1867 permit the values of certain attributes (such as userPassword) to be 1868 compared but not read. In a search result, it may be that an 1869 attribute of that type would be returned, but with an empty set of 1870 values. 1872 4.11. Abandon Operation 1874 The function of the Abandon Operation is to allow a client to request 1875 that the server abandon an outstanding operation. The Abandon Request 1876 is defined as follows: 1878 AbandonRequest ::= [APPLICATION 16] MessageID 1880 The MessageID MUST be that of an operation which was requested 1881 earlier in this connection. 1883 (The abandon request itself has its own message id. This is distinct 1884 from the id of the earlier operation being abandoned.) 1886 There is no response defined in the Abandon Operation. Upon 1887 transmission of an Abandon Operation, a client may expect that the 1888 operation identified by the Message ID in the Abandon Request will be 1889 abandoned. In the event that a server receives an Abandon Request on 1890 a Search Operation in the midst of transmitting responses to the 1891 search, that server MUST cease transmitting entry responses to the 1892 abandoned request immediately, and MUST NOT send the 1893 SearchResponseDone. Of course, the server MUST ensure that only 1894 properly encoded LDAPMessage PDUs are transmitted. 1896 Clients MUST NOT send abandon requests for the same operation 1897 multiple times, and MUST also be prepared to receive results from 1898 operations it has abandoned (since these may have been in transit 1899 when the abandon was requested). 1901 Servers MUST discard abandon requests for message IDs they do not 1902 recognize, for operations which cannot be abandoned, and for 1903 operations which have already been abandoned. 1905 Lightweight Directory Access Protocol Version 3 1907 4.12. Extended Operation 1909 An extension mechanism has been added in this version of LDAP, in 1910 order to allow additional operations to be defined for services not 1911 available elsewhere in this protocol, for instance digitally signed 1912 operations and results. 1914 The extended operation allows clients to make requests and receive 1915 responses with predefined syntaxes and semantics. These may be 1916 defined in RFCs or be private to particular implementations. Each 1917 request MUST have a unique OBJECT IDENTIFIER assigned to it. 1919 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 1920 requestName [0] LDAPOID, 1921 requestValue [1] OCTET STRING OPTIONAL } 1923 The requestName is a dotted-decimal representation of the OBJECT 1924 IDENTIFIER corresponding to the request. The requestValue is 1925 information in a form defined by that request, encapsulated inside an 1926 OCTET STRING. 1928 The server will respond to this with an LDAPMessage containing the 1929 ExtendedResponse. 1931 ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 1932 COMPONENTS OF LDAPResult, 1933 responseName [10] LDAPOID OPTIONAL, 1934 response [11] OCTET STRING OPTIONAL } 1936 If the server does not recognize the request name, it MUST return 1937 only the response fields from LDAPResult, containing the 1938 protocolError result code. 1940 5. Protocol Element Encodings and Transfer 1942 One underlying service is defined here. Clients and servers SHOULD 1943 implement the mapping of LDAP over TCP described in 5.2.1. 1945 5.1. Protocol Encoding 1947 The protocol elements of LDAP are encoded for exchange using the 1948 Basic Encoding Rules (BER) [X.690] of ASN.1 [X.680]. However, due to 1949 the high overhead involved in using certain elements of the BER, the 1950 following additional restrictions are placed on BER-encodings of LDAP 1951 protocol elements: 1953 (1) Only the definite form of length encoding will be used. 1955 (2) OCTET STRING values will be encoded in the primitive form only. 1957 (3) If the value of a BOOLEAN type is true, the encoding MUST have 1958 its contents octets set to hex "FF". 1960 Lightweight Directory Access Protocol Version 3 1962 (4) If a value of a type is its default value, it MUST be absent. 1963 Only some BOOLEAN and INTEGER types have default values in this 1964 protocol definition. 1966 These restrictions do not apply to ASN.1 types encapsulated inside of 1967 OCTET STRING values, such as attribute values, unless otherwise 1968 noted. 1970 5.2. Transfer Protocols 1972 This protocol is designed to run over connection-oriented, reliable 1973 transports, with all 8 bits in an octet being significant in the data 1974 stream. 1976 5.2.1. Transmission Control Protocol (TCP) 1978 The encoded LDAPMessage PDUs are mapped directly onto the TCP 1979 bytestream. It is recommended that server implementations running 1980 over the TCP MAY provide a protocol listener on the assigned port, 1981 389. Servers may instead provide a listener on a different port 1982 number. Clients MUST support contacting servers on any valid TCP 1983 port. 1985 6. Implementation Guidelines 1987 This document describes an Internet protocol. 1989 6.1. Server Implementations 1991 The server MUST be capable of recognizing all the mandatory attribute 1992 type names and implement the syntaxes specified in [RFC2252]. Servers 1993 MAY also recognize additional attribute type names. 1995 6.2. Client Implementations 1997 Clients which request referrals MUST ensure that they do not loop 1998 between servers. They MUST NOT repeatedly contact the same server for 1999 the same request with the same target entry name, scope and filter. 2000 Some clients may be using a counter that is incremented each time 2001 referral handling occurs for an operation, and these kinds of clients 2002 MUST be able to handle a DIT with at least ten layers of naming 2003 contexts between the root and a leaf entry. 2005 In the absence of prior agreements with servers, clients SHOULD NOT 2006 assume that servers support any particular schemas beyond those 2007 referenced in section 6.1. Different schemas can have different 2008 attribute types with the same names. The client can retrieve the 2009 subschema entries referenced by the subschemaSubentry attribute in 2010 the server's root DSE or in entries held by the server. 2012 7. Security Considerations 2014 When used with a connection-oriented transport, this version of the 2015 protocol provides facilities for the LDAP v2 authentication 2017 Lightweight Directory Access Protocol Version 3 2019 mechanism, simple authentication using a cleartext password, as well 2020 as any SASL mechanism [RFC2222]. SASL allows for integrity and 2021 privacy services to be negotiated. 2023 It is also permitted that the server can return its credentials to 2024 the client, if it chooses to do so. 2026 Use of cleartext password is strongly discouraged where the 2027 underlying transport service cannot guarantee confidentiality and may 2028 result in disclosure of the password to unauthorized parties. 2030 When used with SASL, it should be noted that the name field of the 2031 BindRequest is not protected against modification. Thus if the 2032 distinguished name of the client (an LDAPDN) is agreed through the 2033 negotiation of the credentials, it takes precedence over any value in 2034 the unprotected name field. 2036 Implementations which cache attributes and entries obtained via LDAP 2037 MUST ensure that access controls are maintained if that information 2038 is to be provided to multiple clients, since servers may have access 2039 control policies which prevent the return of entries or attributes in 2040 search results except to particular authenticated clients. For 2041 example, caches could serve result information only to the client 2042 whose request caused it to be in the cache. 2044 8. Acknowledgements 2046 This document is an update to RFC 2251, by Mark Wahl, Tim Howes, and 2047 Steve Kille. Their work along with the input of individuals of the 2048 IETF LDAPEXT, LDUP, LDAPBIS, and other Working Groups is gratefully 2049 acknowledged. 2051 9. Bibliography 2053 [ISO10646] Universal Multiple-Octet Coded Character Set (UCS) - 2054 Architecture and Basic Multilingual Plane, ISO/IEC 10646-1 2055 : 1993. 2057 [X.500] ITU-T Rec. X.500, "The Directory: Overview of Concepts, 2058 Models and Service", 1993. 2060 [X.501] ITU-T Rec. X.501, "The Directory: Models", 1993. 2062 [X.511] ITU-T Rec. X.511, "The Directory: Abstract Service 2063 Definition", 1993. 2065 [X.680] ITU-T Rec. X.680, "Abstract Syntax Notation One (ASN.1) - 2066 Specification of Basic Notation", 1994. 2068 [X.690] ITU-T Rec. X.690, "Specification of ASN.1 encoding rules: 2069 Basic, Canonical, and Distinguished Encoding Rules", 1994. 2071 [RFC1777] Yeong, W., Howes, T., and S. Kille, "Lightweight Directory 2072 Access Protocol", RFC 1777, March 1995. 2074 Lightweight Directory Access Protocol Version 3 2076 [RFC1823] Howes, T., and M. Smith, "The LDAP Application Program 2077 Interface", RFC 1823, August 1995. 2079 [RFC2044] Yergeau, F., "UTF-8, a transformation format of Unicode 2080 and ISO 10646", RFC 2044, October 1996. 2082 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2083 Requirement Levels", RFC 2119, March 1997. 2085 [RFC2222] Meyers, J., "Simple Authentication and Security Layer", 2086 RFC 2222, October 1997. 2088 [RFC2234] Crocker, D., and P. Overell, "Augmented BNF for Syntax 2089 Specifications: ABNF", RFC 2234, November 1997. 2091 [RFC2252] Wahl, M., Coulbeck, A., Howes, T., and S. Kille, 2092 "Lightweight Directory Access Protocol (v3): Attribute 2093 Syntax Definitions", RFC 2252, December 1997. 2095 [RFC2253] Kille, S., Wahl, M., and T. Howes, "Lightweight Directory 2096 Access Protocol (v3): UTF-8 String Representation of 2097 Distinguished Names", RFC 2253, December 1997. 2099 [RFC2255] Howes, T., and M. Smith, "The LDAP URL Format", RFC 2255, 2100 December 1997. 2102 [RFC2396] Berners-Lee, T., Fielding, R., and L. Masinter Uniform 2103 Resource Identifiers (URI): Generic Syntax", RFC 2396, 2104 August 1998. 2106 [RFC2829] Wahl, M., Alvestrand, H., Hodges, J., and R. Morgan, 2107 "Authentication Methods for LDAP", RFC 2829, May 2000 2109 [RFC2830] Hodges, J., Morgan, R., and M. Wahl "Lightweight Directory 2110 Access Protocol (v3): Extension for Transport Layer 2111 Security", RFC 2830, May 2000 2113 10. Editor's Address 2115 Jim Sermersheim 2116 Novell, Inc. 2117 1800 South Novell Place 2118 Provo, Utah 84606, USA 2119 jimse@novell.com 2120 +1 801 861-3088 2122 Lightweight Directory Access Protocol Version 3 2124 Appendix A - Complete ASN.1 Definition 2126 Lightweight-Directory-Access-Protocol-V3 DEFINITIONS 2127 IMPLICIT TAGS ::= 2129 BEGIN 2131 LDAPMessage ::= SEQUENCE { 2132 messageID MessageID, 2133 protocolOp CHOICE { 2134 bindRequest BindRequest, 2135 bindResponse BindResponse, 2136 unbindRequest UnbindRequest, 2137 searchRequest SearchRequest, 2138 searchResEntry SearchResultEntry, 2139 searchResDone SearchResultDone, 2140 searchResRef SearchResultReference, 2141 modifyRequest ModifyRequest, 2142 modifyResponse ModifyResponse, 2143 addRequest AddRequest, 2144 addResponse AddResponse, 2145 delRequest DelRequest, 2146 delResponse DelResponse, 2147 modDNRequest ModifyDNRequest, 2148 modDNResponse ModifyDNResponse, 2149 compareRequest CompareRequest, 2150 compareResponse CompareResponse, 2151 abandonRequest AbandonRequest, 2152 extendedReq ExtendedRequest, 2153 extendedResp ExtendedResponse }, 2154 controls [0] Controls OPTIONAL } 2156 MessageID ::= INTEGER (0 .. maxInt) 2158 maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- 2160 LDAPString ::= OCTET STRING 2162 LDAPOID ::= OCTET STRING 2164 LDAPDN ::= LDAPString 2166 RelativeLDAPDN ::= LDAPString 2168 AttributeType ::= LDAPString 2170 AttributeDescription ::= LDAPString 2172 AttributeDescriptionList ::= SEQUENCE OF 2173 AttributeDescription 2175 AttributeValue ::= OCTET STRING 2177 AttributeValueAssertion ::= SEQUENCE { 2179 Lightweight Directory Access Protocol Version 3 2181 attributeDesc AttributeDescription, 2182 assertionValue AssertionValue } 2184 AssertionValue ::= OCTET STRING 2186 Attribute ::= SEQUENCE { 2187 type AttributeDescription, 2188 vals SET OF AttributeValue } 2190 MatchingRuleId ::= LDAPString 2192 LDAPResult ::= SEQUENCE { 2193 resultCode ENUMERATED { 2194 success (0), 2195 operationsError (1), 2196 protocolError (2), 2197 timeLimitExceeded (3), 2198 sizeLimitExceeded (4), 2199 compareFalse (5), 2200 compareTrue (6), 2201 authMethodNotSupported (7), 2202 strongAuthRequired (8), 2203 -- 9 reserved -- 2204 referral (10), 2205 adminLimitExceeded (11), 2206 unavailableCriticalExtension (12), 2207 confidentialityRequired (13), 2208 saslBindInProgress (14), 2209 noSuchAttribute (16), 2210 undefinedAttributeType (17), 2211 inappropriateMatching (18), 2212 constraintViolation (19), 2213 attributeOrValueExists (20), 2214 invalidAttributeSyntax (21), 2215 -- 22-31 unused -- 2216 noSuchObject (32), 2217 aliasProblem (33), 2218 invalidDNSyntax (34), 2219 -- 35 reserved for undefined isLeaf -- 2220 aliasDereferencingProblem (36), 2221 -- 37-47 unused -- 2222 inappropriateAuthentication (48), 2223 invalidCredentials (49), 2224 insufficientAccessRights (50), 2225 busy (51), 2226 unavailable (52), 2227 unwillingToPerform (53), 2228 loopDetect (54), 2229 -- 55-63 unused -- 2230 namingViolation (64), 2231 objectClassViolation (65), 2232 notAllowedOnNonLeaf (66), 2233 notAllowedOnRDN (67), 2234 entryAlreadyExists (68), 2236 Lightweight Directory Access Protocol Version 3 2238 objectClassModsProhibited (69), 2239 -- 70 reserved for CLDAP -- 2240 affectsMultipleDSAs (71), 2241 -- 72-79 unused -- 2242 other (80) }, 2243 -- 81-90 reserved for APIs -- 2244 matchedDN LDAPDN, 2245 errorMessage LDAPString, 2246 referral [3] Referral OPTIONAL } 2248 Referral ::= SEQUENCE OF LDAPURL 2250 LDAPURL ::= LDAPString -- limited to characters permitted in 2251 -- URLs 2253 Controls ::= SEQUENCE OF Control 2255 Control ::= SEQUENCE { 2256 controlType LDAPOID, 2257 criticality BOOLEAN DEFAULT FALSE, 2258 controlValue OCTET STRING OPTIONAL } 2260 BindRequest ::= [APPLICATION 0] SEQUENCE { 2261 version INTEGER (1 .. 127), 2262 name LDAPDN, 2263 authentication AuthenticationChoice } 2265 AuthenticationChoice ::= CHOICE { 2266 simple [0] OCTET STRING, 2267 -- 1 and 2 reserved 2268 sasl [3] SaslCredentials } 2270 SaslCredentials ::= SEQUENCE { 2271 mechanism LDAPString, 2272 credentials OCTET STRING OPTIONAL } 2274 BindResponse ::= [APPLICATION 1] SEQUENCE { 2275 COMPONENTS OF LDAPResult, 2276 serverSaslCreds [7] OCTET STRING OPTIONAL } 2278 UnbindRequest ::= [APPLICATION 2] NULL 2280 SearchRequest ::= [APPLICATION 3] SEQUENCE { 2281 baseObject LDAPDN, 2282 scope ENUMERATED { 2283 baseObject (0), 2284 singleLevel (1), 2285 wholeSubtree (2) }, 2286 derefAliases ENUMERATED { 2287 neverDerefAliases (0), 2288 derefInSearching (1), 2289 derefFindingBaseObj (2), 2290 derefAlways (3) }, 2291 sizeLimit INTEGER (0 .. maxInt), 2293 Lightweight Directory Access Protocol Version 3 2295 timeLimit INTEGER (0 .. maxInt), 2296 typesOnly BOOLEAN, 2297 filter Filter, 2298 attributes AttributeDescriptionList } 2300 Filter ::= CHOICE { 2301 and [0] SET SIZE (1..MAX) OF Filter, 2302 or [1] SET SIZE (1..MAX) OF Filter, 2303 not [2] Filter, 2304 equalityMatch [3] AttributeValueAssertion, 2305 substrings [4] SubstringFilter, 2306 greaterOrEqual [5] AttributeValueAssertion, 2307 lessOrEqual [6] AttributeValueAssertion, 2308 present [7] AttributeDescription, 2309 approxMatch [8] AttributeValueAssertion, 2310 extensibleMatch [9] MatchingRuleAssertion } 2312 SubstringFilter ::= SEQUENCE { 2313 type AttributeDescription, 2314 -- at least one must be present, 2315 -- initial and final can occur at most once 2316 substrings SEQUENCE OF CHOICE { 2317 initial [0] AssertionValue, 2318 any [1] AssertionValue, 2319 final [2] AssertionValue } } 2321 MatchingRuleAssertion ::= SEQUENCE { 2322 matchingRule [1] MatchingRuleId OPTIONAL, 2323 type [2] AttributeDescription OPTIONAL, 2324 matchValue [3] AssertionValue, 2325 dnAttributes [4] BOOLEAN DEFAULT FALSE } 2327 SearchResultEntry ::= [APPLICATION 4] SEQUENCE { 2328 objectName LDAPDN, 2329 attributes PartialAttributeList } 2331 PartialAttributeList ::= SEQUENCE OF SEQUENCE { 2332 type AttributeDescription, 2333 vals SET OF AttributeValue } 2335 SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL 2337 SearchResultDone ::= [APPLICATION 5] LDAPResult 2339 ModifyRequest ::= [APPLICATION 6] SEQUENCE { 2340 object LDAPDN, 2341 modification SEQUENCE OF SEQUENCE { 2342 operation ENUMERATED { 2343 add (0), 2344 delete (1), 2345 replace (2) }, 2346 modification AttributeTypeAndValues } } 2348 AttributeTypeAndValues ::= SEQUENCE { 2350 Lightweight Directory Access Protocol Version 3 2352 type AttributeDescription, 2353 vals SET OF AttributeValue } 2355 ModifyResponse ::= [APPLICATION 7] LDAPResult 2357 AddRequest ::= [APPLICATION 8] SEQUENCE { 2358 entry LDAPDN, 2359 attributes AttributeList } 2361 AttributeList ::= SEQUENCE OF SEQUENCE { 2362 type AttributeDescription, 2363 vals SET OF AttributeValue } 2365 AddResponse ::= [APPLICATION 9] LDAPResult 2367 DelRequest ::= [APPLICATION 10] LDAPDN 2369 DelResponse ::= [APPLICATION 11] LDAPResult 2371 ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { 2372 entry LDAPDN, 2373 newrdn RelativeLDAPDN, 2374 deleteoldrdn BOOLEAN, 2375 newSuperior [0] LDAPDN OPTIONAL } 2377 ModifyDNResponse ::= [APPLICATION 13] LDAPResult 2379 CompareRequest ::= [APPLICATION 14] SEQUENCE { 2380 entry LDAPDN, 2381 ava AttributeValueAssertion } 2383 CompareResponse ::= [APPLICATION 15] LDAPResult 2385 AbandonRequest ::= [APPLICATION 16] MessageID 2387 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 2388 requestName [0] LDAPOID, 2389 requestValue [1] OCTET STRING OPTIONAL } 2391 ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 2392 COMPONENTS OF LDAPResult, 2393 responseName [10] LDAPOID OPTIONAL, 2394 response [11] OCTET STRING OPTIONAL } 2396 END 2398 Lightweight Directory Access Protocol Version 3 2400 Appendix B - Change History 2402 B.1 Changes made to RFC 2251: 2404 B.1.1 Editorial 2406 - Bibliography References: Changed all bibliography references to 2407 use a long name form for readability. 2408 - Changed occurrences of "unsupportedCriticalExtension" 2409 "unavailableCriticalExtension" 2410 - Fixed a small number of misspellings (mostly dropped letters). 2412 B.1.2 Section 1 2414 - Removed IESG note. 2416 B.1.3 Section 9 2418 - Added references to RFCs 1823, 2234, 2829 and 2830. 2420 B.2 Changes made to draft-ietf-ldapbis-protocol-00.txt: 2422 B.2.1 Section 4.1.6 2424 - In the first paragraph, clarified what the contents of an 2425 AttributeValue are. There was confusion regarding whether or not 2426 an AttributeValue that is BER encoded (due to the "binary" option) 2427 is to be wrapped in an extra OCTET STRING. 2428 - To the first paragraph, added wording that doesn't restrict other 2429 transfer encoding specifiers from being used. The previous wording 2430 only allowed for the string encoding and the ;binary encoding. 2431 - To the first paragraph, added a statement restricting multiple 2432 options that specify transfer encoding from being present. This 2433 was never specified in the previous version and was seen as a 2434 potential interoperability problem. 2435 - Added a third paragraph stating that the ;binary option is 2436 currently the only option defined that specifies the transfer 2437 encoding. This is for completeness. 2439 B.2.2 Section 4.1.7 2441 - Generalized the second paragraph to read "If an option specifying 2442 the transfer encoding is present in attributeDesc, the 2443 AssertionValue is encoded as specified by the option...". 2444 Previously, only the ;binary option was mentioned. 2446 B.2.3 Sections 4.2, 4.9, 4.10 2448 - Added alias dereferencing specifications. In the case of modDN, 2449 followed precedent set on other update operations (... alias is 2450 not dereferenced...) In the case of bind and compare stated that 2451 servers SHOULD NOT dereference aliases. Specifications were added 2452 because they were missing from the previous version and caused 2454 Lightweight Directory Access Protocol Version 3 2456 interoperability problems. Concessions were made for bind and 2457 compare (neither should have ever allowed alias dereferencing) by 2458 using SHOULD NOT language, due to the behavior of some existing 2459 implementations. 2461 B.2.4 Sections 4.5 and Appendix A 2463 - Changed SubstringFilter.substrings.initial, any, and all from 2464 LDAPString to AssertionValue. This was causing an incompatibility 2465 with X.500 and confusion among other TS RFCs. 2467 B.3 Changes made to draft-ietf-ldapbis-protocol-01.txt: 2469 B.3.1 Section 3.4 2471 - Reworded text surrounding subschemaSubentry to reflect that it is 2472 a single-valued attribute that holds the schema for the root DSE. 2473 Also noted that if the server masters entries that use differing 2474 schema, each entry's subschemaSubentry attribute must be 2475 interrogated. This may change as further fine-tuning is done to 2476 the data model. 2478 B.3.2 Section 4.1.12 2480 - Specified that the criticality field is only used for requests and 2481 not for unbind or abandon. Noted that it is ignored for all other 2482 operations. 2484 B.3.3 Section 4.2 2486 - Noted that Server behavior is undefined when the name is a null 2487 value, simple authentication is used, and a password is specified. 2489 B.3.4 Section 4.2.(various) 2491 - Changed "unauthenticated" to "anonymous" and "DN" and "LDAPDN" to 2492 "name" 2494 B.3.5 Section 4.2.2 2496 - Changed "there is no authentication or encryption being performed 2497 by a lower layer" to "the underlying transport service cannot 2498 guarantee confidentiality" 2500 B.3.6 Section 4.5.2 2502 - Removed all mention of ExtendedResponse due to lack of 2503 implementation. 2505 B.4 Changes made to draft-ietf-ldapbis-protocol-02.txt: 2507 B.4.1 Section 4 2509 Lightweight Directory Access Protocol Version 3 2511 - Removed "typically" from "and is typically transferred" in the 2512 first paragraph. We know of no (and can conceive of no) case where 2513 this isn't true. 2514 - Added "Section 5.1 specifies how the LDAP protocol is encoded." To 2515 the first paragraph. Added this cross reference for readability. 2516 - Changed "version 3 " to "version 3 or later" in the second 2517 paragraph. This was added to clarify the original intent. 2518 - Changed "protocol version" to "protocol versions" in the third 2519 paragraph. This attribute is multi-valued with the intent of 2520 holding all supported versions, not just one. 2522 B.4.2 Section 4.1.8 2524 - Changed "when transferred in protocol" to "when transferred from 2525 the server to the client" in the first paragraph. This is to 2526 clarify that this behavior only happens when attributes are being 2527 sent from the server. 2529 B.4.3 Section 4.1.10 2531 - Changed "servers will return responses containing fields of type 2532 LDAPResult" to "servers will return responses of LDAPResult or 2533 responses containing the components of LDAPResponse". This 2534 statement was incorrect and at odds with the ASN.1. The fix here 2535 reflects the original intent. 2536 - Dropped '--new' from result codes ASN.1. This simplification in 2537 comments just reduces unneeded verbiage. 2539 B.4.4 Section 4.1.11 2541 - Changed "It contains a reference to another server (or set of 2542 servers)" to "It contains one or more references to one or more 2543 servers or services" in the first paragraph. This reflects the 2544 original intent and clarifies that the URL may point to non-LDAP 2545 services. 2547 B.4.5 Section 4.1.12 2549 - Changed "The server MUST be prepared" to "Implementations MUST be 2550 prepared" in the eighth paragraph to reflect that both client and 2551 server implementations must be able to handle this (as both parse 2552 controls). 2554 B.4.6 Section 4.4 2556 - Changed "One unsolicited notification is defined" to "One 2557 unsolicited notification (Notice of Disconnection) is defined" in 2558 the third paragraph. For clarity and readability. 2560 B.4.7 Section 4.5.1 2562 - Changed "checking for the existence of the objectClass attribute" 2563 to "checking for the presence of the objectClass attribute" in the 2564 last paragraph. This was done as a measure of consistency (we use 2566 Lightweight Directory Access Protocol Version 3 2568 the terms present and presence rather than exists and existence in 2569 search filters). 2571 B.4.8 Section 4.5.3 2573 - Changed "outstanding search operations to different servers," to 2574 "outstanding search operations" in the fifth paragraph as they may 2575 be to the same server. This is a point of clarification. 2577 B.4.9 Section 4.6 2579 - Changed "clients MUST NOT attempt to delete" to "clients MUST NOT 2580 attempt to add or delete" in the second to last paragraph. 2581 - Change "using the "delete" form" to "using the "add" or "delete" 2582 form" in the second to last paragraph. 2584 B.4.10 Section 4.7 2586 - Changed "Clients MUST NOT supply the createTimestamp or 2587 creatorsName attributes, since these will be generated 2588 automatically by the server." to "Clients MUST NOT supply NO-USER- 2589 MODIFICATION attributes such as createTimestamp or creatorsName 2590 attributes, since these are provided by the server." in the 2591 definition of the attributes field. This tightens the language to 2592 reflect the original intent and to not leave a hole in which one 2593 could interpret the two attributes mentioned as the only non- 2594 writable attributes. 2596 B.4.11 Section 4.11 2598 - Changed "has been" to "will be" in the fourth paragraph. This 2599 clarifies that the server will (not has) abandon the operation. 2601 B.5 Changes made to draft-ietf-ldapbis-protocol-03.txt: 2603 B.5.1 Section 3.2.1 2605 - Changed "An attribute is a type with one or more associated 2606 values. The attribute type is identified by a short descriptive 2607 name and an OID (object identifier). The attribute type governs 2608 whether there can be more than one value of an attribute of that 2609 type in an entry, the syntax to which the values must conform, the 2610 kinds of matching which can be performed on values of that 2611 attribute, and other functions." to " An attribute is a 2612 description (a type and zero or more options) with one or more 2613 associated values. The attribute type governs whether the 2614 attribute can have multiple values, the syntax and matching rules 2615 used to construct and compare values of that attribute, and other 2616 functions. Options indicate modes of transfer and other 2617 functions.". This points out that an attribute consists of both 2618 the type and options. 2620 B.5.2 Section 4 2622 Lightweight Directory Access Protocol Version 3 2624 - Changed "Section 5.1 specifies the encoding rules for the LDAP 2625 protocol" to "Section 5.1 specifies how the protocol is encoded 2626 and transferred." 2628 B.5.3 Section 4.1.2 2630 - Added ABNF for the textual representation of LDAPOID. Previously, 2631 there was no formal BNF for this construct. 2633 B.5.4 Section 4.1.4 2635 - Changed "This identifier may be written as decimal digits with 2636 components separated by periods, e.g. "2.5.4.10"" to "may be 2637 written as defined by ldapOID in section 4.1.2" in the second 2638 paragraph. This was done because we now have a formal BNF 2639 definition of an oid. 2641 B.5.5 Section 4.1.5 2643 - Changed the BNF for AttributeDescription to ABNF. This was done 2644 for readability and consistency (no functional changes involved). 2645 - Changed "Options present in an AttributeDescription are never 2646 mutually exclusive." to "Options MAY be mutually exclusive. An 2647 AttributeDescription with mutually exclusive options is treated as 2648 an undefined attribute type." for clarity. It is generally 2649 understood that this is the original intent, but the wording could 2650 be easily misinterpreted. 2651 - Changed "Any option could be associated with any AttributeType, 2652 although not all combinations may be supported by a server." to 2653 "Though any option or set of options could be associated with any 2654 AttributeType, the server support for certain combinations may be 2655 restricted by attribute type, syntaxes, or other factors.". This 2656 is to clarify the meaning of 'combination' (it applies both to 2657 combination of attribute type and options, and combination of 2658 options). It also gives examples of *why* they might be 2659 unsupported. 2661 B.5.6 Section 4.1.11 2663 - Changed the wording regarding 'equally capable' referrals to "If 2664 multiple URLs are present, the client assumes that any URL may be 2665 used to progress the operation.". The previous language implied 2666 that the server MUST enforce rules that it was practically 2667 incapable of. The new language highlights the original intent-- 2668 that is, that any of the referrals may be used to progress the 2669 operation, there is no inherent 'weighting' mechanism. 2671 B.5.7 Section 4.5.1 and Appendix A 2673 - Added the comment "-- initial and final can occur at most once", 2674 to clarify this restriction. 2676 B.5.8 Section 5.1 2678 Lightweight Directory Access Protocol Version 3 2680 - Changed heading from "Mapping Onto BER-based Transport Services" 2681 to "Protocol Encoding". 2683 B.5.9 Section 5.2.1 2685 - Changed "The LDAPMessage PDUs" to "The encoded LDAPMessage PDUs" 2686 to point out that the PDUs are encoded before being streamed to 2687 TCP. 2689 B.6 Changes made to draft-ietf-ldapbis-protocol-03.txt: 2691 B.6.1 Section 4.5.1 and Appendix A 2693 - Changed the ASN.1 for the and and or choices of Filter to have a 2694 lower range of 1. This was an omission in the original ASN.1 2696 B.6.2 Various 2698 - Fixed various typo's 2700 Appendix C - Outstanding Work Items 2702 C.1 Integrate result codes draft. 2704 - The result codes draft should be reconciled with this draft. 2705 Operation-specific instructions will reside with operations while 2706 the error-specific sections will be added as an appendix. 2708 C.2 Section 3.1 2710 - Add "This also increases the complexity of clients in this 2711 version." to fourth paragraph. 2713 C.3 Section 4 2715 - Change "MUST ignore elements of SEQUENCE encodings whose tags they 2716 do not recognize" to "MUST ignore tagged elements of SEQUENCE 2717 encodings that they do not recognize" in the first paragraph. 2718 - Change "version 2 may not provide this attribute." to "version 2 2719 MAY NOT provide this attribute, or a root DSE." in the third 2720 paragraph. 2722 C.4 Section 4.1.1 2724 - Change "the client may discard the PDU, or may abruptly close the 2725 connection." to "the client MAY discard the PDU, or MAY abruptly 2726 close the connection." in the fourth paragraph. 2728 C.5 Section 4.1.1.1 2730 - Add "If an unsolicited notification as described in section 4.4 is 2731 sent from a server, the messageID value MUST be zero." to first 2732 paragraph. 2734 Lightweight Directory Access Protocol Version 3 2736 - Change "MUST have a value different" to "MUST have a non-zero 2737 value different" in the second paragraph. 2738 - Remove "or of the abandoned operation until it has received a 2739 response from the server for another request invoked subsequent to 2740 the abandonRequest," from the fourth paragraph as this imposes 2741 synchronous behavior on the server. 2743 C.7 Section 4.1.4 2745 - Add "Note that due to the restriction above, and due to this 2746 allowance, servers MUST ensure that, within a controlling 2747 subschema, no two attributes be named the same." to the fifth 2748 paragraph. 2749 - Resolve issue on list with the subject "Attribute Type character 2750 set". 2752 C.8 Section 4.1.5 2754 - Change "A server may treat" to "A server MUST treat" in the second 2755 to last paragraph. 2756 - Change "A server MUST treat an AttributeDescription with any 2757 options it does not implement as an unrecognized attribute type." 2758 to "A server MUST treat an AttributeDescription with any options 2759 it does not implement or support as an unrecognized attribute 2760 type." in the second to last paragraph. 2761 - Clarify the statement "An AttributeDescription with one or more 2762 options is treated as a subtype of the attribute type without any 2763 options". There is an unresolved thread titles "RFC 2596 2764 questions" on the ietf-ldapext list regarding this. 2766 C.9 Section 4.1.5.1 2768 - Add "Servers SHOULD only return attributes with printable string 2769 representations as binary when clients request binary transfer." 2770 to the second paragraph. 2771 - Clarify whether the "binary" attribute type option is to be 2772 treated as a subtype. 2774 C.10 Section 4.1.6 2776 - Change "containing an encoded value of an AttributeValue data 2777 type" to "containing an encoded attribute value data type" 2779 C.11 Section 4.1.7 2781 - Change "For all the string-valued user attributes described in 2782 [5], the assertion value syntax is the same as the value syntax." 2783 to "The assertion value syntax for all attributes using human- 2784 readable syntaxes as described in [RFC2252] is the same as the 2785 value syntax unless otherwise noted (an example being 2786 objectIdentifierFirstComponentMatch)." in the third paragraph. 2787 - Find out what the last sentence in third paragraph means (Clients 2788 may use attributes...) 2790 Lightweight Directory Access Protocol Version 3 2792 - Add a fourth paragraph: "Servers SHOULD NOT generate codes 81-90 2793 as these are reserved for use by historical APIs [RFC 1823]. 2794 Later API specifications SHOULD avoid using the resultCode 2795 enumeration to represent anything other than a protocol result 2796 indication." 2798 C.13 Section 4.1.11 2800 - Add "after locating the target entry" to the first paragraph. 2802 C.14 Section 4.1.12 2804 - Specify whether or not servers are to advertise the OIDs of known 2805 response controls. 2807 C.15 Section 4.2 2809 - Change "LDAPDN" to "identity" in the definition of the name field. 2810 - Rework definition of the name field to enumerate empty password and 2811 name combinations. 2813 C.17 Section 4.2.2 2815 - Add "as the authentication identity" to second paragraph. 2817 C.18 Section 4.2.3 2819 - Change "If the bind was successful, the resultCode will be 2820 success, otherwise it will be one of" to "If the bind was 2821 successful, the resultCode will be success, otherwise it MAY be 2822 one of" in the third paragraph. . 2824 - Change "operationsError" to "other" as a result code. 2825 - Change "If the client bound with the password choice" to "If the 2826 client bound with the simple choice" in the last paragraph. 2828 C.19 Section 4.3 2830 - Change "a protocol client may assume that the protocol session is 2831 terminated and MAY close the connection." to "a protocol client 2832 MUST assume that the protocol session is terminated and MAY close 2833 the connection." in the second paragraph. 2834 - Change "a protocol server may assume" to "a protocol server MUST 2835 assume" in the second paragraph. 2836 - Change "and may close the connection" to "and MUST close the 2837 connection" in the second paragraph. 2839 C.20 Section 4.4 2841 - Add "Servers SHOULD NOT assume LDAPv3 clients understand or 2842 recognize unsolicited notifications or unsolicited controls other 2843 than Notice of Disconnection defined below. Servers SHOULD avoid 2844 sending unsolicited notifications unless they know (by related 2846 Lightweight Directory Access Protocol Version 3 2848 request or other means) that the client can make use of the 2849 notification." as a fourth paragraph. 2851 C.21 Section 4.5.1 2853 - Make sure the use of "subordinates" in the derefInSearching 2854 definition is correct. See "derefInSearching" on list. 2856 C.22 Section 4.5.2 2858 - Add "associated with a search operation" to the sixth paragraph. 2859 - Same problem as in C.5. 2861 C.23 Section 4.5.3 2863 - Add "Similarly, a server MUST NOT return a SearchResultReference 2864 when the scope of the search is baseObject. If a client receives 2865 such a SearchResultReference it MUST interpret is as a protocol 2866 error and MUST NOT follow it." to the first paragraph. 2867 - Add "If the scope part of the LDAP URL is present, the client MUST 2868 use the new scope in its next request to progress the search. If 2869 the scope part is absent the client MUST use subtree scope to 2870 complete subtree searches and base scope to complete one level 2871 searches." to the third paragraph. 2873 C.24 Section 4.5.3.1 2875 - Change examples to use dc naming. 2877 C.25 Section 4.6 2879 - Resolve the meaning of "and is ignored if the attribute does not 2880 exist". See "modify: "non-existent attribute"" on the list. 2882 C.26 Section 4.7 2884 - Change examples to use dc naming. 2885 - Clarify the paragraph that talks about structure rules. See 2886 "discussing structure rules" on the list. 2888 C.27 Section 4.10 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 C.28 Section 4.11 2895 - Change "(since these may have been in transit when the abandon was 2896 requested)." to "(since these may either have been in transit when 2897 the abandon was requested, or are not able to be abandoned)." in 2898 the fifth paragraph. 2899 - Add "Abandon and Unbind operations are not able to be abandoned. 2900 Other operations, in particular update operations, or operations 2902 Lightweight Directory Access Protocol Version 3 2904 that have been chained, may not be abandonable (or immediately 2905 abandonable)." as the sixth paragraph. 2907 C.29 Section 4.12 2909 - Change "digitally signed operations and results" to "for instance 2910 StartTLS [RFC2830]" 2912 C.30 Section 5.1 2914 - Add "control and extended operation values" to last paragraph. See 2915 "LBER (BER Restrictions)" on list. 2917 C.31 Section 5.2.1 2919 - Add "using the BER-based described in section 5.1". 2921 C.32 Section 6.1 2923 - Add "that are used by those attributes" to the first paragraph. 2924 - Add "Servers which support update operations MUST, and other 2925 servers SHOULD, support strong authentication mechanisms described 2926 in [RFC2829]." as a second paragraph. 2927 - Add "Servers which provide access to sensitive information MUST, 2928 and other servers SHOULD support privacy protections such as those 2929 described in [RFC2829] and [RFC2830]." as a third paragraph. 2931 C.33 Section 7 2933 - Add "Servers which support update operations MUST, and other 2934 servers SHOULD, support strong authentication mechanisms described 2935 in [RFC2829]." as a fourth paragraph. 2936 - Add "In order to automatically follow referrals, clients may need 2937 to hold authentication secrets. This poses significant privacy and 2938 security concerns and SHOULD be avoided." as a sixth paragraph. 2939 - Add "This document provides a mechanism which clients may use to 2940 discover operational attributes. Those relying on security by 2941 obscurity should implement appropriate access controls to 2942 restricts access to operational attributes per local policy." as 2943 an eighth paragraph. 2944 - Add "This document provides a mechanism which clients may use to 2945 discover operational attributes. Those relying on security by 2946 obscurity should implement appropriate access controls to 2947 restricts access to operational attributes per local policy." as 2948 an eighth paragraph. 2950 Lightweight Directory Access Protocol Version 3 2952 Full Copyright Statement 2954 Copyright (C) The Internet Society (2001). All Rights Reserved. 2956 This document and translations of it may be copied and furnished to 2957 others, and derivative works that comment on or otherwise explain it 2958 or assist in its implementation may be prepared, copied, published 2959 and distributed, in whole or in part, without restriction of any 2960 kind, provided that the above copyright notice and this paragraph are 2961 included on all such copies and derivative works. However, this 2962 document itself may not be modified in any way, such as by removing 2963 the copyright notice or references to the Internet Society or other 2964 Internet organizations, except as needed for the purpose of 2965 developing Internet standards in which case the procedures for 2966 copyrights defined in the Internet Standards process must be 2967 followed, or as required to translate it into languages other than 2968 English. 2970 The limited permissions granted above are perpetual and will not be 2971 revoked by the Internet Society or its successors or assigns. 2973 This document and the information contained herein is provided on an 2974 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 2975 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 2976 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 2977 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 2978 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.