view Side-By-Side changes
Network Working Group M. Wahl INTERNET-DRAFTISODE ConsortiumCritical Angle Inc. Obsoletes: RFC 1777, RFC 1798 T. Howes Netscape Communications Corp. S. Kille ISODE Consortium Expires in six months from5 June30 August 1996 Intended Category: Standards Track Lightweight Directory Access Protocol (v3)<draft-ietf-asid-ldapv3-protocol-01.txt><draft-ietf-asid-ldapv3-protocol-02.txt> Table of Contents - see end of document. 1. Status of this Memo This document is an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." To learn the current status of any Internet-Draft, please check the "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim). 2. Abstract The protocol described in this document is designed to provide access to directories supporting the X.500 models, while not incurring the resource requirements of the X.500 Directory Access Protocol (DAP). This protocol is specifically targeted at management applications and browser applications that provide read/write interactive access to directories. When used with a directory supporting the X.500 protocols, it is intended to be a complement to the X.500 DAP. Key aspects of this version of LDAP are: - All protocol elements of LDAP (RFC 1777) and CLDAP (RFC 1798) are supported. - Protocol elements are carried directly over TCP or other transport, bypassing much of the session/presentation overhead. Connectionless transport (UDP) is also supported for efficient lookup operations. - Most protocol data elements can be encoded as ordinary strings (e.g., Distinguished Names). - New features have been added to enable more powerful clients, such as the abilities to retrieve attribute values in binary or search results in pages. Wahl, Howes, Kille [Page 1] INTERNET-DRAFT LDAP August 1996 - Important features of X.500(1993) and X.500(1997) are included. - Referrals to other servers may be returned. - The protocol may be extended to support bilaterally-defined operations. - Severalservicesession controls may be requested by the client.INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 19963. Models Interest in X.500 [1] directory technologies in the Internet has lead to efforts to reduce the high "cost of entry" associated with use of these technologies. This document continues the efforts to define directory protocol alternatives: it updates the LDAP [2] protocol specification, adding support for new features, including some support forserversconnecting toX.500(1993).X.500 services that implement the 1993 or 1997 edition protocols. 3.1. Protocol Model The general model adopted by this protocol is one of clients performing protocol operations against servers. In this model, a client transmits a protocol request describing the operation to be performed to a server, which is then responsible for performing the necessaryoperations onoperation(s) in the directory. Upon completion of theoperations,operation(s), the server returns a response containing any results or errors to the requesting client. In keeping with the goal of easing the costs associated with use of the directory, it is an objective of this protocol to minimize the complexity of clients so as to facilitate widespread deployment of applications capable of utilizing the directory. Note that, although servers are required to return responses whenever such responses are defined in the protocol, there is no requirement for synchronous behavior on the part of either clients or servers.RrequestsRequests and responses for multiple operations may be exchanged between a client and server in any order, provided the client eventually receives a response for every request that requires one. In LDAP versions 1 and 2, no provision was made for protocol servers returning referrals to clients. However, for improved performance and distribution this version of the protocol permits servers to return to clients referrals to other servers if requested. This allows servers, if requested by clients, to offload the work of contacting other servers to progress operations. Clients may also request that no referrals be returned, in which case the server must ensure that the operation is performed against the directory, or else return an error. This is the default. Note that this protocol can be mapped to a strict subset of theX.500(1993)X.500(1997) directory abstract service, so it can be cleanly provided by the DAP. However there is not a one-to-one mapping between LDAP protocol operations and DAP operations:someserver implementations acting as a gateway to X.500 directories may need to make multiple DAP requests to perform extended operations. Wahl, Howes, Kille [Page 2] INTERNET-DRAFT LDAP August 1996 3.2. Data Model This section provides a brief introduction to the X.500 data model, as used by LDAP. The LDAP protocol assumes thereisare one or more servers which jointly provide access to a Directory Information Tree. The tree is made up of entries. Entries have names: one or more values from the entry itself form its relative distinguished name, which must be unique among all its siblings. The concatenation of the relative distinguished names ofentries, starting fromthe line of entries from a particular entry to an immediate subordinate of theunnamedroot of the treeand continuing to a specific entryforms that entry's Distinguished Name, which is unique in the tree. An example of a Distinguished Name is CN=Steve Kille, O=ISODE Consortium, C=GBINTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996Entries consist of a set of attributes. An attribute is a type with one or more associated values. The attribute type,describedidentified by a short descriptive name and an OID (object identifier), governs the maximum number of values permissible for an attribute of that type in an entry,andthe syntax to which the values mustconform.conform, the types of matching which can be performed on values of that attribute, and other functions. An example of an attribute is "mail". There may be one or more values of this attribute,andthey must be IA5strings. All the attributes of an entrystrings, and they aremastered together in a single server. Shadowcase insensitive (e.g. "foo@bar.com" will match "FOO@BAR.COM"). Some servers may hold cache orcachedshadow copies ofentries mayentries, which can beheld in other servers,used to answer search and comparison queries, butthese cannot be updated directly by users.will return referrals or contact other servers if modification operations are requested. 3.2.1 Attributes of Entries Each entry must have an objectClass attribute.Values of this attribute may be modified by clients, but the objectClass attribute cannot be removed.The objectClass attribute specifies the object classes of an entry, which along with the system and user schema determine the permitted attributes of an entry. Values of this attribute may be modified by clients, but the objectClass attribute cannot be removed. Servers may restrict the modifications of this attribute to prevent the basic structural class of the entry from being changed (e.g. one cannot change a person into a country). Servers should not permit clients to add attributes to an entry unless those attributes are permitted by the object class definitions, the user schema controlling that entry (specified in the subschema subentry), or are operational attributes known to that server and used for administrative purposes.Entries may contain the following operational attributes, but if present should notNote that there is a particular objectClass 'extensibleObject' defined in [5] which permits all user attributes. Entries may contain, among others, the following operational attributes, defined in [5], which if present should not be modifiable by clients: - creatorsName: thestring representation of theDistinguished Name of the user who added this entry to thedirectory, if known.directory. - createTimestamp: theGeneralizedTime value of thetime this entry was added to thedirectory, if known.directory. - modifiersName: thestring representation of theDistinguished Name of the user who last modified thisentry, if known.entry. - modifyTimestamp: theGeneralizedTime value of thetime this entry was lastmodified, if known.modified. Wahl, Howes, Kille [Page 3] INTERNET-DRAFT LDAP August 1996 - subschemaSubentry: thestring representation of theDistinguished Name of the subschema subentry which controls the schema for this entry. -entryName;binary: a DER encoding ofentryName: the Distinguished Name of the entry. Servers may implement other operational attributes. Servers which also make use of X.500(1993) protocols should provide support for the attributes defined in X.501, includingadministrativeRole, collectiveExclusions, governingStructureRule, dseTypeadministrativeRole andentryACI.dseType. Some servers may permit the retrieval of subschema attributes directly from user entries. 3.2.2 Subschema Subentry A server may provide access to one or more subschema subentries to permit clients to interrogate the schema which is in force for entries in the directory. A server which mastersor shadowsentries and permits clients to modify these entries must implement and provide access to these subschema subentries, so that its clients may discover the attributes and object classes which are permitted to be present. It is strongly recommended that all other servers implement subschemasubentries.subentries as well. The followingtwo attributesfour attributes, defined in [6] with string representations in [5], must be present inaall subschema subentries: - CN: this attribute should be used to form the RDN of the subschema subentry. - objectClass: the attribute should have at least the values "top" and "subschema". - objectClasses: each value of this attribute specifies an object class known to the server. - attributeTypes: each value of this attribute specifies an attribute type known to the server. Other operational attributes may be present in subschemasubentries. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 Thesesubentries, in particular dseType, subtreeSpecification, ditStructureRules, nameForms, ditContentRules, matchingRules, matchingRuleUse, createTimestamp, creatorsName, modifyTimestamp, modifiersName, entryName, as described in [6]. Clients must only retrieve these attributesof subschema subentries may be retrievedfrom a subentry by requesting them by name in a baseObject search oftheir name, with filter set to a test for the presence oftheobjectClass attribute. Clients should not expect that subschema subentries will be returned in searches with other settings of scope or filter.subentry. 3.3. Relationship to X.500 This document defines LDAP in terms of X.500 as an X.500 access mechanism. An LDAP server should act in accordance with the X.500(1993) series of ITU Recommendations when providing the service. However, it is not required that an LDAP server make use of any X.500 protocols in providing this service, e.g. LDAP can be mapped onto any other directory system so long as the X.500 data and service model as used in LDAP issupportednot violated in the LDAP interface. Wahl, Howes, Kille [Page 4] INTERNET-DRAFT LDAP August 1996 3.4. Server-specific Data Requirements An LDAP server must provide information about itself and other information that is specific to each server. This is represented as a number of attributes located in the root DSE (DSA-Specific Entry),thatwhich is named with the zero-length LDAPDN. These attributes should be retrievable if a client performs a base object search of the root, however they are subject to access control restrictions. They should not be included if the client performs a subtree search starting from the root. The server may, but neednotnot, allow the client to modify these attributes. The following attributes of the root DSE are defined in section 5.1.3 of [5]. Additional attributes may be definedbyin laterdocuments or by bilateral agreement. These attributes are currently defined:documents. - administratorAddress:This attribute's values are stringa URL containingthe addressesaddress ofthe LDAP server's humanadministrator.This information may be of use when tracking down problems in an Internet distributed directory. For simplicity- currentTime: thesyntax ofcurrent time. - serverName: thevalues are limited to being URLsDistinguished Name of themailto form with an RFC 822 address: "mailto:user@domain". Future versions of this protocol may permit other forms of addresses.server. -currentTime: This attribute has a single value, a string containing a GeneralizedTime character string. This attribute need only be present if the server supports LDAP strong or protected simple authentication. Otherwise ifcertificationPath: theserver does not knowserver's certificate path. - namingContexts: naming contexts held in thecurrent time, or does not choose to present it to clients,server. - subschemaSubentry: subschema subentries known by thisattribute need not be present. The client may wish to useserver. - altServer: alternative servers in case thisvalue to detect whether a strong or protected bindone isfailing because the client and server clocks are not sufficiently synchronized. Clients should not use this time field for setting their own system clock.later unavailable. -serverName;binary: This attribute's value is the binary representation of the ASN.1 DER encodingsupportedExtension: list ofthe server's Distinguished Name.supported extensions. If the server does nothave a Distinguished Name it will not be able to accept strong authentication,master or shadow entries andthis attribute should be absent. Howeverdoes not know thepresencelocations ofthisschema information, the subschemaSubentry attributedoesshould notguarantee that the server willbeable to perform strong authentication.present in the root DSE. If the serveracts as a gateway to more than one X.500 DSA capableholds master or shadow copies ofstrong authentication,directory entries under one or more schema rules, there may bemultipleany number of values ofthis attribute, one per DSA. - certificationPath;binary: Thisthe subschemaSubentry attributecontains a binary DER encodingin the root DSE. 4. Elements ofan AF.CertificationPath data type, whichProtocol The LDAP protocol isthe certificate path fordescribed using Abstract Syntax Notation 1 [3]. It is typically transferred using aserver. Ifsubset of theserver does not have a certificate pathBasic Encoding Rules. In order to support future extensions to thisattributeprotocol, clients and servers shouldbe absent. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 - namingContexts: The values of this attribute are the string representationsignore elements ofDistinguished Names. Each value correspondsSEQUENCEs whose tags they do not recognize. Note that unlike X.500, each change toa naming context which this server masters or shadows. Iftheserver does not master any information (e.g. it is anLDAPgateway toprotocol other than through the extension mechanisms will have apublic X.500 directory) this attribute should be absent. Ifdifferent version number. A client may indicate theserver believesversion itcontainssupports as part of theentire directory,bind request, described in section 4.1.2. If a client has not sent a bind, theattributeserver shouldhave a single value, andassume thatvalue should beversion 3 is supported in theempty string (indicatingclient (since version 2 required that thenull DN ofclient bind first). 4.1. Common Elements This section describes theroot). - subschemaSubentry: The values of this attributeLDAPMessage envelope PDU format, as well as data type definitions which are used in thestring representationsprotocol operations. 4.1.1. Message Envelope For the purposes ofDistinguished Names. Each value corresponds toprotocol exchanges, all protocol operations are encapsulated in asubschema subentry,common envelope, the LDAPMessage, which isan entry in which the server makes available attributes specifyingdefined as follows: Wahl, Howes, Kille [Page 5] INTERNET-DRAFT LDAP August 1996 LDAPMessage ::= SEQUENCE { messageID MessageID, cldapUserName LDAPDN OPTIONAL, protocolOp CHOICE { bindRequest BindRequest, bindResponse BindResponse, unbindRequest UnbindRequest, searchRequest SearchRequest, searchResEntry SearchResultEntry, searchResDone SearchResultDone, searchResRef SearchResultReference, searchResFull SearchResultFull, modifyRequest ModifyRequest, modifyResponse ModifyResponse, addRequest AddRequest, addResponse AddResponse, delRequest DelRequest, delResponse DelResponse, modDNRequest ModifyDNRequest, modDNResponse ModifyDNResponse, compareRequest CompareRequest, compareResponse CompareResponse, abandonRequest AbandonRequest, sessionRequest SessionRequest, sessionResponse SessionResponse, resumeRequest ResumeRequest, resumeError ResumeError, extendedReq ExtendedRequest, extendedResp ExtendedResponse } } MessageID ::= INTEGER (0 .. maxInt) maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- The function of theschema. (ThisLDAPMessage isdescribedto provide an envelope containing common fields required insection 3.2.2). If the server does not master or shadow entries and does not know the locations of schema information,all protocol exchanges. At thisattribute should be absent. Iftime theserver holds allonly common fields are thedirectory under a single set of schema rules, there will be one attributemessage ID and cldapUserName. The message ID value(and a single subentry, which couldmust belocated anywhereechoed in all LDAPMessage envelopes encapsulating responses corresponding to thedirectory hierarchy). Ifrequest contained in theserver holds master or shadow copies of directory entries under one or more schema rules, there may be any number of values of this attribute. - altLdapServer: The values of this attribute are URLs of other LDAP serversLDAPMessage in whichmay be contacted when this server becomes unavailable. Iftheserver does not knowmessage ID value was originally used. The message ID is required to have a value different from the values of any other requests outstanding in the LDAPserverssession of whichcould be usedthisattribute should be absent. Clients should cache this information in case their preferred LDAP server later becomes unavailable. - altX500Server: The values of this attribute are encodedmessage is a part. A client must not send a second request with theAccessPoint93 syntax. They aresame message ID as another request if theaccess points of X.500 DSAs which could be contacted when this server becomes unavailable.first request is outstanding. Ifthis serverit doesnot know of any X.500 DSAs this attribute should be absent. Servers implemented as LDAP gateways to X.500 DAP may permit management clients to modifyso, thevalues of this attributes. - supportedExtension: The values of this attribute arebehavior is undefined. Typically a client will increment a counter for each request. For all requests except for a search with a pageSizeLimit, thestring representations of OBJECT IDENTIFIERs, inmessage ID is outstanding until thedotted decimal form. Each valueclient receives the final response for that operation. For searchRequest with a pageSize limit, if the client did not receive a SearchResultDone for that search indicating all results were received, the message ID is outstanding until after thenameoperation is abandoned. Wahl, Howes, Kille [Page 6] INTERNET-DRAFT LDAP August 1996 A client must not reuse the message id of anextended request which this server supports (see section 4.11). IfabandonRequest or the abandoned operation until it has received a response from the server for another request invoked subsequent to the abandonRequest, as the abandonRequest itself does notsupport any extended operations this attribute should be absent.have a response. TheASN.1 type DistinguishedName is defined in [6], andcldapUserName identifies thetype CertificationPathrequesting user for this message. It isdefinedonly present for backwards compatability with RFC 1798, if this LDAPMessage is carried in[12]. 4. Elements of Protocol Thea connectionless transport protocol, such as UDP. Its significance is equivalent to a bind with a zero-length password. When the LDAPprotocolsession is carried in a connection-oriented transport protocol this field must be absent. LDAPv3 client implementors should not use this field in connectionless requests, but instead concatenate a bind request with the other operations in the request. Concatenation and connectionless transport are describedusing Abstract Syntax Notation 1 [3]. Itin section 5.1.3. 4.1.2. String Types The LDAPString istypically transferred usingasubset of the Basic Encoding Rules. In order to support future extensionsnotational convenience tothis protocol, clients and servers should ignore elementsindicate that, although strings ofSEQUENCEs whose tags they do not recognize.LDAPString type encode as OCTET STRING types, the Unicode [15] character set is used, encoded following the UTF-8 algorithm [16]. Note thatunlike X.500, each change toin theLDAP protocol will have a different version number. 4.1. Common Elements This section describesUTF-8 algorithm, characters which are theLDAPMessage envelope PDU format,same aswellASCII (0000 through 007F) are represented asdata type definitions whichthat same ASCII character in a single byte. The other byte values are usedin the protocol operations. 4.1.1. Message Envelope For the purposesto form a variable- length encoding ofprotocol exchanges, all protocol operations are encapsulated inan arbitrary Unicode character. LDAPString ::= OCTET STRING The LDAPOID is acommon envelope,notational convenience to indicate that theLDAPMessage, whichpermitted value of this string isdefined as follows: INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 LDAPMessagea dotted-decimal representation of an OBJECT IDENTIFIER. LDAPOID ::=SEQUENCE { messageID MessageID, cldapUserName LDAPDN OPTIONAL, protocolOp CHOICE { bindRequest BindRequest, bindReqContinue BindContinuationRequest, bindRespBasic BindResponseBasic, bindRespExtd BindResponseExtended, unbindRequest UnbindRequest, searchRequest SearchRequest, searchResEntry SearchResultEntry, searchResDone SearchResultDone, searchResRef SearchResultReference, searchResFull SearchResultFull, modifyRequest ModifyRequest, modifyResponse ModifyResponse, addRequest AddRequest, addResponse AddResponse, delRequest DelRequest, delResponse DelResponse, modDNRequest ModifyDNRequest, modDNResponse ModifyDNResponse, compareRequest CompareRequest, compareResponse CompareResponse, abandonRequest AbandonRequest, resumeRequest ResumeRequest, resumeError ResumeError, extendedReq ExtendedRequest, extendedResp ExtendedResponse } } MessageID ::= INTEGER (0 .. maxInt) maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- The function of the LDAPMessage is to provide an envelope containing common fields required in all protocol exchanges. At this time the only common fields are the message IDOCTET STRING For example, 1.3.6.1.4.1.1466.1.2.3 4.1.3. Distinguished Name and Relative Distinguished Name An LDAPDN andcldapUserName. The message ID is required to haveavalue different from the values of any other requests outstanding inRelativeLDAPDN are respectively defined to be theLDAP sessionrepresentation ofwhich this message isapart. Typically a client may incrementDistinguished Name and acounter for each request. The message ID value must be echoed in all LDAPMessage envelopes encapsulating responses correspondingRelative Distinguished Name after encoding according to therequest containedspecification inthe LDAPMessage[4], such that <distinguished-name> ::= <name> <relative-distinguished-name> ::= <name-component> where <name> and <name-component> are as defined inwhich the message ID[4]. LDAPDN ::= LDAPString RelativeLDAPDN ::= LDAPString Wahl, Howes, Kille [Page 7] INTERNET-DRAFT LDAP August 1996 4.1.4. Attribute Type and Description An AttributeType takes on as its valuewas originally used. The cldapUserName identifiestherequesting user for this message. It istextual string associated with that AttributeType in its specification. This string must begin with a letter, and onlypresent ifcontain ASCII letters and digit characters. If thisLDAPMessage is carried in a connectionless transport protocol, such as UDP. This is described in section 5.1.3. When the LDAP session is carried in a connection-oriented transport protocol this field must be absent. 4.1.2. String Types The LDAPString is a notational convenience to indicate that, although strings of LDAPString type encode as OCTET STRING types, the legal character set in such strings is defined to be the Basic Multilingual Plane (BMP) of UCS. These are encoded following the UTF-8 algorithm. Note that in the UTF-8 algorithm, characters which are the same as printable ASCII (0020 through 007F) are represented as that same ASCII character in a single byte. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 LDAPString ::= OCTET STRING The LDAPOID is a notational convenince to indicate that the permitted value of this string is a dotted-decimal representation of an OBJECT IDENTIFIER. LDAPOID ::= OCTET STRING 4.1.3. Distinguished Name and Relative Distinguished Name An LDAPDN and a RelativeLDAPDN are respectively defined to be the representation of a Distinguished Name and a Relative Distinguished Name after encoding according to the specification in [4], such that <distinguished-name> ::= <name> <relative-distinguished-name> ::= <name-component> where <name> and <name-component> are as defined in [4]. Only the single line representation should be used, with comma as component separator. LDAPDN ::= LDAPString RelativeLDAPDN ::= LDAPString 4.1.4. Attribute Type and Description An AttributeType takes on as its value the textual string associated with that AttributeType in its specification. This string must begin with a letter, and only contain ASCII letters and digit characters. If this stringstring is not known, the AttributeType should take the ASCII representation of its OBJECT IDENTIFIER, as decimal digits with components separated by periods, e.g., "2.5.4.10". The attribute type strings whichmust be supportedaredescribedused insection [5].this version of LDAP are described in [5]. AttributeType ::= LDAPString An AttributeDescription is a superset of the definition of the AttributeType. It has the same ASN.1 definition, but allows additionalparametersoptions to be specified. AttributeDescription ::= LDAPString A value of AttributeDescription is based on the following BNF: <AttributeDescription> ::= <AttributeType> [ ";" <options> ] <options> ::= <option> | <option> ";" <options> <option> ::= <language-option> | <binary-option> <language-option> ::= "lang=" <lang-code> <lang-code> ::= <printable-ascii> -- as defined in [17] <binary-option> ::= "binary" If the "binary" option is present, this overrides anyprintablestring-based encoding representation defined for thatattribute.attribute in [5]. Instead the attribute is to be transferred as aBER-encodedDER-encoded binaryvalue.value [11]. If the "lang=" option is present, this associates a natural language with values for that attribute. The binary and language tags may both be present in an AttributeDescription. The format and use of language tags in LDAP is defined in [17]. (The language tag has no effect on the character set encoding for string representations of DirectoryString syntax values; UTF-8 is always used). Examples of valid AttributeDescription: CN givenName;lang=en-US CN;lang=ja-JP-kanji CN;lang=ja-JP-roman userCertificate;binary 1.3.6.1.4.1.1466.99.98.97;binary Wahl, Howes, Kille [Page 8] INTERNET-DRAFT LDAP August 1996 The data type "AttributeDescriptionList" describes a list of 0 or more attribute types.Clients and servers should be prepared to accept a(A list ofmany hundreds of attribute types.zero elements has special significance in the Search request.) AttributeDescriptionList ::= SEQUENCESIZE (0..maxInt)OF AttributeDescriptionINTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 19964.1.5. Attribute Value A field of type AttributeValue takes on as its value either an octet string encoding of aX.500 DirectoryAttributeValuetype.data type, or an OCTET STRING containing a DER-encoded binary value, depending on whether the "binary" option is present in the companion AttributeDescription to this AttributeValue. The definition ofthesestring encodings for different syntaxes and types may be found in companions to this document,such asin particular [5]. AttributeValue ::= OCTET STRING Note that there is no defined limit on the size of this encoding; thus PDUs including multi-megabyte attributes (e.g. photographs) may be returned. If the client has limited memory or storage capabilities it may wish to set the attrSizeLimitfield whensession control before invoking a search operation. Clients and server implementors should be aware that attributes whose type names they do not recognize may have an arbitrary and non-printable syntax. Implementations should not either simply display or attempt to decode as DER a value if its syntax is not known. The implementation may attempt to discover the subschema subentry and retrieve the value of attributeTypes from it. 4.1.6. Attribute Value Assertion The AttributeValueAssertion type definition is similar to the one in the X.500 directory standards. It contains an attributetypedescription and a equality matching assertion suitable for that type. AttributeValueAssertion ::= SEQUENCE {attributeType AttributeType,attributeDesc AttributeDescription, assertionValue AssertionValue } AssertionValue ::= OCTET STRING If the "binary" option is present in attributeDesc, this signals to the server that the assertionValue is a binary DER encoding of the assertion value. For all the string-valued user attributes described in [5], the assertion value syntax is the same as the value syntax. Note however that the assertion syntax may be different than the value syntax for operational attributes or for non-equality matching rules. Wahl, Howes, Kille [Page 9] INTERNET-DRAFT LDAP August 1996 4.1.7. Attribute An attribute consists of a type and one or more values of that type.Attribute(Though attributes must have at least one value when stored, due to access control restrictions the set may be empty when transferred in protocol. This is described in section 4.5.2, concerning the PartialAttributeList type.) Attribute ::= SEQUENCE { type AttributeDescription, vals SETSIZE (1..maxInt)OF AttributeValue } 4.1.8. Matching Rule Identifier An X.501(1993) Matching Rule is identified in the LDAP protocol by the ASCII representation of its OBJECT IDENTIFIER, either as one of the strings given in [5], or as decimal digits with components separated by periods, e.g. "caseIgnoreIA5Match" or "1.3.6.1.4.1.453.33.33". MatchingRuleId ::=LDAPOIDLDAPString 4.1.9. Result Message The LDAPResult is the construct used in this protocol to return success or failure indications from servers to clients. In response to various requests, servers will return responses containing fields of type LDAPResult to indicate the final status of a protocol operation request. Wahl, Howes, Kille [Page 10] INTERNET-DRAFT LDAP August 1996 LDAPResult ::= SEQUENCE { resultCode ENUMERATED { success (0), operationsError (1), protocolError (2), timeLimitExceeded (3), sizeLimitExceeded (4), compareFalse (5), compareTrue (6),INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996authMethodNotSupported (7), strongAuthRequired (8), -- 9 reserved -- referral (10), -- new adminLimitExceeded (11), -- new unavailableCriticalExtension (12), -- newunableToProceed (13), -- new--14-1513-15 unused -- noSuchAttribute (16), undefinedAttributeType (17), inappropriateMatching (18), constraintViolation (19), attributeOrValueExists (20), invalidAttributeSyntax (21),overSpecifiedFilter (22),--new -- 23-3122-31 unused -- noSuchObject (32), aliasProblem (33), invalidDNSyntax (34), -- 35 reserved for undefined isLeaf(35),-- aliasDereferencingProblem (36), -- 37-47 unused -- inappropriateAuthentication (48), invalidCredentials (49), insufficientAccessRights (50), busy (51), unavailable (52), unwillingToPerform (53), loopDetect (54), -- 55-63 unused -- namingViolation (64), objectClassViolation (65), notAllowedOnNonLeaf (66), notAllowedOnRDN (67), entryAlreadyExists (68), objectClassModsProhibited (69), resultsTooLarge (70), -- cl only affectsMultipleDSAs (71), -- new -- 72-79 unused -- other (80) }, -- 81-90 reserved for APIs -- matchedDN LDAPDN, errorMessage LDAPString, referral [3] ReferralOPTIONAL, matchedSubtype [4] AttributeTypeOPTIONAL } Wahl, Howes, Kille [Page 11] INTERNET-DRAFT LDAP August 1996 The errorMessage field of this construct may, at the servers option, be used to returnan ASCIIa string containing a textual, human-readable error diagnostic. As this error diagnostic is not standardized, implementations should not rely on the values returned. If the server chooses not to return a textual diagnostic, the errorMessage field of the LDAPResult type should contain a zero length string. For resultCodes of noSuchObject, aliasProblem,invalidDNSyntax, isLeaf,invalidDNSyntax and aliasDereferencingProblem, the matchedDN field is set to the name of the lowest entry (object or alias) in the DIT that wasmatched and ismatched. If no aliases were dereferenced while attempting to locate the entry, this will be a truncated form of the nameprovided or, if an alias has been dereferenced, of the resulting name in a Search or Compare result.provided. The matchedDN field should be set to a NULL DN (a zero length string)inwith all othercases. When the resultCode is compareTrue the matchedSubtype field may contain the type name of the attribute whose value matched the ava in the Compare operation. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996result codes. 4.1.10. Referral The referral field is present in an LDAPResult if the LDAPResult.resultCode field value isreferral.referral, and absent with all other result codes. It contains a reference to another server (or set of servers) which may be accessed via LDAP or other protocols. At least one LDAPURL must be present in the Reference. Referral ::= SEQUENCESIZE (1..maxInt)OF LDAPURL LDAPURL ::= LDAPString -- limited to characters permitted in URLs Thereferral contains a listclient may contact any of the listed URLs [14] ofservers, any of which the client could contactservers to continue the request. Each server in the list must be capable of processing the operation and presenting a consistent view of the DIT to the client. (The mechanisms for how servers achieve this are outside the scope of this document.) URLs for servers implementing the LDAP protocol are written according to[9]; other kinds[9]. If an alias was dereferenced, the dn part ofURLs may be returned so long asthesame information couldURL should bereceived using other protocols. LDAPURL ::= LDAPStringpresent, with the new target object name. If this is present, theserver has not informationclient should use this name in its next request, otherwise it should use the same name as in the original request. Some servers (e.g. participating in distributed indexing) may change the filter in a referral for a search operation. If the filter part ofwhere to progressthe URL is present in an LDAPURL, the client should use this filter in its next request, otherwise it should use the same filter as it used for that search. Note that UTF-8 characters appearing in a DN or search filter may not be legal for URLs (e.g. spaces) and must be escaped using the % method in RFC 1738. Other kinds of URLs may be returned so long as the operation could be performed using that protocol, and the client has indicated (in a session control) that it couldreturn tosupport that protocol. If theclient,client has not indicated that it is capable of handling referrals, the server shouldnotattempt to progress the referral on behalf of the client. Only if it fails to do so may it return a referral,but instead returnand theresult code unableToProceed.URLs in this referral must be of the LDAP form. Wahl, Howes, Kille [Page 12] INTERNET-DRAFT LDAP August 1996 4.2. Bind Operation The function of the Bind Operation is to allow authentication information to be exchanged between the client andserver, and optionally allow session-wide parameters to be set.server. The Bind Request is defined as follows: BindRequest ::= [APPLICATION 0] SEQUENCE { version INTEGER (1 .. 127), name LDAPDN, authenticationAuthenticationChoice, serviceControls [7] Controls OPTIONALAuthenticationChoice } AuthenticationChoice ::= CHOICE { simple[1][0] OCTET STRING, --21 and32 reservedprotected [4] ProtectedPassword, strong [5] StrongCredentials, otherkind [6] OtherCredentials } ProtectedPassword ::= SEQUENCE { time1 [0] UTCTime OPTIONAL, time2 [1] UTCTime OPTIONAL, random1 [2] BIT STRING OPTIONAL, random2sasl [3]BIT STRING OPTIONAL, protected [4] OCTET STRING } StrongCredentials ::= SEQUENCE { certification-path [0] AF.CertificationPath OPTIONAL, bind-token [1] DAS.TokenSaslCredentials }OtherCredentialsSaslCredentials ::= SEQUENCE {authMechanism [0] LDAPOID, authToken [1]mechanism LDAPString, credentials OCTET STRING }Controls ::= SEQUENCE OF SEQUENCE { controlType LDAPString, criticality BOOLEAN DEFAULT FALSE, controlValue OCTET STRING } INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996Parameters of the Bind Request are: - version: A version number indicating the version of the protocol to be used in this protocol session. This document describes version 3 of the LDAP protocol. Note that there is no version negotiation, and the client should just set this parameter to the version it desires. The client may request version 2, in which case the servershouldmust implement only the protocol as described in[2].[2], and not return any v3-specific result codes or protocol fields. - name: The name of the directory object that the client wishes to bind as. This field may take on a null value (a zero length string) for the purposes of anonymous binds,orwhen authentication has been performed at a lowerlayer.layer, or when using SASL credentials with a mechanism that includes the LDAPDN in the credentials. - authentication: information used to authenticate the name, if any, provided in the Bind Request.- serviceControls: additional requests the client may make about the protocol.Upon receipt of a Bind Request, a protocol server will authenticate the requestingclientclient, ifnecessary, and attempt to set up a protocol session with that client.necessary. The server will then return a Bind Response to the client indicating the status of thesession setup request.authentication. 4.2.1. Sequencing of the Bind Request For some authentication mechanisms, it may be necessary for the client to invoke the BindRequest multiple times. If at any stage the client wishes to abort the bind process it should drop the underlying connection. Clients must not invoke operations between two Bind requests made as part of a multi-stage bind. Wahl, Howes, Kille [Page 13] INTERNET-DRAFT LDAP August 1996 Unlike LDAP v2, the client need not send a Bind Request in the first PDU of the connection. The client may request any operations and the server should treat these as unauthenticated (or authentication may have already occured at a lower layer). If the server requires that the client bind first, the server should reject any request otherthatthan binding or unbinding with the "operationsError" result. If the client did not bind before sending a request and receives an operationsError, it should close the connection, reopen it and begin again by first sending a PDU with a Bind Request. This will aid in interoperating with LDAPv2 servers. Clients may send multiple bind requests on anassociation.association to change their credentials. A subsequent bind process has the effect of abandoning all search, compare and resume operations outstanding. Authentication or controls from earlier binds are subsequently ignored, and so if the bind fails, the connection will be treated as anonymous. Clients shouldsubequentlyresend their session controls if needed after rebinding, as session controls may beignored. 4.2.1reset to defaults by servers. 4.2.2 Authentication and Other Security Services The simple authentication option provides minimal authentication facilities, with the contents of the authentication field consisting only of a cleartext password. Note that the use of cleartext passwords is not recommended over open networks when there is no authentication or encryption being performed by a lower layer; see the "Security Considerations section". If no authentication is to be performed, or has been performed at a lower layer, then the simple authentication option should be chosen, and the password be of zero length. (This is often done by LDAPv2 clients.) The"simple" authentication option provides minimal authentication facilities,sasl choice allows for any mechanism defined for use with SASL [18] or listed in Appendix B to be used. The mechanism field contains thecontentsname of theauthentication field consisting only of a cleartext password.mechanism. TheProtectedPassword authentication option allows a hash ofcredentials field contains thepassword, combined optionally witharbitrary data used for authentication, inside an OCTET STRING wrapper. Note that unlike some Internet application protocols where SASL is used, LDAP is not text-based, thus no base64 transformations are performed on thecurrent time and a random number, to be sent tocredentials. If any SASL-based integrity or confidentiality services are enabled, they take effect following theDSA. The protected field containstransmission by thehash value. Strong authentication toserver and reception by thedirectory can be accomplished usingclient of thestrong credentials option.final BindResponse with resultCode success. 4.2.3. Bind Response TheASN.1 type "CertificationPath"Bind Response is definedin [12], andas follows. BindResponse ::= [APPLICATION 1] SEQUENCE { COMPONENTS OF LDAPResult, supportedVersion [5] INTEGER (1..127) OPTIONAL, serverURL [6] LDAPURL OPTIONAL, serverCreds [7] AuthenticationChoice OPTIONAL } A BindResponse consists simply of an indication from theASN.1 type "Token" is defined in [13]. They are included in Appendix Bserver of the status of the client's request forreference.authentication. Wahl, Howes, Kille [Page 14] INTERNET-DRAFTLightweight Directory Access Protocol (v3) JuneLDAP August 1996Other kinds of authentication toIf thedirectory canbind was successful, the resultCode will beperformed usingsuccess, otherwise it will be one of: operationsError protocolError authMethodNotSupported strongAuthRequired referral inappropriateAuthentication invalidCredentials unavailable unavailableCriticalExtension If theother credentials option. The authMechanism mustclient receives a BindResponse response where the resultCode was protocolError and the supportedVersion field is absent, it should close the connection as the server will be unwilling to accept further operations. (This is for compatability with earlier versions of LDAP.) The serverURL contains thedotted-decimal printable representationURL of this LDAP server, if it wishes to provide anOBJECT IDENTIFIER of that authentication mechanism:"authoritative" URL forinteroperability the full decimal format mustitself. Typically this will beused. The authToken is arbitrary information ofaform defined by that authentication mechanism, encoded in an OCTET STRING. 4.2.1.1. Strong Credentials Signature Algorithm It is recommended for interoperability that if strong authentication is to be performed, then ifURL of theserver's or client's certificates"ldap:" type, indicating the official host name, and the name part of the URL will containRSA public keysthePKCS md5WithRSAEncryption (1.2.840.113549.1.1.4) algorithm should be used. 4.2.2. Service Controls Service Controlsencoded name of the server itself. The serverCreds arerequests made byused as part of a SASL-defined bind mechanism; to allow the client to authenticate the server to whichaffect its interactionit is communicating, or to perform "challenge-response" authentication. If the client bound with theserver. Controls are not saved after a session unbindspassword choice, ordisconnects abruptly, and dothe SASL mechanism does notaffect other sessions to this or other servers. Ifrequire the server to return information to the client, then this field is notcapableto be included in the result. The supportedVersion field contains the minimum ofsetting one or more requested controls, it should set as many as possible. If anythe version supplied by the client in the BindRequest and the highest version of LDAP supported in thecontrols whichserver. If the client and servercould not set are marked as critical,both implement the protocol described in this document itshould returnwill have theunavailableCriticalExtension error. The controlTypevalue 3. This fieldmust eithershould be absent when responding to astring defined in this section,version 2 or earlier client. 4.3. Unbind Operation The function of the Unbind Operation is to terminate adotted-decimal representationprotocol session. The Unbind Operation is defined as follows: UnbindRequest ::= [APPLICATION 2] NULL The Unbind Operation has no response defined. Upon transmission of anOBJECT IDENTIFIER. This will aid in preventing conflicts between privately-defined control extensions. The following controls have been defined: - referringServer - chainingProhibited - supportedReferral - useAliasOnUpdate - manageDsaIT - preferredLanguage The referringServer control is always non-critical. The value field containsUnbindRequest, a protocol client may assume that theURLprotocol session is terminated. Upon receipt ofanother server which referredanoperation to this server. This control should only be present if the connection is being made only to processUnbindRequest, areferral. Ifprotocol server may assume that theconnection will be held open to handle referrals from multiple servers this control should be omitted. The chainingProhibited controlrequesting client has terminated the session and that all outstanding requests may becritical or non-critical atdiscarded, and may close theclients request. The value shouldconnection. All session controls will bean empty string. If present,forgotten and search result caches will be cleared when a connection closes. 4.4. Session Control Operation SessionRequest ::= [APPLICATION 17] Controls SessionResponse ::= [APPLICATION 18] SEQUENCE { COMPONENTS OF LDAPResult, unsupportedCtls [12] SEQUENCE OF LDAPString } Wahl, Howes, Kille [Page 15] INTERNET-DRAFT LDAP August 1996 Controls ::= SEQUENCE OF SEQUENCE { controlType LDAPString, criticality BOOLEAN DEFAULT FALSE, controlValue OCTET STRING } Session Controls are requests made by theserver shouldclient which affect its interaction with the server. Controls are notcontact anysaved after a session unbinds or disconnects abruptly, and do not affect otherservers, if it would be possible to instead returnsessions to this or other servers. Session controls do not affect operations which have already been requested on this connection, e.g. if the client sends areferral. Ifsearch request and subsequently sends a sessionControlRequest while the server isa gateway to X.500, itin the middle of sending responses, the session controls which were in force when the search operation began shouldsetcontinue to apply for all thechainingProhibited serviceresults of that search. Session controls are not cumulative, and a session request will override all session controls which were set by a previous request. If a control was set onany DAP/DSP requests it makes. The supportedReferral control is always non-critical. The field isastring name ofprevious request and was not mentioned in aprotocol whichsubsequent request, it will be reset by theclient implements. The name ofserver to its default value. (This permits session controls, such as supportedProtocol, to have multiple values.) If theprotocol may be "ldap", "cldap", "dap", or any IANA-assigned protocol nameserver is not capable of setting one orURL mechanism.more requested controls, it should set as many as possible. Ifthis control is present, aany of the controls which the server could not set are marked as critical, it should return the unavailableCriticalExtension error. The controlType field must either be areferral rather than chain to another server.string defined in this section, or a dotted-decimal representation of an OBJECT IDENTIFIER. This will aid in preventing conflicts between privately-defined control extensions. String names are case insensitive. The following controls have been defined: - attrSizeLimit - dontUseCopy - usePartialCopy - referringServer - chainingProhibited - supportedProtocol - useAliasOnUpdate - manageDsaIT - preferredLanguage The attrSizeLimit control may be critical or non-critical at theclientsclient's request. The valueshould befield contains either an emptystring. If present, the server should permit alias names to be used as components ofstring, implying no limit, or aDistinguished Name in Add, Modify and Delete operations. If the server isstring representation of agateway to X.500, it should set the useAliasOnUpdate critical extensions on any DAP/DSP AddEntry, ModifyEntry and RemoveEntry requests it makes. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996positive integer, e.g. "10000". ThemanageDsaITdefault if this control isalways critical. The value should be an empty string. If present, the chainingProhibited control must also benot presentand critical. This control affects the name resolution behavioris that there is no limit. The attrSizeLimit number is a size in bytes of theserver to permit a manager to read and modify knowledge references and other server-specific attributes. Iflargest encoded value which theserverclient is capable of processing. Servers should not return attribute values in agateway to X.500, itsearch response which are larger than this size. (If attribute values are excluded because of this control, the incompleteEntry field should be set to TRUE in themanageDsaITSearchResultEntry). The dontUseCopy control may be criticalextension, as well asor non-critical at theappropriate common arguments, on any DAP/DSP requests it makes.client's request. ThepreferredLanguagevalue field contains either "TRUE" or "FALSE". To aid interoperability with LDAPv2 clients, the default if this control isalways non-critical. The valuenot set isan ISO 646 language code (such as "EN" for English)."FALSE". This controladvisesonly affects theserver what language should be used for returned attribute valuesSearch anderror messages. It does not affect character sets; BMP is always used. 4.2.3. Bind ResponseCompare operations. Wahl, Howes, Kille [Page 16] INTERNET-DRAFT LDAP August 1996 TheBind Response willusePartialCopy control may beone ofcritical or non-critical at thefollowing,client's request. The value field contains eitherBindResponseBasic"TRUE" orBindResponseExtended. BindResponseBasic ::= [APPLICATION 1] LDAPResult A BindResponseBasic consists simply of an indication from the server of the status of"FALSE". To aid interoperability with LDAPv2 clients, theclient's request fordefault if this control is not set is "FALSE". This control only affects theinitiationSearch and Compare operations when dontUseCopy is "FALSE". If present and set to "TRUE", then if a contacted server holds at least one requested attribute or at least one subtype of aprotocol session. Ifrequested attribute type in an entry, that entry may be used to satisfy thebind was successful,request, even if not all theresultCode will be success, otherwise it will be one of: operationsError protocolError authMethodNotSupported strongAuthRequired referral inappropriateAuthentication invalidCredentials unavailable unavailableCriticalExtensionrequested attributes are in the shadowed copy. If FALSE theclient receivesserver must not return attributes from aBindResponseBasic response whereshadow copy of an entry unless none of theresultCode was not success, it should closerequested attributes were excluded from theconnection asshadow copy. (How servers replicate information and configure shadowing is outside theserver will be unwilling to accept further operations.scope of this specification.) TheBindResponseExtendedreferringServer control isused to provide additional information in the bind response, for either a successful or unsuccessfull bind operation. BindResponseExtended ::= [APPLICATION 17] SEQUENCE { result [0] LDAPResult, serverURL [1] LDAPURL OPTIONAL, serverCreds [2] AuthenticationChoice OPTIONAL, supportedExtns [3] SEQUENCE OF LDAPString, unsupportedCtls [4] SEQUENCE OF LDAPString }always non-critical. TheserverURLvalue field contains the URL of another server which referred an operation to thisLDAPserver.The serverCreds allowsThis control should only be present if theclientconnection is being made only toauthenticateprocess a referral. If theserverconnection will be held open towhich ithandle referrals from multiple servers this control should be omitted. There iscommunicating. The supportedExtns contains the namesno protocol effect ofservice controls and extended operations whichthisserver supports. The unsupportedCtls names the service controls which the client requested but the server was not able to set. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 4.2.4 Bind Continuation The BindContinuationRequestcontrol; it is usedwhen a "challenge-response" style of authentication isto assist in tracing knowledge inconsistencies in the distributed directory. The chainingProhibited control may beperformed.critical or non-critical at the client's request. Theclient will initially send a BindRequest,value should be either "TRUE" or "FALSE". To aid interoperability with LDAPv2 clients, the default if this control is not set is "FALSE". If this control is present andwill receive a BindResponseExtended. The client may then send a BindContinuationRequestset tosupply additional information"TRUE", the server should not contact any other servers as part ofa single authentication process. The server will replyprocessing operations requested by this client, if it would be possible to instead return to theBindContinuationRequest withclient aBindResponseExtended. BindContinuationRequest ::= [APPLICATION 19] SEQUENCE { otherkind [6] OtherCredentials } 4.3. Unbind Operation The function ofreferral. If theUnbind Operationserver is a gateway toterminateX.500, and DAP is not a supported client referral protocolsession.(see next paragraph), the server should set the chainingProhibited service control on any DAP or DSP requests it makes. TheUnbind OperationsupportedProtocol control isdefined as follows: UnbindRequest ::= [APPLICATION 2] NULLalways non-critical. TheUnbind Operation has no response defined. Upon transmission of an UnbindRequest, a protocol client may assume that the protocol sessionfield isterminated. Upon receipta string name ofan UnbindRequest,a protocolserver may assume thatwhich therequestingclienthas terminatedimplements. The name of thesession and that all outstanding requestsprotocol may bediscarded, and may close the connection. 4.4. Search Operation The Search Operation allows a client"ldap", "cldap", "dap", any IANA-assigned protocol name or URL mechanism, or "*" torequestindicate that any type of referral may be returned. If this control is present, asearchserver should return a referral, rather than itself chain to another server using one of the indicated protocol. This control may beperformed on its behalf bypresent multiple times in aserver. The Search Requestsession control if the client wishes to name multiple protocols it supports. If the supportedProtocol control isdefined as follows: SearchRequest ::= [APPLICATION 3] SEQUENCE { baseObject LDAPDN, scope ENUMERATED { baseObject (0), singleLevel (1), wholeSubtree (2) }, derefAliases ENUMERATED { neverDerefAliases (0), derefInSearching (1), derefFindingBaseObj (2), derefAlways (3) }, sizeLimit INTEGER (0 .. maxInt), timeLimit INTEGER (0 .. maxInt), typesOnly BOOLEAN, filter Filter, attributes AttributeDescriptionList, pageSizeLimit [0] INTEGER OPTIONAL, sortKeys [1] SortKeyList OPTIONAL, modifyRightsReq [3] BOOLEAN DEFAULT FALSE, extraAttributes [4] BOOLEAN DEFAULT FALSE, attrSizeLimit [5] INTEGER OPTIONAL, subentries [6] BOOLEAN DEFAULT FALSE, dontUseCopy [7] BOOLEAN DEFAULT FALSE, usePartialCopy [8] BOOLEAN DEFAULT FALSE } SortKeyList ::= SEQUENCE OF SEQUENCE { attributeType AttributeType, orderingRule [0] MatchingRuleId OPTIONAL, reverseOrder [1] BOOLEAN DEFAULT FALSE } INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 Filter ::= CHOICE {absent and[0] SET OF Filter,the server is capable of contacting other servers, then it should return not return results with referrals, as described in 4.1.10, or[1] SET OF Filter,SearchResultContinuation, as described in 4.5.3. If however the server is not[2] Filter, equalityMatch [3] AttributeValueAssertion, substrings [4] SubstringFilter, greaterOrEqual [5] AttributeValueAssertion, lessOrEqual [6] AttributeValueAssertion, present [7] AttributeType, approxMatch [8] AttributeValueAssertion, extensibleMatch [9] MatchingRuleAssertion } SubstringFilter ::= SEQUENCE {capable of contacting other servers, it may return a referral or continuation containing a URL of typeAttributeType, substrings SEQUENCE SIZE (1..maxInt) OF CHOICE { initial [0] LDAPString, any [1] LDAPString, final [2] LDAPString } } MatchingRuleAssertion ::= SEQUENCE { matchingRules [1] SET SIZE (0..maxInt) OF MatchingRuleId, type [2] AttributeType, matchValue [3] AssertionValue, dnAttributes [4] BOOLEAN } Parameters of the Search Request are: - baseObject: An LDAPDN that"LDAP". It is recommended that clients, as a minimum, support LDAP referrals, and set thebase object entry relative to which the search issupportedProtocol control to beperformed. - scope: An indicator of the scope of the search to"ldap". Wahl, Howes, Kille [Page 17] INTERNET-DRAFT LDAP August 1996 The useAliasOnUpdate control may beperformed.critical or non-critical at the client's request. Thesemantics ofvalue should be either "TRUE" or "FALSE". To aid interoperability with LDAPv2 clients, thepossible values ofdefault if thisfield are identicalcontrol is not set is "FALSE". If present and set to TRUE, thesemanticsserver should permit alias names to be used as components ofthe scope fielda Distinguished Name in Add, Modify and Delete operations. If thedirectory Search Operation. - derefAliases: An indicator asserver is a gateway tohow alias objectsX.500, it should set the useAliasOnUpdate critical extension on any DAP/DSP AddEntry, ModifyEntry and RemoveEntry requests it makes if this control is "TRUE". The manageDsaIT control is always critical. The value should behandled in searching.either "TRUE" or "FALSE". Thesemantics of the possible values ofdefault, if thisfield are: neverDerefAliases: docontrol is notdereference aliases in searching or in locatingset, is "FALSE". This control affects thebase objectname resolution behavior of thesearch; derefInSearching: dereference aliases in subordinates ofserver to permit a manager to read and modify knowledge references and other X.500 server-specific attributes. If thebase object in searching, but not in locating the base object of the search; derefFindingBaseObject: dereference aliases in locating the base object of the search, but not when searching subordinates of the base object; derefAlways: dereference aliases both in searching and in locating the base object of the search. - sizelimit: A sizelimit that restricts the maximum number of entriesserver is a gateway tobe returnedX.500, it should set the manageDsaIT critical extension, as well asa result ofthesearch. A valueappropriate common arguments, on any DAP/DSP requests it makes, based on this control. The preferredLanguage control is always non-critical. The use of0 inthisfield indicates that no sizelimit restrictions are in effect for the search. - timelimit: A timelimit that restrictscontrol and its impact on themaximum time (in seconds) allowed for a search. A value of 0directory is defined in [17]. The default if thisfield indicatescontrol is not set, is that there is notimelimit restrictions are in effect for the search. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 - typesOnly: An indicator as to whether search results should contain both attribute types and values, or just attribute types. Setting this field to TRUE causes only attribute types (no values) to be returned. Setting this field to FALSE causes both attribute types and valuespreferred language. 4.5. Search Operation The Search Operation allows a client tobe returned. - filter: A filter that defines the conditionsrequest thatmust be fulfilled in order for thea searchto matchbe performed on its behalf by agiven entry.server. 4.5.1. Search Request Theand, or and not choices maySearch Request is defined as follows: SearchRequest ::= [APPLICATION 3] SEQUENCE { baseObject LDAPDN, scope ENUMERATED { baseObject (0), singleLevel (1), wholeSubtree (2) }, derefAliases ENUMERATED { neverDerefAliases (0), derefInSearching (1), derefFindingBaseObj (2), derefAlways (3) }, sizeLimit INTEGER (0 .. maxInt), timeLimit INTEGER (0 .. maxInt), typesOnly BOOLEAN, filter Filter, attributes AttributeDescriptionList, pageSizeLimit [0] INTEGER OPTIONAL, sortKeys [1] SortKeyList OPTIONAL } SortKeyList ::= SEQUENCE OF SEQUENCE { attributeType AttributeType, orderingRule [0] MatchingRuleId OPTIONAL, reverseOrder [1] BOOLEAN DEFAULT FALSE } Wahl, Howes, Kille [Page 18] INTERNET-DRAFT LDAP August 1996 Filter ::= CHOICE { and [0] SET OF Filter, or [1] SET OF Filter, not [2] Filter, equalityMatch [3] AttributeValueAssertion, substrings [4] SubstringFilter, greaterOrEqual [5] AttributeValueAssertion, lessOrEqual [6] AttributeValueAssertion, present [7] AttributeType, approxMatch [8] AttributeValueAssertion, extensibleMatch [9] MatchingRuleAssertion } SubstringFilter ::= SEQUENCE { type AttributeDescription, -- at least one must beused to form boolean combinationspresent substrings SEQUENCE OF CHOICE { initial [0] LDAPString, any [1] LDAPString, final [2] LDAPString } } MatchingRuleAssertion ::= SEQUENCE { matchingRule [1] MatchingRuleId OPTIONAL, type [2] AttributeType OPTIONAL, matchValue [3] AssertionValue, dnAttributes [4] BOOLEAN DEFAULT FALSE } Parameters offilters.the Search Request are: -attributes: A list ofbaseObject: An LDAPDN that is theattributes from eachbase object entryfound as a result ofrelative to which the search is to bereturned.performed. - scope: Anempty list signifies that all attributes from each entry found inindicator of the scope of the searchareto bereturned. - pageSizeLimit: if present and set to TRUE, then if more entriesperformed. The semantics of the possible values of this field are identical tobe returned thanthepageSizeLimit, the server should return only as many as this limit before returning the SearchResultDone response. It must cache all of the results for the lifetime of the association. (The client will be able to request moresemantics of theentries using the ResumeRequest, and the cached results can be cleared if the client sends the Abandon operation for this search). Ifscope field in thesame or fewer entries than this limit areX.511 Search Operation. - derefAliases: An indicator as tobe returned, the serverhow alias objects shouldreturn all the entries and the SearchResultDone response, and need not cache the result.be handled in searching. ThepageSizeLimit does not affect SearchResultReference responses,semantics ofwhich any number may be returned bytheserver. - sortKeys: Ifpossible values of this fieldis present, then it specifies oneare: neverDerefAliases: do not dereference aliases in searching ormore attribute types and matching rules, and the returned entries should be sortedinorder based on these types. Iflocating thereverseOrder field is set to TRUE, thenbase object of theentries will be presentedsearch; derefInSearching: dereference aliases inreverse sorted order. Ifsubordinates of theserver doesbase object in searching, but notrecognize anyin locating the base object of theattribute types, orsearch; derefFindingBaseObject: dereference aliases in locating theordering rule associated with an attribute type isbase object of the search, but notapplicable, or nonewhen searching subordinates of theattributesbase object; derefAlways: dereference aliases both in searching and in locating thesearch responses arebase object ofthese types, thenthesortKeys field is ignored and result entries are returned in random order.search. -modifyRightsReq: If this field is set to TRUE andsizelimit: A sizelimit that restricts thescope field is setmaximum number of entries tobaseObject, thenbe returned as a result of theclient requestssearch. A value of 0 in this field indicates thatthe modification rightsno sizelimit restrictions are in effect for theentry be included insearch. Wahl, Howes, Kille [Page 19] INTERNET-DRAFT LDAP August 1996 - timelimit: A timelimit that restricts thesearch result. Supportmaximum time (in seconds) allowed for a search. A value of 0 in this fieldis optional, and clients should expectindicates thatnot all servers will implement returning modify rights.no timelimit restrictions are in effect for the search. -extraAttributes: IftypesOnly: An indicator as to whether search results should contain both attribute types and values, or just attribute types. Setting this fieldis present and setto TRUEthen all operational attributes are requestedcauses only attribute types (no values) to bereturned as well. Note that specific operational attributes may instead be listed in the attributes field. Servers are permitted to ignore extraAttributes if returning this information is prohibited by security policy. Clients should note that many operational attributes are not modifiable. - attrSizeLimit: Ifreturned. Setting this fieldis present, then if the size in bytes of anto FALSE causes both attribute types andall itsvalueswhich wouldto bereturned in a result entry exceeds this size in bytes, thenreturned. - filter: A filter that defines theattribute is not includedconditions that must be fulfilled in order for theresult and the incompleteEntry field is setsearch toTRUE. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 - subentries: if presentmatch a given entry. The 'and', 'or' andset to TRUE, the server should ignore ordinary'not' choices may be used to form boolean combinations of filters. At least one filter element must be present in an 'and' or 'or' choice. The others match against individual attribute values of entriesand only performin thesearch against subentries. Ifscope of theserver not support subentries andsearch. The extensibleMatch is new in this version of LDAP. If the matchingRule field isTRUE it should not do any searching,absent, the type field must be present, andreturn an empty result. (Note that iftheLDAPequality match isbacked by an X.500(1988) directory service,performed for that type. If theLDAP server may receive a protocolError or unavailableCriticalExtension error, which it should discardtype field is absent andinstead return tomatchingRule is present, theclientmatchValue is compared against all attributes in anempty result.) - dontUseCopy: if presententry which support that matchingRule, andset to TRUE, onlytheserver which holdsmatchingRule determines themaster copy ofsyntax for theentry is permitted to performassertion value. If thefiltering and attribute selection. - usePartialCopy: iftype field is present andset to TRUE, ifmatchingRule is present, theserver holds a shadow copy of at leastmatchingRule must be oneattribute from a matching entry, it shouldpermitted for use with thatcopytype. If the dnAttributes field is set tosatisfyTRUE, thesearch, even if notmatch is applied against all the attributesrequested are presentinthe shadowed copy.an entry's distinguished name as well. (Editors note: TheresultsdnAttributes field is present so that there does not need to be multiple versions of generic matching rules such as wordMatch, one to apply to entries and another to apply to entries and dn attributes as well). - attributes: A list of thesearch attempted byattributes from each entry found as a result of theserver upon receipt of a Search Request are returned in Search Responses, which are LDAP messages containing either SearchResultEntry, SearchResultReference, SearchResultDone or SearchResultFull data types. SearchResultEntry ::= [APPLICATION 4] SEQUENCE { objectName LDAPDN,search to be returned. An empty list signifies that all user attributesPartialAttributeList, modifyRights [2] BOOLEAN OPTIONAL, incompleteEntry [3] BOOLEAN DEFAULT FALSE, fromEntry [4] BOOLEAN DEFAULT FALSE, thisEntryNumber [5] INTEGER OPTIONAL, totalCount [6] INTEGER OPTIONAL } PartialAttributeList ::= SEQUENCE SIZE (0..maxInt) OF SEQUENCE { type AttributeDescription, vals SET SIZE (0..maxInt) OF AttributeValue } SearchResultReference ::= [APPLICATION 18] Referral SearchResultDone ::= [APPLICATION 5] LDAPResult SearchResultFull ::= SEQUENCE SIZE (1..maxInt) OF CHOICE {from each entrySearchResultEntry, reference SearchResultReference, resultCode SearchResultDone } Upon receipt of a Search Request, a server will performfound in thenecessarysearchof the DIT. If the LDAP session is operating over a connection-oriented transport suchare to be returned, asTCP,does theserver will return tospecial attribute description string "*". (the latter technique allows the clienta sequence of responses in separate LDAP messages. There may be zero or more responses containing SearchResultEntry, one for each entry found duringto request all user attributes along with selected operational attributes). If thesearch. There may also be zero or more responses containing SearchResultReference, one for each areaclient does notexplored by this server duringwant any attributes returned, it can request only thesearch. The SearchResultEntry and SearchResultReferences may comeattribute with OID "1.1". Attributes should be named at most once inany order. Following alltheSearchResultReference responseslist, and are returned at most once in an entry. Client implementors should note that even if allSearchResultEntry responses up to a pageSizeLimit (if any),user attributes are requested, some attributes of theserver willentry may not be included in search results due to access control restrictions. Furthermore, servers will not returna response containing the SearchResultDone, which contains an indication of success,operational attributes, such as modifyRights ordetailing any errors that have occurred. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 If theattributeTypes, unless they are listed by name, since there may be extremely large number of values for certain operational attributes. (A list of operational attributes for use in LDAPsessionisoperating over a connectionless transport such as UDP,given in [5].) - pageSizeLimit: if present, then if more entries are to be returned than the pageSizeLimit, the serverwillshould returnto the clientonlyone response, a LDAPMessage containing a SearchResultFull data type. All if any but the last element ofas many as this limit before returning theSEQUENCE OFSearchResultDone response. It mustbecache all of theSearchResultEntry type, and the last must be ofresulting entries from this search, at least until theSearchResultDone type. The SearchResultFullnext (non-resume) operation isnever returned over a connection-oriented transport. Each entry returned in a SearchResultEntry will containinvoked. The server may cache allattributes, complete with associated values if necessary,the results for as long asspecified intheattributes fieldlifetime of theSearch Request. Return of attributes is subject to access control and other administrative policy. In a SearchResultEntry, as an encoding optimisation,association, although if server resources are limited it may clear thevalue ofcache after theobjectNamenext (non-resume) operation is invoked. Wahl, Howes, Kille [Page 20] INTERNET-DRAFT LDAPDN may useAugust 1996 If atrailing '*' character to refer to the baseObject ofpageSizeLimit was set and reached during thecorresponding searchRequest. For example, ifsearch, thebaseObject is specified as "o=UofM, c=US", thenclient will be able to request more of thefollowing objectName LDAPDNs in a response would haveentries using theindicated meanings objectName returned actual LDAPDN denoted ____________________________________________________ "*" "o=UofM, c=US" "cn=Babs Jensen, *" "cn=Babs Jensen, o=UofM, c=US" If (and only if)ResumeRequest, and themodifyRightsReq field was present incached results can be cleared by theSearch Request mayclient sending the Abandon operation for this search message id. If the same or fewer entries than this limit are to be returned, the serveralso includeshould return all theModifyRights field inentries and theentry. If presentSearchResultDone response, and need not cache the result. The pageSizeLimit does not affect SearchResultReference responses, of which any number may be returned by the server. If operating over connectionless data transport, the client must not setto TRUE,this field. - sortKeys: If this field is present, thenthe server suggestsitis likely that a valid modification operationspecifies one or more attribute types and matching rules, and the returned entries should be sorted in order based onthis entry would succeed.these types. Ifpresent andthe reverseOrder field is set toFALSE,TRUE, thenit is likelytheoperation would fail due to an authentication or access control restriction.entries will be presented in reverse sorted order. Ifno information is availablethe servershoulddoes notincluderecognize any of themodifyRights field inattribute types, or theresponse. The incompleteEntry flagordering rule associated with an attribute type isset if onenot applicable, ormorenone of the attributes in the search responses are of these types, then the sortKeys field is notpresentused and result entries are returned in random order. If thePartialAttributeList, because their size would have exceeded the attribute size limit, or if a partial shadow copy of the entry was used to satisfyserver does not support sorting with therequest and somerequested attributesare not returned. Itor matching rules, then it must return only protocolError (which isnever set just because typesOnly was set to TRUE. Thewhat an LDAPv2 servermay setwould return), undefinedAttributeType or inappropriateMatching and no searchResultEntry or searchResultReference responses. If thefromEntry fieldclient includes the attribute type name 'modifyRights' ina SearchResult entry to TRUE if it is known thatthe searchis not based uponrequest attribute type list when performing ashadow or cached copy of the entry, but that the source of entry data has been directly contacted. If the pageSizeLimit control was present,baseObject search, then the servermust numbershould return theentries which matchmodifyRights attribute as part of thesearch.response attributes for that entry. Thefirst entry returned will have thisEntryNumber field contain the number 0, the nextvalue of this attribute isnumber 1, etc. The server must also indicate a countdescribed in section 6.2.2.1 of [5], and corresponds to thetotal numberX.511(93) ModifyRights field ofentries inthefield totalCount. The server may reviseReadResponse. Note that an X.500 "list"-like operation can be emulated by thecount,client requesting alarger totalCount field inone-level LDAP search operation with alater SearchResultEntry will overridefilter checking for thetotalCount fieldexistence ofan earlier SearchResultEntry forthe objectClass attribute, and thatsearch. Ifan X.500 "read"-like operation can be emulated by a base object LDAP search operation with the same filter. A serverwas ablewhich provides a gateway tolocate the entry referredX.500 is not required tobyuse thebaseObject but was unableRead or List operations, although it may choose tosearch alldo so. If theentries insearch filter includes an equality match of thescope atobjectClass attribute andunderthebaseObject,value "subentry", then if the servermay return one or more SearchResultReference, each containing a referenceis converting toanother LDAP server for continuing the operation. The server should return at most one SearchResultReference for a subtree. A server must not return a SearchResultReference if it has not located the baseObject and thus has not searched any entries; in this case it should return a SearchResultDone containing a referral resultCode. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 Note thatan X.500"list" operation can be emulated by a one-level LDAP search operation with a filter checking forprotocol, theexistencesubentries service control should be set. 4.5.2. Search Result The results of theobjectClass attribute, and that an X.500 "read" operation can be emulated by a base object LDAPsearchoperation withattempted by thesame filter. 4.5. Resume Search Operation The Resumeserver upon receipt of a SearchOperation is usedRequest are returned inconjunction with aSearchoperationResponses, whichwas previously issued on this association. ResumeRequestare LDAP messages containing either SearchResultEntry, SearchResultReference, SearchResultDone or SearchResultFull data types. Wahl, Howes, Kille [Page 21] INTERNET-DRAFT LDAP August 1996 SearchResultEntry ::= [APPLICATION20]4] SEQUENCE {searchRequestID [0] MessageID, startAtEntry [1] INTEGER OPTIONAL, entriesToReturn [2] INTEGER OPTIONALobjectName LDAPDN, attributes PartialAttributeList }The SearchRequest must have been made with the pageSizeLimit field present, andPartialAttributeList ::= SEQUENCE OF SEQUENCE { type AttributeDescription, vals SET OF AttributeValue } -- implementors should note that theserver must notPartialAttributeList may havereturned-- zero elements (if none of theSearchResultDone for this search, indicatingattributes of thatall the results have been returnedentry were -- requested, oran error was encountered. A Search which has been abandoned cannotcould beresumed. The searchRequestID field must contain the value of messageID which the client used forreturned), and that theoriginal search operation. The startAtEntry numbervals set maybe any number greater than 0, andalso -- have zero elements (if types only was requested, or all thesumvalues -- exceeded the attribute size limit or were excluded because ofstartAtEntry and entriesToReturn-- access control). SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL -- at least one LDAPURL element mustnotbegreater than the value ofpresent SearchResultDone ::= [APPLICATION 5] SEQUENCE { COMPONENTS OF LDAPResult, totalCountreturned by the[8] INTEGER OPTIONAL } SearchResultFull ::= SEQUENCE OF CHOICE { entry SearchResultEntry, reference SearchResultReference, resultCode SearchResultDone } Upon receipt of a Search Request, a serverfor this search. Note that the client may request thatwill perform theserver retransmit entries which it has already sent, by setting a valuenecessary search ofstartAtEntry smaller thanthethisEntryNumber ofDIT. If thelast entry whichLDAP session is operating over a connection-oriented transport such as TCP, the serverhas transmitted. The serverwillrespondreturn to theResumeRequest with either a ResumeError, or withclient aseriessequence ofSearchResultEntry responses. The ResumeError is only returned ifresponses in separate LDAP messages. There may be zero or more responses containing SearchResultEntry, one for each entry found during the search. There may also be zero or more responses containing SearchResultReference, one for each area not explored by this serverdetected a problem withduring theResumeRequest, such as an invalid searchRequestID.search. The SearchResultEntry and SearchResultReferences may come in any order. Following all the SearchResultReference responseshaveand all SearchResultEntry responses up to a pageSizeLimit (if any), theMessageID ofserver will return a response containing theResumeRequest, notSearchResultDone, which contains an indication of success, or detailing any errors that have occurred. If theoriginal SearchRequest. ResumeError ::= [APPLICATION 21] LDAPResult An example of using ResumeLDAP session isas follows: CLIENT SERVER 0,BindRequest --> 0,BindResponse <-- 1,SearchRequest (pageSizeLimit=2) --> (search matches 5 entries) 1,SearchResultEntry (0 of 5) <-- 1,SearchResultEntry (1 of 5) <-- 1,SearchResultDone <-- INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 2,ResumeRequest (search id 1, start at 2, retrieve 3) --> 2,SearchResultEntry (2 of 5) <-- 2,SearchResultEntry (3 of 5) <-- 2,SearchResultEntry (4 of 5) <-- 3,AbandonRequest (id 1) --> (search cache cleared) 4.6. Modify Operation The Modify Operation allowsoperating over a connectionless transport such as UDP, the server will return to the client only one response torequest thatthe search, an LDAPMessage containing amodificationSearchResultFull data type. All (if any) but the last element of theDIB be performed on its behalf by a server. The Modify Request is defined as follows: ModifyRequest ::= [APPLICATION 6] SEQUENCE { object LDAPDN, modification SEQUENCE SIZE (1..maxInt) OFSEQUENCE{ operation ENUMERATED { add (0), delete (1), replace (2) }, modification AttributeTypeAndValues } } AttributeTypeAndValues ::= SEQUENCE { type AttributeDescription, vals SETOFAttributeValue } Parametersmust be of theModify Request are: - object: The object toSearchResultEntry or SearchResultReference types, and the last must bemodified. The valueofthis field should nametheobject to be modified.SearchResultDone type. Theserver will not perform any alias dereferencingSearchResultFull is never returned over a connection-oriented transport. Wahl, Howes, Kille [Page 22] INTERNET-DRAFT LDAP August 1996 Each entry returned in a SearchResultEntry will contain all attributes, complete with associated values if necessary, as specified indeterminingtheobject to be modified. - A listattributes field ofmodifications to be performed ontheentry to be modified. The entire listSearch Request. Return ofentry modifications shouldattributes is subject to access control and other administrative policy. Some attributes may beperformedreturned in DER-encoded binary format (indicated by theorder they are listed, asAttributeDescription in the response having the binary option present), or in asingle atomic operation. While individual modifications may violatelanguage-specific subtype (indicated by thedirectory schema,AttributeDescription in theresultingresponse having the language option present). The following are not strictly attributes of an entryafter(or a subentry), but may appear in theentireresult listof modificationsif requested. - entryName. This operational attribute isperformed must conformmaintained by the server and appears to be present in each entry. The value of this attribute is therequirementsdistinguished name of thedirectory schema. The valuesentry from which it is read. It is expected thatmay be taken on bythe'operation' fieldclient would retrieve this attribute ineach modification construct havebinary. - modifyRights. Each value is thefollowing semantics respectively: add: add values listedencoding of an element of modifyRights. The attribute is specific to thegiven attribute, creatingparticular search operation and theattributerequestor, and must not be cached or replicated.' - incompleteEntry. This attribute's value is TRUE ifnecessary; delete: delete values listed fromone or more attributes are not present in thegiven attribute, removingPartialAttributeList, because their size would have exceeded theentireattributeif no values are listed,size limit, or ifall current valuesa partial shadow copy of theattribute are listed for deletion; replace: replace existing values ofentry was used to satisfy thegivenrequest and some requested attributes are not returned. It is never set just because typesOnly was set to TRUE, or because a requested attributewith the new values listed, creatingwas not present in theattribute if necessary. A replace with no(master) entry. - fromEntry. The server may return this attribute's valueshould deleteas FALSE if it is known that theentire attribute. The resultsearch is based upon a shadow or cached copy of themodify attempted byentry, and may return it as TRUE if the serverupon receipt of a Modify Request is returned inmasters the entry. In aModify Response, definedSearchResultEntry, asfollows: INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 ModifyResponse ::= [APPLICATION 7] LDAPResult Upon receiptan encoding optimization, the value ofa Modify Request, a server will performthenecessary modificationsobjectName LDAP DN may use a trailing '*' character tothe DIB. The server will returnrefer to theclient a single Modify Response indicating either the successful completionbaseObject of theDIB modification, or the reason thatcorresponding searchRequest. For example, if themodification failed. Note that due tobaseObject is specified as "o=UofM, c=US", then therequirement for atomicityfollowing objectName LDAPDNs inapplyinga response would have thelist of modifications inindicated meanings objectName returned actual LDAPDN denoted ____________________________________________________ "*" "o=UofM, c=US" "cn=Babs Jensen, *" "cn=Babs Jensen, o=UofM, c=US" If theModify Request,pageSizeLimit field was present, theclient may expect that no modifications ofserver must number theDIB have been performed ifentries which match theModify Response received indicates any sort of error,search, andthat all requested modifications have been performed ifmust indicate theModify Response indicates successful completiontotal number of entries which match theModify Operation. 4.7. Add Operation The Add Operation allows a client to requestsearch in theadditionfield totalCount ofan entry intothedirectory.SearchResultDone. TheAdd Request is defined as follows: AddRequest ::= [APPLICATION 8] SEQUENCE { entry LDAPDN, attributes AttributeList, targetSystem [0] LDAPString OPTIONAL } AttributeList ::= SEQUENCE SIZE (1..maxInt) OF SEQUENCE { type AttributeDescription, vals SET SIZE (1..maxInt) OF AttributeValue } Parameters oftotal count would either be theAdd Request are: - entry:same as or greater than theDistinguished Namenumber of SearchResultEntry responses returned at this time. If it is greater, then theentry to be added. Note thatserver did not return allcomponents ofthename except forresponses because thelast RDN componentpageSizeLimit was reached, and the server mustexist forcache all theadd to succeed. Note also thatresulting entries. If it is the same, then the serverwilldid notdereference any aliases in locatingexceed theentry to be added,pageSizeLimit, andthat there are never any entries subordinate to an alias entry. - attributes:thelist of attributes that make upserver need not cache thecontent ofresponses. When theentry being added. - targetSystem: if present,search result exceeded thestring representation of an AccessPoint93, identifyingpageSizeLimit, all matching entries are cached (including those for which SearchResultEntry was returned), and the serverwhich should holdmust not clear thetarget entry.cache until an operation other than a ResumeRequest for this search is received. Wahl, Howes, Kille [Page 23] INTERNET-DRAFT LDAP August 1996 4.5.3. Continuation References in the Search Result If the serverdoes not supportwas able to locate thetargetSystem extension it should returnentry referred to by theerror unavailableCriticalExtension. The result ofbaseObject but was unable to search all theadd attempted byentries in the scope at and under the baseObject, the serverupon receipt ofmay return one or more SearchResultReference, each containing aAdd Request is returned in the Add Response, defined as follows: AddResponse ::= [APPLICATION 9] LDAPResult Upon receiptreference to another set ofan Add Request,servers for continuing the operation. The server should return at most one SearchResultReference for a new subordinate base object with a particular scope and filter. A serverwill attempt to performmust not return a SearchResultReference if it has not located theadd requested.baseObject and thus has not searched any entries; in this case it should return a SearchResultDone containing a referral resultCode. TheresultSearchResultReference is of theadd attempt will be returned tosame data type as theclientReferral. A URL inthe Add Response. 4.8. Delete Operation The Delete Operation allowsaclient to requestSearchResultReference may only be included if theremoval of an entry fromclient has indicated (in thedirectory. The Delete Requestsession controls) that it isdefined as follows: DelRequest ::= [APPLICATION 10] LDAPDN INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 The Delete Request consists of the Distinguished Name of the entryable tobe deleted. Notehandle that protocol. If theserver willclient has notdereference aliases while resolving the name ofindicated any protocols which thetarget entryserver could use tobe removed. The result ofreturn in a SearchResultReference, thedelete attempted byserver must itself process the entire search. If the serverupon receipt of a Delete Request iscould not contact all other servers, it may return one or more SearchResultReference for unexplored subtrees, and must indicate also that only partial results were returned by setting the resultCode in theDelete Response, defined as follows: DelResponse ::= [APPLICATION 11] LDAPResult Upon receipt of a Delete Request, a server will attemptSearchResultDone toperformbe something other than success, such as timeLimitExceeded. URLs for servers implementing theentry removal requested.LDAP protocol are written according to [9]. Theresult of the delete attempt willdn part must bereturned to the clientpresent in theDelete Response. Note that only leaf objects may be deletedURL, withthis operation. 4.9. Modify DN Operationthe new target object name. TheModify DN Operation allows aclienttomust use this name in its next request. Some servers (e.g. participating in distributed indexing) may change thelast component offilter. If thenamefilter part ofan entrythe URL is present in an LDAP URL, thedirectory, or to move a subtree of entries to a new locationclient should use this filter in its next request, otherwise it should use thedirectory. The Modify DN Request is definedsame filter asfollows: ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { entry LDAPDN, newrdn RelativeLDAPDN, deleteoldrdn BOOLEAN, newSuperior [0] LDAPDN OPTIONAL } Parameters of the Modify DN Request are: - entry: the nameit used for that search. Other kinds ofthe entry toURLs may bechanged. - newrdn:returned so long as theRDNoperation could be performed using thatwill form the last component ofprotocol, and thenew name. - deleteoldrdn:client has indicated (in aboolean parametersession control) thatcontrols whether the old RDN attribute values should be retained as attributes of the entry or deleted from the entry. - newSuperior: if present, thisit istheable to handle that protocol. The name ofanother entry which should be the superior of thean unexplored subtree in a SearchResultReference need not be subordinate to theentry field. The resultbase object if an alias was dereferenced, however it should not be a prefix of thename change attempted bybase object, otherwise theserver upon receipt of a Modify DN Requestclient will loop. (Client implementations must detect loops; see section 6.2.) Note: the "X.500 Non-Specific Subordinate Reference" isreturnednot permitted in LDAP. Servers must not return multiple SearchResultReference for theModify DN Response, defined as follows: ModifyDNResponse ::= [APPLICATION 13] LDAPResult Upon receipt of a Modify RDN Request, a server will attempt to perform the name change. The resultsame subtree, and any one of (not all of) thename change attempt willservers listed in a SearchResultReference may bereturnedcontacted to perform thecliententire search in a particular subtree. 4.5.3.1 Example For example, suppose theModify DN Response. The attributes that make upcontacted server (hosta) holds theold RDN are deleted fromentry "O=MNN,C=WW" and theentry,entry "CN=Manager,O=MNN,C=WW". It knows that either LDAP-capable servers (hostb) orkept, depending on(hostc) hold "OU=People,O=MNN,C=WW" (one is thesetting ofmaster and thedeleteoldrdn parameter. 4.10. Compare Operation The Compare Operation allowsother server aclientshadow), and that LDAP-capable server (hostd) holds the subtree "OU=Roles,O=MNN,C=WW". If a subtree search of "O=MNN,C=WW" is requested tocompare an assertion provided with an entrythe contacted server in which chainingProhibited is set and referrals are permitted, and thedirectory. The Compare Requestfilter isdefined as follows: CompareRequest ::= [APPLICATION 14] SEQUENCE { entry LDAPDN, ava AttributeValueAssertion, dontUseCopy [1] BOOLEAN DEFAULT FALSE } INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 Parameters ofobjectClass=*, theCompare Request are: - entry: the name ofserver may return theentry tofollowing responses: Wahl, Howes, Kille [Page 24] INTERNET-DRAFT LDAP August 1996 SearchResultEntry for O=MNN,C=WW SearchResultEntry for CN=Manager,O=MNN,C=WW SearchResultReference { ldap://hostb/OU=People,O=MNN,C=WW ldap://hostc/OU=People,O=MNN,C=WW } SearchResultReference { ldap://hostd/OU=Roles,O=MNN,C=WW } SearchResultDone (entries = 2) Client implementors should note that when following a SearchResultReference, additional SearchResultReference may becompared with. - ava: the assertion with which an attribute ingenerated. Continuing theentry is to be compared. - dontUseCopy:example, ifpresent and set to TRUE, only the server which holdsthemaster copy ofclient contacted theentry is permitted to returnserver (hostb) and issued thecompareTrue or compareFalse results. The result ofsearch for thecompare attempted bysubtree "OU=People,O=MNN,C=WW", the serverupon receipt of a Compare Request is returned in the Compare Response, definedmight respond as follows:CompareResponseSearchResultEntry for OU=People,O=MNN,C=WW SearchResultReference { ldap://hoste/OU=Managers,OU=People,O=MNN,C=WW } SearchResultReference { ldap://hostf/OU=Consultants,OU=People,O=MNN,C=WW } 4.6. Resume Search Operation The Resume Search Operation is used in conjunction with a Search operation which was previously issued on this association. ResumeRequest ::= [APPLICATION15] LDAPResult Upon receipt of a Compare Request, a server will attempt to perform the requested comparison.20] SEQUENCE { searchRequestID [0] MessageID, startAtEntry [1] INTEGER, entriesToReturn [2] INTEGER } Theresult of the comparison will be returned to the client inSearchRequest must have been made with theCompare Response. Note that errorspageSizeLimit field present, and theresult of comparison are allserver must not have returnedinall thesame construct. Note that some directory systems may establish access controls which permitresults at thevalues of certain attributes (such as userPassword) to be compared but not read. 4.11. Abandon Operation The functiontime of theAbandon Operation is to allowsearch, or indicated aclient to request thatresultCode in theserver abandon an outstanding operation. The Abandon RequestSearchResultDone other than success, timeLimitExceeded, sizeLimitExceeded or adminLimitExcceded. A Search which isdefined as follows: AbandonRequest ::= [APPLICATION 16] MessageIDstill in progress (the final SearchResultDone has not been returned) or has been abandoned cannot be resumed. TheMessageIDsearchRequestID field mustbe thatcontain the value ofa Search, Resume or Compare operationmessageID whichwas requested earlier during this association. Other typesthe client used for the original search operation. Entries in a result are always numbered starting from 1. The startAtEntry number may be any number greater than 0, and the sum ofoperations cannotstartAtEntry and entriesToReturn must not beabandoned. There is no response defined ingreater than one plus theAbandon Operation. Upon transmissionvalue ofan Abandon Operation, atotalCount returned by the server for this search. The client mayexpectrequest that theoperation identified byserver retransmit entries which it had already sent as responses for theMessage ID insearch, e.g. by setting startAtEntry to "1" and entriesToReturn to be theAbandon Request has been abandoned. Insame as totalCount, all theevent that aentries will be transmitted. Wahl, Howes, Kille [Page 25] INTERNET-DRAFT LDAP August 1996 The serverreceives an Abandon Request onwill respond to the ResumeRequest with either aSearchResumeError, orResume Operation in the midstwith a series oftransmittingSearchResultEntry responsestoand a SearchResultDone response. The ResumeError is returned if thesearch, thatservershould cease transmitting entry responses to the abandoned request immediately. If the MessageID is fordetected aSearch operation in which pageSizeLimit was set,problem with theabandon will clearResumeRequest, such as an invalid searchRequestID, or if theresults fromserver has cleared theserver's cache. Abandoning a Resume operation does not clear the cache. 4.11 Extended Operation It may be desirable in some communities to define additional operations for services not available in this protocol, for instance digitally signed operationscache and cannot resume that search, or if the Directory Information Tree has changed such that the search would no longer return the same results.Thus an extension mechanismTheextended operation allows clients to make requestsSearchResultEntry andreceiveSearchResultDone responseswith bilaterally-defined syntaxesfrom a ResumeRequest have the Message ID of the ResumeRequest, not of the original SearchRequest. Any SearchResultReferences are returned at the the time of the original search, andsemantics. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 ExtendedRequestnone returned by a resume operation. ResumeError ::= [APPLICATION23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING } The requestName21] LDAPResult An example of using Resume isa dotted-decimal representationas follows: CLIENT SERVER 1,SearchRequest (pageSizeLimit=2) --> (search matches 5 entries) 1,SearchResultEntry (1 ofthe OBJECT IDENTIFIER corresponding5) <-- 1,SearchResultEntry (2 of 5) <-- 1,SearchResultDone (5) <-- 2,ResumeRequest (search id 1, startAtEntry 3, entriesToReturn 3) --> 2,SearchResultEntry (3 of 5) <-- 2,SearchResultEntry (4 of 5) <-- 2,SearchResultEntry (5 of 5) <-- <-- 2,SearchResultDone (5) 3,AbandonRequest (id 1) --> (search cache cleared) 4.7. Modify Operation The Modify Operation allows a client to request that a modification of therequest.DIB be performed on its behalf by a server. TherequestValueModify Request isinformation in a formdefinedby that request, encapsulated inside an OCTET STRING. The server will respond to this with an LDAPMessage containing the ExtendedResponse. ExtendedResponseas follows: ModifyRequest ::= [APPLICATION24]6] SEQUENCE {responseName [0] LDAPOID OPTIONAL, response [1] OCTET STRING OPTIONAL, standardResponse [2] LDAPResultobject LDAPDN, modification SEQUENCE OF SEQUENCE { operation ENUMERATED { add (0), delete (1), replace (2) }, modification AttributeTypeAndValues }If the server does not recognize} Wahl, Howes, Kille [Page 26] INTERNET-DRAFT LDAP August 1996 AttributeTypeAndValues ::= SEQUENCE { type AttributeDescription, vals SET OF AttributeValue } Parameters of theoperation name, itModify Request are: - object: The object to be modified. The value of this field shouldreturn only the standardResponse field, containing the protocolError result code. 5. Protocol Element Encodings and Transfer For compatibility withname theexisting LDAP v2 and CLDAP protocols, four underlying services are defined here. However an LDAPobject to be modified. The serverneedwill notimplement all of them. 5.1. Mapping Onto BER-based Transport Services This protocolperform any alias dereferencing in determining the object to be modified unless the useAliasOnUpdate session control isdesignedset torun over connection-oriented, reliable transports, with all 8 bits in an octet being significant inTRUE. - A list of modifications to be performed on thedata stream.entry to be modified. Theprotocol elementsentire list ofLDAPentry modifications should be performed in the order they areencoded for exchange usinglisted, as a single atomic operation. While individual modifications may violate theBasic Encoding Rules (BER) [11]directory schema, the resulting entry after the entire list ofASN.1 [3]. However, duemodifications is performed must conform to thehigh overhead involved in using certain elementsrequirements of theBER, the following additional restrictions are placeddirectory schema. The values that may be taken onBER-encodings of LDAP protocol elements: (1) Onlyby thedefinite form of length encoding will be used. (2) BIT STRINGs and OCTET STRINGs will be encoded'operation' field in each modification construct have theprimitive form only. (3) Iffollowing semantics respectively: add: add values listed to the given attribute, creating the attribute if necessary; delete: delete values listed from the given attribute, removing the entire attribute if no values are listed, or if all current values of the attribute are listed for deletion; replace: replace all existing values of the given attribute with the new values listed, creating the attribute if it did not already exist. A replace with no value should delete the entire attribute. The result of the modify attempted by the server upon receipt of aBOOLEAN typeModify Request istrue,returned in a Modify Response, defined as follows: ModifyResponse ::= [APPLICATION 7] LDAPResult Upon receipt of a Modify Request, a server will perform theencoding should have its contents octets setnecessary modifications tohex "FF". (4) Ifthe DIB. The server will return to the client avaluesingle Modify Response indicating either the successful completion ofa type is its default value, it should be absent. Only some BOOLEAN and ENUMERATED types have default values in this protocol definition. If an implementation supportstheprotectedDIB modification, orstrong authentication elements thenthefollowing additional restrictions apply: (5) UTC Times inreason that theprotocol itself should be encoded withmodification failed. Note that due to the"Z" suffix, not as a local time. (Thisrequirementdoes not apply to times in attribute values). (6) Unused bitsfor atomicity in applying thefinal octetlist of modifications in theencoding of a BIT STRING value, if there are any, should always be set to zero. These restrictions do not apply to ASN.1 types encapsulated insideModify Request, the client may expect that no modifications ofOCTET STRINGs, such as attribute values. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 5.1.1. Transmission Control Protocol (TCP) The LDAPMessage PDUs are mapped directly ontotheTCP bytestream. Server implementations running overDIB have been performed if theTCP should provide a protocol listener on port 389. 5.1.2. Connection Oriented Transport Service (COTS) The connection is established. No special useModify Response received indicates any sort ofT-Connect is made. Each LDAPMessage PDUerror, and that all requested modifications have been performed if the Modify Response indicates successful completion of the Modify Operation. If the connection fails, whether the modification occurred or not ismapped directly onto T-Data. 5.1.3. User Datagram Protocol (UDP) The LDAPMessage PDUs are mapped directly onto UDP datagrams. Only one request may be sentindeterminate. Note that due to the simplifications made in LDAP, there is not asingle datagram. Only one response may be sentdirect mapping of the modifications in an LDAP ModifyRequest onto the EntryModifications of asingle datagram. Servera DAP ModifyEntry operation, and different implementationsrunning overof LDAP-DAP gateways may use different means of representing theUDP should provide a protocol listener on port 389.change. Theonlyfinal effect of the operations on the entry will be identical. Wahl, Howes, Kille [Page 27] INTERNET-DRAFT LDAP August 1996 4.8. Add Operation The Add Operation allows a client to request the addition of an entry into the directory. The Add Request is defined as follows: AddRequest ::= [APPLICATION 8] SEQUENCE { entry LDAPDN, attributes AttributeList } AttributeList ::= SEQUENCE OF SEQUENCE { type AttributeDescription, vals SET OF AttributeValue } Parameters of the Add Request are: - entry: the Distinguished Name of the entry to be added. Note that all components of the name except for the last RDN component must exist for the add to succeed. Note also that the server will not dereference any aliases in locating the entry to be added (unless the useAliasOnUpdate session control is TRUE), and that there are never any entries subordinate to an alias entry. - attributes: the list of attributes that make up the content of the entry being added. Clients must included distinguished values in this list. The result of the add attempted by the server upon receipt of a Add Request is returned in the Add Response, defined as follows: AddResponse ::= [APPLICATION 9] LDAPResult Upon receipt of an Add Request, a server will attempt to perform the add requested. The result of the add attempt will be returned to the client in the Add Response. 4.9. Delete Operation The Delete Operation allows a client to request the removal of an entry from the directory. The Delete Request is defined as follows: DelRequest ::= [APPLICATION 10] LDAPDN The Delete Request consists of the Distinguished Name of the entry to be deleted. Note that the server will not dereference aliases while resolving the name of the target entry to be removed, unless the useAliasOnUpdate session control is TRUE. The result of the delete attempted by the server upon receipt of a Delete Request is returned in the Delete Response, defined as follows: DelResponse ::= [APPLICATION 11] LDAPResult Upon receipt of a Delete Request, a server will attempt to perform the entry removal requested. The result of the delete attempt will be returned to the client in the Delete Response. Note that only leaf objects (with no subordinates) may be deleted with this operation. Wahl, Howes, Kille [Page 28] INTERNET-DRAFT LDAP August 1996 4.10. Modify DN Operation The Modify DN Operation allows a client to change the last component of the name of an entry in the directory, or to move a subtree of entries to a new location in the directory. The Modify DN Request is defined as follows: ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { entry LDAPDN, newrdn RelativeLDAPDN, deleteoldrdn BOOLEAN, newSuperior [0] LDAPDN OPTIONAL } Parameters of the Modify DN Request are: - entry: the name of the entry to be changed. - newrdn: the RDN that will form the last component of the new name. - deleteoldrdn: a boolean parameter that controls whether the old RDN attribute values should be retained as attributes of the entry or deleted from the entry. - newSuperior: if present, this is the name of the entry which becomes the immediate superior of the existing entry. The result of the name change attempted by the server upon receipt of a Modify DN Request is returned in the Modify DN Response, defined as follows: ModifyDNResponse ::= [APPLICATION 13] LDAPResult Upon receipt of a Modify RDN Request, a server will attempt to perform the name change. The result of the name change attempt will be returned to the client in the Modify DN Response. The attributes that make up the old RDN are deleted from the entry, or kept, depending on the setting of the deleteoldrdn parameter. Note that X.500 restricts the ModifyDN operation to only affect entries that are contained within a single server. If the LDAP server is mapped onto DAP, then this restriction will apply, and the resultCode affectsMultipleDSAs will be returned. In general clients should not expect to be able to perform arbitrary movements of entries and subtrees. 4.11. Compare Operation The Compare Operation allows a client to compare an assertion provided with an entry in the directory. The Compare Request is defined as follows: CompareRequest ::= [APPLICATION 14] SEQUENCE { entry LDAPDN, ava AttributeValueAssertion } Parameters of the Compare Request are: - entry: the name of the entry to be compared with. Wahl, Howes, Kille [Page 29] INTERNET-DRAFT LDAP August 1996 - ava: the assertion with which an attribute in the entry is to be compared. The result of the compare attempted by the server upon receipt of a Compare Request is returned in the Compare Response, defined as follows: CompareResponse ::= [APPLICATION 15] SEQUENCE { COMPONENTS OF LDAPResult, matchedSubtype [9] AttributeType OPTIONAL } When the resultCode is compareTrue the matchedSubtype field is permitted to contain the type name of the attribute whose value matched the ava in the Compare operation. Servers which do not implement attribute hierarchies will omit this element. Upon receipt of a Compare Request, a server will attempt to perform the requested comparison. The result of the comparison will be returned to the client in the Compare Response. Note that errors and the result of comparison are all returned in the same construct. Note that some directory systems may establish access controls which permit the values of certain attributes (such as userPassword) to be compared but not read. In a search result, it may be that an attribute of that type would be returned, but with an empty set of values. 4.12. Abandon Operation The function of the Abandon Operation is to allow a client to request that the server abandon an outstanding operation. The Abandon Request is defined as follows: AbandonRequest ::= [APPLICATION 16] MessageID The MessageID must be that of a Search, Resume or Compare operation which was requested earlier during this association. Other types of operations cannot be abandoned. (The abandon request itself has its own message id. This is distinct from the id of the earlier operation being abandoned.) There is no response defined in the Abandon Operation. Upon transmission of an Abandon Operation, a client may expect that the operation identified by the Message ID in the Abandon Request has been abandoned. In the event that a server receives an Abandon Request on a Search or Resume Operation in the midst of transmitting responses to the search, that server should cease transmitting entry responses to the abandoned request immediately. Of course, the server must ensure that only properly encoded LDAPMessages are transmitted. Clients must not send abandon requests for the same operation multiple times. Servers must discard abandon requests for message ids it does not recognize, for operations which cannot be abandoned, and for operations which have already been abandoned. Wahl, Howes, Kille [Page 30] INTERNET-DRAFT LDAP August 1996 If the MessageID is for a Search operation in which pageSizeLimit was set, the abandon will clear the results from the server's cache. Abandoning a Resume operation does not clear the cache, it just stops the server from sending responses. 4.13. Extended Operation It may be desirable in some communities to define additional operations for services not available in this protocol, for instance digitally signed operations and results. Thus an extension mechanism has been added in this version of LDAP. The extended operation allows clients to make requests and receive responses with predefined syntaxes and semantics. These may be defined in RFCs or be private to particular implementations. Each operation should have a unique OBJECT IDENTIFIER assigned to it. ExtendedRequest ::= [APPLICATION 23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING } The requestName is a dotted-decimal representation of the OBJECT IDENTIFIER corresponding to the request. The requestValue is information in a form defined by that request, encapsulated inside an OCTET STRING. The server will respond to this with an LDAPMessage containing the ExtendedResponse. ExtendedResponse ::= [APPLICATION 24] SEQUENCE { COMPONENTS OF LDAPResult, responseName [10] LDAPOID OPTIONAL, response [11] OCTET STRING OPTIONAL } If the server does not recognize the operation name, it should return only the standard response fields, containing the protocolError result code. 5. Protocol Element Encodings and Transfer For compatibility with the existing LDAP v2 and CLDAP protocols, four underlying services are defined here. However an LDAP server need not implement all of them. 5.1. Mapping Onto BER-based Transport Services This protocol is designed to run over connection-oriented, reliable transports, with all 8 bits in an octet being significant in the data stream. The protocol elements of LDAP are encoded for exchange using the Basic Encoding Rules (BER) [11] of ASN.1 [3]. However, due to the high overhead involved in using certain elements of the BER, the following additional restrictions are placed on BER-encodings of LDAP protocol elements: (1) Only the definite form of length encoding will be used. Wahl, Howes, Kille [Page 31] INTERNET-DRAFT LDAP August 1996 (2) BIT STRINGs and OCTET STRINGs will be encoded in the primitive form only. (3) If the value of a BOOLEAN type is true, the encoding should have its contents octets set to hex "FF". (4) If a value of a type is its default value, it should be absent. Only some BOOLEAN and INTEGER types have default values in this protocol definition. These restrictions do not apply to ASN.1 types encapsulated inside of OCTET STRINGs, such as attribute values, unless otherwise noted. 5.1.1. Transmission Control Protocol (TCP) The LDAPMessage PDUs are mapped directly onto the TCP bytestream. Server implementations running over the TCP should provide a protocol listener on port 389. 5.1.2. Connection Oriented Transport Service (COTS) The connection is established. No special use of T-Connect is made. Each LDAPMessage PDU is mapped directly onto T-Data. 5.1.3. User Datagram Protocol (UDP) The LDAPMessage PDUs are mapped directly onto UDP datagrams. A datagram may contain one or more concatenated requests. Only one response datagram is returned, containing all the responses concatenated together. The only operations which the client may request are sessionRequest, searchRequest, compareRequest and extendedReq. The server may return sessionResponse, searchResFull, compareResponse and extendedResp. If any of the requests in an incoming datagram generates an error (a result other than success, compareTrue or compareFalse), the server should ignore any following requests in that datagram. Server implementations running over the UDP should provide a protocol listener on port 389. 5.1.4. Secure Socket Layer over TCP (SSL) LDAP is an application protocol which may be carried inside of an Secure Sockets Layer connection [19]. After establishing the SSL connection over TCP, the LDAPMessage PDUs are mapped directly onto the bytestream. Server implementations running over SSL/TCP should provide a protocol listener on port 636. Note: it is expected that future versions of this document may reference an IETF specification for equivalent security services, should one become available. Wahl, Howes, Kille [Page 32] INTERNET-DRAFT LDAP August 1996 6. Implementation Guidelines 6.1. Server Implementations The server should be capable of recognizing all the mandatory attribute type names and implement the syntaxes specified in [5]. Servers may also recognize additional attribute type names. 6.2. Client Implementations For simple lookup applications using the connectionless transport protocol UDP, use of a retry algorithm with multiple servers similar to that commonly used in DNS stub resolver implementations is recommended. The location of a CLDAP server or servers may be better specified using IP addresses (simple or broadcast) rather than names that must first be looked up in another directory such as DNS. 6.2.1. Loop Detection Clients which request referrals should ensure that they do not loop between servers. They must not progress a referral or reference in a subtree search where the new name is a superior of the name requested. They must not repeatedly contact the same server twice with the same target entry name. Some clients may be using a counter that is incremented each time referral handling is handled for an operation, and these kind of clients must be able to handle a DIT with up to ten layers of naming contexts between the root and a leaf entry. 7. Security Considerations When used with a connection-oriented transport, this version of the protocol provides facilities for the LDAP v2 authentication mechanism, simple authentication using a cleartext password, as well as any SASL mechanism [18]. It is also permitted that the server can return its credentials to the client, if it chooses to do so. This document also defines a mapping of LDAP over the Secure Sockets Layer (SSL), which can provide strong authentication, integrity and privacy of the connection. Use of cleartext password is strongly discouraged where the underlying transport service cannot guarantee confidentiality. A password hashing mechanism is given in Appendix B. When used with SASL, it should be noted that the name field of the BindRequest is not protected against modification. Thus if there is a client name (LDAPDN) agreed through the negotiation of the credentials, it must take precedence over any value in the unprotected name field. Wahl, Howes, Kille [Page 33] INTERNET-DRAFT LDAP August 1996 When used with the connectionless transport, no security services are available. There has been some discussion about the desirability of authentication with connectionless LDAP requests. This might take the form of a clear text password (which would go against the current IAB drive to remove such things from protocols) or some arbitrary credentials. It is felt that, in general, authentication would incur sufficient overhead to negate the advantages of the connectionless basis of LDAP. If an application requires authenticated access to the directory then connectionless LDAP is not an appropriate protocol. 8. Acknowledgements This document is an update to RFC 1777, by Wengyik Yeong, Tim Howes, and Steve Kille. It also includes material from RFC 1798, by Alan Young. Design ideas included in this document are based on those discussed in ASID and other IETF Working Groups. The contributions of individuals in these working groups is gratefully acknowledged. 9. Bibliography [1] ITU-T Rec. X.500, "The Directory: Overview of Concepts, Models and Service", 1993. [2] W. Yeong, T. Howes, S. Kille, "Lightweight Directory Access Protocol", RFC 1777, March 1995. [3] ITU-T Rec. X.680, "Abstract Syntax Notation One (ASN.1) - Specification of Basic Notation", 1994. [4] S. Kille, M. Wahl, "A UTF-8 String Representation of Distinguished Names", INTERNET-DRAFT <draft-ietf-asid-ldapv3-dn-00.txt>. August 1996. [5] M. Wahl, A. Coulbeck, T. Howes, S. Kille, W. Yeong, C. Robbins, "Lightweight X.500 Directory Access Protocol Standard and Pilot Attribute Definitions", INTERNET-DRAFT <draft-ietf-asid-ldapv3-attributes-02.txt>, August 1996. [6] ITU-T Rec. X.501, "The Directory: Models", 1993. [7] ITU-T Rec. X.520, "The Directory: Selected Attribute Types", 1993. [9] T. Howes, M. Smith, "An LDAP URL Format", RFC 1959, June 1996. [10] ITU-T Rec. X.518, "The Directory: Procedures for Distributed Operation", 1993. [11] ITU-T Rec. X.690, "Specification of ASN.1 encoding rules: Basic, Canonical, and Distinguished Encoding Rules", 1994. [12] ITU-T Rec. X.509, "The Directory: Authentication Framework", 1993. [13] ITU-T Rec. X.511, "The Directory: Abstract Service Definition", 1993. [14] T. Berners-Lee, L. Masinter, M. McCahill, "Uniform Resource Locators (URL)", RFC 1738, Dec. 1994. Wahl, Howes, Kille [Page 34] INTERNET-DRAFT LDAP August 1996 [15] Universal Multiple-Octet Coded Character Set (UCS) - Architecture and Basic Multilingual Plane, ISO/IEC 10646-1 : 1993. [16] M. Davis, UTF-8, (WG2 N1036) DAM for ISO/IEC 10646-1. [17] M. Wahl, T. Howes, "LDAP Use of Language Indications", INTERNET-DRAFT <draft-ietf-asid-ldapv3-lang-00.txt"> August 1996. [18] J. Meyers, "Simple Authentication and Security Layer", INTERNET-DRAFT <draft-myers-auth-sasl-04.txt>, July 1996. [19] A. Freier, P. Karlton, P. Kocher, "The SSL Protocol Version 3.0", INTERNET-DRAFT <draft-freier-ssl-version3-01.txt>, March 1996. 10. Authors' Address Mark Wahl Critical Angle Inc. 4815 W Braker Lane #502-385 Austin, TX 78759 USA EMail: M.Wahl@critical-angle.com Tim Howes Netscape Communications Corp. 501 E. Middlefield Rd. Mountain View, CA 94043 USA Phone: +1 415 254-1900 EMail: howes@netscape.com Steve Kille ISODE Consortium The Dome, The Square Richmond TW9 1DT UK Phone: +44-181-332-9091 EMail: S.Kille@isode.com Appendix A - Complete ASN.1 Definition Lightweight-Directory-Access-Protocol-V3 DEFINITIONS IMPLICIT TAGS ::= BEGIN Wahl, Howes, Kille [Page 35] INTERNET-DRAFT LDAP August 1996 LDAPMessage ::= SEQUENCE { messageID MessageID, cldapUserName LDAPDN OPTIONAL, protocolOp CHOICE { bindRequest BindRequest, bindResponse BindResponse, unbindRequest UnbindRequest, searchRequest SearchRequest, searchResEntry SearchResultEntry, searchResDone SearchResultDone, searchResRef SearchResultReference, searchResFull SearchResultFull, modifyRequest ModifyRequest, modifyResponse ModifyResponse, addRequest AddRequest, addResponse AddResponse, delRequest DelRequest, delResponse DelResponse, modDNRequest ModifyDNRequest, modDNResponse ModifyDNResponse, compareRequest CompareRequest, compareResponse CompareResponse, abandonRequest AbandonRequest, sessionRequest SessionRequest, sessionResponse SessionResponse, resumeRequest ResumeRequest, resumeError ResumeError, extendedReq ExtendedRequest, extendedResp ExtendedResponse } } MessageID ::= INTEGER (0 .. maxInt) maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) -- LDAPString ::= OCTET STRING LDAPOID ::= OCTET STRING LDAPDN ::= LDAPString RelativeLDAPDN ::= LDAPString AttributeType ::= LDAPString AttributeDescription ::= LDAPString AttributeDescriptionList ::= SEQUENCE OF AttributeDescription AttributeValue ::= OCTET STRING AttributeValueAssertion ::= SEQUENCE { attributeDesc AttributeDescription, assertionValue AssertionValue } AssertionValue ::= OCTET STRING Wahl, Howes, Kille [Page 36] INTERNET-DRAFT LDAP August 1996 Attribute ::= SEQUENCE { type AttributeDescription, vals SET OF AttributeValue } MatchingRuleId ::= LDAPString LDAPResult ::= SEQUENCE { resultCode ENUMERATED { success (0), operationsError (1), protocolError (2), timeLimitExceeded (3), sizeLimitExceeded (4), compareFalse (5), compareTrue (6), authMethodNotSupported (7), strongAuthRequired (8), -- 9 reserved -- referral (10), -- new adminLimitExceeded (11), -- new unavailableCriticalExtension (12), -- new -- 13-15 unused -- noSuchAttribute (16), undefinedAttributeType (17), inappropriateMatching (18), constraintViolation (19), attributeOrValueExists (20), invalidAttributeSyntax (21), -- 22-31 unused -- noSuchObject (32), aliasProblem (33), invalidDNSyntax (34), -- 35 reserved for undefined isLeaf -- aliasDereferencingProblem (36), -- 37-47 unused -- inappropriateAuthentication (48), invalidCredentials (49), insufficientAccessRights (50), busy (51), unavailable (52), unwillingToPerform (53), loopDetect (54), -- 55-63 unused -- namingViolation (64), objectClassViolation (65), notAllowedOnNonLeaf (66), notAllowedOnRDN (67), entryAlreadyExists (68), objectClassModsProhibited (69), resultsTooLarge (70), -- cl only affectsMultipleDSAs (71), -- new -- 72-79 unused -- other (80) }, -- 81-90 reserved for APIs -- matchedDN LDAPDN, errorMessage LDAPString, referral [3] Referral OPTIONAL } Wahl, Howes, Kille [Page 37] INTERNET-DRAFT LDAP August 1996 Referral ::= SEQUENCE OF LDAPURL LDAPURL ::= LDAPString -- limited to characters permitted in URLs BindRequest ::= [APPLICATION 0] SEQUENCE { version INTEGER (1 .. 127), name LDAPDN, authentication AuthenticationChoice } AuthenticationChoice ::= CHOICE { simple [0] OCTET STRING, -- 1 and 2 reserved sasl [3] SaslCredentials } SaslCredentials ::= SEQUENCE { mechanism LDAPString, credentials OCTET STRING } BindResponse ::= [APPLICATION 1] SEQUENCE { COMPONENTS OF LDAPResult, supportedVersion [5] INTEGER (1..127) OPTIONAL, serverURL [6] LDAPURL OPTIONAL, serverCreds [7] AuthenticationChoice OPTIONAL } UnbindRequest ::= [APPLICATION 2] NULL SessionRequest ::= [APPLICATION 17] Controls SessionResponse ::= [APPLICATION 18] SEQUENCE { COMPONENTS OF LDAPResult, unsupportedCtls [12] SEQUENCE OF LDAPString } Controls ::= SEQUENCE OF SEQUENCE { controlType LDAPString, criticality BOOLEAN DEFAULT FALSE, controlValue OCTET STRING } SearchRequest ::= [APPLICATION 3] SEQUENCE { baseObject LDAPDN, scope ENUMERATED { baseObject (0), singleLevel (1), wholeSubtree (2) }, derefAliases ENUMERATED { neverDerefAliases (0), derefInSearching (1), derefFindingBaseObj (2), derefAlways (3) }, sizeLimit INTEGER (0 .. maxInt), timeLimit INTEGER (0 .. maxInt), typesOnly BOOLEAN, filter Filter, attributes AttributeDescriptionList, pageSizeLimit [0] INTEGER OPTIONAL, sortKeys [1] SortKeyList OPTIONAL } Wahl, Howes, Kille [Page 38] INTERNET-DRAFT LDAP August 1996 SortKeyList ::= SEQUENCE OF SEQUENCE { attributeType AttributeType, orderingRule [0] MatchingRuleId OPTIONAL, reverseOrder [1] BOOLEAN DEFAULT FALSE } Filter ::= CHOICE { and [0] SET OF Filter, or [1] SET OF Filter, not [2] Filter, equalityMatch [3] AttributeValueAssertion, substrings [4] SubstringFilter, greaterOrEqual [5] AttributeValueAssertion, lessOrEqual [6] AttributeValueAssertion, present [7] AttributeType, approxMatch [8] AttributeValueAssertion, extensibleMatch [9] MatchingRuleAssertion } SubstringFilter ::= SEQUENCE { type AttributeDescription, -- at least one must be present substrings SEQUENCE OF CHOICE { initial [0] LDAPString, any [1] LDAPString, final [2] LDAPString } } MatchingRuleAssertion ::= SEQUENCE { matchingRule [1] MatchingRuleId OPTIONAL, type [2] AttributeType OPTIONAL, matchValue [3] AssertionValue, dnAttributes [4] BOOLEAN DEFAULT FALSE } SearchResultEntry ::= [APPLICATION 4] SEQUENCE { objectName LDAPDN, attributes PartialAttributeList } PartialAttributeList ::= SEQUENCE OF SEQUENCE { type AttributeDescription, vals SET OF AttributeValue } -- implementors should note that the PartialAttributeList may have -- zero elements (if none of the attributes of that entry were -- requested, or could be returned), and that the vals set may also -- have zero elements (if types only was requested, or all the values -- exceeded the attribute size limit or were excluded because of -- access control). SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL -- at least one LDAPURL element must be present SearchResultDone ::= [APPLICATION 5] SEQUENCE { COMPONENTS OF LDAPResult, totalCount [8] INTEGER OPTIONAL } SearchResultFull ::= SEQUENCE OF CHOICE { entry SearchResultEntry, reference SearchResultReference, resultCode SearchResultDone } Wahl, Howes, Kille [Page 39] INTERNET-DRAFT LDAP August 1996 ResumeRequest ::= [APPLICATION 20] SEQUENCE { searchRequestID [0] MessageID, startAtEntry [1] INTEGER, entriesToReturn [2] INTEGER } ResumeError ::= [APPLICATION 21] LDAPResult ModifyRequest ::= [APPLICATION 6] SEQUENCE { object LDAPDN, modification SEQUENCE OF SEQUENCE { operation ENUMERATED { add (0), delete (1), replace (2) }, modification AttributeTypeAndValues } } AttributeTypeAndValues ::= SEQUENCE { type AttributeDescription, vals SET OF AttributeValue } ModifyResponse ::= [APPLICATION 7] LDAPResult AddRequest ::= [APPLICATION 8] SEQUENCE { entry LDAPDN, attributes AttributeList } AttributeList ::= SEQUENCE OF SEQUENCE { type AttributeDescription, vals SET OF AttributeValue } AddResponse ::= [APPLICATION 9] LDAPResult DelRequest ::= [APPLICATION 10] LDAPDN DelResponse ::= [APPLICATION 11] LDAPResult ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { entry LDAPDN, newrdn RelativeLDAPDN, deleteoldrdn BOOLEAN, newSuperior [0] LDAPDN OPTIONAL } ModifyDNResponse ::= [APPLICATION 13] LDAPResult CompareRequest ::= [APPLICATION 14] SEQUENCE { entry LDAPDN, ava AttributeValueAssertion } CompareResponse ::= [APPLICATION 15] SEQUENCE { COMPONENTS OF LDAPResult, matchedSubtype [9] AttributeType OPTIONAL } AbandonRequest ::= [APPLICATION 16] MessageID Wahl, Howes, Kille [Page 40] INTERNET-DRAFT LDAP August 1996 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING } ExtendedResponse ::= [APPLICATION 24] SEQUENCE { COMPONENTS OF LDAPResult, responseName [10] LDAPOID OPTIONAL, response [11] OCTET STRING OPTIONAL } -- not part of LDAP core protocol, see Appendix B -- ProtectedPassword ::= SEQUENCE { time1 [0] UTCTime OPTIONAL, time2 [1] UTCTime OPTIONAL, random1 [2] BIT STRING OPTIONAL, random2 [3] BIT STRING OPTIONAL, protected [4] OCTET STRING } StrongCredentials ::= SEQUENCE { certification-path [0] AF.CertificationPath OPTIONAL, bind-token [1] DAS.Token } END Appendix B - X.500 Authentication Mechanisms This Appendix defines two SASL authentication mechanisms whichthe client may request are searchRequest and abandonRequest. The servermayonly respondbe used withthe searchResultFull. 5.1.4. Secure Socket Layer over TCP (SSL) After establishing the SSL connection over TCP, the LDAPMessage PDUsLDAP. These mechanisms aremapped directly onto the bytestream. Server implementations running over SSL/TCP should provide a protocol listeneronly for authentication, they have no effect onport TBD. 6. Implementation Guidelines 6.1. Server Implementations The server should be capable of recognizing all the mandatory attribute type names and implement the syntaxes specified in [5]. Servers may also recognize additional attribute type names. 6.2. Client Implementations For simple lookup applications usingtheconnectionless transportprotocolUDP, use of a retry algorithm with multiple servers similarencodings and are not designed tothat commonly used in DNS stub resolver implementations is recommended. The location of a CLDAP server or servers may be better specified using IP addresses (simpleprovide integrity orbroadcast) rather than names that must firstconfidentiality services. If an implementation supports these elements, then the following additional encoding restrictions apply tor these elements: (5) UTC Times should belooked up in another directory such as DNS. 7. Security Considerations When usedencoded witha connection-oriented transport, this version of the protocol provides facilities fortheLDAP v2 authentication mechanism: simple authentication using a cleartext password. It also provides for two other authentication mechanisms"Z" suffix, not asdescribeda local time. (6) Unused bits inX.511: transferthe final octet of the encoding of a BIT STRING value, if there are any, should always be set to zero. B.1. X.511-Protected The "X.511-Protected" authentication mechanism allows a hash of theclient'spassword, combined optionally with the current time andstrong authentication based onrandom numbers, to be sent to theprivate key ofserver. The protected field contains theclient. Ithash value. This prevents a password from being carried in the clear. The mechanism field isalso permitted thatset to the string "X.511-Protected", and theserver can return itscredentialstofield contain theclient. This document also definesDER encoding of amappingvalue of the following ASN.1 type: ProtectedPassword ::= SEQUENCE { time1 [0] UTCTime OPTIONAL, time2 [1] UTCTime OPTIONAL, random1 [2] BIT STRING OPTIONAL, random2 [3] BIT STRING OPTIONAL, protected [4] OCTET STRING } Wahl, Howes, Kille [Page 41] INTERNET-DRAFT LDAPoverAugust 1996 The use of theSecure Sockets Layer (SSL), which can provide strong authentication, integritytime1, time2, random1, random2 and protected fields are as defined in ITU-T Rec. X.509 [12] andprivacy oftheconnection. Use of cleartext passwordfunctional profile for X.500 for the environment in which this authentication mechanism isstrongly discouraged whereto be used. The name field of theunderlying transport service cannot guarantee confidentiality. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 WhenBindRequest must be a nonempty string when this mechanism is being usedwithto authenticate theconnectionless transport, noclient. Note that this securityservices are available. There has been some discussion aboutmechanism is not intended to protect against attackers modifying thedesirability ofbind name field or other protocol elements. B.2. X.511-Strong Strong authenticationwith connectionless LDAP requests. This might taketo the directory can be accomplished using theform"X.511-Strong". The mechanism field is set to the string "X.511-Strong", and the credentials field set to a DER-encoding of aclear text password (which would go againstvalue of thecurrent IAB drive to remove such things from protocols) or some arbitrary credentials. Itfollowing ASN.1 type: StrongCredentials ::= SEQUENCE { certification-path [0] AF.CertificationPath OPTIONAL, bind-token [1] DAS.Token } The ASN.1 type "CertificationPath" isfelt that,defined ingeneral, authentication would incur sufficient overhead to negate[12], and theadvantages ofASN.1 type "Token" is defined in [13]. When theconnectionless basis of CLDAP. If an application requires authenticated accesscredentials are being used to authenticate thedirectory then CLDAPclient, it isnot an appropriate protocol. 8. Acknowledgements This documentrecommended that the certification-path field be present, which will contain minimally the client's certificate. If the certification-path field is supplied, then the name field of the BindRequest must be anupdate to RFC 1777, by Wengyik Yeong, Tim Howes,empty string, andSteve Kille. It also includes materialthe server will obtain the name of the client fromRFC 1798, by Alan Young. Design ideas included in this document are based on those discussed in ASID and other IETF Working Groups. 9. Bibliography [1] The Directory: Overviewthe subject field ofConcepts, Models and Service. ITU-T Recommendation X.500, 1993. [2] W. Yeong, T. Howes, S. Kille, "Lightweight Directory Access Protocol", RFC 1777, March 1995. [3] Abstract Syntax Notation One (ASN.1) - Specificationthe certification-path userCertificate. It is recommended for interoperability that if the server's or client's certificates contain RSA public keys, the PKCS md5WithRSAEncryption (1.2.840.113549.1.1.4) algorithm should be used. Table ofBasic Notation. ITU-T Recommendation X.680, 1994. [4] S. Kille, "A String RepresentationContents 1. Status of this Memo .................................... 1 2. Abstract ............................................... 1 3. Models ................................................. 2 3.1. Protocol Model ........................................ 2 3.2. Data Model ............................................ 3 3.2.1 Attributes ofDistinguished Names", RFC 1779, March 1995. [5] M. Wahl, A. Coulbeck, T. Howes, S. Kille, W. Yeong, C. Robbins, "LightweightEntries ................................ 3 3.2.2 Subschema Subentry ................................... 4 3.3. Relationship to X.500Directory Access................................. 4 3.4. Server-specific Data Requirements ..................... 5 4. Elements of ProtocolStandard................................... 5 4.1. Common Elements ....................................... 5 4.1.1. Message Envelope .................................... 5 4.1.2. String Types ........................................ 7 4.1.3. Distinguished Name andPilotRelative Distinguished Name .. 7 4.1.4. AttributeDefinitions", <draft-ietf-asid-ldapv3-attributes-03.txt>, May 1996. [6] The Directory: Models. ITU-T Recommendation X.501, 1993. [7] The Directory: SelectedType and Description ...................... 8 4.1.5. AttributeTypes. ITU-T Recommendation X.520, 1993. [9] T.Value ..................................... 9 4.1.6. Attribute Value Assertion ........................... 9 4.1.7. Attribute ........................................... 10 4.1.8. Matching Rule Identifier ............................ 10 4.1.9. Result Message ...................................... 10 Wahl, Howes,M. Smith, AnKille [Page 42] INTERNET-DRAFT LDAPURL Format, December 1995, <draft-ietf-asid-ldap-format-03.txt> [10] The Directory: Procedures for Distributed Operation. ITU-T Recommendation X.518, 1993. [11] SpecificationAugust 1996 4.1.10. Referral ........................................... 12 4.2. Bind Operation ....................................... 13 4.2.1. Sequencing ofASN.1 encoding rules: Basic, Canonical, and Distinguished Encoding Rules. ITU-T Recommendation X.690, 1994. [12] The Directory:the Bind Request ...................... 13 4.2.2 AuthenticationFramework. ITU-T Recommendation X.509, 1993. [13] The Directory: Abstract Service Definition. ITU-T Recommendation X.511, 1993. [14] T. Berners-Lee, L. Masinter, M. McCahill, "Uniform Resource Locators (URL)", RFC 1738, Dec. 1994. [15] Universal Multiple-Octet Coded Character Set (UCS) - ArchitectureandBasic Multilingual Plane, ISO/IEC 10646-1 : 1993. INTERNET-DRAFT Lightweight Directory AccessOther Security Services ........... 14 4.2.3. Bind Response ....................................... 14 4.3. Unbind Operation ..................................... 15 4.4. Session Control Operation ............................ 15 4.5. Search Operation ..................................... 18 4.5.1. Search Request ...................................... 18 4.5.2. Search Result ....................................... 21 4.5.3. Continuation References in the Search Result ........ 24 4.5.3.1 Example ............................................ 24 4.6. Resume Search Operation .............................. 25 4.7. Modify Operation ..................................... 26 4.8. Add Operation ........................................ 28 4.9. Delete Operation ..................................... 28 4.10. Modify DN Operation ................................. 29 4.11. Compare Operation ................................... 29 4.12. Abandon Operation ................................... 30 4.13. Extended Operation .................................. 31 5. Protocol Element Encodings and Transfer ................ 31 5.1. Mapping Onto BER-based Transport Services ............ 31 5.1.1. Transmission Control Protocol(v3) June 1996 [16] M. Davis, UTF-8, (WG2 N1036) DAM for ISO/IEC 10646-1.(TCP) ................ 32 5.1.2. Connection Oriented Transport Service (COTS) ....... 32 5.1.3. User Datagram Protocol (UDP) ....................... 32 5.1.4. Secure Socket Layer over TCP (SSL) ................. 32 6. Implementation Guidelines .............................. 32 6.1. Server Implementations ............................... 32 6.2. Client Implementations ............................... 32 6.2.1. Loop Detection ...................................... 32 7. Security Considerations ................................ 33 8. Acknowledgements ....................................... 34 9. Bibliography ........................................... 34 10. Authors' AddressMark Wahl ISODE Consortium Inc. 3925 West Braker Lane, Suite 333 Austin, TX 78759 USA Phone: +1 512-305-0280 EMail: M.Wahl@isode.com Tim Howes Netscape Communications Corp. 685 Middlefield Mountain View, CA 94043 USA Phone: +1 415 254-1900 EMail: howes@netscape.com Steve Kille ISODE Consortium The Dome, The Square Richmond TW9 1DT UK Phone: +44-181-332-9091 EMail: S.Kille@isode.com...................................... 35 Appendix A - Complete ASN.1 DefinitionIn the IMPORTS statement the "AF" module refers to X.509(1993), and the "DAS" module to X.511(1993). Lightweight-Directory-Access-Protocol-V3 DEFINITIONS IMPLICIT TAGS ::= BEGIN IMPORTS CertificationPath FROM AF Token FROM DAS; --- to be provided --- END..................... 35 Appendix B -Imported ASN.1 Definitions Note that the types described here are distinct from those defined in the body of this document.X.500 Authentication Mechanisms ............... 41 B.1.Types from X.509(1993) "Authentication Framework" The type "Certificate" is defined in X.509(1993). It it strongly recommended that clients and server implementations which support certificates implement the draft addendums to X.509 which provide certificate extensions. INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996 AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY OPTIONAL } CertificatePair ::= SEQUENCE { forward [0] Certificate OPTIONAL, reverse [1] Certificate OPTIONAL -- at least one of the pair shall be present -- } CertificationPath ::= SEQUENCE { userCertificate Certificate, theCACertificates SEQUENCE OF CertificatePair OPTIONAL }X.511-Protected ....................................... 41 B.2.Types from X.511(1993) "Directory Abstract Syntax" The type "DistinguishedName" is defined in X.501(1993). It is the ASN.1 encoding, not a string encoding. Token ::= SIGNED { SEQUENCE { algorithm [0] AlgorithmIdentifier, name [1] DistinguishedName, time [2] UTCTime, random [3] BIT STRING } } <draft-ietf-asid-ldapv3-protocol-01.txt>X.511-Strong .......................................... 42 <draft-ietf-asid-ldapv3-protocol-02.txt> Expires:December 5, 1996 INTERNET-DRAFT Lightweight Directory Access Protocol (v3) June 1996March 2, 1997 Wahl, Howes, Kille [Page 43] ----