draft-ietf-asid-ldapv3-protocol-03.txt  -->   draft-ietf-asid-ldapv3-protocol-04.txt

view Side-By-Side changes

Network Working Group                                            M. Wahl
INTERNET-DRAFT                                       Critical Angle Inc.
Replaces: RFC 1777, RFC 1798 1777                                              T. Howes
                                           Netscape Communications Corp.
                                                                S. Kille
                                                        ISODE Consortium
                                                           Isode Limited
Expires in six months from                               22 October 1996                                 25 March 1997
Intended Category: Standards Track


                  Lightweight Directory Access Protocol (v3)
                  <draft-ietf-asid-ldapv3-protocol-03.txt>
                  <draft-ietf-asid-ldapv3-protocol-04.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 LDAPv2 (RFC 1777) and CLDAP (RFC 1798) are supported.  

   - Protocol elements are The protocol
     is carried directly over TCP or other transport, bypassing 
     much of the session/presentation overhead.  Connectionless
     transport (UDP) is also supported for efficient lookup operations. overhead of X.500 DAP.  

   - Most protocol data elements can be encoded as ordinary strings 
     (e.g., Distinguished Names).

   - Referrals to other servers may be returned.

   - SASL and SSL mechanisms may be used with LDAP to provide connection 
     security services.


Wahl, Howes & Howes, Kille                                              [Page 1]                                              Page 1

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996   March 1997

   - New features Attribute values and Distinguished Names have been added, such as internationalized
     through the abilities to retrieve 
     attribute values in binary or search results in pages.

   - Important features use of X.500(1993) and X.500(1997) are included.

   - Referrals to other servers can be returned. the ISO 10646 character set.

   - The protocol can be extended to support bilaterally-defined new operations, and controls
     may be used to extend existing operations.

   - Several session controls Schema may be requested by published in the client. directory for use by clients. 

3.  Models

   Interest in X.500 [1] directory technologies in the Internet has lead led to 
   efforts to reduce the high "cost cost of entry" entry associated with use of these
   technologies.  This document continues the efforts to define directory 
   protocol alternatives: it updates alternatives, updating the LDAP [2] protocol specification, 
   adding support for new features, including some support for connecting
   to X.500 services that implement the 1993 or 1997 edition protocols. specification. 

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 server. The server is then responsible for performing 
   the necessary operation(s) in the directory. Upon completion of 
   the 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 using the directory.

   Note that, 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.
   Requests 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. servers.  This allows servers,
   if requested by clients, servers 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.



Wahl, Howes & Kille                                              [Page 2]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996

   Note that this the core protocol operations defined in this document can be 
   mapped to a strict subset of the 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: 
   server implementations acting as a gateway to X.500 directories may need 
   to make multiple DAP 
   requests to perform extended operations. requests.

3.2. Data Model 

   This section provides a brief introduction to the X.500 data model, as
   used by LDAP. 



Wahl, Howes, Kille                                              Page 2

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   The LDAP protocol assumes there are one or more servers which jointly 
   provide access to a Directory Information Tree (DIT).  The tree is made
   up of entries.  Entries have names: one or more attribute values from the 
   entry itself form its relative distinguished name (RDN), which must MUST be unique 
   among all its siblings.  The concatenation of the relative distinguished 
   names of the line sequence of entries from a particular entry to an immediate 
   subordinate of the root of the tree forms that entry's Distinguished 
   Name (DN), which is unique in the tree.  An example of a Distinguished 
   Name is 

   CN=Steve Kille, O=ISODE Consortium, O=Isode Limited, C=GB

   Some servers may hold cache or shadow copies of entries, which can be 
   used to answer search and comparison queries, but will return referrals
   or contact other servers if modification operations are requested.

   Servers which perform caching or shadowing MUST ensure that they do not 
   violate any access control constraints placed on the data by the 
   originating server.

   The largest collection of entries, starting at an entry that is mastered by 
   a particular server, and including all its subordinates and their 
   subordinates, down to an entry which is the entries which are mastered by a different server, servers, 
   is termed a naming context.  For example, in the following sample DIT, one server
   might master only the entry C=GB, and another server master both the 
   entries O=Foo,C=US and O=Bar,C=US.  Each of these entries are in a separate
   naming context.  The root of the DIT is not an entry a DSA-specific Entry
   (DSE) and not part of any naming context.

                                     (ROOT)
                                       |
                                      C=GB
                        /------------/    \--------------\
                     O=Foo                             O=Bar
   

3.2.1 context: each server has different 
   attribute values in the root DSE.
   
   
   
   
   

3.2.1. Attributes of Entries

   Entries consist of a set of attributes.  An attribute is a type with 
   one or more associated values.  The attribute type, type is identified by a 
   short descriptive name and an OID (object identifier), identifier). The attribute
   type governs the maximum number of values permissible for an attribute of 
   that type in an entry, the syntax to which the values must conform, the types 
   kinds of matching which can be performed on values of that attribute, and
   other functions.




Wahl, Howes & Kille                                              [Page 3]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996

   An example of an attribute is "mail". There may be one or more values 
   of this attribute, they must be IA5 strings, and they are case 
   insensitive (e.g. "foo@bar.com" will match "FOO@BAR.COM").

   Each entry must MUST have an objectClass attribute.  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).  

   A small number of  




Wahl, Howes, Kille                                              Page 3

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   Some attributes, termed operational attributes, are used by servers for 
   administering the directory system itself.  They are not returned in 
   search results unless they were explicitly requested by name.  Attributes which 
   are not operational, such as "mail", will have their schema and syntax 
   constraints enforced by servers, but servers will generally not make use 
   of their values.

   Servers must not MUST NOT permit clients to add attributes to an entry unless 
   those attributes are permitted by the object class definitions, the 
   schema controlling that entry (specified in the subschema subentry - see
   below), or are operational attributes known to that server and used for 
   administrative purposes.  Note that there is a particular objectClass 
   'extensibleObject' defined in [5] which permits all user attributes
   to be present in an entry.

   Entries may contain, among others, the following operational attributes, 
   defined in [5]. These attributes are maintained automatically by the 
   server and are not modifiable by clients:

   - creatorsName: the Distinguished Name of the user who added this entry 
     to the directory.

   - createTimestamp: the time this entry was added to the directory.

   - modifiersName: the Distinguished Name of the user who last modified 
     this entry.

   - modifyTimestamp: the time this entry was last modified.

   - subschemaSubentry:  the Distinguished Name of the subschema subentry entry 
     which controls the schema for this entry.
   - entryName: the Distinguished Name of the entry.

   Servers may implement other operational attributes.  Servers which 
   also make use of X.500(1993) protocols will provide support for more of 
   the attributes defined in X.501, including administrativeRole and dseType.  
   Some servers may permit the retrieval of subschema attributes directly 
   from user entries.

3.2.2  

3.2.2. Subschema Subentry
        
   A subentry is a special kind of entry which is used by servers and holds
   attributes for administering the directory system.  Subentries are defined
   in clause 11.6 of X.501 [6]. Entries
        
   Subschema subentries entries are used for administering information about the 
   directory schema, in particular the object classes and attribute types 
   supported by directory servers.


Wahl, Howes & Kille                                              [Page 4]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996  A server may provide access to one or more single subschema subentries to 
   permit clients to interrogate the entry contains 
   all schema which is in force for definitions used by entries in a particular part of the directory. 
   directory tree.

   A server which masters entries and permits clients to modify these 
   entries must MUST implement and provide access to these subschema subentries, entries,
   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 subschema subentries this as well.

   The following four attributes, defined in [6] with string representations
   in [5], must attributes MUST be present in all subschema subentries: entries:

   - CN: cn: this attribute must MUST be used to form the RDN of the subschema 
     subentry. 
     entry.

   - objectClass: the attribute must MUST have at least the values "top" and 
     "subschema".


Wahl, Howes, Kille                                              Page 4

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   - 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.

   These are defined in [5]. Other operational attributes may be present in subschema subentries, 
   in particular dseType, subtreeSpecification, ditStructureRules, nameForms, 
   ditContentRules,
   entries, to reflect additional supported capabilities. These include
   matchingRules, matchingRuleUse, createTimestamp,
   creatorsName, modifyTimestamp, modifiersName, entryName, as described dITStructureRules, dITContentRules 
   and nameForms.

   Servers SHOULD provide the attributes createTimestamp and modifyTimestamp 
   in
   [6]. subschema entries, in order to allow clients to maintain their caches of 
   schema information. 

   Servers which follow X.500(93) models may implement subschema using the
   X.500 subschema mechanisms.  LDAP clients MUST NOT assume that servers
   implement any of the other aspects of X.500 subschema.

   Clients must MUST only retrieve these attributes from a subentry subschema entry by requesting
   them by name in 
   a baseObject base object search of the subentry. entry, where the search filter is 
   "(objectClass=subschema)". (This will allow LDAPv3 servers which gateway
   to X.500 to detect that subentry information is being requested.)

3.3. Relationship to X.500

   This document defines LDAP in terms of X.500 as an X.500 access 
   mechanism.  An LDAP server must MUST act in accordance with the 
   X.500(1993) series of ITU Recommendations 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 is not violated in the LDAP interface.

3.4. Server-specific Data Requirements

   An LDAP server must 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), 
   which is named with the zero-length LDAPDN.  These attributes 
   are retrievable if a client performs a base object search of the 
   root, 
   root with filter "(objectClass=*)", however they are subject to 
   access control restrictions.
   They must not

   The root DSE MUST NOT be included if the client performs a subtree search 
   starting from the root.  

   Servers in general will not may allow clients to modify these attributes.




Wahl, Howes & Kille                                              [Page 5]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996

   The following attributes of the root DSE are defined in section 5.1.3 of 
   [5].  Additional attributes may be defined in later documents. 

   - administratorAddress: a URL containing address of administrator.
   - currentTime: the current time. 
   - serverName: the Distinguished Name of the server.
   - certificationPath: the server's certificate path.
   - namingContexts: naming contexts held in the server. Naming contexts
     are defined in section 17 of X.501 [6].

   - subschemaSubentry: subschema subentries known by this server.

Wahl, Howes, Kille                                              Page 5

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   - altServer: alternative servers in case this one is later unavailable.

   - supportedExtension: list of supported extended operations.

   - supportedControl: list of supported session controls.

   - supportedSASLMechanisms: list of supported SASL security features. 

   - supportedLDAPVersion: LDAP versions implemented by the server.

   If the server does not master or shadow entries and does not know the locations of 
   schema information, the subschemaSubentry attribute must is not be present 
   in the root DSE.  If the server holds master or shadow 
   copies of masters directory entries under one or 
   more schema rules, there may be any number of values of the 
   subschemaSubentry attribute in the root DSE. 

4.  Elements of Protocol

   The LDAP protocol is described using Abstract Syntax Notation 1 [3]. It (ASN.1) [3],
   and is typically transferred using a subset of the ASN.1 Basic Encoding Rules. Rules
   [11]. In order to support future extensions to this protocol, clients and 
   servers must MUST ignore elements of SEQUENCEs whose tags they do not 
   recognize.  

   Note that unlike X.500, each change to the LDAP protocol other than through
   the extension mechanisms will have a different version number.  A client 
   will indicate the version it supports as part of the bind request, 
   described in section 4.1.2. 4.2.  If a client has not sent a bind, the server 
   MUST assume that version 3 is supported in the client (since version 2 
   required that the client bind first).  
  
   Clients may determine the protocol version a server supports by reading
   the supportedLDAPVersion attribute from the root DSE.  Servers which 
   implement version 3 or later versions MUST provide this attribute.  
   Servers which only implement version 2 may not provide this attribute.

4.1. Common Elements

   This section describes the LDAPMessage envelope PDU format, as well as 
   data type definitions which are used in the protocol operations.

4.1.1. Message Envelope 

   For the purposes of protocol exchanges, all protocol operations are
   encapsulated in a common envelope, the LDAPMessage, which is defined
   as follows:











Wahl, Howes & Howes, Kille                                              [Page 6]                                              Page 6

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996   March 1997

        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,  
                        extendedReq     ExtendedRequest,
                        extendedResp    ExtendedResponse } },
                 controls       [0] Controls OPTIONAL }

        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 ID and cldapUserName. 

   All LDAPMessage envelopes encapsulating responses contain the messageID
   value of the controls.

   If the server receives a PDU from the client in which the LDAPMessage 
   SEQUENCE tag cannot be recognized, the messageID cannot be parsed, 
   the tag of the protocolOp is not recognized as a request, or the 
   encoding structures or lengths of data fields are found to be incorrect, 
   then the server MUST return the notice of disconnection described in 
   section 4.4.1, with resultCode protocolError, and immediately close the 
   connection. In other cases that the server cannot parse the request 
   received by the client, the server MUST return an appropriate response to 
   the request, with the resultCode set to protocolError.
 
   If the client receives a PDU from the server which cannot be parsed,
   the client may discard the PDU, or may abruptly close the connection.

   The ASN.1 type Controls is defined in section 4.1.12.

4.1.1.1. Message ID

   All LDAPMessage envelopes encapsulating responses contain the messageID
   value of the corresponding request LDAPMessage.





Wahl, Howes, Kille                                              Page 7

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997    

   The message ID is required to of a request MUST have a value different from the values of 
   any other requests outstanding in the LDAP session of which this message 
   is a part.  

   A client must not MUST NOT send a second request with the same message ID as another an 
   earlier request on the same connection if the first request is outstanding.
   If it does so, client has not received the 
   final response from the earlier request.  Otherwise the behavior is 
   undefined.  Typically a client will  Typical clients increment a counter for each request. 

   For all requests except for search, unbind and abandon, the message ID is 
   outstanding until the client receives the response for that operation.

   For a searchRequest which has not been abandoned, the message ID is 
   outstanding until the SearchResultDone for that search is received.




Wahl, Howes & Kille                                              [Page 7]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996 

   A client must not MUST NOT reuse the message id of an abandonRequest or of 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 not have a response.

4.1.2. String Types

   The cldapUserName identifies the requesting user for this message. It
   is only present for backwards compatibility with RFC 1798, if this 
   LDAPMessage is carried in a connectionless transport protocol, such as UDP.
   Its significance is equivalent to a bind with a zero-length password.
   When the LDAP session is carried in a connection-oriented transport
   protocol this field must be absent.  LDAPv3 client implementors must 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 described in section 5.1.3. 

4.1.2. String Types

   The LDAPString LDAPString is a notational convenience to indicate that, although
   strings of LDAPString type encode as OCTET STRING types, the ISO 10646
   [15]
   [13] character set (a superset of Unicode) is used, encoded following the 
   UTF-8 algorithm [16]. [14]. Note that in the UTF-8 algorithm, algorithm characters which 
   are the same as ASCII (0000 (0x0000 through 007F) 0x007F) are represented as that same 
   ASCII character in a single byte.  The other byte values are used to form 
   a variable-length encoding of an arbitrary character. 

        LDAPString ::= OCTET STRING

   The LDAPOID is a notational convenience to indicate that the permitted 
   value of this string is a (UTF-8 encoded) dotted-decimal representation of 
   an OBJECT IDENTIFIER.

        LDAPOID ::= OCTET STRING 
   
   For example,

        1.3.6.1.4.1.1466.1.2.3

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]. 

        LDAPDN ::= LDAPString

        RelativeLDAPDN ::= LDAPString

   Only Attribute Types can be present in a relative distinguished name
   component; the options of Attribute Descriptions (next section) must 
   not 
   MUST NOT be used in specifying distinguished names.


Wahl, Howes & Howes, Kille                                              [Page 8]                                              Page 8

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996   March 1997

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 string is not known, the  

        AttributeType will take the ASCII 
   representation of its ::= LDAPString

   Each attribute type has a unique OBJECT IDENTIFIER, IDENTIFIER which has been 
   assigned to it.  This identifier may be written as decimal digits
   with components separated by periods, e.g., e.g. "2.5.4.10". The  

   A specification may also assign one or more textual names for an
   attribute type 
   strings which are used in this version of LDAP are described in [5]. type.  These names MUST begin with a letter, and only 
   contain ASCII letters, digit characters and hyphens.  They are case 
   insensitive.

        AttributeType ::= LDAPString
        
   An AttributeDescription  (These ASCII characters are identical to ISO 10646 
   characters whose UTF-8 encoding is a superset of the definition of single byte between 0x00 and 0x7F.)

   If the 
   AttributeType.  It server has a textual name for an attribute type, it MUST use
   that name for attributes returned in search results.  The dotted-decimal
   OBJECT IDENTIFIER is only used if there is no textual name for an 
   attribute type.

   Attribute type names are non-unique, as two different specifications
   may choose the same ASN.1 definition, but allows additional
   options to be specified.  They are also case insensitive.

        AttributeDescription name.  

   A server which masters or shadows entries SHOULD list all the attribute 
   types it supports in the subschema entries, using the attributeTypes 
   attribute.  Servers which support an open-ended set of attributes
   SHOULD include at least the attributeTypes value for the 'objectClass'
   attribute. Clients MAY retrieve the attributeTypes value from subschema 
   entries in order to obtain the OBJECT IDENTIFIER and other information 
   associated with attribute types.

   Some attribute type names which are used in this version of LDAP are 
   described in [5].  Servers may implement additional attribute types.

4.1.5. Attribute Description
        
   An AttributeDescription is a superset of the definition of the 
   AttributeType.  It has the same ASN.1 definition, but allows additional
   options to be specified.  They are also case insensitive.

        AttributeDescription ::= LDAPString

   A value of AttributeDescription is based on the following BNF:
        
        <AttributeDescription> ::= <AttributeType> [ ";" <options> ]

        <options> ::= <option> | <option> ";" <options>

        <option> ::= <language-option> | <binary-option> | <dynamic-option>

        <language-option> ::= "lang=" <lang-code>

        <lang-code> ::= <printable-ascii>  

        <binary-option> ::= "binary"

        <dynamic-option> ::= "dynamic"

   If the "binary" option is present, this overrides any string-based
   encoding representation defined for that attribute in [5].  Instead the 
   attribute is to be transferred as an encoded binary value [11].

   If the "lang=" option is present, this associates a natural language
   with values for that attribute.  The binary and language options may both
   be present in an AttributeDescription.  
   (The language code has no effect on the character set encoding for string 
   representations of DirectoryString syntax values; UTF-8 is always used).

   If the "dynamic" option is present, this implies that the values are not
   permanent parts of the directory entry <opt-char> <opt-char>*
 
        <opt-char> ::=  ASCII-equivalent letters, numbers and may disappear unexpectedly. hyphen




Wahl, Howes & Howes, Kille                                              [Page 9]                                              Page 9

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996   March 1997

   Examples of valid AttributeDescription:

        CN
        givenName;lang=en-US
        CN;lang=ja-JP-kanji
        CN;lang=ja-JP-romaji

        cn
        userCertificate;binary
        1.3.6.1.4.1.1466.99.98.97;binary;dynamic

   One option, "binary", is defined in this document.  Additional documents 
   may define other options.

   An AttributeDescription with one or more options is treated as a subtype 
   of the attribute without any options.  Options present in an 
   AttributeDescription are never exclusive and may be 
   listed mutually exclusive.  Implementations 
   should generate the <options> list sorted in ascending order, and servers
   MUST treat any order.  Not all options are applicable not every attribute, 
   however.

   For example, if a client requests a "description" attribute, two AttributeDescription with the same AttributeType and 
   options as equivalent.  A server 
   may return will treat an attribute "description;lang=fr".  However if the client 
   requests a "description;lang=en", the server must AttributeDescription with 
   any options it does not return "description" 
   or "description;lang=fr", but may return "description;lang=en;dynamic".

   Later documents may define additional options. implement as an unrecognized attribute type. 

   The data type "AttributeDescriptionList" describes a list of 0 or more 
   attribute types.  (A list of zero elements has special significance in
   the Search request.)

        AttributeDescriptionList ::= SEQUENCE OF 
                AttributeDescription
    

4.1.5.

4.1.5.1. Binary Option

   If the "binary" option is present in an AttributeDescription, it overrides 
   any string-based encoding representation defined for that attribute in [5]. 
   Instead the attribute is to be transferred as a binary value encoded using 
   the Basic Encoding Rules [11].  The syntax of the binary value is an 
   ASN.1 data type definition which is referenced by the "SYNTAX" part of the
   attribute type definition.

   The presence or absence of the "binary" option only affects the transfer
   of attribute values in protocol; servers store any particular attribute 
   in a single format.  If a client requests that a server return an attribute
   in the binary format, but the server cannot generate that format, the 
   server MUST treat this attribute type as an unrecognized attribute type.  
   Similarly, clients MUST NOT expect servers to return an attribute in 
   binary format if the client requested that attribute by name without the 
   binary option.

   This option is intended to be used with attributes whose syntax is a 
   complex ASN.1 data type, and the structure of values of that type is 
   needed by clients.  Examples of this kind of syntax are "Certificate" and 
   "CertificateList".

4.1.6. Attribute Value

   A field of type AttributeValue takes on as its value either an octet a string
   encoding of a AttributeValue data type, or an OCTET STRING containing 
   an encoded binary value, depending on whether the "binary" option is 
   present in the companion AttributeDescription to this AttributeValue.  

   The definition of string encodings for different syntaxes and types may 
   be found in companions to this document, other documents, and in particular [5].

Wahl, Howes, Kille                                              Page 10

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

        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 

   Attributes may wish to set the attrSizeLimit session control before invoking a 
   search operation.

   Clients and server implementors should be aware that attributes whose
   type names they do not recognize may defined which have an arbitrary and non-printable syntax.  
   Implementations must not either MUST NEITHER simply display or nor attempt to decode as 
   ASN.1 a value if its syntax is not known.  The implementation may attempt
   to discover the subschema subentry of the source entry, and retrieve the value values of 
   attributeTypes from it.


Wahl, Howes & Kille                                              [Page 10]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


4.1.6.

4.1.7. Attribute Value Assertion

   The AttributeValueAssertion type definition is similar to the one in
   the X.500 directory standards.  It contains an attribute description 
   and a an equality matching rule assertion value suitable for that type.  

        AttributeValueAssertion ::= SEQUENCE {
                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 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.  Clients may use 
   attribute values as assertion values in compare requests and search
   filters.

   Note however that the assertion syntax may be different than from the value 
   syntax for operational attributes or for non-equality matching rules.

4.1.7.
   These attributes may have an assertion syntax which contains only part
   of the value.   See section 20.2.1.8 of X.501 [6] for examples.

4.1.8. Attribute

   An attribute consists of a type and one or more values of that type.
   (Though attributes must 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    SET OF AttributeValue }

4.1.8.

   The order of attribute values within the vals set is undefined and 
   implementation-dependent, and MUST NOT be relied upon.





Wahl, Howes, Kille                                              Page 11

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

4.1.9. Matching Rule Identifier

   An X.501(1993) Matching Rule is identified in the LDAP protocol by the
   ASCII
   printable 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 ::= LDAPString

4.1.9.

   Servers which support matching rules for use in extensibleMatch MUST 
   list the matching rules they implement in subschema entries.  This is 
   done with the matchingRules and matchingRuleUse attributes.

4.1.10. 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, requests servers will return responses containing fields
   of type LDAPResult to indicate the final status of a protocol
   operation request.  





































Wahl, Howes & Howes, Kille                                              [Page 11]                                              Page 12

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996   March 1997

        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 70 reserved for CLDAP --
                             affectsMultipleDSAs          (71), -- new
                                        -- 72-79 unused --
                             other                        (80) },
                             -- 81-90 reserved for APIs --
                matchedDN       LDAPDN,
                errorMessage    LDAPString,
                referral        [3] Referral OPTIONAL }





Wahl, Howes & Howes, Kille                                              [Page 12]                                              Page 13

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996   March 1997

   All the result codes with the exception of success, compareFalse and
   compareTrue are to be treated as meaning the operation could not be 
   completed in its entirety.  



   Most of the result codes are based on problem indications from X.511
   error data types.  Result codes from 16 to 21 indicate an AttributeProblem, 
   codes 32, 33, 34 and 36 indicate a NameProblem, codes 48, 49 and 50
   indicate a SecurityProblem, codes 51 to 54 indicate a ServiceProblem, 
   and codes 64 to 69 and 71 indicates an UpdateProblem.
  
   If a client receives a result code which is not listed above, it is to be 
   treated as an unknown error condition.

   The errorMessage field of this construct may, at the servers server's option, 
   be used to return a string containing a textual, human-readable (terminal
   control and page formatting characters should be avoided) error diagnostic. 
   As this error diagnostic is not standardized, implementations must not MUST NOT rely 
   on the values returned.  If the server chooses not to return a textual 
   diagnostic, the errorMessage field of the LDAPResult type must MUST contain a 
   zero length string.

   For resultCodes result codes of noSuchObject, aliasProblem, invalidDNSyntax
   and aliasDereferencingProblem, the matchedDN field is set to
   the name of the lowest entry (object or alias) in the DIT directory that was
   matched.  If no aliases were dereferenced while attempting to locate
   the entry, this will be a truncated form of the name provided. provided, or if  
   aliases were dereferenced, of the resulting name, as defined in section 12.5
   of X.511 [15]. The matchedDN field is to be set to a NULL DN (a zero length 
   string) string
   with all other result codes.

4.1.10.

4.1.11. Referral

   The referral field is present in an LDAPResult if the 
   LDAPResult.resultCode field value is 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  Referrals
   can be present returned in the Reference.

        Referral ::= SEQUENCE responses to any operation request (except unbind and 
   abandon which do not have responses). At least one LDAPURL MUST be 
   present in the reference.

        Referral ::= SEQUENCE OF LDAPURL

        LDAPURL ::= LDAPString  -- limited to characters permitted in URLs
   
   The client may MUST contact any one of the listed URLs [14] [7] of servers to 
   continue the request. Each server in the list must MUST be capable of 
   processing the operation and presenting a consistent view of the DIT directory 
   to the client. client, so the client may choose any URL in the list. (The 
   mechanisms for how servers achieve this are outside the scope of this 
   document.)





Wahl, Howes, Kille                                              Page 14

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   URLs for servers implementing the LDAP protocol are written according 
   to [9].  If an alias was dereferenced, the dn <dn> part of the URL must MUST
   be present, with the new target object name.  If this is present, 
   the client must MUST use this name in its next request to progress this search, the operation,
   and if it is not present the client will use the same name as in the 
   original request.  Some servers (e.g. participating in distributed indexing)
   may change the provide an different filter in a referral for a search operation.  If 
   the filter part of the URL is present in an LDAPURL, the client must MUST use 
   this filter in its next request to progress this search, and if it is not 
   present the client MUST 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 MUST be escaped using the % method
   in RFC 1738.




Wahl, Howes & Kille                                              [Page 13]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996

   Other kinds of URLs may be returned returned, so long as the operation could be 
   performed using that protocol, and the client has indicated (in a session 
   control) that it could support that protocol.

   If the client has not indicated that it 

4.1.12. Controls

   A control is capable of handling referrals,
   the server must attempt a way to progress the referral on behalf specify extension information. Controls which are 
   sent as part of the client.
   Only if it fails to do so may it return a referral, and the URLs in this
   referral must be of the LDAP form.

4.2.  Bind Operation

   The function of the Bind Operation is to allow authentication information request apply only to be exchanged between the client that request and server.

   The Bind Request is defined as follows:

        BindRequest are not saved.

        Controls ::= [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 OF Control

        Control ::= SEQUENCE {
                mechanism               LDAPString,
                credentials
                controlType             LDAPOID,
                criticality             BOOLEAN DEFAULT FALSE,
                controlValue            OCTET STRING OPTIONAL }

   Parameters

   The controlType field MUST be a UTF-8 encoded dotted-decimal representation 
   of an OBJECT IDENTIFIER which uniquely identifies the Bind Request are:

   - version: A version number indicating the version of the protocol to
     be used in this protocol session. control.  This document describes version
     3 of the LDAP protocol.  Note that there 
   prevents conflicts between control names.

   The criticality field is no version negotiation,
     and either TRUE or FALSE.  

   If the client should just set this parameter to server recognizes the version control type and it
     desires.  The client may request version 2, in which case is appropriate for the
   operation, the server
     must implement only will make use of the protocol as described in [2], and control when performing the
   operation.

   If the server does not 
     return any v3-specific result codes or protocol fields.

   - name: The name of recognize the directory object that control type and the client wishes to
     bind as.  This criticality 
   field may take on a null value (a zero length
     string) for is TRUE, the purposes of anonymous binds, when authentication
     has been performed at a lower layer, or when using SASL credentials
     with a mechanism that includes server MUST NOT perform the LDAPDN in operation, and MUST instead
   return the credentials. 

   - authentication: information used to authenticate resultCode unsupportedCriticalExtension.

   If the name, if any,
     provided in control is not appropriate for the Bind Request.  
 
   Upon receipt of a Bind Request, a protocol server will authenticate operation and criticality field
   is TRUE, the requesting client, if necessary.  The server will then MUST NOT perform the operation, and MUST instead
   return a 
   Bind Response to the client indicating resultCode unsupportedCriticalExtension.

   If the status of control is unrecognized or inappropriate but the authentication.




Wahl, Howes & Kille                                              [Page 14]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



4.2.1. Sequencing of criticality field
   is FALSE, the Bind Request

   For some authentication mechanisms, it may be necessary server MUST ignore the control.

   The controlValue contains any information associated with the control,
   and its format is defined for the client control.  The server MUST be prepared
   to invoke handle arbitrary contents of the BindRequest multiple times.  If at controlValue octet string, including
   zero bytes.  It is absent only if there is no value information which 
   is associated with a control of its type.

Wahl, Howes, Kille                                              Page 15

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   This document does not define any stage controls.  Controls may be defined in 
   later documents.  The definition of a control consists of:

     - the client 
   wishes OBJECT IDENTIFIER assigned to abort the bind process it should drop control,

     - whether the underlying
   connection.  Clients must not invoke operations between two Bind requests
   made as part of a multi-stage bind.

   Unlike LDAP v2, control is always noncritical, always critical, or 
       critical at the client need not send a Bind Request in client's option,

     - the first
   PDU format of the connection.  The client may request any operations and controlValue contents of the
   server must treat these as unauthenticated (unless authentication has
   already occurred at a lower layer).  If control.

   Servers list the server requires that controls which they recognize in the 
   client bind first, supportedControl
   attribute in the server must reject any request other than 
   binding or unbinding with root DSE.

4.2. Bind Operation

   The function of the "operationsError" result. If Bind Operation is to allow authentication information
   to be exchanged between the client did not bind before sending a request and receives an 
   operationsError, it must close the connection, reopen it and begin 
   again by first sending a PDU with a server.

   The Bind Request.  This will aid in 
   interoperating with servers implementing other versions Request is defined as follows:

        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 }

   Parameters of LDAP.

   Clients may send multiple bind requests on an association to change
   their credentials. the Bind Request are:

   - version: A subsequent bind process has version number indicating the effect version of abandoning 
   all search and compare 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 must resend their session controls if needed after rebinding, 
   as session controls may be reset protocol to defaults by servers.

4.2.2 Authentication and Other Security Services

   The simple authentication option provides minimal authentication 
   facilities, with the contents
     be used in this protocol session.  This document describes version
     3 of the authentication field consisting 
   only of a cleartext password. LDAP protocol.  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 version negotiation,
     and the "Security 
   Considerations" section.

   If no authentication is client just sets this parameter to be performed, or has been performed at a 
   lower layer, then the simple authentication option should be chosen,
   and version it desires.
     If the password be of zero length.  (This is often done by LDAPv2 
   clients.)

   The sasl choice allows for any mechanism defined for use with SASL [17]   
   or listed client requests protocol version 2, a server that supports
     the version 2 protocol as described in Appendix B to [2] will not return any
     v3-specific protocol fields.  (Note that not all LDAP servers will
     support protocol version 2, since they may be used.  The mechanism field contains unable to generate 
     the attribute syntaxes associated with version 2.)

   - name: The name of the mechanism.  The credentials field contains the arbitrary data
   used for authentication, inside an OCTET STRING wrapper.  Note directory object that unlike
   some Internet application protocols where SASL is used, LDAP is not 
   text-based, thus no base64 transformations are performed the client wishes to
     bind as.  This field may take on a null value (a zero length
     string) for the credentials.

   If any SASL-based integrity purposes of anonymous binds, when authentication
     has been performed at a lower layer, or confidentiality services are enabled, they 
   take effect following when using SASL credentials
     with a mechanism that includes the transmission by LDAPDN in the server and reception by credentials. 

   - authentication: information used to authenticate the client of name, if any,
     provided in the final BindResponse with resultCode success. Bind Request.  



Wahl, Howes & Howes, Kille                                              [Page 15]                                              Page 16

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


4.2.3.   March 1997 

   Upon receipt of a Bind Response Request, a protocol server will authenticate
   the requesting client, if necessary.  The server will then return a 
   Bind Response is defined as 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 to the server of client indicating the status of the client's request for authentication.
 
   If the bind was successful,

4.2.1. Sequencing of the resultCode will be success,
   otherwise Bind Request

   For some authentication mechanisms, it will may be one of:

                operationsError
                protocolError
                authMethodNotSupported
                strongAuthRequired
                referral
                inappropriateAuthentication
                invalidCredentials
                unavailable
                unavailableCriticalExtension

   If necessary for the client receives a BindResponse response where the resultCode was 
   protocolError and the supportedVersion field is absent, it must close 
   the connection as the server will be unwilling
   to accept further 
   operations.  (This is for compatibility with earlier versions of LDAP.)

   The serverURL contains invoke the URL of this LDAP server, if it BindRequest multiple times.  If at any stage the client 
   wishes to 
   provide an "authoritative" URL for itself.  Typically this will be a
   URL of the "ldap:" type, indicating abort the official host name, bind process it MAY unbind and MUST drop the 
   name underlying
   connection.  Clients MUST NOT invoke operations between two Bind requests
   made as part of a multi-stage bind.

   Unlike LDAP v2, the URL will contain client need not send a Bind Request in the encoded name first
   PDU of the server itself. connection.  The serverCreds are used client may request any operations and the
   server MUST treat these as part of unauthenticated (unless authentication has
   already occurred at a SASL-defined bind mechanism; to 
   allow lower layer).  If the server requires that the 
   client to authenticate bind first, the server to which it is communicating, MUST reject any request other than 
   binding or to perform "challenge-response" authentication.  If the client 
   bound unbinding with the password choice, or "operationsError" result. 

   If the SASL mechanism does client did not require
   the server to return information to the client, bind before sending a request and receives an 
   operationsError, it may then send a Bind Request.  If this field is also fails 
   or the client chooses not to be included in the result.

   The supportedVersion field contains the minimum of bind on the version supplied
   by the client in existing connection, it will 
   close the BindRequest connection, reopen it and the highest version of LDAP supported begin again by first sending a PDU 
   with a Bind Request.  This will aid in interoperating with servers 
   implementing other versions of LDAP.

   Clients MAY send multiple bind requests on a connection to change
   their credentials.  A subsequent bind process has the server.  If effect of abandoning 
   all operations outstanding on the client and connection.  (This simplifies server both implement 
   implementation.)  Authentication from earlier binds are subsequently 
   ignored, and so if the protocol 
   described in this document it will have bind fails, the value 3.  This field connection will be absent when responding to treated as 
   anonymous. If a version 2 SASL transfer encryption or earlier client.









Wahl, Howes & Kille                                              [Page 16]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


4.3.  Unbind Operation

   The function of integrity mechanism has been 
   negotiated, and that mechanism does not support the Unbind Operation is changing of 
   credentials from one identity to terminate another, then the client MUST instead 
   establish a protocol
   session.  The Unbind Operation is defined as follows:

        UnbindRequest ::= [APPLICATION 2] NULL new connection. 

4.2.2. Authentication and Other Security Services

   The Unbind Operation has no response defined. Upon transmission simple authentication option provides minimal authentication 
   facilities, with the contents of the authentication field consisting 
   only of an
   UnbindRequest, a protocol client may assume cleartext password.  Note that the protocol session
   is terminated. Upon receipt use of an UnbindRequest, cleartext passwords
   is not recommended over open networks when there is no authentication or
   encryption being performed by a protocol server
   may assume that lower layer; see the requesting client "Security 
   Considerations" section.

   If no authentication is to be performed, or has terminated the session and
   that all outstanding requests may be discarded, and may close been performed at a 
   lower layer, then the 
   connection.  All session controls will simple authentication option MUST be forgotten chosen,
   and search result
   caches will the password be cleared when a connection closes. 

4.4.  Session Control Operation

        SessionRequest ::= [APPLICATION 17] Controls

        SessionResponse ::= [APPLICATION 18] SEQUENCE {
                COMPONENTS OF LDAPResult,
                unsupportedCtls of zero length.  (This is often done by LDAPv2 
   clients.)

   The sasl choice allows for any mechanism defined for use with SASL [12] SEQUENCE OF LDAPString }

        Controls ::= SEQUENCE OF SEQUENCE {
                controlType             LDAPString,
                criticality             BOOLEAN DEFAULT FALSE,
                controlValue   
   The mechanism field contains the name of the mechanism.  The credentials 
   field contains the arbitrary data used for authentication, inside an 
   OCTET STRING }

   Session Controls wrapper.  Note that unlike some Internet application protocols 
   where SASL is used, LDAP is not text-based, thus no base64 transformations 
   are requests made performed on the credentials.

Wahl, Howes, Kille                                              Page 17

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   If any SASL-based integrity or confidentiality services are enabled, they 
   take effect following the transmission by the server and reception by 
   the client which affect its 
   interaction of the final BindResponse with resultCode success.

   If the server. Controls are not saved after a session 
   unbinds or disconnects abruptly, and do not affect other sessions to 
   this or other servers. Session controls do not affect operations which
   have already connection has been requested on this connection, e.g. if authenticated at a lower layer, the client sends
   can override this by sending a search bind request and subsequently sends a sessionControlRequest while the
   server is in the middle of sending responses, the session controls which
   were in force when the search operation began still apply for all the 
   results of that search until the SearchResultDone is returned.

   Session controls are not cumulative, and 
   AuthenticationChoice includes a session non-empty password or SASL credentials.


4.2.3. Bind Response

   The Bind Response is defined as follows.

        BindResponse ::= [APPLICATION 1] SEQUENCE {
             COMPONENTS OF LDAPResult,
             serverCreds        [7] SaslCredentials OPTIONAL }

   A BindResponse consists simply of an indication from the server of
   the status of the client's request will 
   override all session controls which were set by a previous request. for authentication.
 
   If a control was set on a previous request and the bind was not mentioned in 
   a subsequent request, successful, the resultCode will be success,
   otherwise it will be reset by the one of:

    - operationsError (server encountered an internal error)
    - protocolError (unrecognized version number or incorrect PDU structure)
    - authMethodNotSupported (unrecognized SASL mechanism name)
    - strongAuthRequired (e.g. server does not accept cleartext password)
    - referral (this server cannot accept this bind, try another)
    - inappropriateAuthentication (server requires the client to its default
   value.  (This permits session controls, such as supportedProtocol, to 
   have multiple values.) provide
      credentials or use a different authentication mechanism)
    - invalidCredentials (e.g. wrong password supplied or bad signature)
    - unavailable (e.g. server is shutting down)
  
   If the server is does not capable of setting one or more support the client's requested controls, protocol version,
   it should MUST set as many as possible. the resultCode to protocolError.

   If any of the controls which client receives a BindResponse response where the 
   server could not set are marked as critical, resultCode was 
   protocolError, it must return MUST close the 
   unavailableCriticalExtension error.

   The controlType field must either connection as the server will be a string defined in this section,
   or a dotted-decimal representation 
   unwilling to accept further operations.  (This is for compatibility with 
   earlier versions of an OBJECT IDENTIFIER.  This will
   aid LDAP, in preventing conflicts between privately-defined control extensions.
   String names which the bind was always the first operation,
   and there was no negotiation.)

   The serverCreds are case insensitive.


Wahl, Howes & used as part of a SASL-defined bind mechanism to 
   allow the client to authenticate the server to which it is communicating, 
   or to perform "challenge-response" authentication.  If the client 
   bound with the password choice, or the SASL mechanism does not require
   the server to return information to the client, then this field is not 
   to be included in the result.

4.3. Unbind Operation

   The function of the Unbind Operation is to terminate a protocol
   session.  The Unbind Operation is defined as follows:

        UnbindRequest ::= [APPLICATION 2] NULL


Wahl, Howes, Kille                                              [Page 17]                                              Page 18

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996   March 1997

   The following controls have been defined:

     NAME                CRITICAL?        VALUE CONTAINS  DEFAULT 
     =================== ================ =============== =============
     attrSizeLimit       clients option   integer Unbind Operation has no limit
     dontUseCopy         clients option   boolean         FALSE
     usePartialCopy      clients option   boolean         FALSE
     referringServer     non-critical     URL             none
     chainingProhibited  clients option   boolean         FALSE
     supportedProtocol   non-critical response defined. Upon transmission of an
   UnbindRequest, a protocol name   none
     useAliasOnUpdate    clients option   boolean         FALSE
     manageDsaIT         critical         boolean         FALSE
     preferredLanguage   non-critical     string          no preference

   The attrSizeLimit control client may be critical or non-critical at assume that the client's
   request.  The value field contains either an empty string, implying no 
   limit, or a string representation protocol session
   is terminated. Upon receipt of an UnbindRequest, a positive integer, e.g. "10000".
   The default if this control is not present is protocol server
   may assume that there is no limit.
   The attrSizeLimit number the requesting client has terminated the session and
   that all outstanding requests may be discarded, and may close the 
   connection.

4.4. Unsolicited Notification

   An unsolicited notification is a size in bytes of an LDAPMessage sent from the largest encoded value
   which server to the 
   client which is capable of processing.  Servers should not return
   attribute values in a search response which are larger than this size.  
   (If attribute values are excluded because of this control, to any LDAPMessage received by the 
   incompleteEntry attribute must be present with the value TRUE server. 
   It is used to signal an extraordinary condition in the 
   SearchResultEntry).

   The dontUseCopy control may be critical server or non-critical at in the client's
   request.  The value field contains either "TRUE" or "FALSE".  
   The default if this control is not set is "FALSE".  This control only 
   affects 
   connection between the Search client and Compare operations.  If present the server.  The notification is of an
   advisory nature, and set to "TRUE",
   servers should the server will not make use of information from cached or shadowed 
   copies of entries in these operations.   This control overrides expect any 
   setting of the usePartialCopy control.

   The usePartialCopy control may response to be critical or non-critical at 
   returned from the client's
   request.  The value field contains either "TRUE" or "FALSE". client.
 
   The default if this control is not set unsolicited notification is "FALSE".  This control only 
   affects structured as an LDAPMessage in which the Search
   messageID is 0 and Compare operations.  If protocolOp is of the dontUsecopy control extendedResp form.  The 
   responseName field of the ExtendedResponse is
   set to "TRUE", present. The LDAPOID 
   value MUST be unique for this control is ignored.   If usePartialCopy is present notification, and 
   set to "TRUE", then if a contacted server holds at least one attribute not be used in a 
   shadow or cached copy any other 
   situation.
 
   One unsolicited notification is defined in this document.  

4.4.1. Notice of an entry, then that entry Disconnection

   This notification may be used to satisfy by the request, even if not all server to advise the requested attributes are in client that 
   the shadowed 
   copy.  If this control is "FALSE" and dontUseCopy server is also "FALSE", about to close the 
   server must not return attributes from connection due to an incomplete shadow copy of error condition.
   Note that this notification is NOT a response to an 
   entry unless none of the unbind requested attributes or their subtypes were 
   excluded from by 
   the shadow copy.  (How servers replicate information and 
   configure shadowing is outside client: the scope server MUST follow the procedures of this specification.)
 
   The referringServer control section 4.3.  This
   notification is always non-critical.  The value field 
   contains the URL of another server which referred intended to assist clients in distinguishing between an operation 
   error condition and a transient network failure.  As with a connection
   close due to this 
   server.  This control must only be present if network failure, the connection client MUST NOT assume that any 
   outstanding requests which modified the directory have succeeded or failed. 
 
   The responseName is being 
   made only to process a referral.  If 1.3.6.1.4.1.1466.20036, the connection will be held open to 
   handle referrals from multiple servers this control must be omitted.
   There response field is no protocol effect of this control; it absent, 
   and the resultCode is used to assist in 
   tracing knowledge inconsistencies in indicate the distributed directory.


Wahl, Howes & Kille                                              [Page 18]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


   The chainingProhibited control may be critical or non-critical at reason for the 
   client's request. disconnection.
 
   The value must following resultCode values are to be either "TRUE" or "FALSE".  To aid
   interoperability with LDAPv2 clients, the default if this control is not
   set is "FALSE".  If used in this control is present and set to "TRUE", the notification:
 
   - protocolError: The server must has received data from the client in which
     the LDAPMessage structure could not contact any other servers as part of processing operations 
   requested by this client, if it would be possible to instead 
   return to parsed.  
 
   - strongAuthRequired: The server has detected that an established 
     underlying security association protecting communication between the 
     client a referral.   If the and server is a gateway to X.500, has unexpectedly failed or been compromised.  
 
   - unavailable: This server will stop accepting new connections and DAP is not a supported
     operations on all existing connections, and be unavailable for an 
     extended period of time.  The client referral protocol (see next paragraph), may make use of an alternative 
     server.
 
   After sending this notice, the server must set MUST close the chainingProhibited service control on any DAP 
   or DSP requests it makes.  

   The supportedProtocol control is always non-critical.  The field is 
   a string name of a protocol which connection.  After
   receiving this notice, the client implements.  The name of MUST NOT transmit any further on the protocol 
   connection, and may be "ldap", "cldap", "dap", any IANA-assigned protocol
   name or URL mechanism, or "*" abruptly close the connection.


Wahl, Howes, Kille                                              Page 19

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997
 
4.5. Search Operation

   The Search Operation allows a client to indicate request that any type of referral may
   be returned.  If this control is present, a server must return search be
   performed on its behalf by a 
   referral, rather than itself chain to another server using one of the 
   indicated protocol. server.  This control may can be present multiple times in a 
   session control if the client wishes used to name multiple protocols it 
   supports.  

   If the supportedProtocol control is absent and the server is capable of 
   contacting other servers, then it must not return results with
   referrals, as described in 4.1.10, or SearchResultContinuation, as 
   described in 4.5.3, unless the server is not capable of contacting 
   other servers, in which case it may return read attributes
   from a referral single entry, from entries immediately below a particular entry,
   or continuation 
   containing a URL whole subtree of type "LDAP".

   It entries.

4.5.1. Search Request

   The Search Request is recommended that clients, defined as a minimum, support LDAP referrals, 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 }

        Filter ::= CHOICE {
                and set the supportedProtocol control to be "ldap".

   The useAliasOnUpdate control may be critical             [0] SET OF Filter,
                or non-critical at the
   client's request.  The value must be either "TRUE" or "FALSE".  To 
   aid interoperability with LDAPv2 clients, the default if this control
   is              [1] SET OF Filter,
                not set is "FALSE".  If             [2] Filter,
                equalityMatch   [3] AttributeValueAssertion,
                substrings      [4] SubstringFilter,
                greaterOrEqual  [5] AttributeValueAssertion,
                lessOrEqual     [6] AttributeValueAssertion,
                present and set to TRUE, the server         [7] AttributeDescription,
                approxMatch     [8] AttributeValueAssertion,
                extensibleMatch [9] MatchingRuleAssertion }     

        SubstringFilter ::= SEQUENCE {
                type            AttributeDescription,
                -- at least one must
   permit alias names to be used as components present
                substrings      SEQUENCE OF CHOICE { 
                        initial [0] LDAPString,
                        any     [1] LDAPString,
                        final   [2] LDAPString } }

        MatchingRuleAssertion ::= SEQUENCE {
                matchingRule    [1] MatchingRuleId OPTIONAL,
                type            [2] AttributeDescription OPTIONAL,
                matchValue      [3] AssertionValue,
                dnAttributes    [4] BOOLEAN DEFAULT FALSE }

   Parameters of a Distinguished Name in 
   Add, Modify and Delete operations.  If the server Search Request are:


Wahl, Howes, Kille                                              Page 20

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   - baseObject: An LDAPDN that is a gateway the base object entry relative to X.500, 
   it must set
     which the useAliasOnUpdate critical extension on any DAP/DSP 
   AddEntry, ModifyEntry and RemoveEntry requests it makes if this 
   control search is "TRUE".   This control does not affect the ModifyDN operation,
   which only allows Distinguished Names to be provided.

   The manageDsaIT control is always critical.  The value must performed.

   - scope: An indicator of the scope of the search to be either  
   "TRUE" or "FALSE". performed. The default, if
     semantics of the possible values of this control is not set, is "FALSE".  
   This control affects field are identical to the name resolution behavior
     semantics of the server scope field in the X.511 Search Operation.

   - derefAliases: An indicator as to 
   permit a manager how alias objects are to read and modify knowledge references and other 
   X.500 server-specific attributes.  If be
     handled in searching.  The semantics of the server is a gateway to 
   X.500, it must set possible values of
     this field are:

             neverDerefAliases: do not dereference aliases in searching
             or in locating the manageDsaIT critical extension, as well as base object of the
   appropriate common arguments, on any DAP/DSP requests it makes, based on
   this control.  






Wahl, Howes & Kille                                              [Page 19]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



   The preferredLanguage control is always non-critical.  The use search;

             derefInSearching: dereference aliases in subordinates of this 
   control
             the base object in searching, but not in locating the
             base object of the search;

             derefFindingBaseObj: 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 its impact on in
             locating the directory will base object of the search.

   - sizelimit: A sizelimit that restricts the maximum number of entries
     to be defined returned as a result of the search. A value of 0 in future drafts.
   The default if this control is not set, is
     field indicates that there is no preferred 
   language.

4.5.  Search Operation

   The Search Operation allows a client to request sizelimit restrictions are in effect for
     the search.

   - timelimit: A timelimit that restricts the maximum time (in seconds)
     allowed for a search. A value of 0 in this field indicates that no
     timelimit restrictions are in effect for the search.

   - typesOnly: An indicator as to whether search results will contain
     both attribute types and values, or just attribute types.  Setting
     this field to TRUE causes only attribute types (no values) to be
   performed on its behalf by a server.  This can be used
     returned.  Setting this field to read attributes
   from a single entry, or FALSE causes both attribute types
     and values to be returned.

   - filter: A filter that defines the conditions that must be fulfilled
     in order for the search to match a whole subtree given entry.  The 'and', 'or' and 
     'not' choices may be used to form boolean combinations of entries.

4.5.1. Search Request filters.  At 
     least one filter element MUST be present in an 'and' or 'or' 
     choice.  The Search Request is defined as follows:

        SearchRequest ::= [APPLICATION 3] SEQUENCE {
                baseObject      LDAPDN, others match against individual attribute values of 
     entries in the 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, of the search.

     (Implementor's note: the 'not' filter          Filter,
                attributes      AttributeDescriptionList,
                pageSizeLimit   [0] INTEGER     OPTIONAL,
                sortKeys        [1] SortKeyList OPTIONAL,
                prevSearchId    [2] MessageID   OPTIONAL,
                startLocation   [3] INTEGER     OPTIONAL }

        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 } is an example of a tagged 
      choice in an implicitly-tagged module.  In BER this is treated as
      if the tag was explicit.)






Wahl, Howes & Howes, Kille                                              [Page 20]                                              Page 21

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


        SubstringFilter ::= SEQUENCE {   March 1997

     The extensibleMatch is new in this version of LDAP.  If the 
     matchingRule field is absent, the type            AttributeDescription,
                -- at least one must field 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 }

   Parameters of present, and
     the Search Request are:

   - baseObject: An LDAPDN equality match is performed for that type.  If the type field is 
     absent and matchingRule is present, the base object matchValue is compared 
     against all attributes in an entry relative to which support that matchingRule, 
     and the search is to be performed.

   - scope: An indicator of matchingRule determines the scope of syntax for the search to assertion value.
     If the type field is present and matchingRule is present, the 
     matchingRule MUST be performed. The
     semantics of one permitted for use with that type.
     If the possible values of this dnAttributes field are identical is set to TRUE, the
     semantics of match is applied 
     against all the scope field attributes in the X.511 Search Operation.

   - derefAliases: An indicator an entry's distinguished name as to how alias objects are to be be
     handled in searching. 
     well.  (Editors note: The semantics of the possible values of
     this dnAttributes field are:

             neverDerefAliases: do is present so that there 
     does not dereference aliases in searching
             or in locating the base object need to be multiple versions of the search;

             derefInSearching: dereference aliases in subordinates generic matching rules such as
     wordMatch, one to apply to entries and another to apply to entries and 
     dn attributes as well).

     Servers MUST ignore parts of filters which use unrecognized attribute
     types (that part of the base object in searching, but filter does not in locating match any entry).  If the
             base object of entire 
     filter is ignored, no entries match.  A server may return the search;

             derefFindingBaseObject: dereference aliases in locating
             the base object of the search, but error 
     inappropriateMatching if it does not when searching
             subordinates of the base object;

             derefAlways: dereference aliases both in searching and in
             locating the base object permit a particular form of matching 
     (e.g. substrings match on an integer value). Servers may return the search.

   - sizelimit: A sizelimit that restricts 
     error invalidAttributeSyntax if the maximum number value part of entries
     to be returned as a result of the search. A value search filter is 
     improperly specified.  More details of 0 in this
     field indicates that no sizelimit restrictions filter processing are given in effect for
     the search.
     section 7.8 of X.511 [15].
 
   - timelimit: attributes: A timelimit that restricts list of the maximum time (in seconds)
     allowed for attributes from each entry found as a search. A value
     result of 0 in this field indicates that no
     timelimit restrictions are in effect for the search.

   - typesOnly: An indicator as to whether search results will 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 values to be returned.

Wahl, Howes & Kille                                              [Page 21]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


   - filter: A filter that defines the conditions An empty list signifies that must be fulfilled
     all user attributes from each entry found in order for the search are to match a given entry.  The 'and', 'or' and 
     '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 
     entries in the scope of the search.

     The extensibleMatch is new in this version of LDAP.  If the 
     matchingRule field is absent, the type field must be present, and
     the equality match is performed for that type.  If the type field is 
     absent and matchingRule is present, the matchValue is compared 
     against all attributes in an entry which support that matchingRule, 
     and the matchingRule determines the syntax for the assertion value.
     If the type field is present and matchingRule is present, the 
     matchingRule must be one permitted for use with that type.
     If the dnAttributes field is set to TRUE, the match is applied 
     against all the attributes in an entry's distinguished name as 
     well.  (Editors note: The dnAttributes 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 the attributes from each entry found as a
     result of the search to be returned. An empty list signifies that
     all user attributes from each entry found in the search are to be 
     returned, as does 
     returned, as does the special attribute description string "*". (the
     latter technique allows the client to request all user attributes 
     along with selected operational attributes).  If the client does not 
     want any attributes returned, it can request only the attribute with 
     OID "1.1". "1.1" (this OID is arbitrary).  Attributes must MUST be named at most 
     once in the list, and are returned at most once in an entry. 

     Servers MUST ignore requests for unrecognized attribute types.  If   
     no attributes specified by the client are recognized, then no attributes 
     will be included in the result entries.

     Client implementors should note that even if all user attributes are 
     requested, some attributes of the entry may not be included in search
     results due to access control or other restrictions.  Furthermore, 
     servers will not return operational attributes, such as modifyRights objectClasses or
     attributeTypes, 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 LDAP is given in [5].)

   - pageSizeLimit: if present, then if more entries are to

   Note that an X.500 "list"-like operation can be returned than 
     the pageSizeLimit, emulated by the server must return only as many as this limit 
     before returning client
   requesting a one-level LDAP search operation with a filter checking for 
   the SearchResultDone response.  If existence of the same or fewer 
     entries than this limit are to objectClass attribute, and that an X.500 "read"-like 
   operation can be returned, emulated by a base object LDAP search operation with 
   the same filter.  A server must return all 
     the entries and the SearchResultDone response.

     The pageSizeLimit does not affect SearchResultReference responses, which
     are provides a gateway to X.500 is not counted as entries and of which any number may be returned by the 
     server.

     If operating over connectionless data transport, 
   required to use the client must not 
     set this field. Read or List operations, although it may choose to
   do so.  




Wahl, Howes & Howes, Kille                                              [Page 22]                                              Page 22

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


     If a pageSizeLimit was set and reached during   March 1997

4.5.2. Search Result

   The results of the search, search attempted by the client 
     will be able to request more server upon receipt of the entries using a subsequent 
     SearchRequest with the prevSearchId field present. 

     It is strongly recommended that clients include the sortKeys field when
     including this field.

   - sortKeys: If this field is present, then it specifies one or more 
     attribute types and matching rules, and the
   Search Request are returned entries must
     be sorted in order based on these Search Responses, which are LDAP 
   messages containing either SearchResultEntry, SearchResultReference,
   ExtendedResponse or SearchResultDone data types.  If 

        SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
                objectName      LDAPDN,
                attributes      PartialAttributeList }

        PartialAttributeList ::= SEQUENCE OF SEQUENCE { 
                type    AttributeDescription,
                vals    SET OF AttributeValue } 
        -- implementors should note that the reverseOrder field is 
     set to TRUE, then PartialAttributeList may have
        -- zero elements (if none of the entries will be presented in reverse sorted 
     order.   

     Only if the server does not recognize any attributes of that entry were 
        -- requested, or could be returned), and that the attribute types, the 
     ordering rule associated with an attribute type is not applicable, vals set may also 
        -- have zero elements (if types only was requested, or
     none of all values were
        -- excluded from the attributes in result.)

        SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
        -- at least one LDAPURL element must be present
               
        SearchResultDone ::= [APPLICATION 5] LDAPResult

   Upon receipt of a Search Request, a server will perform the necessary
   search responses are of these types, 
     then the sortKeys field is not used and result entries are returned 
     in random order. DIT.

   If the server does not support sorting with the requested attributes
     or matching rules, then it must return only protocolError (which LDAP session is what
     an LDAPv2 operating over a connection-oriented transport
   such as TCP, the server would return), undefinedAttributeType or 
     inappropriateMatching and no searchResultEntry will return to the client a sequence of 
   responses in separate LDAP messages.  There may be zero or 
     searchResultReference responses.

     If more 
   responses containing SearchResultEntry, one for each entry found 
   during the sortKeys field is absent, there is no defined order search.  There may also be zero or more responses 
   containing SearchResultReference, one for returning
     entries in a search result.  

   - prevSearchId: If this field is present, each area not explored by 
   this informs the server that,
     with possibly the exception of during the value of search.  The SearchResultEntry and 
   SearchResultReference PDUs may come in any order. Following all the startLocation field, 
     this request is identical 
   SearchResultReference responses and all SearchResultEntry responses 
   to a searchRequest made previously on this
     association.  If be returned by the server, the server does not recognize this as will return a response containing
   the message id SearchResultDone, which contains an indication of a previous search operation, it must silently ignore this field and 
     perform this search as normal.  The client must ensure success, or 
   detailing any errors that have occurred.  

   Each entry returned in a SearchResultEntry will contain all fields, 
     other than startLocation, are the same attributes,
   complete with associated values if necessary, as specified in the earlier search, 
     otherwise the contents 
   attributes field of the entries Search Request.  Return of attributes is subject
   to access control and other administrative policy.  Some attributes may
   be returned from this search are not 
     defined.  If clients are performing in binary format (indicated by the same search more than twice on an
     association, then AttributeDescription in the prevSearchId field of all but 
   response having the first search
     must contain binary option present).

   Some attributes may be constructed by the messageID server and appear in a 
   SearchResultEntry attribute list, although they are not stored attributes
   of an entry. Clients MUST NOT assume that first search.
 
   - startLocation: this field may all attributes can be present modified,
   even if permitted by access control.

   Response LDAPMessages of the pageSizeLimit is 
     present.  After filtering and selecting ExtendedResponse form are reserved for 
   returning information associated with a control requested by the entries to client. 
   These may be returned defined in 
     a search, future versions of this document.

Wahl, Howes, Kille                                              Page 23

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

4.5.3. Continuation References in the Search Result

   If the server will discard this many entries before starting was able to return SearchResultEntry responses.  Thus setting startLocation 0 is locate the same as not including a startLocation field.  If entry referred to by the client sends a 
     value of startLocation which is larger than 
   baseObject but was unable to search all the number of entries in the
     result, scope at 
   and under the server will only baseObject, the server may return any one or more 
   SearchResultReference, each containing a reference to another set of 
   servers for continuing the operation.  The server will return 
   a SearchResultReference
     responses, for each new base object with a 
   particular scope and then the SearchResultDone response.  (The filter.  A server should 
     indicate in the SearchResultDone a value of totalCount which MUST NOT return any  
   SearchResultReference if it has not located the client
     may use to make a better choice of startLocation baseObject and 
   thus has not searched any entries; in this case it would return a subsequent search). 
   SearchResultDone containing a referral resultCode.

   The startLocation does not affect SearchResultReference responses, which
     are not counted as entries.



Wahl, Howes & Kille                                              [Page 23]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


     It is strongly recommended that clients include the sortKeys field when
     including this field.
    
   If the client includes the attribute type name 'modifyRights' in of the 
   search request attribute same data type list when performing a baseObject search, 
   then as the server may return Referral.
   URLs for servers implementing the modifyRights attribute as LDAP protocol are written according 
   to [9].  The <dn> part of MUST be present in the response attributes for that entry. URL, with the new target
   object name.  The value of client MUST use this attribute
   is described name in section 6.2.2.1 its next request.
   Some servers (e.g. part of [5], and corresponds to a distributed index exchange system) may provide
   a different filter in the X.511(93)
   ModifyRights field URLs of the ReadResponse.

   Note that an X.500 "list"-like operation can be emulated by SearchResultReference.  If the client
   requesting a one-level LDAP search operation with a 
   filter checking for 
   the existence part of the objectClass attribute, and that URL is present in an X.500 "read"-like 
   operation can be emulated by a base object LDAP search operation with URL, the same filter.  A server which provides a gateway client MUST use the 
   new filter in its next request to X.500 progress the search, and if the filter 
   part is not 
   required to absent the client will use again the Read or List operations, although it filter from the original 
   search.

   Other kinds of URLs may choose be returned so long as the operation could be 
   performed using that protocol.

   The name of an unexplored subtree in a SearchResultReference need not be
   subordinate to
   do so.  

   If the base object.

   In order to complete the search, the client MUST issue a new search filter includes an equality match of 
   operation for each SearchResultReference that is returned.  Note that the objectClass 
   attribute
   abandon operation described in section 4.11 applies only to a particular 
   operation sent on a connection between a client and server, and the value "subentry", then if the 
   client has multiple outstanding search operations to different servers,
   it MUST abandon each operation individually.

4.5.3.1. Example

   For example, suppose the contacted server (hosta) holds the entry 
   "O=MNN,C=WW" and the entry "CN=Manager,O=MNN,C=WW".  It knows that either 
   LDAP-capable servers (hostb) or (hostc) hold "OU=People,O=MNN,C=WW" (one 
   is converting
   to an X.500 protocol, the subentries service control must be set.
   Thus clients must not search for both subentries master and ordinary entries
   with the other server a single shadow), and that LDAP-capable 
   server (hostd) holds the subtree "OU=Roles,O=MNN,C=WW".  If a subtree 
   search operation.

4.5.2. Search Result

   The results of "O=MNN,C=WW" is requested to the search attempted by contacted server, the 
   server upon receipt of a
   Search Request are returned in Search Responses, which are LDAP 
   messages containing either SearchResultEntry, SearchResultReference, 
   SearchResultDone or SearchResultFull data types. may return the following responses:

     SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
                objectName      LDAPDN,
                attributes      PartialAttributeList }

        PartialAttributeList ::= SEQUENCE OF SEQUENCE for O=MNN,C=WW
     SearchResultEntry for CN=Manager,O=MNN,C=WW
     SearchResultReference { 
                type    AttributeDescription,
                vals    SET OF AttributeValue
       ldap://hostb/OU=People,O=MNN,C=WW
       ldap://hostc/OU=People,O=MNN,C=WW
     } 
        -- 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
       ldap://hostd/OU=Roles,O=MNN,C=WW
     }
     SearchResultDone (success)
Wahl, Howes & Howes, Kille                                              [Page 24]                                              Page 24

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



        SearchResultFull ::= SEQUENCE OF CHOICE {
                        entry           SearchResultEntry,
                        reference       SearchResultReference,
                        resultCode      SearchResultDone }

   Upon receipt of a Search Request,   March 1997

   Client implementors should note that when following a 
   SearchResultReference, additional SearchResultReference may be 
   generated.  Continuing the example, if the client contacted the 
   server will perform (hostb) and issued the necessary search of for the DIT.

   If subtree 
   "OU=People,O=MNN,C=WW", the LDAP session is operating over a connection-oriented transport
   such server might respond as TCP, follows:
  
     SearchResultEntry 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
     }
     SearchResultDone (success)

   If the contacted server does not hold the base object for the search, 
   then it will return a referral to the client.  For example, if the
   client requests a sequence subtree search of 
   responses in separate LDAP messages.  There may be zero or more 
   responses containing SearchResultEntry, one for each entry found 
   during "O=XYZ,C=US" to hosta, the search.  There server
   may also be zero or more responses return only a SearchResultDone containing SearchResultReference, one for each area not explored by 
   this server during the search.  The SearchResultEntry and 
   SearchResultReferences may come in any order. Following all the 
   SearchResultReference responses and all SearchResultEntry responses up
   to a pageSizeLimit (if any), the server will return a response containing
   the SearchResultDone, which contains an indication of success, or 
   detailing any errors that have occurred.  

   If the LDAP session is operating over referral. 

     SearchResultDone (referral) {
       ldap://hostg/O=XYZ,C=US
     }

4.6. Modify Operation

   The Modify Operation allows a connectionless transport such 
   as UDP, the server will return to the client only one response to the
   search, an LDAPMessage containing request that a SearchResultFull data type.  All (if 
   any) but the last element modification
   of the an entry be performed on its behalf by a server.  The Modify
   Request is defined as follows:

        ModifyRequest ::= [APPLICATION 6] SEQUENCE {
                object          LDAPDN,
                modification    SEQUENCE OF must be SEQUENCE {
                        operation       ENUMERATED {
                                                add     (0),
                                                delete  (1),
                                                replace (2) },
                        modification    AttributeTypeAndValues } }

        AttributeTypeAndValues ::= SEQUENCE {
                type    AttributeDescription,
                vals    SET OF AttributeValue }

   Parameters of the 
   SearchResultEntry or SearchResultReference types, and the last must Modify Request are:

   - object: The object to be modified. The value of this field contains the
     DN of the SearchResultDone type.

   The SearchResultFull is never returned over a connection-oriented 
   transport.

   Each entry returned in a SearchResultEntry to be modified.  The server will contain all attributes,
   complete with associated values if necessary, as specified not perform any alias 
     dereferencing in determining the 
   attributes field of the Search Request.  Return object to be modified.









Wahl, Howes, Kille                                              Page 25

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   - modification: A list of attributes is subject modifications to access control and other administrative policy.  Some attributes may be returned in binary format (indicated by performed on the AttributeDescription entry.
     The entire list of entry modifications MUST be performed
     in the 
   response having the binary option present), or in order they are listed, as a language-specific 
   subtype (indicated by the AttributeDescription in single atomic operation.  While
     individual modifications may violate the response having directory schema, the 
   language option present).

   The following are not strictly attributes of an
     resulting entry (or a subentry), 
   but may appear in after the result entire list if requested.

    - entryName. This operational attribute is maintained by the server and 
      appears to be present in each entry.  The value of this attribute modifications is performed
     MUST conform to the distinguished name requirements of the entry from which it is read.  It 
      is expected directory schema. The
     values that may be taken on by the client would request and the server would return
      this attribute 'operation' field in binary.

    - modifyRights. Each value is each
     modification construct have the encoding of an element of modifyRights.
      The attribute is specific following semantics respectively:

             add: add values listed to the particular search operation and given attribute, creating
             the requestor, and must not be cached or replicated.



Wahl, Howes & Kille                                              [Page 25]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


    - incompleteEntry.  This attribute's value is TRUE attribute if one or more 
      attributes are not present in necessary;

             delete: delete values listed from the PartialAttributeList, because their 
      size would have exceeded given attribute,
             removing the entire attribute size limit, if no values are listed, or
             if a partial 
      shadow copy all current values of the entry was used to satisfy the request and some 
      requested attributes attribute are not returned.  It is never set just because 
      typesOnly was set to TRUE, or because a requested listed for
             deletion;

             replace: replace all existing values of the given attribute was not
      actually present in
             with the entry.

    - fromEntry.  The server may return this attribute's value as FALSE new values listed, creating the attribute if it 
      is known that
             did not already exist.  A replace with no value will delete 
             the search is based upon a shadow or cached copy entire attribute.

   The result of the 
      entry, and may return it as TRUE if modify attempted by the server masters the entry. 

   In upon receipt of a SearchResultEntry,
   Modify Request is returned in a Modify Response, defined as an encoding optimization, the value follows:

        ModifyResponse ::= [APPLICATION 7] LDAPResult

   Upon receipt of the
   objectName LDAPDN may have a trailing '*' character Modify Request, a server will perform the necessary
   modifications to refer the DIT.

   The server will return to the 
   baseObject client a single Modify Response
   indicating either the successful completion of the corresponding searchRequest.  For example, if DIT modification,
   or the
   baseObject is specified as "o=UofM, c=US", then reason that the following objectName 
   LDAPDNs modification failed. Note that due to the
   requirement for atomicity in a response would have applying the indicated meanings

          objectName returned   actual LDAPDN denoted
          ____________________________________________________
          "*"                   "o=UofM, c=US"
          "cn=Babs Jensen, *"   "cn=Babs Jensen, o=UofM, c=US"

   If list of modifications in
   the pageSizeLimit field was present, Modify Request, the server client may indicate the total 
   number expect that no modifications of entries which could
   the DIT have matched been performed if the search filter in Modify Response received indicates
   any sort of error, and that all requested modifications have been
   performed if the field 
   totalCount Modify Response indicates successful completion of
   the SearchResultDone. The total count would be Modify Operation.  If the same or 
   greater than connection fails, whether the number of SearchResultEntry responses returned at this 
   time.  If it modification
   occurred or not is greater, then indeterminate.

   Note that due to the server did simplifications made in LDAP, there is not return all a direct 
   mapping of the responses 
   because modifications in an LDAP ModifyRequest onto the pageSizeLimit was reached.  This field is not affected by any 
   requested startLocation field. Client implementors should note that 
   subsequent search requests with the same fields may return 
   EntryModifications of a DAP ModifyEntry operation, and different value
   for totalCount if
   implementations of LDAP-DAP gateways may use different means of 
   representing the DIT is being modified by other users.  The totalCount
   field must be absent if change.  If successful, the pageSizeLimit field was not included in final effect of the 
   request.

   Servers should not return 
   operations on the resultCode sizeLimitExceeded merely because entry MUST be identical.










Wahl, Howes, Kille                                              Page 26

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

4.7. Add Operation

   The Add Operation allows a pageSizeLimit was reached. 

4.5.3. Continuation References in the Search Result

   If the server was able client to locate request the addition of an entry referred to by the 
   baseObject but was unable to search all
   into the entries in 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 scope at 
   and under Add Request are:

   - entry: the baseObject, Distinguished Name of the server may return one or more 
   SearchResultReference, each containing a reference entry to another set be added. Note that
     all components of 
   servers the name except for continuing the operation.  The server must return at most 
   one SearchResultReference last RDN component MUST
     exist for a new subordinate base object with a 
   particular scope and filter.  A server must not return a 
   SearchResultReference if it has not located the baseObject and 
   thus has add to succeed.  Note also that the server will not searched 
     dereference any entries; aliases in this case it would return a 
   SearchResultDone containing a referral resultCode.






Wahl, Howes & Kille                                              [Page 26]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



   The SearchResultReference is of the same data type as locating the Referral.
   A URL in a SearchResultReference entry to be added, and that 
     servers may enforce restrictions on where entries may only be included if the client has
   indicated (in located. 

   - attributes: the session controls) that it is able to handle list of attributes that 
   protocol.  If make up the client has not indicated any protocols which content of the 
   server could use to return 
     entry being added.  Clients MUST include distinguished values (those
     forming the entry's own RDN) in a SearchResultReference, this list, the server must
   itself process objectClass attribute,
     and values of any mandatory attributes of the entire search.  If listed object classes.

   The result of the server could 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 add attempted by setting the resultCode server upon receipt of a Add
   Request is returned in the SearchResultDone to be something 
   other than success, such Add Response, defined as timeLimitExceeded.

   URLs for servers implementing the LDAP protocol are written according follows:

        AddResponse ::= [APPLICATION 9] LDAPResult

   Upon receipt of an Add Request, a server will attempt to [9]. perform the
   add requested.  The dn part must be present in result of the URL, with add attempt will be returned to the new target
   object name.  The
   client must use this name in its next request.
   Some servers (e.g. participating in distributed indexing) may change the filter.  If Add Response.

4.8. Delete Operation

   The Delete Operation allows a client to request the filter part removal of the URL is present in an LDAP URL, 
   the client must use this filter in its next request to progress this
   search, and if
   entry from the filter directory. The Delete Request is absent the client will use the same filter defined as 
   it used for that search.

   Other kinds follows: 

        DelRequest ::= [APPLICATION 10] LDAPDN

   The Delete Request consists of URLs may be returned so long as the operation could be 
   performed using that protocol, and Distinguished Name of the client has indicated (in a 
   session control) that it is able
   entry to handle be deleted. Note that protocol.  

   The the server will not dereference aliases 
   while resolving the name of an unexplored subtree in a SearchResultReference need not the target entry to be removed, and that only 
   leaf entries (those with no subordinate to the base object if an alias was dereferenced, however it 
   must not entries) may be a prefix deleted with this 
   operation.
    
   The result of the base object, otherwise the client will
   loop.  (Client implementations must detect loops; see section 6.2.)

   Note: delete attempted by the "X.500 Non-Specific Subordinate Reference" server upon receipt of a 
   Delete Request is not permitted returned in 
   LDAP.  Servers must not return multiple SearchResultReference for the same 
   subtree, and any one Delete Response, defined as follows:

        DelResponse ::= [APPLICATION 11] LDAPResult

   Upon receipt of (not all of) the servers listed in a 
   SearchResultReference may be contacted to perform the entire search in Delete Request, a 
   particular subtree.

4.5.3.1. Example

   For example, suppose the contacted server (hosta) holds the entry 
   "O=MNN,C=WW" and will attempt to perform
   the entry "CN=Manager,O=MNN,C=WW".  It knows that either 
   LDAP-capable servers (hostb) or (hostc) hold "OU=People,O=MNN,C=WW" (one 
   is removal requested. The result of the master and delete attempt will be
   returned to the other server a shadow), and that LDAP-capable 
   server (hostd) holds client in the subtree "OU=Roles,O=MNN,C=WW".  If a subtree 
   search of "O=MNN,C=WW" is requested to the contacted server in which 
   chainingProhibited is set and referrals are permitted, and the filter is 
   objectClass=*, the server may return the following responses: Delete Response. 

Wahl, Howes & Howes, Kille                                              [Page 27]                                              Page 27

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 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 be 
   generated.  Continuing the example, if the client contacted the 
   server (hostb) and issued the search for the subtree 
   "OU=People,O=MNN,C=WW", the server might respond as follows:
  
     SearchResultEntry 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.   March 1997

4.9. Modify DN Operation

   The Modify DN Operation allows a client to request that a modification change the last component
   of the name of an entry be performed on its behalf by in the directory, or to move a server. subtree of 
   entries to a new location in the directory.  
   The Modify DN Request is defined as follows:

        ModifyRequest

        ModifyDNRequest ::= [APPLICATION 6] 12] SEQUENCE {
                object
                entry           LDAPDN,
                modification    SEQUENCE OF SEQUENCE {
                        operation       ENUMERATED {
                                                add     (0),
                                                delete  (1),
                                                replace (2) },
                        modification    AttributeTypeAndValues } }

        AttributeTypeAndValues ::= SEQUENCE {
                type    AttributeDescription,
                vals    SET OF AttributeValue
                newrdn          RelativeLDAPDN,
                deleteoldrdn    BOOLEAN,
                newSuperior     [0] LDAPDN OPTIONAL }
               
   Parameters of the Modify DN Request are:

   - object: The object to be modified. The value of this field contains entry: the
     DN Distinguished Name of the entry to be modified.  The server will changed.  This entry
     may or may not perform any 
     alias dereferencing in determining have subordinate entries.

   - newrdn: the object to be modified unless RDN that will form the useAliasOnUpdate session control is set to TRUE.





Wahl, Howes & Kille                                              [Page 28]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



   - A list last component of modifications to be performed on the entry to be modified.
     The entire list of entry modifications must be performed
     in the order they are listed, as new name.

   - deleteoldrdn: a single atomic operation.  While
     individual modifications may violate the directory schema, the
     resulting entry after the entire list of modifications is performed
     must conform to the requirements of the directory schema. The
     values boolean parameter that may be taken on by the 'operation' field in each
     modification construct have controls whether the following semantics respectively:

             add: add old RDN
     attribute values listed are to be retained as attributes of the given attribute, creating
             the attribute if necessary;

             delete: delete values listed entry, or
     deleted from the given attribute,
             removing the entire attribute if no values are listed, or entry.

   - newSuperior: if all current values of present, this is the attribute are listed for
             deletion;

             replace: replace all existing values Distinguished Name of the given attribute
             with the new values listed, creating entry 
     which becomes the attribute if it
             did not already exist.  A replace with no value will delete immediate superior of the entire attribute. existing entry.

   The result of the modify name change attempted by the server upon receipt of
   a Modify DN Request is returned in a the Modify DN Response, defined
   as follows:

        ModifyResponse

        ModifyDNResponse ::= [APPLICATION 7] 13] LDAPResult

   Upon receipt of a Modify Request, ModifyDNRequest, a server will perform the necessary
   modifications attempt to
   perform the DIT. name change. The server result of the name change attempt will return
   be returned to the client a single in the Modify Response
   indicating either DN Response. 
  
   If the successful completion of deleteoldrdn parameter is TRUE, the DIT modification,
   or values forming the reason that old
   RDN are deleted from the modification failed. Note that due to entry.  If the
   requirement for atomicity in applying deleteoldrdn parameter is 
   FALSE, the list of modifications in values forming the Modify Request, the client may expect that no modifications old RDN will be retained as 
   non-distinguished attribute values of the DIT have been performed if entry.  The server may 
   not perform the Modify Response received indicates
   any sort of error, operation and that all requested modifications have been
   performed return an error code if the Modify Response indicates successful completion setting of 
   the Modify Operation.  If the connection fails, whether deleteoldrdn parameter would cause a schema inconsistency in the modification
   occurred or not is indeterminate.
   entry.

   Note that due to X.500 restricts the simplifications made in LDAP, there is not ModifyDN operation to only affect entries
   that are contained within a direct 
   mapping of single server.  If the modifications in an LDAP ModifyRequest server is mapped
   onto the 
   EntryModifications of a a DAP ModifyEntry operation, DAP, then this restriction will apply, and different
   implementations of LDAP-DAP gateways may use different means of 
   representing the change.  The final effect of the operations on the 
   entry resultCode 
   affectsMultipleDSAs will be identical. returned if this error occurred.  In general 
   clients must not expect to be able to perform arbitrary movements of 
   entries and subtrees between servers.
 





Wahl, Howes & Howes, Kille                                              [Page 29]                                              Page 28

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


4.7.  Add   March 1997

4.10. Compare Operation

   The Add Compare Operation allows a client to request the addition of compare an assertion
   provided with an entry
   into in the directory. The Add Compare Request is
   defined as follows:

        AddRequest

        CompareRequest ::= [APPLICATION 8] 14] SEQUENCE {
                entry           LDAPDN,
                attributes      AttributeList }

        AttributeList ::= SEQUENCE OF SEQUENCE {
                type    AttributeDescription,
                vals    SET OF AttributeValue
                ava             AttributeValueAssertion }

   Parameters of the Add Compare Request are:

   - entry: the Distinguished Name name of the entry to be added. Note that
     all components of the name except for compared with.

   - ava: the last RDN component must
     exist for assertion with which an attribute in the add to succeed.  Note also that the server will not 
     dereference any aliases in locating the entry entry is 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. 
     compared.

   The result of the add compare attempted by the server upon receipt of a Add
   Compare Request is returned in the Add Compare Response, defined as
   follows:

        AddResponse

        CompareResponse ::= [APPLICATION 9] 15] LDAPResult 

   Upon receipt of an Add a Compare Request, a server will attempt to perform
   the
   add requested. requested comparison. The result of the add attempt comparison will be
   returned to the client in the Add Compare Response.

4.8.  Delete 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.11. Abandon Operation

   The Delete function of the Abandon Operation allows is to allow a client to request
   that the removal of server abandon an
   entry from the directory. outstanding operation.  The Delete Abandon
   Request is defined as follows: 

        DelRequest

        AbandonRequest ::= [APPLICATION 10] LDAPDN 16] MessageID

   The Delete Request consists of the Distinguished Name of the
   entry to MessageID MUST be deleted. Note that the server will not dereference aliases 
   while resolving the name of a an operation which was requested earlier 
   in this connection.  

   (The abandon request itself has its own message id.  This is distinct
    from the target entry to be removed, unless id of the useAliasOnUpdate session control earlier operation being abandoned.)

   There is TRUE.
    
   The result no response defined in the Abandon Operation. Upon
   transmission of an Abandon Operation, a client may expect that the delete attempted
   operation identified by the server upon receipt of Message ID in the Abandon Request has
   been abandoned. In the event that a 
   Delete server receives an Abandon
   Request is returned on a Search Operation in the Delete Response, defined as follows:

        DelResponse ::= [APPLICATION 11] LDAPResult midst of transmitting 
   responses to the search, that server MUST cease transmitting entry 
   responses to the abandoned request immediately, and MUST NOT send the
   SearchResponseDone.  Of course, the server MUST ensure that only properly 
   encoded LDAPMessage PDUs are transmitted.

Wahl, Howes & Howes, Kille                                              [Page 30]                                              Page 29

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



   Upon receipt of a Delete Request, a server will attempt to perform
   the entry removal requested. The result of   March 1997

   Clients MUST NOT send abandon requests for the delete attempt will same operation multiple
   times, and MUST also be
   returned prepared to the client receive results from operations it
   has abandoned (since these may have been in transit when the Delete Response. Note that only leaf
   objects (with no subordinates) may abandon was 
   requested).

   Servers MUST discard abandon requests for message IDs they do not 
   recognize, for operations which cannot be deleted with this operation.

4.9.  Modify DN Operation

   The Modify DN abandoned, and for operations 
   which have already been abandoned.

4.12. Extended Operation allows a client to change the last component
   of the name

   An extension mechanism has been added in this version of an entry LDAP, in the directory, or order to move a subtree of 
   entries 
   allow additional operations to a new location be defined for services not available 
   elsewhere in the directory. this protocol, for instance digitally signed operations and 
   results.

   The Modify DN Request is extended operation allows clients to make requests and receive 
   responses with predefined syntaxes and semantics.  These may be 
   defined as follows:

        ModifyDNRequest in RFCs or be private to particular implementations.  Each 
   operation MUST have a unique OBJECT IDENTIFIER assigned to it.

        ExtendedRequest ::= [APPLICATION 12] 23] SEQUENCE {
                entry           LDAPDN,
                newrdn          RelativeLDAPDN,
                deleteoldrdn    BOOLEAN,
                newSuperior
                requestName      [0] LDAPDN LDAPOID,
                requestValue     [1] OCTET STRING OPTIONAL }
               
   Parameters of the Modify DN Request are:

   - entry: the name

   The requestName is a dotted-decimal representation of the entry 
   OBJECT IDENTIFIER corresponding to be changed.

   - newrdn: the RDN request.  
   The requestValue is information in a form defined by that request, 
   encapsulated inside an OCTET STRING. 

   The server will form respond to this with an LDAPMessage containing the last component of 
   ExtendedResponse.

        ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
                COMPONENTS OF LDAPResult,
                responseName     [10] LDAPOID OPTIONAL,
                response         [11] OCTET STRING OPTIONAL }
    
   If the new name.

   - deleteoldrdn: a boolean parameter that controls whether server does not recognize the old RDN
     attribute values is to be retained as attributes of request name, it MUST return
   only the entry, or
     deleted response fields from LDAPResult, containing the entry.

   - newSuperior: if present, this is protocolError 
   result code.

5.  Protocol Element Encodings and Transfer

   Two underlying services are defined here.  At a minimum, clients and 
   servers SHOULD implement the name mapping of LDAP over TCP described in 5.2.1.

5.1. Mapping Onto BER-based Transport Services

   The protocol elements of LDAP are encoded for exchange using the entry which 
     becomes the immediate superior
   Basic Encoding Rules (BER) [11] of ASN.1 [3]. However, due to the existing entry.

   The result
   high overhead involved in using certain elements of the name change attempted by BER, the server upon receipt
   following additional restrictions are placed on BER-encodings of
   a Modify DN Request is returned in the Modify DN Response, defined
   as follows:

        ModifyDNResponse ::= [APPLICATION 13] LDAPResult

   Upon receipt of a ModifyDNRequest, a server will attempt to
   perform LDAP
   protocol elements:



Wahl, Howes, Kille                                              Page 30

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

   (1) Only the name change. The result definite form of the name change attempt length encoding will be returned to the client used.

   (2) OCTET STRINGs will be encoded in the Modify DN Response. The attributes
   that make up the old RDN are deleted from the entry, or kept,
   depending on primitive form only.

   (3) If the setting value of a BOOLEAN type is true, the deleteoldrdn parameter.

   Note that X.500 restricts the ModifyDN operation encoding MUST have 
       its contents octets set to only affect entries
   that are contained within a single server. hex "FF".

   (4) If the LDAP server a value of a type is mapped
   onto DAP, then this restriction will apply, and the resultCode 
   affectsMultipleDSAs will its default value, it MUST be returned.  In general clients must absent.  
       Only some BOOLEAN and INTEGER types have default values in this 
       protocol definition.

   These restrictions do not 
   expect to be able apply to perform arbitrary movements ASN.1 types encapsulated inside of entries and subtrees.







Wahl, Howes & Kille                                              [Page 31]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


   
4.10.  Compare Operation

   The Compare Operation allows a client 
   OCTET STRINGs, such as attribute values, unless otherwise noted.

5.2. Transfer Protocols

   This protocol is designed to compare an assertion
   provided run over connection-oriented, reliable
   transports, with all 8 bits in an entry octet being significant in the directory. data
   stream.  

5.2.1. Transmission Control Protocol (TCP)

   The Compare Request LDAPMessage PDUs are mapped directly onto the TCP bytestream.
   It is
   defined as follows:

        CompareRequest ::= [APPLICATION 14] SEQUENCE {
                entry           LDAPDN,
                ava             AttributeValueAssertion }

   Parameters of recommended that server implementations running over the Compare Request are:

   - entry: TCP MAY
   provide a protocol listener on the name assigned port, 389.  Servers may 
   instead provide a listener on a different port number. Clients MUST
   support contacting servers on any valid TCP port.

5.2.2. Secure Socket Layer over TCP (SSL)

   LDAP is an application protocol which may be carried inside of a 
   Secure Sockets Layer connection [8]. After establishing the entry to be compared with.

   - ava: SSL 
   connection over TCP, the assertion with which an attribute in LDAPMessage PDUs are mapped directly onto 
   the entry is bytestream to be 
     compared.

   The result of the compare attempted encoded by SSL.  Server implementations running over 
   SSL/TCP MAY provide a protocol listener on the assigned port for LDAPS, 
   port 636.

   SSL may be used to provide to the server upon receipt the authenticated identity of a
   Compare Request is returned in the Compare Response, defined 
   client, as
   follows:

        CompareResponse ::= [APPLICATION 15] SEQUENCE {
           COMPONENTS OF LDAPResult,
           matchedSubtype [9] AttributeDescription OPTIONAL }

   When the resultCode is compareTrue a distinguished name, and the matchedSubtype field server MAY use this information
   when making access control decisions.  This authentication is 
   permitted to contain the name of unaffected if 
   the attribute whose client binds and specifies no value 
   matched the ava in for the Compare operation.  Servers which do not 
   implement attribute hierarchies will omit this element.

   Upon receipt of a Compare Request, password nor a server will attempt to perform
   the requested comparison. SASL 
   mechanism. The result of the comparison will be
   returned to the client in may override the Compare Response. authentication by binding with a 
   distinguished name and a non-empty password or a SASL mechanism. 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 is expected that an attribute future versions of that type would be returned, but with this document will reference
   an empty set of values.
   
4.11.  Abandon Operation

   The function of the Abandon Operation is to allow a client to request
   that the server abandon IETF specification for equivalent transport layer security services, 
   when one becomes available.

6.  Implementation Guidelines

   This document describes an outstanding operation.  The Abandon
   Request is Internet protocol. Terms are defined as follows:

        AbandonRequest ::= [APPLICATION 16] MessageID in [10].

6.1. Server Implementations

   The MessageID must server MUST be that of a Search or Compare operation 
   which was requested earlier during this association.  Other types capable of 
   operations cannot be abandoned.  

   (The abandon request itself has its own message id.  This is distinct
    from recognizing all the id of mandatory attribute 
   type names and implement the earlier operation being abandoned.) syntaxes specified in [5].  Servers may also
   recognize additional attribute type names.

Wahl, Howes & Howes, Kille                                              [Page 32]                                              Page 31

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


   There is no response defined in the Abandon Operation. Upon
   transmission of an Abandon Operation, a client may expect   March 1997
        
6.2. Client Implementations

   Clients which request referrals MUST ensure that they do not loop
   between servers. 

   They MUST NOT repeatedly contact the
   operation identified by the Message ID in same server for the Abandon Request has
   been abandoned. In same request
   with the event that same target entry name, scope and filter.   

   Some clients may be using a server receives counter that is incremented each time 
   referral handling occurs for an Abandon
   Request on operation, and these kind of clients MUST 
   be able to handle a Search Operation in DIT with at least ten layers of naming contexts 
   between the midst root and a leaf entry.

7.  Security Considerations

   When used with a connection-oriented transport, this version of transmitting 
   responses to the search, that server must cease transmitting entry 
   responses to 
   protocol provides facilities for the abandoned request immediately. Of course, LDAP v2 authentication mechanism,
   simple authentication using a cleartext password, as well as any SASL
   mechanism [12].
   
   It is also permitted that the server
   must ensure that only properly encoded LDAPMessages are transmitted.

   Clients must not send abandon requests for can return its credentials to the same operation multiple
   times.  Servers must discard abandon requests for message ids 
   client, if it does
   not recognize, for operations 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 be abandoned, guarantee confidentiality and for 
   operations which have already been abandoned.

4.12.  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 result in this version 
   disclosure of LDAP.

   The extended operation allows clients the password to make requests and receive 
   responses unauthorized parties.

   When used with predefined syntaxes and semantics.  These may be 
   defined in RFCs or SASL, it should be private to particular implementations.  Each 
   operation must 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 noted that the 
   OBJECT IDENTIFIER corresponding to name field of the request.  
   The requestValue 
   BindRequest is not protected against modification.  Thus if there 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 
   client name (LDAPDN) agreed through the server does not recognize negotiation of the operation name, credentials,
   it must return
   only the standard response fields, containing takes precedence over any value in the protocolError result 
   code.

5.  Protocol Element Encodings unprotected name field.

   Implementations which cache attributes and Transfer

   Four underlying services entries obtained via LDAP 
   MUST ensure that access controls are defined here.  At a minimum, clients maintained if that information is 
   to be provided to multiple clients.

8.  Acknowledgements

   This document is an update to RFC 1777, by Wengyik Yeong, Tim 
   Howes, and 
   servers must implement the mapping Steve Kille.  Design ideas included in this document are 
   based on those discussed in ASID and other IETF Working Groups.  The 
   contributions of LDAP over TCP described individuals in 5.1.1. 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.


Wahl, Howes & Howes, Kille                                              [Page 33]                                              Page 32

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



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   March 1997

   [3] ITU-T Rec. X.680, "Abstract Syntax Notation One (ASN.1) - 
       Specification 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 Notation", 1994.

   [4] S. Kille, M. Wahl, "A UTF-8 String Representation of Distinguished 
       Names", INTERNET-DRAFT <draft-ietf-asid-ldapv3-dn-01.txt>.

   [5] M. Wahl, A. Coulbeck, T. Howes, S. Kille, W. Yeong, C. Robbins,
       "Lightweight X.500 Directory Access Protocol Attribute Syntax
       Definitions", INTERNET-DRAFT 
       <draft-ietf-asid-ldapv3-attributes-04.txt>, March 1997.

   [6] ITU-T Rec. X.501, "The Directory: Models", 1993.
     
   [7] T. Berners-Lee, L. Masinter, M. McCahill, "Uniform Resource 
        Locators (URL)", RFC 1738, Dec. 1994.

   [8] A. Freier, P. Karlton, P. Kocher, "The SSL Protocol Version 3.0",
        INTERNET-DRAFT <draft-ietf-tls-ssl-version3-00.txt>, Nov. 1996.

   [9] T. Howes, M. Smith, "An LDAP
   protocol elements:

   (1) Only the definite form of length encoding will be used.

   (2) OCTET STRINGs will be encoded URL Format", RFC 1959, June 1996.

   [10] S. Bradner, "Key words for use in the primitive form only.

   (3) If the value of a BOOLEAN type is true, the encoding must have 
       its contents octets set RFCs to hex "FF".

   (4) If a value Indicate Requirement 
        Levels", INTERNET-DRAFT <draft-bradner-key-words-03.txt>.
   
   [11] ITU-T Rec. X.690, "Specification of a type is its default value, it must 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 the assigned 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 encoding rules: Basic, 
        Canonical, and extendedReq.  The server may return sessionResponse, 
   searchResFull, compareResponse Distinguished Encoding Rules", 1994.

   [12] J. Meyers, "Simple Authentication 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 Security Layer",
        INTERNET-DRAFT <draft-myers-auth-sasl-04.txt>, July 1996.

   [13] Universal Multiple-Octet Coded Character Set (UCS) - Architecture
        and Basic Multilingual Plane, ISO/IEC 10646-1 : 1993.
   
   [14] F. Yergeau, "UTF-8, a protocol 
   listener on the assigned port, 389.




Wahl, transformation format of Unicode and ISO 
        10646", RFC 2044, October 1996.

   [15] ITU-T Rec. X.511, "The Directory: Abstract Service Definition", 
        1993.


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

Wahl, Howes, Kille                                              [Page 34]                                              Page 33

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


   
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 [8]. 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 the assigned port for LDAP-SSL, port 636.

   Note: it is expected that future versions of this document may reference
   an IETF specification for equivalent transport layer security services, 
   should one become available.

6.  Implementation Guidelines

6.1.  Server Implementations

   The server must 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

6.2.1. CLDAP Retry

   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.2. Loop Detection

   Clients which request referrals must 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 [17].
   
   It is also permitted that the server can return its credentials to the 
   client, if it chooses to do so.




Wahl, Howes & Kille                                              [Page 35]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



   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.

   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>.

   [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.


Wahl, Howes & Kille                                              [Page 36]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



   [8] A. Freier, P. Karlton, P. Kocher, "The SSL Protocol Version 3.0",
        INTERNET-DRAFT <draft-freier-ssl-version3-01.txt>, March 1996.

   [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.

   [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] J. Meyers, "Simple Authentication and Security Layer",
        INTERNET-DRAFT <draft-myers-auth-sasl-04.txt>, July 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









Wahl, Howes & Kille                                              [Page 37]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



       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

        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,
                        extendedReq     ExtendedRequest,
                        extendedResp    ExtendedResponse } }

        MessageID ::= INTEGER (0 .. maxInt)

        maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) --

        LDAPString ::= OCTET STRING

        LDAPOID ::= OCTET STRING 


Wahl, Howes & Kille                                              [Page 38]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996

   
        LDAPDN ::= LDAPString

        RelativeLDAPDN ::= LDAPString

        AttributeType ::= LDAPString

        AttributeDescription ::= LDAPString

        AttributeDescriptionList ::= SEQUENCE OF 
                AttributeDescription
    

        AttributeValue ::= OCTET STRING 

        AttributeValueAssertion ::= SEQUENCE {
                attributeDesc   AttributeDescription,
                assertionValue  AssertionValue }

        AssertionValue ::= OCTET STRING

        Attribute ::= SEQUENCE {
                type    AttributeDescription,
                vals    SET OF AttributeValue }

        MatchingRuleId ::= LDAPString































Wahl, Howes & Kille                                              [Page 39]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


        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 }

        Referral ::= SEQUENCE OF LDAPURL


Wahl, Howes & Kille                                              [Page 40]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


        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, 
                prevSearchId    [2] MessageID   OPTIONAL,
                startLocation   [3] INTEGER     OPTIONAL }

Wahl, Howes &   March 1997
       
       Phone:  +1 415 254-1900
       EMail:   howes@netscape.com

       Steve Kille                                              [Page 41]

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 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
       Isode Limited
       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 ::= SEQUENCE {
                type            AttributeDescription,
                -- at least one must be present
                substrings      SEQUENCE OF CHOICE { 
                        initial [0] LDAPString,
                        any     [1] LDAPString,
                        final   [2] LDAPString } }

        MatchingRuleAssertion

        BEGIN

        LDAPMessage ::= SEQUENCE {
                matchingRule    [1] MatchingRuleId OPTIONAL,
                type            [2] AttributeType OPTIONAL,
                matchValue      [3] AssertionValue,
                dnAttributes    [4] BOOLEAN DEFAULT FALSE }

        SearchResultEntry ::= [APPLICATION 4] SEQUENCE
                messageID       MessageID,
                protocolOp      CHOICE {
                objectName      LDAPDN,
                attributes      PartialAttributeList
                        bindRequest     BindRequest,
                        bindResponse    BindResponse, 
                        unbindRequest   UnbindRequest, 
                        searchRequest   SearchRequest, 
                        searchResEntry  SearchResultEntry, 
                        searchResDone   SearchResultDone, 
                        searchResRef    SearchResultReference, 
                        modifyRequest   ModifyRequest, 
                        modifyResponse  ModifyResponse, 
                        addRequest      AddRequest,     
                        addResponse     AddResponse,    
                        delRequest      DelRequest, 
                        delResponse     DelResponse,    
                        modDNRequest    ModifyDNRequest, 
                        modDNResponse   ModifyDNResponse, 
                        compareRequest  CompareRequest, 
                        compareResponse CompareResponse, 
                        abandonRequest  AbandonRequest,  
                        extendedReq     ExtendedRequest,
                        extendedResp    ExtendedResponse },
                 controls       [0] Controls OPTIONAL }

        PartialAttributeList

        MessageID ::= 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 INTEGER (0 .. maxInt)

        maxInt INTEGER ::= 2147483647 -- exceeded the attribute size limit or were excluded because of (2^^31 - 1) -- access control).

        SearchResultReference

        LDAPString ::= [APPLICATION 19] SEQUENCE OF LDAPURL
        -- at least one LDAPURL element must be present
               
        SearchResultDone OCTET STRING

        LDAPOID ::= [APPLICATION 5] SEQUENCE {
           COMPONENTS OF LDAPResult,
           totalCount [8] INTEGER OPTIONAL } OCTET STRING 

        LDAPDN ::= LDAPString


Wahl, Howes & Howes, Kille                                              [Page 42]                                              Page 34

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


        SearchResultFull   March 1997

        RelativeLDAPDN ::= SEQUENCE OF CHOICE {
                        entry           SearchResultEntry,
                        reference       SearchResultReference,
                        resultCode      SearchResultDone }

        ModifyRequest LDAPString

        AttributeType ::= [APPLICATION 6] SEQUENCE {
                object          LDAPDN,
                modification    SEQUENCE OF SEQUENCE {
                        operation       ENUMERATED {
                                                add     (0),
                                                delete  (1),
                                                replace (2) },
                        modification    AttributeTypeAndValues } }

        AttributeTypeAndValues LDAPString
        
        AttributeDescription ::= LDAPString
        
        AttributeDescriptionList ::= SEQUENCE {
                type    AttributeDescription,
                vals    SET OF 
                AttributeDescription

        AttributeValue }

        ModifyResponse ::= [APPLICATION 7] LDAPResult

        AddRequest OCTET STRING 

        AttributeValueAssertion ::= [APPLICATION 8] SEQUENCE {
                entry           LDAPDN,
                attributes      AttributeList
                attributeDesc   AttributeDescription,
                assertionValue  AssertionValue }

        AttributeList

        AssertionValue ::= OCTET STRING

        Attribute ::= 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

        MatchingRuleId ::= [APPLICATION 13] LDAPString

        LDAPResult

        CompareRequest ::= [APPLICATION 14] SEQUENCE {
                entry           LDAPDN,
                ava             AttributeValueAssertion }

        CompareResponse ::= [APPLICATION 15] SEQUENCE {
           COMPONENTS OF LDAPResult,
           matchedSubtype [9] AttributeDescription OPTIONAL }

        AbandonRequest ::= [APPLICATION 16] MessageID

        ExtendedRequest ::= [APPLICATION 23] SEQUENCE
                resultCode      ENUMERATED {
                requestName      [0] LDAPOID,
                requestValue     [1] OCTET STRING }
                             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),

Wahl, Howes & Howes, Kille                                              [Page 43]                                              Page 35

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996


        ExtendedResponse   March 1997

                             unavailable                  (52),
                             unwillingToPerform           (53),
                             loopDetect                   (54),
                                        -- 55-63 unused --
                             namingViolation              (64),
                             objectClassViolation         (65),
                             notAllowedOnNonLeaf          (66),
                             notAllowedOnRDN              (67),
                             entryAlreadyExists           (68),
                             objectClassModsProhibited    (69),
                                        -- 70 reserved for CLDAP --
                             affectsMultipleDSAs          (71), -- new
                                        -- 72-79 unused --
                             other                        (80) },
                             -- 81-90 reserved for APIs --
                matchedDN       LDAPDN,
                errorMessage    LDAPString,
                referral        [3] Referral OPTIONAL }

        Referral ::= SEQUENCE OF LDAPURL

        LDAPURL ::= LDAPString  -- limited to characters permitted in URLs

        Controls ::= [APPLICATION 24] SEQUENCE {
                COMPONENTS OF LDAPResult,
                responseName     [10] LDAPOID OPTIONAL,
                response         [11] Control

        Control ::= SEQUENCE {
                controlType             LDAPOID,
                criticality             BOOLEAN DEFAULT FALSE,
                controlValue            OCTET STRING OPTIONAL }
    
        -- not part of LDAP core protocol, see Appendix B --

        ProtectedPassword

        BindRequest ::= [APPLICATION 0] SEQUENCE {
                time1
                version                 INTEGER (1 .. 127),
                name                    LDAPDN,
                authentication          AuthenticationChoice }

        AuthenticationChoice ::= CHOICE {
                simple                  [0] UTCTime OPTIONAL,
                time2                   [1] UTCTime OPTIONAL,
                random1                 [2] BIT STRING OPTIONAL,
                random2 OCTET STRING,
                                         -- 1 and 2 reserved
                sasl                    [3] BIT STRING OPTIONAL,
                algorithmIdentifier     [4] LDAPOID,
                encipheredPassword      [5] BIT STRING SaslCredentials }

        StrongCredentials

        SaslCredentials ::= 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 which may
   be used with LDAP.  These mechanisms are only for authentication, they
   have no effect on the protocol encodings and are not designed to 
   provide integrity or confidentiality services.

   If an implementation supports these elements, then the following 
   additional encoding restrictions apply to these elements:

   - BIT STRING values are to be encoded in primitive form only. Unused bits 
     in the final octet of the encoding of a BIT STRING value, if there are 
     any, should always be set to zero.

   - UTC Times must be encoded with the "Z" suffix, not as a local time. 
        
   The client may include one of these mechanisms and its credential in the 
   BindRequest. The server will return a BindResponse of either:
    - success, and the serverCreds field absent, implying that the server
      successfully authenticated the client but is not returning any 
      authentication information about the server,
    - success, and the serverCreds field present, with the same
                mechanism
      as that requested by the client, and the               LDAPString,
                credentials of the server 
      itself,
    - any of the resultCodes listen in 4.2.3, with the             OCTET STRING }

        BindResponse ::= [APPLICATION 1] SEQUENCE {
             COMPONENTS OF LDAPResult,
             serverCreds field 
      absent, indicating that the server did not successfully authenticate
      the client or another problem occurred.        [7] SaslCredentials OPTIONAL }

        UnbindRequest ::= [APPLICATION 2] NULL








Wahl, Howes & Howes, Kille                                              [Page 44]                                              Page 36

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



B.1. X.511-Protected

   The "X.511-Protected" authentication mechanism allows a hash of the 
   password, combined optionally with the current time   March 1997

        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 }

        Filter ::= CHOICE {
                and random 
   numbers, to be sent to             [0] SET OF Filter,
                or returned from the server.  The protected field 
   contains the hash value.  This prevents a password from being carried in 
   the clear.

   The mechanism field is set to the string "X.511-Protected", and the 
   credentials field contain the DER encoding of a value of the following 
   ASN.1 type:

        ProtectedPassword              [1] SET OF Filter,
                not             [2] Filter,
                equalityMatch   [3] AttributeValueAssertion,
                substrings      [4] SubstringFilter,
                greaterOrEqual  [5] AttributeValueAssertion,
                lessOrEqual     [6] AttributeValueAssertion,
                present         [7] AttributeDescription,
                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] AttributeDescription 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 } 

        SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
               
        SearchResultDone ::= [APPLICATION 5] LDAPResult



Wahl, Howes, Kille                                              Page 37

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   March 1997

        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 {
                time1
                entry           LDAPDN,
                newrdn          RelativeLDAPDN,
                deleteoldrdn    BOOLEAN,
                newSuperior     [0] UTCTime OPTIONAL,
                time2                   [1] UTCTime OPTIONAL,
                random1                 [2] BIT STRING OPTIONAL,
                random2                 [3] BIT STRING OPTIONAL,
                algorithmIdentifier     [4] LDAPOID,
                encipheredPassword      [5] BIT STRING LDAPDN OPTIONAL }

   The use of the time1, time2, random1, random2 and encryptedPassword fields 
   are as defined in ITU-T Rec. X.509 [12] and the functional profile for X.500
   for the environment in which this authentication mechanism is to be used.

   The name field of the BindRequest must be a nonempty string when this
   mechanism is being used to authenticate the client.  Note that this 
   security mechanism is not intended to protect against attackers 
   modifying the bind name field or other protocol elements.

B.2. X.511-Strong

   Strong authentication to the directory can be accomplished using the 
   "X.511-Strong".
 
   The mechanism field is set to the string "X.511-Strong", and the 
   credentials field set to a DER-encoding of a value of the following 
   ASN.1 type: 

        StrongCredentials
               
        ModifyDNResponse ::= [APPLICATION 13] LDAPResult

        CompareRequest ::= [APPLICATION 14] SEQUENCE {
                entry           LDAPDN,
                ava             AttributeValueAssertion }

        CompareResponse ::= [APPLICATION 15] LDAPResult 

        AbandonRequest ::= [APPLICATION 16] MessageID

        ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
                requestName      [0] LDAPOID,
                requestValue     [1] OCTET STRING OPTIONAL }

        ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
                certification-path      [0] AF.CertificationPath
                COMPONENTS OF LDAPResult,
                responseName     [10] LDAPOID OPTIONAL,
                bind-token              [1] DAS.Token
                response         [11] OCTET STRING OPTIONAL }

   The ASN.1 type "CertificationPath" is defined in [12], and the ASN.1 
   type "Token" is defined in [13].  

   When the credentials are being used to authenticate the client, it is 
   recommended 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 an 
   empty string, and the server will obtain the name of the client from 
   the subject field of the certification-path userCertificate.

        END


Wahl, Howes & Howes, Kille                                              [Page 45]                                              Page 38

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996



   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.   March 1997

Table of Contents 

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 2
3.2.1. Attributes of Entries ................................ ............................... 3
   3.2.2
3.2.2. Subschema Subentry Entries ................................... 4
3.3. Relationship to X.500 ................................. 5
3.4. Server-specific Data Requirements ..................... 5
4.  Elements of Protocol ................................... 6
4.1. Common Elements ....................................... 6
4.1.1. Message Envelope .................................... 6
4.1.1.1. Message ID ........................................ 7
4.1.2. String Types ........................................ 8
4.1.3. Distinguished Name and Relative Distinguished Name .. 8
4.1.4. Attribute Type and Description ...................... ...................................... 9
4.1.5. Attribute Value Description ............................... 9
4.1.5.1. Binary Option ..................................... 10
4.1.6. Attribute Value ..................................... 10
4.1.7. Attribute Value Assertion ........................... 11
   4.1.7.
4.1.8. Attribute ........................................... 11
   4.1.8.
4.1.9. Matching Rule Identifier ............................ 11
   4.1.9. 12
4.1.10. Result Message ...................................... 11
   4.1.10. ..................................... 12
4.1.11. Referral ........................................... 13 14
4.1.12. Controls ........................................... 15
4.2. Bind Operation ....................................... 14 ........................................ 16
4.2.1. Sequencing of the Bind Request ...................... 15
   4.2.2 17
4.2.2. Authentication and Other Security Services ........... 15 .......... 17
4.2.3. Bind Response ....................................... 16 18
4.3. Unbind Operation ..................................... 17 ...................................... 18
4.4.  Session Control Operation ............................ 17 Unsolicited Notification .............................. 19
4.4.1. Notice of Disconnection ............................. 19
4.5. Search Operation ..................................... ...................................... 20
4.5.1. Search Request ...................................... 20
4.5.2. Search Result ....................................... 24 23
4.5.3. Continuation References in the Search Result ........ 26 24
4.5.3.1. Example ........................................... 27 24
4.6. Modify Operation ..................................... 28 ...................................... 25
4.7. Add Operation ........................................ 30 ......................................... 27
4.8. Delete Operation ..................................... 30 ...................................... 27
4.9. Modify DN Operation .................................. 31 ................................... 28
4.10. Compare Operation ................................... 32 .................................... 29
4.11. Abandon Operation ................................... 32 .................................... 29
4.12. Extended Operation .................................. 33 ................................... 30
5.  Protocol Element Encodings and Transfer ................ 33 30
5.1. Mapping Onto BER-based Transport Services ............ 34
   5.1.1. ............. 30
5.2. Transfer Protoocols ................................... 31
5.2.1. Transmission Control Protocol (TCP) ................ 34
   5.1.2.  Connection Oriented Transport Service (COTS) ....... 34
   5.1.3.  User Datagram Protocol (UDP) ....................... 34
   5.1.4. ................. 31
5.2.2. Secure Socket Layer over TCP (SSL) ................. 35 .................. 31
6.  Implementation Guidelines .............................. 35 31
6.1. Server Implementations ............................... 35 ................................ 31
6.2. Client Implementations ................................ 32



Wahl, Howes & Howes, Kille                                              [Page 46]                                              Page 39

INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996

   6.2.  Client Implementations ............................... 35
   6.2.1. CLDAP Retry ......................................... 35
   6.2.2. Loop Detection ...................................... 35   March 1997

7.  Security Considerations ................................ 35 32
8.  Acknowledgements ....................................... 36 32
9.  Bibliography ........................................... 36 32 
10. Authors' Address ...................................... 37 ....................................... 33
Appendix A - Complete ASN.1 Definition ..................... 38
   Appendix B - X.500 Authentication Mechanisms ............... 44
   B.1. X.511-Protected ....................................... 45
   B.2. X.511-Strong .......................................... 45


<draft-ietf-asid-ldapv3-protocol-03.txt> 34

















































<draft-ietf-asid-ldapv3-protocol-04.txt> Expires: April 5, September 25, 1997 [Page 47] 

----