home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_a_c / draft-ietf-asid-ldapv3-protocol-03.txt < prev    next >
Text File  |  1996-10-23  |  123KB  |  2,821 lines

  1.  
  2. Network Working Group                                            M. Wahl
  3. INTERNET-DRAFT                                       Critical Angle Inc.
  4. Replaces: RFC 1777, RFC 1798                                    T. Howes
  5.                                            Netscape Communications Corp.
  6.                                                                 S. Kille
  7.                                                         ISODE Consortium
  8. Expires in six months from                               22 October 1996
  9. Intended Category: Standards Track
  10.  
  11.  
  12.                   Lightweight Directory Access Protocol (v3)
  13.                   <draft-ietf-asid-ldapv3-protocol-03.txt>
  14.  
  15.  
  16. Table of Contents - see end of document.
  17.  
  18. 1.  Status of this Memo
  19.  
  20.    This document is an Internet-Draft.  Internet-Drafts are working 
  21.    documents of the Internet Engineering Task Force (IETF), its areas, and
  22.    its working groups.  Note that other groups may also distribute working
  23.    documents as Internet-Drafts.
  24.  
  25.    Internet-Drafts are draft documents valid for a maximum of six months
  26.    and may be updated, replaced, or obsoleted by other documents at any
  27.    time.  It is inappropriate to use Internet-Drafts as reference material
  28.    or to cite them other than as "work in progress."
  29.  
  30.    To learn the current status of any Internet-Draft, please check the
  31.    "1id-abstracts.txt" listing  contained in the Internet-Drafts Shadow
  32.    Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe),
  33.    ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
  34.  
  35. 2.  Abstract
  36.  
  37.    The protocol described in this document is designed to provide access
  38.    to directories supporting the X.500 models, while not incurring the 
  39.    resource requirements of the X.500 Directory Access Protocol (DAP). This 
  40.    protocol is specifically targeted at management applications and browser 
  41.    applications that provide read/write interactive access to directories. 
  42.    When used with a directory supporting the X.500 protocols, it is 
  43.    intended to be a complement to the X.500 DAP.
  44.  
  45.    Key aspects of this version of LDAP are:
  46.  
  47.    - All protocol elements of LDAP (RFC 1777) and CLDAP (RFC 1798) are 
  48.      supported.  
  49.  
  50.    - Protocol elements are carried directly over TCP or other transport,
  51.      bypassing much of the session/presentation overhead.  Connectionless
  52.      transport (UDP) is also supported for efficient lookup operations.
  53.  
  54.    - Most protocol data elements can be encoded as ordinary strings 
  55.      (e.g., Distinguished Names).
  56.  
  57.  
  58.  
  59.  
  60. Wahl, Howes & Kille                                              [Page 1]
  61.  
  62. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  63.  
  64.    - New features have been added, such as the abilities to retrieve 
  65.      attribute values in binary or search results in pages.
  66.  
  67.    - Important features of X.500(1993) and X.500(1997) are included.
  68.  
  69.    - Referrals to other servers can be returned.
  70.  
  71.    - The protocol can be extended to support bilaterally-defined 
  72.      operations.
  73.    
  74.    - Several session controls may be requested by the client.
  75.  
  76. 3.  Models
  77.  
  78.    Interest in X.500 [1] directory technologies in the Internet has lead to 
  79.    efforts to reduce the high "cost of entry" associated with use of these
  80.    technologies.  This document continues the efforts to define directory 
  81.    protocol alternatives: it updates the LDAP [2] protocol specification, 
  82.    adding support for new features, including some support for connecting
  83.    to X.500 services that implement the 1993 or 1997 edition protocols.
  84.  
  85. 3.1. Protocol Model
  86.  
  87.    The general model adopted by this protocol is one of clients
  88.    performing protocol operations against servers. In this model, a
  89.    client transmits a protocol request describing the operation to be 
  90.    performed to a server, which is then responsible for performing 
  91.    the necessary operation(s) in the directory. Upon completion of 
  92.    the operation(s), the server returns a response containing any results or 
  93.    errors to the requesting client.
  94.  
  95.    In keeping with the goal of easing the costs associated with use of
  96.    the directory, it is an objective of this protocol to minimize the
  97.    complexity of clients so as to facilitate widespread deployment of
  98.    applications capable of utilizing the directory.
  99.  
  100.    Note that, although servers are required to return responses whenever
  101.    such responses are defined in the protocol, there is no requirement
  102.    for synchronous behavior on the part of either clients or servers.
  103.    Requests and responses for multiple operations may be exchanged 
  104.    between a client and server in any order, provided the client
  105.    eventually receives a response for every request that requires one.
  106.  
  107.    In LDAP versions 1 and 2, no provision was made for protocol servers
  108.    returning referrals to clients.  However, for improved performance and
  109.    distribution this version of the protocol permits servers to return to
  110.    clients referrals to other servers if requested.  This allows servers,
  111.    if requested by clients, to offload the work of contacting other servers
  112.    to progress operations.
  113.  
  114.    Clients may also request that no referrals be returned, in which case 
  115.    the server must ensure that the operation is performed against the 
  116.    directory, or else return an error.  This is the default.
  117.  
  118.  
  119.  
  120. Wahl, Howes & Kille                                              [Page 2]
  121.  
  122. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  123.  
  124.    Note that this protocol can be mapped to a strict subset of the
  125.    X.500(1997) directory abstract service, so it can be cleanly provided 
  126.    by the DAP.  However there is not a one-to-one mapping between LDAP 
  127.    protocol operations and DAP operations: server implementations 
  128.    acting as a gateway to X.500 directories may need to make multiple DAP 
  129.    requests to perform extended operations.
  130.  
  131. 3.2. Data Model 
  132.  
  133.    This section provides a brief introduction to the X.500 data model, as
  134.    used by LDAP. 
  135.  
  136.    The LDAP protocol assumes there are one or more servers which jointly 
  137.    provide access to a Directory Information Tree (DIT).  The tree is made up 
  138.    of entries.  Entries have names: one or more values from the entry itself
  139.    form its relative distinguished name (RDN), which must be unique among all 
  140.    its siblings.  The concatenation of the relative distinguished names 
  141.    of the line of entries from a particular entry to an immediate 
  142.    subordinate of the root of the tree forms that entry's Distinguished 
  143.    Name (DN), which is unique in the tree.  An example of a Distinguished 
  144.    Name is 
  145.  
  146.    CN=Steve Kille, O=ISODE Consortium, C=GB
  147.  
  148.    Some servers may hold cache or shadow copies of entries, which can be 
  149.    used to answer search and comparison queries, but will return referrals
  150.    or contact other servers if modification operations are requested.
  151.  
  152.    The largest collection of entries, starting an entry that is mastered by 
  153.    a particular server, and all its subordinates and their subordinates, 
  154.    down to an entry which is mastered by a different server, is termed a 
  155.    naming context.  For example, in the following sample DIT, one server
  156.    might master only the entry C=GB, and another server master both the 
  157.    entries O=Foo,C=US and O=Bar,C=US.  Each of these entries are in a separate
  158.    naming context.  The root of the DIT is not an entry and not part of any 
  159.    naming context.
  160.  
  161.                                      (ROOT)
  162.                                        |
  163.                                       C=GB
  164.                         /------------/    \--------------\
  165.                      O=Foo                             O=Bar
  166.    
  167.  
  168. 3.2.1 Attributes of Entries
  169.  
  170.    Entries consist of a set of attributes.  An attribute is a type with 
  171.    one or more associated values.  The attribute type, identified by a 
  172.    short descriptive name and an OID (object identifier), governs the 
  173.    maximum number of values permissible for an attribute of that type 
  174.    in an entry, the syntax to which the values must conform, the types 
  175.    of matching which can be performed on values of that attribute, and
  176.    other functions.
  177.  
  178.  
  179.  
  180.  
  181. Wahl, Howes & Kille                                              [Page 3]
  182.  
  183. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  184.  
  185.  
  186.    An example of an attribute is "mail". There may be one or more values 
  187.    of this attribute, they must be IA5 strings, and they are case 
  188.    insensitive (e.g. "foo@bar.com" will match "FOO@BAR.COM").
  189.  
  190.    Each entry must have an objectClass attribute.  The objectClass 
  191.    attribute specifies the object classes of an entry, which along with 
  192.    the system and user schema determine the permitted attributes of an entry.  
  193.    Values of this attribute may be modified by clients, but the objectClass 
  194.    attribute cannot be removed.  Servers may restrict the modifications of 
  195.    this attribute to  prevent the basic structural class of the entry from 
  196.    being changed (e.g. one cannot change a person into a country).  
  197.  
  198.    A small number of attributes, termed operational attributes, are used by 
  199.    servers for administering the directory system itself.  They are not 
  200.    returned in search results unless they were explicitly requested by name.  
  201.    Attributes which are not operational, such as "mail", will have their  
  202.    schema and syntax constraints enforced by servers, but servers will 
  203.    generally not make use of their values.
  204.  
  205.    Servers must not permit clients to add attributes to an entry unless 
  206.    those attributes are permitted by the object class definitions, the 
  207.    schema controlling that entry (specified in the subschema subentry - see
  208.    below), or are operational attributes known to that server and used for 
  209.    administrative purposes.  Note that there is a particular objectClass 
  210.    'extensibleObject' defined in [5] which permits all user attributes
  211.    to be present in an entry.
  212.  
  213.    Entries contain, among others, the following operational attributes, 
  214.    defined in [5]. These attributes are maintained automatically by the 
  215.    server are not modifiable by clients:
  216.  
  217.    - creatorsName: the Distinguished Name of the user who added this entry 
  218.      to the directory.
  219.    - createTimestamp: the time this entry was added to the directory.
  220.    - modifiersName: the Distinguished Name of the user who last modified 
  221.      this entry.
  222.    - modifyTimestamp: the time this entry was last modified.
  223.    - subschemaSubentry:  the Distinguished Name of the subschema subentry 
  224.      which controls the schema for this entry.
  225.    - entryName: the Distinguished Name of the entry.
  226.  
  227.    Servers may implement other operational attributes.  Servers which 
  228.    also make use of X.500(1993) protocols will provide support for more of 
  229.    the attributes defined in X.501, including administrativeRole and dseType.  
  230.    Some servers may permit the retrieval of subschema attributes directly 
  231.    from user entries.
  232.  
  233. 3.2.2 Subschema Subentry
  234.         
  235.    A subentry is a special kind of entry which is used by servers and holds
  236.    attributes for administering the directory system.  Subentries are defined
  237.    in clause 11.6 of X.501 [6].  Subschema subentries are used for 
  238.    administering information about the directory schema, in particular the 
  239.    object classes and attribute types supported by directory servers.
  240.  
  241.  
  242. Wahl, Howes & Kille                                              [Page 4]
  243.  
  244. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  245.  
  246.  
  247.    A server may provide access to one or more subschema subentries to 
  248.    permit clients to interrogate the schema which is in force for entries
  249.    in the directory.
  250.  
  251.    A server which masters entries and permits clients to modify these 
  252.    entries must implement and provide access to these subschema subentries, 
  253.    so that its clients may discover the attributes and object classes which 
  254.    are permitted to be present. It is strongly recommended that all other 
  255.    servers implement subschema subentries as well.
  256.  
  257.    The following four attributes, defined in [6] with string representations
  258.    in [5], must be present in all subschema subentries:
  259.  
  260.    - CN: this attribute must be used to form the RDN of the subschema 
  261.      subentry.
  262.    - objectClass: the attribute must have at least the values "top" and 
  263.      "subschema".
  264.    - objectClasses: each value of this attribute specifies an object class
  265.      known to the server.
  266.    - attributeTypes: each value of this attribute specifies an attribute
  267.      type known to the server.
  268.  
  269.    Other operational attributes may be present in subschema subentries, 
  270.    in particular dseType, subtreeSpecification, ditStructureRules, nameForms, 
  271.    ditContentRules, matchingRules, matchingRuleUse, createTimestamp,
  272.    creatorsName, modifyTimestamp, modifiersName, entryName, as described in
  273.    [6].
  274.  
  275.    Clients must only retrieve these attributes from a subentry by requesting
  276.    them by name in a baseObject search of the subentry.
  277.  
  278. 3.3. Relationship to X.500
  279.  
  280.    This document defines LDAP in terms of X.500 as an X.500 access 
  281.    mechanism.  An LDAP server must act in accordance with the 
  282.    X.500(1993) series of ITU Recommendations when providing the service. 
  283.    However, it is not required that an LDAP server make use of any X.500 
  284.    protocols in providing this service, e.g. LDAP can be mapped onto any 
  285.    other directory system so long as the X.500 data and service model as
  286.    used in LDAP is not violated in the LDAP interface.
  287.  
  288. 3.4. Server-specific Data Requirements
  289.  
  290.    An LDAP server must provide information about itself and other 
  291.    information that is specific to each server.  This is represented as a 
  292.    number of attributes located in the root DSE (DSA-Specific Entry), 
  293.    which is named with the zero-length LDAPDN.  These attributes 
  294.    are retrievable if a client performs a base object search of the 
  295.    root, however they are subject to access control restrictions.
  296.    They must not be included if the client performs a subtree search 
  297.    starting from the root.  Servers in general will not allow clients to 
  298.    modify these attributes.
  299.  
  300.  
  301.  
  302.  
  303. Wahl, Howes & Kille                                              [Page 5]
  304.  
  305. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  306.  
  307.  
  308.  
  309.    The following attributes of the root DSE are defined in section 5.1.3 of 
  310.    [5].  Additional attributes may be defined in later documents. 
  311.  
  312.    - administratorAddress: a URL containing address of administrator.
  313.    - currentTime: the current time. 
  314.    - serverName: the Distinguished Name of the server.
  315.    - certificationPath: the server's certificate path.
  316.    - namingContexts: naming contexts held in the server.
  317.    - subschemaSubentry: subschema subentries known by this server.
  318.    - altServer: alternative servers in case this one is later unavailable.
  319.    - supportedExtension: list of supported extended operations.
  320.    - supportedControl: list of supported session controls.
  321.  
  322.    If the server does not master or shadow entries and does not know the 
  323.    locations of schema information, the subschemaSubentry attribute must
  324.    not be present in the root DSE.  If the server holds master or shadow 
  325.    copies of directory entries under one or more schema rules, there may be 
  326.    any number of values of the subschemaSubentry attribute in the root DSE. 
  327.  
  328. 4.  Elements of Protocol
  329.  
  330.    The LDAP protocol is described using Abstract Syntax Notation 1 [3]. It
  331.    is typically transferred using a subset of the Basic Encoding Rules.
  332.    In order to support future extensions to this protocol, clients and 
  333.    servers must ignore elements of SEQUENCEs whose tags they do not 
  334.    recognize.  
  335.  
  336.    Note that unlike X.500, each change to the LDAP protocol other than through
  337.    the extension mechanisms will have a different version number.  A client 
  338.    will indicate the version it supports as part of the bind request, 
  339.    described in section 4.1.2.  If a client has not sent a bind, the server 
  340.    MUST assume that version 3 is supported in the client (since version 2 
  341.    required that the client bind first).  
  342.  
  343. 4.1. Common Elements
  344.  
  345.    This section describes the LDAPMessage envelope PDU format, as well as 
  346.    data type definitions which are used in the protocol operations.
  347.  
  348. 4.1.1. Message Envelope 
  349.  
  350.    For the purposes of protocol exchanges, all protocol operations are
  351.    encapsulated in a common envelope, the LDAPMessage, which is defined
  352.    as follows:
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364. Wahl, Howes & Kille                                              [Page 6]
  365.  
  366. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  367.  
  368.  
  369.  
  370.         LDAPMessage ::= SEQUENCE {
  371.                 messageID       MessageID,
  372.                 cldapUserName   LDAPDN OPTIONAL,
  373.                 protocolOp      CHOICE {        
  374.                         bindRequest     BindRequest,
  375.                         bindResponse    BindResponse, 
  376.                         unbindRequest   UnbindRequest, 
  377.                         searchRequest   SearchRequest, 
  378.                         searchResEntry  SearchResultEntry, 
  379.                         searchResDone   SearchResultDone, 
  380.                         searchResRef    SearchResultReference, 
  381.                         searchResFull   SearchResultFull, 
  382.                         modifyRequest   ModifyRequest, 
  383.                         modifyResponse  ModifyResponse, 
  384.                         addRequest      AddRequest,     
  385.                         addResponse     AddResponse,    
  386.                         delRequest      DelRequest, 
  387.                         delResponse     DelResponse,    
  388.                         modDNRequest    ModifyDNRequest, 
  389.                         modDNResponse   ModifyDNResponse, 
  390.                         compareRequest  CompareRequest, 
  391.                         compareResponse CompareResponse, 
  392.                         abandonRequest  AbandonRequest,  
  393.                         sessionRequest  SessionRequest,
  394.                         sessionResponse SessionResponse,
  395.                         extendedReq     ExtendedRequest,
  396.                         extendedResp    ExtendedResponse } }
  397.  
  398.         MessageID ::= INTEGER (0 .. maxInt)
  399.  
  400.         maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) --
  401.  
  402.    The function of the LDAPMessage is to provide an envelope containing
  403.    common fields required in all protocol exchanges. At this time the
  404.    only common fields are the message ID and cldapUserName. 
  405.  
  406.    All LDAPMessage envelopes encapsulating responses contain the messageID
  407.    value of the request LDAPMessage.
  408.  
  409.    The message ID is required to have a value different from the values of
  410.    any other requests outstanding in the LDAP session of which this 
  411.    message is a part.  A client must not send a second request with the same
  412.    message ID as another request if the first request is outstanding.
  413.    If it does so, the behavior is undefined.  Typically a client will 
  414.    increment a counter for each request. 
  415.  
  416.    For all requests except for search, unbind and abandon, the message ID is 
  417.    outstanding until the client receives the response for that operation.
  418.  
  419.    For a searchRequest which has not been abandoned, the message ID is 
  420.    outstanding until the SearchResultDone for that search is received.
  421.  
  422.  
  423.  
  424.  
  425. Wahl, Howes & Kille                                              [Page 7]
  426.  
  427. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  428.  
  429.  
  430.    A client must not reuse the message id of an abandonRequest or the 
  431.    abandoned operation until it has received a response from the server for 
  432.    another request invoked subsequent to the abandonRequest, as the 
  433.    abandonRequest itself does not have a response.
  434.  
  435.    The cldapUserName identifies the requesting user for this message. It
  436.    is only present for backwards compatibility with RFC 1798, if this 
  437.    LDAPMessage is carried in a connectionless transport protocol, such as UDP.
  438.    Its significance is equivalent to a bind with a zero-length password.
  439.    When the LDAP session is carried in a connection-oriented transport
  440.    protocol this field must be absent.  LDAPv3 client implementors must not
  441.    use this field in connectionless requests, but instead concatenate a bind 
  442.    request with the other operations in the request.  Concatenation and 
  443.    connectionless transport are described in section 5.1.3. 
  444.  
  445. 4.1.2. String Types
  446.  
  447.    The LDAPString is a notational convenience to indicate that, although
  448.    strings of LDAPString type encode as OCTET STRING types, the ISO 10646
  449.    [15] character set (a superset of Unicode) is used, encoded following the 
  450.    UTF-8 algorithm [16]. Note that in the UTF-8 algorithm, characters which 
  451.    are the same as ASCII (0000 through 007F) are represented as that same 
  452.    ASCII character in a single byte.  The other byte values are used to form 
  453.    a variable-length encoding of an arbitrary character. 
  454.  
  455.         LDAPString ::= OCTET STRING
  456.  
  457.    The LDAPOID is a notational convenience to indicate that the permitted 
  458.    value of this string is a dotted-decimal representation of an OBJECT 
  459.    IDENTIFIER.
  460.  
  461.         LDAPOID ::= OCTET STRING 
  462.    
  463.    For example,
  464.         1.3.6.1.4.1.1466.1.2.3
  465.  
  466. 4.1.3. Distinguished Name and Relative Distinguished Name
  467.  
  468.    An LDAPDN and a RelativeLDAPDN are respectively defined to be the
  469.    representation of a Distinguished Name and a Relative Distinguished
  470.    Name after encoding according to the specification in [4], such that
  471.  
  472.         <distinguished-name> ::= <name>
  473.  
  474.         <relative-distinguished-name> ::= <name-component>
  475.  
  476.    where <name> and <name-component> are as defined in [4]. 
  477.  
  478.         LDAPDN ::= LDAPString
  479.  
  480.         RelativeLDAPDN ::= LDAPString
  481.  
  482.    Only Attribute Types can be present in a relative distinguished name
  483.    component; the options of Attribute Descriptions (next section) must 
  484.    not be used in specifying distinguished names.
  485.  
  486. Wahl, Howes & Kille                                              [Page 8]
  487.  
  488. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  489.  
  490.  
  491. 4.1.4. Attribute Type and Description
  492.  
  493.    An AttributeType takes on as its value the textual string associated 
  494.    with that AttributeType in its specification.  This string must begin
  495.    with a letter, and only contain ASCII letters and digit characters.
  496.    If this string is not known, the AttributeType will take the ASCII 
  497.    representation of its OBJECT IDENTIFIER, as decimal digits with 
  498.    components separated by periods, e.g., "2.5.4.10". The attribute type 
  499.    strings which are used in this version of LDAP are described in [5].
  500.    They are case insensitive.
  501.  
  502.         AttributeType ::= LDAPString
  503.         
  504.    An AttributeDescription is a superset of the definition of the 
  505.    AttributeType.  It has the same ASN.1 definition, but allows additional
  506.    options to be specified.  They are also case insensitive.
  507.  
  508.         AttributeDescription ::= LDAPString
  509.  
  510.    A value of AttributeDescription is based on the following BNF:
  511.         
  512.         <AttributeDescription> ::= <AttributeType> [ ";" <options> ]
  513.  
  514.         <options> ::= <option> | <option> ";" <options>
  515.  
  516.         <option> ::= <language-option> | <binary-option> | <dynamic-option>
  517.  
  518.         <language-option> ::= "lang=" <lang-code>
  519.  
  520.         <lang-code> ::= <printable-ascii>  
  521.  
  522.         <binary-option> ::= "binary"
  523.  
  524.         <dynamic-option> ::= "dynamic"
  525.  
  526.    If the "binary" option is present, this overrides any string-based
  527.    encoding representation defined for that attribute in [5].  Instead the 
  528.    attribute is to be transferred as an encoded binary value [11].
  529.  
  530.    If the "lang=" option is present, this associates a natural language
  531.    with values for that attribute.  The binary and language options may both
  532.    be present in an AttributeDescription.  
  533.    (The language code has no effect on the character set encoding for string 
  534.    representations of DirectoryString syntax values; UTF-8 is always used).
  535.  
  536.    If the "dynamic" option is present, this implies that the values are not
  537.    permanent parts of the directory entry and may disappear unexpectedly.
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547. Wahl, Howes & Kille                                              [Page 9]
  548.  
  549. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  550.  
  551.  
  552.  
  553.    Examples of valid AttributeDescription:
  554.  
  555.         CN
  556.         givenName;lang=en-US
  557.         CN;lang=ja-JP-kanji
  558.         CN;lang=ja-JP-romaji
  559.         userCertificate;binary
  560.         1.3.6.1.4.1.1466.99.98.97;binary;dynamic
  561.  
  562.    An AttributeDescription with one or more options is treated as a subtype of 
  563.    the attribute without any options.  Options are never exclusive and may be 
  564.    listed in any order.  Not all options are applicable not every attribute, 
  565.    however.
  566.  
  567.    For example, if a client requests a "description" attribute, the server 
  568.    may return an attribute "description;lang=fr".  However if the client 
  569.    requests a "description;lang=en", the server must not return "description" 
  570.    or "description;lang=fr", but may return "description;lang=en;dynamic".
  571.  
  572.    Later documents may define additional options.
  573.  
  574.    The data type "AttributeDescriptionList" describes a list of 0 or more 
  575.    attribute types.  (A list of zero elements has special significance in
  576.    the Search request.)
  577.  
  578.         AttributeDescriptionList ::= SEQUENCE OF 
  579.                 AttributeDescription
  580.     
  581.  
  582. 4.1.5. Attribute Value
  583.  
  584.    A field of type AttributeValue takes on as its value either an octet string
  585.    encoding of a AttributeValue data type, or an OCTET STRING containing 
  586.    an encoded binary value, depending on whether the "binary" option is 
  587.    present in the companion AttributeDescription to this AttributeValue.  
  588.  
  589.    The definition of string encodings for different syntaxes and types may 
  590.    be found in companions to this document, in particular [5].
  591.  
  592.         AttributeValue ::= OCTET STRING 
  593.  
  594.    Note that there is no defined limit on the size of this encoding; thus 
  595.    PDUs including multi-megabyte attributes (e.g. photographs) may be 
  596.    returned. If the client has limited memory or storage capabilities it 
  597.    may wish to set the attrSizeLimit session control before invoking a 
  598.    search operation.
  599.  
  600.    Clients and server implementors should be aware that attributes whose
  601.    type names they do not recognize may have an arbitrary and non-printable
  602.    syntax.  Implementations must not either simply display or attempt to 
  603.    decode as ASN.1 a value if its syntax is not known.  The implementation 
  604.    may attempt to discover the subschema subentry and retrieve the value of 
  605.    attributeTypes from it.
  606.  
  607.  
  608. Wahl, Howes & Kille                                              [Page 10]
  609.  
  610. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  611.  
  612.  
  613. 4.1.6. Attribute Value Assertion
  614.  
  615.    The AttributeValueAssertion type definition is similar to the one in
  616.    the X.500 directory standards.  It contains an attribute description 
  617.    and a equality matching assertion suitable for that type.  
  618.  
  619.         AttributeValueAssertion ::= SEQUENCE {
  620.                 attributeDesc   AttributeDescription,
  621.                 assertionValue  AssertionValue }
  622.  
  623.         AssertionValue ::= OCTET STRING
  624.  
  625.    If the "binary" option is present in attributeDesc, this signals to the
  626.    server that the assertionValue is a binary encoding of the assertion 
  627.    value.
  628.  
  629.    For all the string-valued user attributes described in [5], the assertion 
  630.    value syntax is the same as the value syntax.  Note however that the 
  631.    assertion syntax may be different than the value syntax for operational
  632.    attributes or for non-equality matching rules.
  633.  
  634. 4.1.7. Attribute
  635.  
  636.    An attribute consists of a type and one or more values of that type.
  637.    (Though attributes must have at least one value when stored, due to 
  638.    access control restrictions the set may be empty when transferred  
  639.    in protocol.  This is described in section 4.5.2, concerning the 
  640.    PartialAttributeList type.)
  641.  
  642.         Attribute ::= SEQUENCE {
  643.                 type    AttributeDescription,
  644.                 vals    SET OF AttributeValue }
  645.  
  646. 4.1.8. Matching Rule Identifier
  647.  
  648.    An X.501(1993) Matching Rule is identified in the LDAP protocol by the
  649.    ASCII representation of its OBJECT IDENTIFIER, either as one of the 
  650.    strings given in [5], or as decimal digits with components separated by 
  651.    periods, e.g. "caseIgnoreIA5Match" or "1.3.6.1.4.1.453.33.33".  
  652.  
  653.         MatchingRuleId ::= LDAPString
  654.  
  655. 4.1.9. Result Message
  656.  
  657.    The LDAPResult is the construct used in this protocol to return
  658.    success or failure indications from servers to clients. In response
  659.    to various requests, servers will return responses containing fields
  660.    of type LDAPResult to indicate the final status of a protocol
  661.    operation request.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669. Wahl, Howes & Kille                                              [Page 11]
  670.  
  671. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  672.  
  673.  
  674.  
  675.         LDAPResult ::= SEQUENCE {
  676.                 resultCode      ENUMERATED {
  677.                              success                      (0),
  678.                              operationsError              (1),
  679.                              protocolError                (2),
  680.                              timeLimitExceeded            (3),
  681.                              sizeLimitExceeded            (4),
  682.                              compareFalse                 (5),
  683.                              compareTrue                  (6),
  684.  
  685.                              authMethodNotSupported       (7),
  686.                              strongAuthRequired           (8),
  687.                                         -- 9 reserved --
  688.                              referral                     (10),  -- new
  689.                              adminLimitExceeded           (11),  -- new
  690.                              unavailableCriticalExtension (12),  -- new
  691.                                         -- 13-15 unused --
  692.                              noSuchAttribute              (16),
  693.                              undefinedAttributeType       (17),
  694.                              inappropriateMatching        (18),
  695.                              constraintViolation          (19),
  696.                              attributeOrValueExists       (20),
  697.                              invalidAttributeSyntax       (21),
  698.                                         -- 22-31 unused --
  699.                              noSuchObject                 (32),
  700.                              aliasProblem                 (33),
  701.                              invalidDNSyntax              (34),
  702.                              -- 35 reserved for undefined isLeaf --
  703.                              aliasDereferencingProblem    (36),
  704.                                         -- 37-47 unused --
  705.                              inappropriateAuthentication  (48),
  706.                              invalidCredentials           (49),
  707.                              insufficientAccessRights     (50),
  708.                              busy                         (51),
  709.                              unavailable                  (52),
  710.                              unwillingToPerform           (53),
  711.                              loopDetect                   (54),
  712.                                         -- 55-63 unused --
  713.                              namingViolation              (64),
  714.                              objectClassViolation         (65),
  715.                              notAllowedOnNonLeaf          (66),
  716.                              notAllowedOnRDN              (67),
  717.                              entryAlreadyExists           (68),
  718.                              objectClassModsProhibited    (69),
  719.                              resultsTooLarge              (70), -- cl only
  720.                              affectsMultipleDSAs          (71), -- new
  721.                                         -- 72-79 unused --
  722.                              other                        (80) },
  723.                              -- 81-90 reserved for APIs --
  724.                 matchedDN       LDAPDN,
  725.                 errorMessage    LDAPString,
  726.                 referral        [3] Referral OPTIONAL }
  727.  
  728.  
  729.  
  730. Wahl, Howes & Kille                                              [Page 12]
  731.  
  732. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  733.  
  734.  
  735.    All the result codes with the exception of success, compareFalse and
  736.    compareTrue are to be treated as meaning the operation could not be 
  737.    completed in its entirety.  If a client receives a result code which
  738.    is not listed above, it is to be treated as an unknown error condition.
  739.  
  740.    The errorMessage field of this construct may, at the servers option, 
  741.    be used to return a string containing a textual, human-readable 
  742.    error diagnostic. As this error diagnostic is not standardized, 
  743.    implementations must not rely on the values returned.  If the server 
  744.    chooses not to return a textual diagnostic, the errorMessage field of 
  745.    the LDAPResult type must contain a zero length string.
  746.  
  747.    For resultCodes of noSuchObject, aliasProblem, invalidDNSyntax
  748.    and aliasDereferencingProblem, the matchedDN field is set to
  749.    the name of the lowest entry (object or alias) in the DIT that was
  750.    matched.  If no aliases were dereferenced while attempting to locate
  751.    the entry, this will be a truncated form of the name provided.
  752.    The matchedDN field is to be set to a NULL DN (a zero length 
  753.    string) with all other result codes.
  754.  
  755. 4.1.10. Referral
  756.  
  757.    The referral field is present in an LDAPResult if the 
  758.    LDAPResult.resultCode field value is referral, and absent with all other
  759.    result codes.  It contains a reference to another server (or set of 
  760.    servers) which may be accessed via LDAP or other protocols.  
  761.    At least one LDAPURL must be present in the Reference.
  762.  
  763.         Referral ::= SEQUENCE OF LDAPURL
  764.  
  765.         LDAPURL ::= LDAPString  -- limited to characters permitted in URLs
  766.    
  767.    The client may contact any of the listed URLs [14] of servers to 
  768.    continue the request. Each server in the list must be capable of 
  769.    processing the operation and presenting a consistent view of the DIT to 
  770.    the client. (The mechanisms for how servers achieve this are outside
  771.    the scope of this document.)
  772.  
  773.    URLs for servers implementing the LDAP protocol are written according 
  774.    to [9].  If an alias was dereferenced, the dn part of the URL must
  775.    be present, with the new target object name.  If this is present, 
  776.    the client must use this name in its next request to progress this search, 
  777.    and if it is not present the client will use the same name as in the 
  778.    original request.  Some servers (e.g. participating in distributed indexing)
  779.    may change the filter in a referral for a search operation.  If the filter 
  780.    part of the URL is present in an LDAPURL, the client must use this filter 
  781.    in its next request to progress this search, and if it is not present the 
  782.    client use the same filter as it used for that search.
  783.  
  784.    Note that UTF-8 characters appearing in a DN or search filter may not
  785.    be legal for URLs (e.g. spaces) and must be escaped using the % method
  786.    in RFC 1738.
  787.  
  788.  
  789.  
  790.  
  791. Wahl, Howes & Kille                                              [Page 13]
  792.  
  793. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  794.  
  795.  
  796.    Other kinds of URLs may be returned so long as the operation could be 
  797.    performed using that protocol, and the client has indicated (in a session 
  798.    control) that it could support that protocol.
  799.  
  800.    If the client has not indicated that it is capable of handling referrals,
  801.    the server must attempt to progress the referral on behalf of the client.
  802.    Only if it fails to do so may it return a referral, and the URLs in this
  803.    referral must be of the LDAP form.
  804.  
  805. 4.2.  Bind Operation
  806.  
  807.    The function of the Bind Operation is to allow authentication information
  808.    to be exchanged between the client and server.
  809.  
  810.    The Bind Request is defined as follows:
  811.  
  812.         BindRequest ::= [APPLICATION 0] SEQUENCE {
  813.                 version                 INTEGER (1 .. 127),
  814.                 name                    LDAPDN,
  815.                 authentication          AuthenticationChoice }
  816.  
  817.         AuthenticationChoice ::= CHOICE {
  818.                 simple                  [0] OCTET STRING,
  819.                                          -- 1 and 2 reserved
  820.                 sasl                    [3] SaslCredentials }
  821.  
  822.         SaslCredentials ::= SEQUENCE {
  823.                 mechanism               LDAPString,
  824.                 credentials             OCTET STRING }
  825.  
  826.    Parameters of the Bind Request are:
  827.  
  828.    - version: A version number indicating the version of the protocol to
  829.      be used in this protocol session.  This document describes version
  830.      3 of the LDAP protocol.  Note that there is no version negotiation,
  831.      and the client should just set this parameter to the version it
  832.      desires.  The client may request version 2, in which case the server
  833.      must implement only the protocol as described in [2], and not 
  834.      return any v3-specific result codes or protocol fields.
  835.  
  836.    - name: The name of the directory object that the client wishes to
  837.      bind as.  This field may take on a null value (a zero length
  838.      string) for the purposes of anonymous binds, when authentication
  839.      has been performed at a lower layer, or when using SASL credentials
  840.      with a mechanism that includes the LDAPDN in the credentials. 
  841.  
  842.    - authentication: information used to authenticate the name, if any,
  843.      provided in the Bind Request.  
  844.  
  845.    Upon receipt of a Bind Request, a protocol server will authenticate
  846.    the requesting client, if necessary.  The server will then return a 
  847.    Bind Response to the client indicating the status of the authentication.
  848.  
  849.  
  850.  
  851.  
  852. Wahl, Howes & Kille                                              [Page 14]
  853.  
  854. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  855.  
  856.  
  857.  
  858. 4.2.1. Sequencing of the Bind Request
  859.  
  860.    For some authentication mechanisms, it may be necessary for the client
  861.    to invoke the BindRequest multiple times.  If at any stage the client 
  862.    wishes to abort the bind process it should drop the underlying
  863.    connection.  Clients must not invoke operations between two Bind requests
  864.    made as part of a multi-stage bind.
  865.  
  866.    Unlike LDAP v2, the client need not send a Bind Request in the first
  867.    PDU of the connection.  The client may request any operations and the
  868.    server must treat these as unauthenticated (unless authentication has
  869.    already occurred at a lower layer).  If the server requires that the 
  870.    client bind first, the server must reject any request other than 
  871.    binding or unbinding with the "operationsError" result. If the 
  872.    client did not bind before sending a request and receives an 
  873.    operationsError, it must close the connection, reopen it and begin 
  874.    again by first sending a PDU with a Bind Request.  This will aid in 
  875.    interoperating with servers implementing other versions of LDAP.
  876.  
  877.    Clients may send multiple bind requests on an association to change
  878.    their credentials. A subsequent bind process has the effect of abandoning 
  879.    all search and compare operations outstanding.  
  880.    Authentication or controls from earlier binds are subsequently ignored, and
  881.    so if the bind fails, the connection will be treated as anonymous.  
  882.    Clients must resend their session controls if needed after rebinding, 
  883.    as session controls may be reset to defaults by servers.
  884.  
  885. 4.2.2 Authentication and Other Security Services
  886.  
  887.    The simple authentication option provides minimal authentication 
  888.    facilities, with the contents of the authentication field consisting 
  889.    only of a cleartext password.  Note that the use of cleartext passwords
  890.    is not recommended over open networks when there is no authentication or
  891.    encryption being performed by a lower layer; see the "Security 
  892.    Considerations" section.
  893.  
  894.    If no authentication is to be performed, or has been performed at a 
  895.    lower layer, then the simple authentication option should be chosen,
  896.    and the password be of zero length.  (This is often done by LDAPv2 
  897.    clients.)
  898.  
  899.    The sasl choice allows for any mechanism defined for use with SASL [17]   
  900.    or listed in Appendix B to be used.  The mechanism field contains the 
  901.    name of the mechanism.  The credentials field contains the arbitrary data
  902.    used for authentication, inside an OCTET STRING wrapper.  Note that unlike
  903.    some Internet application protocols where SASL is used, LDAP is not 
  904.    text-based, thus no base64 transformations are performed on the credentials.
  905.  
  906.    If any SASL-based integrity or confidentiality services are enabled, they 
  907.    take effect following the transmission by the server and reception by 
  908.    the client of the final BindResponse with resultCode success.
  909.  
  910.  
  911.  
  912.  
  913. Wahl, Howes & Kille                                              [Page 15]
  914.  
  915. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  916.  
  917.  
  918. 4.2.3. Bind Response
  919.  
  920.    The Bind Response is defined as follows.
  921.  
  922.         BindResponse ::= [APPLICATION 1] SEQUENCE {
  923.              COMPONENTS OF LDAPResult,
  924.              supportedVersion   [5] INTEGER (1..127) OPTIONAL,
  925.              serverURL          [6] LDAPURL OPTIONAL,
  926.              serverCreds        [7] AuthenticationChoice OPTIONAL }
  927.                 
  928.    A BindResponse consists simply of an indication from the server of
  929.    the status of the client's request for authentication.
  930.  
  931.    If the bind was successful, the resultCode will be success,
  932.    otherwise it will be one of:
  933.  
  934.                 operationsError
  935.                 protocolError
  936.                 authMethodNotSupported
  937.                 strongAuthRequired
  938.                 referral
  939.                 inappropriateAuthentication
  940.                 invalidCredentials
  941.                 unavailable
  942.                 unavailableCriticalExtension
  943.  
  944.    If the client receives a BindResponse response where the resultCode was 
  945.    protocolError and the supportedVersion field is absent, it must close 
  946.    the connection as the server will be unwilling to accept further 
  947.    operations.  (This is for compatibility with earlier versions of LDAP.)
  948.  
  949.    The serverURL contains the URL of this LDAP server, if it wishes to 
  950.    provide an "authoritative" URL for itself.  Typically this will be a
  951.    URL of the "ldap:" type, indicating the official host name, and the 
  952.    name part of the URL will contain the encoded name of the server itself.
  953.    The serverCreds are used as part of a SASL-defined bind mechanism; to 
  954.    allow the client to authenticate the server to which it is communicating, 
  955.    or to perform "challenge-response" authentication.  If the client 
  956.    bound with the password choice, or the SASL mechanism does not require
  957.    the server to return information to the client, then this field is not 
  958.    to be included in the result.
  959.  
  960.    The supportedVersion field contains the minimum of the version supplied
  961.    by the client in the BindRequest and the highest version of LDAP supported
  962.    in the server.  If the client and server both implement the protocol 
  963.    described in this document it will have the value 3.  This field
  964.    will be absent when responding to a version 2 or earlier client.
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974. Wahl, Howes & Kille                                              [Page 16]
  975.  
  976. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  977.  
  978.  
  979. 4.3.  Unbind Operation
  980.  
  981.    The function of the Unbind Operation is to terminate a protocol
  982.    session.  The Unbind Operation is defined as follows:
  983.  
  984.         UnbindRequest ::= [APPLICATION 2] NULL
  985.  
  986.    The Unbind Operation has no response defined. Upon transmission of an
  987.    UnbindRequest, a protocol client may assume that the protocol session
  988.    is terminated. Upon receipt of an UnbindRequest, a protocol server
  989.    may assume that the requesting client has terminated the session and
  990.    that all outstanding requests may be discarded, and may close the 
  991.    connection.  All session controls will be forgotten and search result
  992.    caches will be cleared when a connection closes. 
  993.  
  994. 4.4.  Session Control Operation
  995.  
  996.         SessionRequest ::= [APPLICATION 17] Controls
  997.  
  998.         SessionResponse ::= [APPLICATION 18] SEQUENCE {
  999.                 COMPONENTS OF LDAPResult,
  1000.                 unsupportedCtls         [12] SEQUENCE OF LDAPString }
  1001.  
  1002.         Controls ::= SEQUENCE OF SEQUENCE {
  1003.                 controlType             LDAPString,
  1004.                 criticality             BOOLEAN DEFAULT FALSE,
  1005.                 controlValue            OCTET STRING }
  1006.  
  1007.    Session Controls are requests made by the client which affect its 
  1008.    interaction with the server. Controls are not saved after a session 
  1009.    unbinds or disconnects abruptly, and do not affect other sessions to 
  1010.    this or other servers. Session controls do not affect operations which
  1011.    have already been requested on this connection, e.g. if the client sends
  1012.    a search request and subsequently sends a sessionControlRequest while the
  1013.    server is in the middle of sending responses, the session controls which
  1014.    were in force when the search operation began still apply for all the 
  1015.    results of that search until the SearchResultDone is returned.
  1016.  
  1017.    Session controls are not cumulative, and a session request will 
  1018.    override all session controls which were set by a previous request.
  1019.    If a control was set on a previous request and was not mentioned in 
  1020.    a subsequent request, it will be reset by the server to its default
  1021.    value.  (This permits session controls, such as supportedProtocol, to 
  1022.    have multiple values.) 
  1023.  
  1024.    If the server is not capable of setting one or more requested controls,
  1025.    it should set as many as possible.  If any of the controls which the 
  1026.    server could not set are marked as critical, it must return the 
  1027.    unavailableCriticalExtension error.
  1028.  
  1029.    The controlType field must either be a string defined in this section,
  1030.    or a dotted-decimal representation of an OBJECT IDENTIFIER.  This will
  1031.    aid in preventing conflicts between privately-defined control extensions.
  1032.    String names are case insensitive.
  1033.  
  1034.  
  1035. Wahl, Howes & Kille                                              [Page 17]
  1036.  
  1037. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1038.  
  1039.    
  1040.    The following controls have been defined:
  1041.  
  1042.      NAME                CRITICAL?        VALUE CONTAINS  DEFAULT 
  1043.      =================== ================ =============== =============
  1044.      attrSizeLimit       clients option   integer         no limit
  1045.      dontUseCopy         clients option   boolean         FALSE
  1046.      usePartialCopy      clients option   boolean         FALSE
  1047.      referringServer     non-critical     URL             none
  1048.      chainingProhibited  clients option   boolean         FALSE
  1049.      supportedProtocol   non-critical     protocol name   none
  1050.      useAliasOnUpdate    clients option   boolean         FALSE
  1051.      manageDsaIT         critical         boolean         FALSE
  1052.      preferredLanguage   non-critical     string          no preference
  1053.  
  1054.    The attrSizeLimit control may be critical or non-critical at the client's
  1055.    request.  The value field contains either an empty string, implying no 
  1056.    limit, or a string representation of a positive integer, e.g. "10000".
  1057.    The default if this control is not present is that there is no limit.
  1058.    The attrSizeLimit number is a size in bytes of the largest encoded value
  1059.    which the client is capable of processing.  Servers should not return
  1060.    attribute values in a search response which are larger than this size.  
  1061.    (If attribute values are excluded because of this control, the 
  1062.    incompleteEntry attribute must be present with the value TRUE in the 
  1063.    SearchResultEntry).
  1064.  
  1065.    The dontUseCopy control may be critical or non-critical at the client's
  1066.    request.  The value field contains either "TRUE" or "FALSE".  
  1067.    The default if this control is not set is "FALSE".  This control only 
  1068.    affects the Search and Compare operations.  If present and set to "TRUE",
  1069.    servers should not make use of information from cached or shadowed 
  1070.    copies of entries in these operations.   This control overrides any 
  1071.    setting of the usePartialCopy control.
  1072.  
  1073.    The usePartialCopy control may be critical or non-critical at the client's
  1074.    request.  The value field contains either "TRUE" or "FALSE".  
  1075.    The default if this control is not set is "FALSE".  This control only 
  1076.    affects the Search and Compare operations.  If the dontUsecopy control is
  1077.    set to "TRUE", this control is ignored.   If usePartialCopy is present and 
  1078.    set to "TRUE", then if a contacted server holds at least one attribute in a 
  1079.    shadow or cached copy of an entry, then that entry may be used to satisfy 
  1080.    the request, even if not all the requested attributes are in the shadowed 
  1081.    copy.  If this control is "FALSE" and dontUseCopy is also "FALSE", the 
  1082.    server must not return attributes from an incomplete shadow copy of an 
  1083.    entry unless none of the requested attributes or their subtypes were 
  1084.    excluded from the shadow copy.  (How servers replicate information and 
  1085.    configure shadowing is outside the scope of this specification.)
  1086.  
  1087.    The referringServer control is always non-critical.  The value field 
  1088.    contains the URL of another server which referred an operation to this 
  1089.    server.  This control must only be present if the connection is being 
  1090.    made only to process a referral.  If the connection will be held open to 
  1091.    handle referrals from multiple servers this control must be omitted.
  1092.    There is no protocol effect of this control; it is used to assist in 
  1093.    tracing knowledge inconsistencies in the distributed directory.
  1094.  
  1095.  
  1096. Wahl, Howes & Kille                                              [Page 18]
  1097.  
  1098. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1099.  
  1100.  
  1101.    The chainingProhibited control may be critical or non-critical at the 
  1102.    client's request.  The value must be either "TRUE" or "FALSE".  To aid
  1103.    interoperability with LDAPv2 clients, the default if this control is not
  1104.    set is "FALSE".  If this control is present and set to "TRUE", the 
  1105.    server must not contact any other servers as part of processing operations 
  1106.    requested by this client, if it would be possible to instead 
  1107.    return to the client a referral.   If the server is a gateway to X.500, 
  1108.    and DAP is not a supported client referral protocol (see next paragraph), 
  1109.    the server must set the chainingProhibited service control on any DAP 
  1110.    or DSP requests it makes.  
  1111.  
  1112.    The supportedProtocol control is always non-critical.  The field is 
  1113.    a string name of a protocol which the client implements.  The name of 
  1114.    the protocol may be "ldap", "cldap", "dap", any IANA-assigned protocol
  1115.    name or URL mechanism, or "*" to indicate that any type of referral may
  1116.    be returned.  If this control is present, a server must return a 
  1117.    referral, rather than itself chain to another server using one of the 
  1118.    indicated protocol.  This control may be present multiple times in a 
  1119.    session control if the client wishes to name multiple protocols it 
  1120.    supports.  
  1121.  
  1122.    If the supportedProtocol control is absent and the server is capable of 
  1123.    contacting other servers, then it must not return results with
  1124.    referrals, as described in 4.1.10, or SearchResultContinuation, as 
  1125.    described in 4.5.3, unless the server is not capable of contacting 
  1126.    other servers, in which case it may return a referral or continuation 
  1127.    containing a URL of type "LDAP".
  1128.  
  1129.    It is recommended that clients, as a minimum, support LDAP referrals, 
  1130.    and set the supportedProtocol control to be "ldap".
  1131.  
  1132.    The useAliasOnUpdate control may be critical or non-critical at the
  1133.    client's request.  The value must be either "TRUE" or "FALSE".  To 
  1134.    aid interoperability with LDAPv2 clients, the default if this control
  1135.    is not set is "FALSE".  If present and set to TRUE, the server must
  1136.    permit alias names to be used as components of a Distinguished Name in 
  1137.    Add, Modify and Delete operations.  If the server is a gateway to X.500, 
  1138.    it must set the useAliasOnUpdate critical extension on any DAP/DSP 
  1139.    AddEntry, ModifyEntry and RemoveEntry requests it makes if this 
  1140.    control is "TRUE".   This control does not affect the ModifyDN operation,
  1141.    which only allows Distinguished Names to be provided.
  1142.  
  1143.    The manageDsaIT control is always critical.  The value must be either  
  1144.    "TRUE" or "FALSE".  The default, if this control is not set, is "FALSE".  
  1145.    This control affects the name resolution behavior of the server to 
  1146.    permit a manager to read and modify knowledge references and other 
  1147.    X.500 server-specific attributes.  If the server is a gateway to 
  1148.    X.500, it must set the manageDsaIT critical extension, as well as the
  1149.    appropriate common arguments, on any DAP/DSP requests it makes, based on
  1150.    this control.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157. Wahl, Howes & Kille                                              [Page 19]
  1158.  
  1159. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1160.  
  1161.  
  1162.  
  1163.    The preferredLanguage control is always non-critical.  The use of this 
  1164.    control and its impact on the directory will be defined in future drafts.
  1165.    The default if this control is not set, is that there is no preferred 
  1166.    language.
  1167.  
  1168. 4.5.  Search Operation
  1169.  
  1170.    The Search Operation allows a client to request that a search be
  1171.    performed on its behalf by a server.  This can be used to read attributes
  1172.    from a single entry, or a whole subtree of entries.
  1173.  
  1174. 4.5.1. Search Request
  1175.  
  1176.    The Search Request is defined as follows:
  1177.  
  1178.         SearchRequest ::= [APPLICATION 3] SEQUENCE {
  1179.                 baseObject      LDAPDN,
  1180.                 scope           ENUMERATED {
  1181.                         baseObject              (0),
  1182.                         singleLevel             (1),
  1183.                         wholeSubtree            (2) },
  1184.                 derefAliases    ENUMERATED {
  1185.                         neverDerefAliases       (0),
  1186.                         derefInSearching        (1),
  1187.                         derefFindingBaseObj     (2),
  1188.                         derefAlways             (3) },
  1189.                 sizeLimit       INTEGER (0 .. maxInt),
  1190.                 timeLimit       INTEGER (0 .. maxInt),
  1191.                 typesOnly       BOOLEAN,
  1192.                 filter          Filter,
  1193.                 attributes      AttributeDescriptionList,
  1194.                 pageSizeLimit   [0] INTEGER     OPTIONAL,
  1195.                 sortKeys        [1] SortKeyList OPTIONAL,
  1196.                 prevSearchId    [2] MessageID   OPTIONAL,
  1197.                 startLocation   [3] INTEGER     OPTIONAL }
  1198.  
  1199.         SortKeyList ::= SEQUENCE OF SEQUENCE {
  1200.                 attributeType   AttributeType,
  1201.                 orderingRule    [0] MatchingRuleId OPTIONAL,
  1202.                 reverseOrder    [1] BOOLEAN DEFAULT FALSE }
  1203.  
  1204.         Filter ::= CHOICE {
  1205.                 and             [0] SET OF Filter,
  1206.                 or              [1] SET OF Filter,
  1207.                 not             [2] Filter,
  1208.                 equalityMatch   [3] AttributeValueAssertion,
  1209.                 substrings      [4] SubstringFilter,
  1210.                 greaterOrEqual  [5] AttributeValueAssertion,
  1211.                 lessOrEqual     [6] AttributeValueAssertion,
  1212.                 present         [7] AttributeType,
  1213.                 approxMatch     [8] AttributeValueAssertion,
  1214.                 extensibleMatch [9] MatchingRuleAssertion }     
  1215.  
  1216.  
  1217.  
  1218. Wahl, Howes & Kille                                              [Page 20]
  1219.  
  1220. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1221.  
  1222.  
  1223.         SubstringFilter ::= SEQUENCE {
  1224.                 type            AttributeDescription,
  1225.                 -- at least one must be present
  1226.                 substrings      SEQUENCE OF CHOICE { 
  1227.                         initial [0] LDAPString,
  1228.                         any     [1] LDAPString,
  1229.                         final   [2] LDAPString } }
  1230.  
  1231.         MatchingRuleAssertion ::= SEQUENCE {
  1232.                 matchingRule    [1] MatchingRuleId OPTIONAL,
  1233.                 type            [2] AttributeType OPTIONAL,
  1234.                 matchValue      [3] AssertionValue,
  1235.                 dnAttributes    [4] BOOLEAN DEFAULT FALSE }
  1236.  
  1237.    Parameters of the Search Request are:
  1238.  
  1239.    - baseObject: An LDAPDN that is the base object entry relative to
  1240.      which the search is to be performed.
  1241.  
  1242.    - scope: An indicator of the scope of the search to be performed. The
  1243.      semantics of the possible values of this field are identical to the
  1244.      semantics of the scope field in the X.511 Search Operation.
  1245.  
  1246.    - derefAliases: An indicator as to how alias objects are to be be
  1247.      handled in searching.  The semantics of the possible values of
  1248.      this field are:
  1249.  
  1250.              neverDerefAliases: do not dereference aliases in searching
  1251.              or in locating the base object of the search;
  1252.  
  1253.              derefInSearching: dereference aliases in subordinates of
  1254.              the base object in searching, but not in locating the
  1255.              base object of the search;
  1256.  
  1257.              derefFindingBaseObject: dereference aliases in locating
  1258.              the base object of the search, but not when searching
  1259.              subordinates of the base object;
  1260.  
  1261.              derefAlways: dereference aliases both in searching and in
  1262.              locating the base object of the search.
  1263.  
  1264.    - sizelimit: A sizelimit that restricts the maximum number of entries
  1265.      to be returned as a result of the search. A value of 0 in this
  1266.      field indicates that no sizelimit restrictions are in effect for
  1267.      the search.
  1268.  
  1269.    - timelimit: A timelimit that restricts the maximum time (in seconds)
  1270.      allowed for a search. A value of 0 in this field indicates that no
  1271.      timelimit restrictions are in effect for the search.
  1272.  
  1273.    - typesOnly: An indicator as to whether search results will contain
  1274.      both attribute types and values, or just attribute types.  Setting
  1275.      this field to TRUE causes only attribute types (no values) to be
  1276.      returned.  Setting this field to FALSE causes both attribute types
  1277.      and values to be returned.
  1278.  
  1279. Wahl, Howes & Kille                                              [Page 21]
  1280.  
  1281. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1282.  
  1283.  
  1284.    - filter: A filter that defines the conditions that must be fulfilled
  1285.      in order for the search to match a given entry.  The 'and', 'or' and 
  1286.      'not' choices may be used to form boolean combinations of filters.  At 
  1287.      least one filter element must be present in an 'and' or 'or' 
  1288.      choice.  The others match against individual attribute values of 
  1289.      entries in the scope of the search.
  1290.  
  1291.      The extensibleMatch is new in this version of LDAP.  If the 
  1292.      matchingRule field is absent, the type field must be present, and
  1293.      the equality match is performed for that type.  If the type field is 
  1294.      absent and matchingRule is present, the matchValue is compared 
  1295.      against all attributes in an entry which support that matchingRule, 
  1296.      and the matchingRule determines the syntax for the assertion value.
  1297.      If the type field is present and matchingRule is present, the 
  1298.      matchingRule must be one permitted for use with that type.
  1299.      If the dnAttributes field is set to TRUE, the match is applied 
  1300.      against all the attributes in an entry's distinguished name as 
  1301.      well.  (Editors note: The dnAttributes field is present so that there 
  1302.      does not need to be multiple versions of generic matching rules such as
  1303.      wordMatch, one to apply to entries and another to apply to entries and 
  1304.      dn attributes as well).
  1305.  
  1306.    - attributes: A list of the attributes from each entry found as a
  1307.      result of the search to be returned. An empty list signifies that
  1308.      all user attributes from each entry found in the search are to be 
  1309.      returned, as does the special attribute description string "*". (the
  1310.      latter technique allows the client to request all user attributes 
  1311.      along with selected operational attributes).  If the client does not 
  1312.      want any attributes returned, it can request only the attribute with 
  1313.      OID "1.1".  Attributes must be named at most once in the list, and 
  1314.      are returned at most once in an entry. 
  1315.  
  1316.      Client implementors should note that even if all user attributes are 
  1317.      requested, some attributes of the entry may not be included in search
  1318.      results due to access control restrictions.  Furthermore, servers
  1319.      will not return operational attributes, such as modifyRights or 
  1320.      attributeTypes, unless they are listed by name, since there may be 
  1321.      extremely large number of values for certain operational attributes. 
  1322.      (A list of operational attributes for use in LDAP is given in [5].)
  1323.  
  1324.    - pageSizeLimit: if present, then if more entries are to be returned than 
  1325.      the pageSizeLimit, the server must return only as many as this limit 
  1326.      before returning the SearchResultDone response.  If the same or fewer 
  1327.      entries than this limit are to be returned, the server must return all 
  1328.      the entries and the SearchResultDone response.
  1329.  
  1330.      The pageSizeLimit does not affect SearchResultReference responses, which
  1331.      are not counted as entries and of which any number may be returned by the 
  1332.      server.
  1333.  
  1334.      If operating over connectionless data transport, the client must not 
  1335.      set this field.
  1336.  
  1337.  
  1338.  
  1339.  
  1340. Wahl, Howes & Kille                                              [Page 22]
  1341.  
  1342. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1343.  
  1344.  
  1345.      If a pageSizeLimit was set and reached during the search, the client 
  1346.      will be able to request more of the entries using a subsequent 
  1347.      SearchRequest with the prevSearchId field present. 
  1348.  
  1349.      It is strongly recommended that clients include the sortKeys field when
  1350.      including this field.
  1351.  
  1352.    - sortKeys: If this field is present, then it specifies one or more 
  1353.      attribute types and matching rules, and the returned entries must
  1354.      be sorted in order based on these types.  If the reverseOrder field is 
  1355.      set to TRUE, then the entries will be presented in reverse sorted 
  1356.      order.   
  1357.  
  1358.      Only if the server does not recognize any of the attribute types, the 
  1359.      ordering rule associated with an attribute type is not applicable, or
  1360.      none of the attributes in the search responses are of these types, 
  1361.      then the sortKeys field is not used and result entries are returned 
  1362.      in random order.
  1363.   
  1364.      If the server does not support sorting with the requested attributes
  1365.      or matching rules, then it must return only protocolError (which is what
  1366.      an LDAPv2 server would return), undefinedAttributeType or 
  1367.      inappropriateMatching and no searchResultEntry or 
  1368.      searchResultReference responses.
  1369.  
  1370.      If the sortKeys field is absent, there is no defined order for returning
  1371.      entries in a search result.  
  1372.  
  1373.    - prevSearchId: If this field is present, this informs the server that,
  1374.      with possibly the exception of the value of the startLocation field, 
  1375.      this request is identical to a searchRequest made previously on this
  1376.      association.  If the server does not recognize this as the message id 
  1377.      of a previous search operation, it must silently ignore this field and 
  1378.      perform this search as normal.  The client must ensure that all fields, 
  1379.      other than startLocation, are the same as in the earlier search, 
  1380.      otherwise the contents of the entries returned from this search are not 
  1381.      defined.  If clients are performing the same search more than twice on an
  1382.      association, then the prevSearchId field of all but the first search
  1383.      must contain the messageID of that first search.
  1384.  
  1385.    - startLocation: this field may be present if the pageSizeLimit is 
  1386.      present.  After filtering and selecting the entries to be returned in 
  1387.      a search, the server will discard this many entries before starting
  1388.      to return SearchResultEntry responses.  Thus setting startLocation 0 is
  1389.      the same as not including a startLocation field.  If the client sends a 
  1390.      value of startLocation which is larger than the number of entries in the
  1391.      result, the server will only return any of the SearchResultReference
  1392.      responses, and then the SearchResultDone response.  (The server should 
  1393.      indicate in the SearchResultDone a value of totalCount which the client
  1394.      may use to make a better choice of startLocation in a subsequent search).
  1395.  
  1396.      The startLocation does not affect SearchResultReference responses, which
  1397.      are not counted as entries.
  1398.  
  1399.  
  1400.  
  1401. Wahl, Howes & Kille                                              [Page 23]
  1402.  
  1403. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1404.  
  1405.  
  1406.      It is strongly recommended that clients include the sortKeys field when
  1407.      including this field.
  1408.     
  1409.    If the client includes the attribute type name 'modifyRights' in the 
  1410.    search request attribute type list when performing a baseObject search, 
  1411.    then the server may return the modifyRights attribute as part of 
  1412.    the response attributes for that entry.  The value of this attribute
  1413.    is described in section 6.2.2.1 of [5], and corresponds to the X.511(93)
  1414.    ModifyRights field of the ReadResponse.
  1415.  
  1416.    Note that an X.500 "list"-like operation can be emulated by the client
  1417.    requesting a one-level LDAP search operation with a filter checking for 
  1418.    the existence of the objectClass attribute, and that an X.500 "read"-like 
  1419.    operation can be emulated by a base object LDAP search operation with 
  1420.    the same filter.  A server which provides a gateway to X.500 is not 
  1421.    required to use the Read or List operations, although it may choose to
  1422.    do so.  
  1423.  
  1424.    If the search filter includes an equality match of the objectClass 
  1425.    attribute and the value "subentry", then if the server is converting
  1426.    to an X.500 protocol, the subentries service control must be set.
  1427.    Thus clients must not search for both subentries and ordinary entries
  1428.    with a single search operation.
  1429.  
  1430. 4.5.2. Search Result
  1431.  
  1432.    The results of the search attempted by the server upon receipt of a
  1433.    Search Request are returned in Search Responses, which are LDAP 
  1434.    messages containing either SearchResultEntry, SearchResultReference, 
  1435.    SearchResultDone or SearchResultFull data types.
  1436.  
  1437.         SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
  1438.                 objectName      LDAPDN,
  1439.                 attributes      PartialAttributeList }
  1440.  
  1441.         PartialAttributeList ::= SEQUENCE OF SEQUENCE { 
  1442.                 type    AttributeDescription,
  1443.                 vals    SET OF AttributeValue } 
  1444.         -- implementors should note that the PartialAttributeList may have
  1445.         -- zero elements (if none of the attributes of that entry were 
  1446.         -- requested, or could be returned), and that the vals set may also 
  1447.         -- have zero elements (if types only was requested, or all the values
  1448.         -- exceeded the attribute size limit or were excluded because of 
  1449.         -- access control).
  1450.  
  1451.         SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
  1452.         -- at least one LDAPURL element must be present
  1453.                
  1454.         SearchResultDone ::= [APPLICATION 5] SEQUENCE {
  1455.            COMPONENTS OF LDAPResult,
  1456.            totalCount [8] INTEGER OPTIONAL }
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462. Wahl, Howes & Kille                                              [Page 24]
  1463.  
  1464. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1465.  
  1466.  
  1467.  
  1468.         SearchResultFull ::= SEQUENCE OF CHOICE {
  1469.                         entry           SearchResultEntry,
  1470.                         reference       SearchResultReference,
  1471.                         resultCode      SearchResultDone }
  1472.  
  1473.    Upon receipt of a Search Request, a server will perform the necessary
  1474.    search of the DIT.
  1475.  
  1476.    If the LDAP session is operating over a connection-oriented transport
  1477.    such as TCP, the server will return to the client a sequence of 
  1478.    responses in separate LDAP messages.  There may be zero or more 
  1479.    responses containing SearchResultEntry, one for each entry found 
  1480.    during the search.  There may also be zero or more responses 
  1481.    containing SearchResultReference, one for each area not explored by 
  1482.    this server during the search.  The SearchResultEntry and 
  1483.    SearchResultReferences may come in any order. Following all the 
  1484.    SearchResultReference responses and all SearchResultEntry responses up
  1485.    to a pageSizeLimit (if any), the server will return a response containing
  1486.    the SearchResultDone, which contains an indication of success, or 
  1487.    detailing any errors that have occurred.  
  1488.  
  1489.    If the LDAP session is operating over a connectionless transport such 
  1490.    as UDP, the server will return to the client only one response to the
  1491.    search, an LDAPMessage containing a SearchResultFull data type.  All (if 
  1492.    any) but the last element of the SEQUENCE OF must be of the 
  1493.    SearchResultEntry or SearchResultReference types, and the last must be of 
  1494.    the SearchResultDone type.
  1495.  
  1496.    The SearchResultFull is never returned over a connection-oriented 
  1497.    transport.
  1498.  
  1499.    Each entry returned in a SearchResultEntry will contain all attributes,
  1500.    complete with associated values if necessary, as specified in the 
  1501.    attributes field of the Search Request.  Return of attributes is subject
  1502.    to access control and other administrative policy.  Some attributes may
  1503.    be returned in binary format (indicated by the AttributeDescription in the 
  1504.    response having the binary option present), or in a language-specific 
  1505.    subtype (indicated by the AttributeDescription in the response having the 
  1506.    language option present).
  1507.  
  1508.    The following are not strictly attributes of an entry (or a subentry), 
  1509.    but may appear in the result list if requested.
  1510.  
  1511.     - entryName. This operational attribute is maintained by the server and 
  1512.       appears to be present in each entry.  The value of this attribute 
  1513.       is the distinguished name of the entry from which it is read.  It 
  1514.       is expected that the client would request and the server would return
  1515.       this attribute in binary.
  1516.  
  1517.     - modifyRights. Each value is the encoding of an element of modifyRights.
  1518.       The attribute is specific to the particular search operation and
  1519.       the requestor, and must not be cached or replicated.
  1520.  
  1521.  
  1522.  
  1523. Wahl, Howes & Kille                                              [Page 25]
  1524.  
  1525. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1526.  
  1527.  
  1528.     - incompleteEntry.  This attribute's value is TRUE if one or more 
  1529.       attributes are not present in the PartialAttributeList, because their 
  1530.       size would have exceeded the attribute size limit, or if a partial 
  1531.       shadow copy of the entry was used to satisfy the request and some 
  1532.       requested attributes are not returned.  It is never set just because 
  1533.       typesOnly was set to TRUE, or because a requested attribute was not
  1534.       actually present in the entry.
  1535.  
  1536.     - fromEntry.  The server may return this attribute's value as FALSE if it 
  1537.       is known that the search is based upon a shadow or cached copy of the 
  1538.       entry, and may return it as TRUE if the server masters the entry. 
  1539.  
  1540.    In a SearchResultEntry, as an encoding optimization, the value of the
  1541.    objectName LDAPDN may have a trailing '*' character to refer to the 
  1542.    baseObject of the corresponding searchRequest.  For example, if the
  1543.    baseObject is specified as "o=UofM, c=US", then the following objectName 
  1544.    LDAPDNs in a response would have the indicated meanings
  1545.  
  1546.           objectName returned   actual LDAPDN denoted
  1547.           ____________________________________________________
  1548.           "*"                   "o=UofM, c=US"
  1549.           "cn=Babs Jensen, *"   "cn=Babs Jensen, o=UofM, c=US"
  1550.  
  1551.    If the pageSizeLimit field was present, the server may indicate the total 
  1552.    number of entries which could have matched the search filter in the field 
  1553.    totalCount of the SearchResultDone. The total count would be the same or 
  1554.    greater than the number of SearchResultEntry responses returned at this 
  1555.    time.  If it is greater, then the server did not return all the responses 
  1556.    because the pageSizeLimit was reached.  This field is not affected by any 
  1557.    requested startLocation field. Client implementors should note that 
  1558.    subsequent search requests with the same fields may return a different value
  1559.    for totalCount if the DIT is being modified by other users.  The totalCount
  1560.    field must be absent if the pageSizeLimit field was not included in the 
  1561.    request.
  1562.  
  1563.    Servers should not return the resultCode sizeLimitExceeded merely because
  1564.    a pageSizeLimit was reached. 
  1565.  
  1566. 4.5.3. Continuation References in the Search Result
  1567.  
  1568.    If the server was able to locate the entry referred to by the 
  1569.    baseObject but was unable to search all the entries in the scope at 
  1570.    and under the baseObject, the server may return one or more 
  1571.    SearchResultReference, each containing a reference to another set of 
  1572.    servers for continuing the operation.  The server must return at most 
  1573.    one SearchResultReference for a new subordinate base object with a 
  1574.    particular scope and filter.  A server must not return a 
  1575.    SearchResultReference if it has not located the baseObject and 
  1576.    thus has not searched any entries; in this case it would return a 
  1577.    SearchResultDone containing a referral resultCode.
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584. Wahl, Howes & Kille                                              [Page 26]
  1585.  
  1586. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1587.  
  1588.  
  1589.  
  1590.    The SearchResultReference is of the same data type as the Referral.
  1591.    A URL in a SearchResultReference may only be included if the client has
  1592.    indicated (in the session controls) that it is able to handle that 
  1593.    protocol.  If the client has not indicated any protocols which the 
  1594.    server could use to return in a SearchResultReference, the server must
  1595.    itself process the entire search.  If the server could not contact 
  1596.    all other servers, it may return one or more SearchResultReference for
  1597.    unexplored subtrees, and must indicate also that only partial results were 
  1598.    returned by setting the resultCode in the SearchResultDone to be something 
  1599.    other than success, such as timeLimitExceeded.
  1600.  
  1601.    URLs for servers implementing the LDAP protocol are written according 
  1602.    to [9].  The dn part must be present in the URL, with the new target
  1603.    object name.  The client must use this name in its next request.
  1604.    Some servers (e.g. participating in distributed indexing) may change 
  1605.    the filter.  If the filter part of the URL is present in an LDAP URL, 
  1606.    the client must use this filter in its next request to progress this
  1607.    search, and if the filter is absent the client will use the same filter as 
  1608.    it used for that search.
  1609.  
  1610.    Other kinds of URLs may be returned so long as the operation could be 
  1611.    performed using that protocol, and the client has indicated (in a 
  1612.    session control) that it is able to handle that protocol.  
  1613.  
  1614.    The name of an unexplored subtree in a SearchResultReference need not be
  1615.    subordinate to the base object if an alias was dereferenced, however it 
  1616.    must not be a prefix of the base object, otherwise the client will
  1617.    loop.  (Client implementations must detect loops; see section 6.2.)
  1618.  
  1619.    Note: the "X.500 Non-Specific Subordinate Reference" is not permitted in 
  1620.    LDAP.  Servers must not return multiple SearchResultReference for the same 
  1621.    subtree, and any one of (not all of) the servers listed in a 
  1622.    SearchResultReference may be contacted to perform the entire search in a 
  1623.    particular subtree.
  1624.  
  1625. 4.5.3.1. Example
  1626.  
  1627.    For example, suppose the contacted server (hosta) holds the entry 
  1628.    "O=MNN,C=WW" and the entry "CN=Manager,O=MNN,C=WW".  It knows that either 
  1629.    LDAP-capable servers (hostb) or (hostc) hold "OU=People,O=MNN,C=WW" (one 
  1630.    is the master and the other server a shadow), and that LDAP-capable 
  1631.    server (hostd) holds the subtree "OU=Roles,O=MNN,C=WW".  If a subtree 
  1632.    search of "O=MNN,C=WW" is requested to the contacted server in which 
  1633.    chainingProhibited is set and referrals are permitted, and the filter is 
  1634.    objectClass=*, the server may return the following responses:
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645. Wahl, Howes & Kille                                              [Page 27]
  1646.  
  1647. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1648.  
  1649.  
  1650.  
  1651.      SearchResultEntry for O=MNN,C=WW
  1652.      SearchResultEntry for CN=Manager,O=MNN,C=WW
  1653.      SearchResultReference {
  1654.        ldap://hostb/OU=People,O=MNN,C=WW
  1655.        ldap://hostc/OU=People,O=MNN,C=WW
  1656.      }
  1657.      SearchResultReference {
  1658.        ldap://hostd/OU=Roles,O=MNN,C=WW
  1659.      }
  1660.      SearchResultDone (entries = 2)
  1661.  
  1662.    Client implementors should note that when following a 
  1663.    SearchResultReference, additional SearchResultReference may be 
  1664.    generated.  Continuing the example, if the client contacted the 
  1665.    server (hostb) and issued the search for the subtree 
  1666.    "OU=People,O=MNN,C=WW", the server might respond as follows:
  1667.   
  1668.      SearchResultEntry for OU=People,O=MNN,C=WW
  1669.      SearchResultReference {
  1670.       ldap://hoste/OU=Managers,OU=People,O=MNN,C=WW
  1671.      }
  1672.      SearchResultReference {
  1673.       ldap://hostf/OU=Consultants,OU=People,O=MNN,C=WW
  1674.      }
  1675.  
  1676. 4.6.  Modify Operation
  1677.  
  1678.    The Modify Operation allows a client to request that a modification
  1679.    of an entry be performed on its behalf by a server.  The Modify
  1680.    Request is defined as follows:
  1681.  
  1682.         ModifyRequest ::= [APPLICATION 6] SEQUENCE {
  1683.                 object          LDAPDN,
  1684.                 modification    SEQUENCE OF SEQUENCE {
  1685.                         operation       ENUMERATED {
  1686.                                                 add     (0),
  1687.                                                 delete  (1),
  1688.                                                 replace (2) },
  1689.                         modification    AttributeTypeAndValues } }
  1690.  
  1691.         AttributeTypeAndValues ::= SEQUENCE {
  1692.                 type    AttributeDescription,
  1693.                 vals    SET OF AttributeValue }
  1694.  
  1695.    Parameters of the Modify Request are:
  1696.  
  1697.    - object: The object to be modified. The value of this field contains the
  1698.      DN of the entry to be modified.  The server will not perform any 
  1699.      alias dereferencing in determining the object to be modified unless 
  1700.      the useAliasOnUpdate session control is set to TRUE.
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706. Wahl, Howes & Kille                                              [Page 28]
  1707.  
  1708. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1709.  
  1710.  
  1711.  
  1712.    - A list of modifications to be performed on the entry to be modified.
  1713.      The entire list of entry modifications must be performed
  1714.      in the order they are listed, as a single atomic operation.  While
  1715.      individual modifications may violate the directory schema, the
  1716.      resulting entry after the entire list of modifications is performed
  1717.      must conform to the requirements of the directory schema. The
  1718.      values that may be taken on by the 'operation' field in each
  1719.      modification construct have the following semantics respectively:
  1720.  
  1721.              add: add values listed to the given attribute, creating
  1722.              the attribute if necessary;
  1723.  
  1724.              delete: delete values listed from the given attribute,
  1725.              removing the entire attribute if no values are listed, or
  1726.              if all current values of the attribute are listed for
  1727.              deletion;
  1728.  
  1729.              replace: replace all existing values of the given attribute
  1730.              with the new values listed, creating the attribute if it
  1731.              did not already exist.  A replace with no value will delete 
  1732.              the entire attribute.
  1733.  
  1734.    The result of the modify attempted by the server upon receipt of a
  1735.    Modify Request is returned in a Modify Response, defined as follows:
  1736.  
  1737.         ModifyResponse ::= [APPLICATION 7] LDAPResult
  1738.  
  1739.    Upon receipt of a Modify Request, a server will perform the necessary
  1740.    modifications to the DIT.
  1741.  
  1742.    The server will return to the client a single Modify Response
  1743.    indicating either the successful completion of the DIT modification,
  1744.    or the reason that the modification failed. Note that due to the
  1745.    requirement for atomicity in applying the list of modifications in
  1746.    the Modify Request, the client may expect that no modifications of
  1747.    the DIT have been performed if the Modify Response received indicates
  1748.    any sort of error, and that all requested modifications have been
  1749.    performed if the Modify Response indicates successful completion of
  1750.    the Modify Operation.  If the connection fails, whether the modification
  1751.    occurred or not is indeterminate.
  1752.  
  1753.    Note that due to the simplifications made in LDAP, there is not a direct 
  1754.    mapping of the modifications in an LDAP ModifyRequest onto the 
  1755.    EntryModifications of a a DAP ModifyEntry operation, and different
  1756.    implementations of LDAP-DAP gateways may use different means of 
  1757.    representing the change.  The final effect of the operations on the 
  1758.    entry will be identical.
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767. Wahl, Howes & Kille                                              [Page 29]
  1768.  
  1769. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1770.  
  1771.  
  1772. 4.7.  Add Operation
  1773.  
  1774.    The Add Operation allows a client to request the addition of an entry
  1775.    into the directory. The Add Request is defined as follows:
  1776.  
  1777.         AddRequest ::= [APPLICATION 8] SEQUENCE {
  1778.                 entry           LDAPDN,
  1779.                 attributes      AttributeList }
  1780.  
  1781.         AttributeList ::= SEQUENCE OF SEQUENCE {
  1782.                 type    AttributeDescription,
  1783.                 vals    SET OF AttributeValue }    
  1784.  
  1785.    Parameters of the Add Request are:
  1786.  
  1787.    - entry: the Distinguished Name of the entry to be added. Note that
  1788.      all components of the name except for the last RDN component must
  1789.      exist for the add to succeed.  Note also that the server will not 
  1790.      dereference any aliases in locating the entry to be added (unless
  1791.      the useAliasOnUpdate session control is TRUE), and that there are 
  1792.      never any entries subordinate to an alias entry.
  1793.  
  1794.    - attributes: the list of attributes that make up the content of the 
  1795.      entry being added.  Clients must included distinguished values in
  1796.      this list.
  1797.  
  1798.    The result of the add attempted by the server upon receipt of a Add
  1799.    Request is returned in the Add Response, defined as follows:
  1800.  
  1801.         AddResponse ::= [APPLICATION 9] LDAPResult
  1802.  
  1803.    Upon receipt of an Add Request, a server will attempt to perform the
  1804.    add requested. The result of the add attempt will be returned to the
  1805.    client in the Add Response.
  1806.  
  1807. 4.8.  Delete Operation
  1808.  
  1809.    The Delete Operation allows a client to request the removal of an
  1810.    entry from the directory. The Delete Request is defined as follows: 
  1811.  
  1812.         DelRequest ::= [APPLICATION 10] LDAPDN
  1813.  
  1814.    The Delete Request consists of the Distinguished Name of the
  1815.    entry to be deleted. Note that the server will not dereference aliases 
  1816.    while resolving the name of the target entry to be removed, unless 
  1817.    the useAliasOnUpdate session control is TRUE.
  1818.     
  1819.    The result of the delete attempted by the server upon receipt of a 
  1820.    Delete Request is returned in the Delete Response, defined as follows:
  1821.  
  1822.         DelResponse ::= [APPLICATION 11] LDAPResult
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828. Wahl, Howes & Kille                                              [Page 30]
  1829.  
  1830. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1831.  
  1832.  
  1833.  
  1834.    Upon receipt of a Delete Request, a server will attempt to perform
  1835.    the entry removal requested. The result of the delete attempt will be
  1836.    returned to the client in the Delete Response. Note that only leaf
  1837.    objects (with no subordinates) may be deleted with this operation.
  1838.  
  1839. 4.9.  Modify DN Operation
  1840.  
  1841.    The Modify DN Operation allows a client to change the last component
  1842.    of the name of an entry in the directory, or to move a subtree of 
  1843.    entries to a new location in the directory.  The Modify DN Request is
  1844.    defined as follows:
  1845.  
  1846.         ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {
  1847.                 entry           LDAPDN,
  1848.                 newrdn          RelativeLDAPDN,
  1849.                 deleteoldrdn    BOOLEAN,
  1850.                 newSuperior     [0] LDAPDN OPTIONAL }
  1851.                
  1852.    Parameters of the Modify DN Request are:
  1853.  
  1854.    - entry: the name of the entry to be changed.
  1855.  
  1856.    - newrdn: the RDN that will form the last component of the new name.
  1857.  
  1858.    - deleteoldrdn: a boolean parameter that controls whether the old RDN
  1859.      attribute values is to be retained as attributes of the entry, or
  1860.      deleted from the entry.
  1861.  
  1862.    - newSuperior: if present, this is the name of the entry which 
  1863.      becomes the immediate superior of the existing entry.
  1864.  
  1865.    The result of the name change attempted by the server upon receipt of
  1866.    a Modify DN Request is returned in the Modify DN Response, defined
  1867.    as follows:
  1868.  
  1869.         ModifyDNResponse ::= [APPLICATION 13] LDAPResult
  1870.  
  1871.    Upon receipt of a ModifyDNRequest, a server will attempt to
  1872.    perform the name change. The result of the name change attempt will
  1873.    be returned to the client in the Modify DN Response. The attributes
  1874.    that make up the old RDN are deleted from the entry, or kept,
  1875.    depending on the setting of the deleteoldrdn parameter.
  1876.  
  1877.    Note that X.500 restricts the ModifyDN operation to only affect entries
  1878.    that are contained within a single server.  If the LDAP server is mapped
  1879.    onto DAP, then this restriction will apply, and the resultCode 
  1880.    affectsMultipleDSAs will be returned.  In general clients must not 
  1881.    expect to be able to perform arbitrary movements of entries and subtrees.
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889. Wahl, Howes & Kille                                              [Page 31]
  1890.  
  1891. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1892.  
  1893.  
  1894.    
  1895. 4.10.  Compare Operation
  1896.  
  1897.    The Compare Operation allows a client to compare an assertion
  1898.    provided with an entry in the directory. The Compare Request is
  1899.    defined as follows:
  1900.  
  1901.         CompareRequest ::= [APPLICATION 14] SEQUENCE {
  1902.                 entry           LDAPDN,
  1903.                 ava             AttributeValueAssertion }
  1904.  
  1905.    Parameters of the Compare Request are:
  1906.  
  1907.    - entry: the name of the entry to be compared with.
  1908.  
  1909.    - ava: the assertion with which an attribute in the entry is to be 
  1910.      compared.
  1911.  
  1912.    The result of the compare attempted by the server upon receipt of a
  1913.    Compare Request is returned in the Compare Response, defined as
  1914.    follows:
  1915.  
  1916.         CompareResponse ::= [APPLICATION 15] SEQUENCE {
  1917.            COMPONENTS OF LDAPResult,
  1918.            matchedSubtype [9] AttributeDescription OPTIONAL }
  1919.  
  1920.    When the resultCode is compareTrue the matchedSubtype field is 
  1921.    permitted to contain the name of the attribute whose value 
  1922.    matched the ava in the Compare operation.  Servers which do not 
  1923.    implement attribute hierarchies will omit this element.
  1924.  
  1925.    Upon receipt of a Compare Request, a server will attempt to perform
  1926.    the requested comparison. The result of the comparison will be
  1927.    returned to the client in the Compare Response. Note that errors and
  1928.    the result of comparison are all returned in the same construct.
  1929.  
  1930.    Note that some directory systems may establish access controls which
  1931.    permit the values of certain attributes (such as userPassword) to be 
  1932.    compared but not read.  In a search result, it may be that an attribute
  1933.    of that type would be returned, but with an empty set of values.
  1934.    
  1935. 4.11.  Abandon Operation
  1936.  
  1937.    The function of the Abandon Operation is to allow a client to request
  1938.    that the server abandon an outstanding operation.  The Abandon
  1939.    Request is defined as follows:
  1940.  
  1941.         AbandonRequest ::= [APPLICATION 16] MessageID
  1942.  
  1943.    The MessageID must be that of a Search or Compare operation 
  1944.    which was requested earlier during this association.  Other types of 
  1945.    operations cannot be abandoned.  
  1946.  
  1947.    (The abandon request itself has its own message id.  This is distinct
  1948.     from the id of the earlier operation being abandoned.)
  1949.  
  1950. Wahl, Howes & Kille                                              [Page 32]
  1951.  
  1952. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  1953.  
  1954.  
  1955.    There is no response defined in the Abandon Operation. Upon
  1956.    transmission of an Abandon Operation, a client may expect that the
  1957.    operation identified by the Message ID in the Abandon Request has
  1958.    been abandoned. In the event that a server receives an Abandon
  1959.    Request on a Search Operation in the midst of transmitting 
  1960.    responses to the search, that server must cease transmitting entry 
  1961.    responses to the abandoned request immediately. Of course, the server
  1962.    must ensure that only properly encoded LDAPMessages are transmitted.
  1963.  
  1964.    Clients must not send abandon requests for the same operation multiple
  1965.    times.  Servers must discard abandon requests for message ids it does
  1966.    not recognize, for operations which cannot be abandoned, and for 
  1967.    operations which have already been abandoned.
  1968.  
  1969. 4.12.  Extended Operation
  1970.  
  1971.    It may be desirable in some communities to define additional operations
  1972.    for services not available in this protocol, for instance digitally 
  1973.    signed operations and results.  Thus an extension mechanism has been
  1974.    added in this version of LDAP.
  1975.  
  1976.    The extended operation allows clients to make requests and receive 
  1977.    responses with predefined syntaxes and semantics.  These may be 
  1978.    defined in RFCs or be private to particular implementations.  Each 
  1979.    operation must have a unique OBJECT IDENTIFIER assigned to it.
  1980.  
  1981.         ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
  1982.                 requestName      [0] LDAPOID,
  1983.                 requestValue     [1] OCTET STRING }
  1984.  
  1985.    The requestName is a dotted-decimal representation of the 
  1986.    OBJECT IDENTIFIER corresponding to the request.  
  1987.    The requestValue is information in a form defined by that request, 
  1988.    encapsulated inside an OCTET STRING. 
  1989.  
  1990.    The server will respond to this with an LDAPMessage containing the 
  1991.    ExtendedResponse.
  1992.  
  1993.         ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
  1994.                 COMPONENTS OF LDAPResult,
  1995.                 responseName     [10] LDAPOID OPTIONAL,
  1996.                 response         [11] OCTET STRING OPTIONAL }
  1997.     
  1998.    If the server does not recognize the operation name, it must return
  1999.    only the standard response fields, containing the protocolError result 
  2000.    code.
  2001.  
  2002. 5.  Protocol Element Encodings and Transfer
  2003.  
  2004.    Four underlying services are defined here.  At a minimum, clients and 
  2005.    servers must implement the mapping of LDAP over TCP described in 5.1.1.
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011. Wahl, Howes & Kille                                              [Page 33]
  2012.  
  2013. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2014.  
  2015.  
  2016.  
  2017. 5.1.  Mapping Onto BER-based Transport Services
  2018.  
  2019.    This protocol is designed to run over connection-oriented, reliable
  2020.    transports, with all 8 bits in an octet being significant in the data
  2021.    stream.  
  2022.  
  2023.    The protocol elements of LDAP are encoded for exchange using the
  2024.    Basic Encoding Rules (BER) [11] of ASN.1 [3]. However, due to the
  2025.    high overhead involved in using certain elements of the BER, the
  2026.    following additional restrictions are placed on BER-encodings of LDAP
  2027.    protocol elements:
  2028.  
  2029.    (1) Only the definite form of length encoding will be used.
  2030.  
  2031.    (2) OCTET STRINGs will be encoded in the primitive form only.
  2032.  
  2033.    (3) If the value of a BOOLEAN type is true, the encoding must have 
  2034.        its contents octets set to hex "FF".
  2035.  
  2036.    (4) If a value of a type is its default value, it must be absent.  
  2037.        Only some BOOLEAN and INTEGER types have default values in this 
  2038.        protocol definition.
  2039.  
  2040.    These restrictions do not apply to ASN.1 types encapsulated inside of 
  2041.    OCTET STRINGs, such as attribute values, unless otherwise noted.
  2042.  
  2043. 5.1.1.  Transmission Control Protocol (TCP)
  2044.  
  2045.    The LDAPMessage PDUs are mapped directly onto the TCP bytestream.
  2046.    Server implementations running over the TCP should provide a protocol
  2047.    listener on the assigned port, 389.
  2048.  
  2049. 5.1.2.  Connection Oriented Transport Service (COTS)
  2050.  
  2051.    The connection is established.  No special use of T-Connect is made.
  2052.    Each LDAPMessage PDU is mapped directly onto T-Data.
  2053.  
  2054. 5.1.3.  User Datagram Protocol (UDP)
  2055.  
  2056.    The LDAPMessage PDUs are mapped directly onto UDP datagrams.  A datagram
  2057.    may contain one or more concatenated requests.  Only one response datagram
  2058.    is returned, containing all the responses concatenated together. The only 
  2059.    operations which the client may request are sessionRequest, searchRequest, 
  2060.    compareRequest and extendedReq.  The server may return sessionResponse, 
  2061.    searchResFull, compareResponse and extendedResp.  If any of the requests in 
  2062.    an incoming datagram generates an error (a result other than success, 
  2063.    compareTrue or compareFalse), the server should ignore any following 
  2064.    requests in that datagram.
  2065.  
  2066.    Server implementations running over the UDP should provide a protocol 
  2067.    listener on the assigned port, 389.
  2068.  
  2069.  
  2070.  
  2071.  
  2072. Wahl, Howes & Kille                                              [Page 34]
  2073.  
  2074. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2075.  
  2076.  
  2077.    
  2078. 5.1.4.  Secure Socket Layer over TCP (SSL)
  2079.  
  2080.    LDAP is an application protocol which may be carried inside of an 
  2081.    Secure Sockets Layer connection [8]. After establishing the SSL 
  2082.    connection over TCP, the LDAPMessage PDUs are mapped directly onto 
  2083.    the bytestream.  Server implementations running over SSL/TCP should 
  2084.    provide a protocol listener on the assigned port for LDAP-SSL, port 636.
  2085.  
  2086.    Note: it is expected that future versions of this document may reference
  2087.    an IETF specification for equivalent transport layer security services, 
  2088.    should one become available.
  2089.  
  2090. 6.  Implementation Guidelines
  2091.  
  2092. 6.1.  Server Implementations
  2093.  
  2094.    The server must be capable of recognizing all the mandatory attribute 
  2095.    type names and implement the syntaxes specified in [5].  Servers may also
  2096.    recognize additional attribute type names.
  2097.         
  2098. 6.2.  Client Implementations
  2099.  
  2100. 6.2.1. CLDAP Retry
  2101.  
  2102.    For simple lookup applications using the connectionless transport 
  2103.    protocol UDP, use of a retry algorithm with multiple servers similar 
  2104.    to that commonly used in DNS stub resolver implementations is 
  2105.    recommended.  The location of a CLDAP server or servers may be better 
  2106.    specified using IP addresses (simple or broadcast) rather than names 
  2107.    that must first be looked up in another directory such as DNS.
  2108.  
  2109. 6.2.2. Loop Detection
  2110.  
  2111.    Clients which request referrals must ensure that they do not loop
  2112.    between servers. They must not progress a referral or reference in a 
  2113.    subtree search where the new name is a superior of the name requested.
  2114.    They must not repeatedly contact the same server twice with the same 
  2115.    target entry name.   Some clients may be using a counter that is 
  2116.    incremented each time referral handling is handled for an operation, 
  2117.    and these kind of clients must be able to handle a DIT with up to ten 
  2118.    layers of naming contexts between the root and a leaf entry.
  2119.  
  2120. 7.  Security Considerations
  2121.  
  2122.    When used with a connection-oriented transport, this version of the 
  2123.    protocol provides facilities for the LDAP v2 authentication mechanism,
  2124.    simple authentication using a cleartext password, as well as any SASL
  2125.    mechanism [17].
  2126.    
  2127.    It is also permitted that the server can return its credentials to the 
  2128.    client, if it chooses to do so.
  2129.  
  2130.  
  2131.  
  2132.  
  2133. Wahl, Howes & Kille                                              [Page 35]
  2134.  
  2135. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2136.  
  2137.  
  2138.  
  2139.    This document also defines a mapping of LDAP over the Secure Sockets 
  2140.    Layer (SSL), which can provide strong authentication, integrity and 
  2141.    privacy of the connection.
  2142.  
  2143.    Use of cleartext password is strongly discouraged where the underlying
  2144.    transport service cannot guarantee confidentiality.  A password hashing
  2145.    mechanism is given in Appendix B.
  2146.  
  2147.    When used with SASL, it should be noted that the name field of the 
  2148.    BindRequest is not protected against modification.  Thus if there is a 
  2149.    client name (LDAPDN) agreed through the negotiation of the credentials,
  2150.    it must take precedence over any value in the unprotected name field.
  2151.  
  2152.    When used with the connectionless transport, no security services are
  2153.    available.  There has been some discussion about the desirability of
  2154.    authentication with connectionless LDAP requests.  This might take the 
  2155.    form of a clear text password (which would go against the current IAB 
  2156.    drive to remove such things from protocols) or some arbitrary 
  2157.    credentials.  It is felt that, in general, authentication would incur 
  2158.    sufficient overhead to negate the advantages of the connectionless 
  2159.    basis of LDAP. If an application requires authenticated access to the 
  2160.    directory then connectionless LDAP is not an appropriate protocol.
  2161.  
  2162. 8.  Acknowledgements
  2163.  
  2164.    This document is an update to RFC 1777, by Wengyik Yeong, Tim 
  2165.    Howes, and Steve Kille.  It also includes material from RFC 1798, by 
  2166.    Alan Young. Design ideas included in this document are based on those 
  2167.    discussed in ASID and other IETF Working Groups.  The contributions of
  2168.    individuals in these working groups is gratefully acknowledged.
  2169.  
  2170. 9.  Bibliography
  2171.  
  2172.    [1] ITU-T Rec. X.500, "The Directory: Overview of Concepts, Models and 
  2173.        Service",  1993.
  2174.  
  2175.    [2] W. Yeong, T. Howes, S. Kille, "Lightweight Directory Access  
  2176.        Protocol", RFC 1777, March 1995.
  2177.  
  2178.    [3] ITU-T Rec. X.680, "Abstract Syntax Notation One (ASN.1) - 
  2179.        Specification of Basic Notation", 1994.
  2180.  
  2181.    [4] S. Kille, M. Wahl, "A UTF-8 String Representation of Distinguished 
  2182.        Names", INTERNET-DRAFT <draft-ietf-asid-ldapv3-dn-00.txt>.
  2183.  
  2184.    [5] M. Wahl, A. Coulbeck, T. Howes, S. Kille, W. Yeong, C. Robbins,
  2185.        "Lightweight X.500 Directory Access Protocol Standard and Pilot
  2186.        Attribute Definitions", INTERNET-DRAFT 
  2187.        <draft-ietf-asid-ldapv3-attributes-02.txt>, August 1996.
  2188.  
  2189.    [6] ITU-T Rec. X.501, "The Directory: Models", 1993.
  2190.      
  2191.    [7] ITU-T Rec. X.520, "The Directory: Selected Attribute Types", 1993.
  2192.  
  2193.  
  2194. Wahl, Howes & Kille                                              [Page 36]
  2195.  
  2196. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2197.  
  2198.  
  2199.  
  2200.    [8] A. Freier, P. Karlton, P. Kocher, "The SSL Protocol Version 3.0",
  2201.         INTERNET-DRAFT <draft-freier-ssl-version3-01.txt>, March 1996.
  2202.  
  2203.    [9] T. Howes, M. Smith, "An LDAP URL Format", RFC 1959, June 1996.
  2204.  
  2205.    [10] ITU-T Rec. X.518, "The Directory: Procedures for Distributed 
  2206.         Operation", 1993.
  2207.    
  2208.    [11] ITU-T Rec. X.690, "Specification of ASN.1 encoding rules: Basic, 
  2209.         Canonical, and Distinguished Encoding Rules", 1994.
  2210.  
  2211.    [12] ITU-T Rec. X.509, "The Directory: Authentication Framework",
  2212.         1993.
  2213.  
  2214.    [13] ITU-T Rec. X.511, "The Directory: Abstract Service Definition", 1993.
  2215.  
  2216.    [14] T. Berners-Lee, L. Masinter, M. McCahill, "Uniform Resource 
  2217.         Locators (URL)", RFC 1738, Dec. 1994.
  2218.  
  2219.    [15] Universal Multiple-Octet Coded Character Set (UCS) - Architecture
  2220.         and Basic Multilingual Plane, ISO/IEC 10646-1 : 1993.
  2221.    
  2222.    [16] M. Davis, UTF-8, (WG2 N1036) DAM for ISO/IEC 10646-1.
  2223.  
  2224.    [17] J. Meyers, "Simple Authentication and Security Layer",
  2225.         INTERNET-DRAFT <draft-myers-auth-sasl-04.txt>, July 1996.
  2226.  
  2227. 10.  Authors' Address
  2228.  
  2229.        Mark Wahl
  2230.        Critical Angle Inc.
  2231.        4815 W Braker Lane #502-385
  2232.        Austin, TX 78759
  2233.        USA
  2234.  
  2235.        EMail:  M.Wahl@critical-angle.com
  2236.  
  2237.  
  2238.        Tim Howes
  2239.        Netscape Communications Corp.
  2240.        501 E. Middlefield Rd.
  2241.        Mountain View, CA 94043
  2242.        USA
  2243.        
  2244.        Phone:  +1 415 254-1900
  2245.        EMail:   howes@netscape.com
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255. Wahl, Howes & Kille                                              [Page 37]
  2256.  
  2257. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2258.  
  2259.  
  2260.  
  2261.        Steve Kille
  2262.        ISODE Consortium
  2263.        The Dome, The Square
  2264.        Richmond
  2265.        TW9 1DT
  2266.        UK
  2267.  
  2268.        Phone:  +44-181-332-9091
  2269.        EMail:  S.Kille@isode.com
  2270.  
  2271.  
  2272. Appendix A - Complete ASN.1 Definition
  2273.  
  2274.         Lightweight-Directory-Access-Protocol-V3 DEFINITIONS 
  2275.         IMPLICIT TAGS ::=
  2276.  
  2277.         BEGIN
  2278.  
  2279.         LDAPMessage ::= SEQUENCE {
  2280.                 messageID       MessageID,
  2281.                 cldapUserName   LDAPDN OPTIONAL,
  2282.                 protocolOp      CHOICE {        
  2283.                         bindRequest     BindRequest,
  2284.                         bindResponse    BindResponse, 
  2285.                         unbindRequest   UnbindRequest, 
  2286.                         searchRequest   SearchRequest, 
  2287.                         searchResEntry  SearchResultEntry, 
  2288.                         searchResDone   SearchResultDone, 
  2289.                         searchResRef    SearchResultReference, 
  2290.                         searchResFull   SearchResultFull, 
  2291.                         modifyRequest   ModifyRequest, 
  2292.                         modifyResponse  ModifyResponse, 
  2293.                         addRequest      AddRequest,     
  2294.                         addResponse     AddResponse,    
  2295.                         delRequest      DelRequest, 
  2296.                         delResponse     DelResponse,    
  2297.                         modDNRequest    ModifyDNRequest, 
  2298.                         modDNResponse   ModifyDNResponse, 
  2299.                         compareRequest  CompareRequest, 
  2300.                         compareResponse CompareResponse, 
  2301.                         abandonRequest  AbandonRequest,  
  2302.                         sessionRequest  SessionRequest,
  2303.                         sessionResponse SessionResponse,
  2304.                         extendedReq     ExtendedRequest,
  2305.                         extendedResp    ExtendedResponse } }
  2306.  
  2307.         MessageID ::= INTEGER (0 .. maxInt)
  2308.  
  2309.         maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) --
  2310.  
  2311.         LDAPString ::= OCTET STRING
  2312.  
  2313.         LDAPOID ::= OCTET STRING 
  2314.  
  2315.  
  2316. Wahl, Howes & Kille                                              [Page 38]
  2317.  
  2318. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2319.  
  2320.    
  2321.         LDAPDN ::= LDAPString
  2322.  
  2323.         RelativeLDAPDN ::= LDAPString
  2324.  
  2325.         AttributeType ::= LDAPString
  2326.  
  2327.         AttributeDescription ::= LDAPString
  2328.  
  2329.         AttributeDescriptionList ::= SEQUENCE OF 
  2330.                 AttributeDescription
  2331.     
  2332.  
  2333.         AttributeValue ::= OCTET STRING 
  2334.  
  2335.         AttributeValueAssertion ::= SEQUENCE {
  2336.                 attributeDesc   AttributeDescription,
  2337.                 assertionValue  AssertionValue }
  2338.  
  2339.         AssertionValue ::= OCTET STRING
  2340.  
  2341.         Attribute ::= SEQUENCE {
  2342.                 type    AttributeDescription,
  2343.                 vals    SET OF AttributeValue }
  2344.  
  2345.         MatchingRuleId ::= LDAPString
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377. Wahl, Howes & Kille                                              [Page 39]
  2378.  
  2379. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2380.  
  2381.  
  2382.         LDAPResult ::= SEQUENCE {
  2383.                 resultCode      ENUMERATED {
  2384.                              success                      (0),
  2385.                              operationsError              (1),
  2386.                              protocolError                (2),
  2387.                              timeLimitExceeded            (3),
  2388.                              sizeLimitExceeded            (4),
  2389.                              compareFalse                 (5),
  2390.                              compareTrue                  (6),
  2391.  
  2392.                              authMethodNotSupported       (7),
  2393.                              strongAuthRequired           (8),
  2394.                                         -- 9 reserved --
  2395.                              referral                     (10),  -- new
  2396.                              adminLimitExceeded           (11),  -- new
  2397.                              unavailableCriticalExtension (12),  -- new
  2398.                                         -- 13-15 unused --
  2399.                              noSuchAttribute              (16),
  2400.                              undefinedAttributeType       (17),
  2401.                              inappropriateMatching        (18),
  2402.                              constraintViolation          (19),
  2403.                              attributeOrValueExists       (20),
  2404.                              invalidAttributeSyntax       (21),
  2405.                                         -- 22-31 unused --
  2406.                              noSuchObject                 (32),
  2407.                              aliasProblem                 (33),
  2408.                              invalidDNSyntax              (34),
  2409.                              -- 35 reserved for undefined isLeaf --
  2410.                              aliasDereferencingProblem    (36),
  2411.                                         -- 37-47 unused --
  2412.                              inappropriateAuthentication  (48),
  2413.                              invalidCredentials           (49),
  2414.                              insufficientAccessRights     (50),
  2415.                              busy                         (51),
  2416.                              unavailable                  (52),
  2417.                              unwillingToPerform           (53),
  2418.                              loopDetect                   (54),
  2419.                                         -- 55-63 unused --
  2420.                              namingViolation              (64),
  2421.                              objectClassViolation         (65),
  2422.                              notAllowedOnNonLeaf          (66),
  2423.                              notAllowedOnRDN              (67),
  2424.                              entryAlreadyExists           (68),
  2425.                              objectClassModsProhibited    (69),
  2426.                              resultsTooLarge              (70), -- cl only
  2427.                              affectsMultipleDSAs          (71), -- new
  2428.                                         -- 72-79 unused --
  2429.                              other                        (80) },
  2430.                              -- 81-90 reserved for APIs --
  2431.                 matchedDN       LDAPDN,
  2432.                 errorMessage    LDAPString,
  2433.                 referral        [3] Referral OPTIONAL }
  2434.  
  2435.         Referral ::= SEQUENCE OF LDAPURL
  2436.  
  2437.  
  2438. Wahl, Howes & Kille                                              [Page 40]
  2439.  
  2440. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2441.  
  2442.  
  2443.         LDAPURL ::= LDAPString  -- limited to characters permitted in URLs
  2444.    
  2445.         BindRequest ::= [APPLICATION 0] SEQUENCE {
  2446.                 version                 INTEGER (1 .. 127),
  2447.                 name                    LDAPDN,
  2448.                 authentication          AuthenticationChoice }
  2449.  
  2450.         AuthenticationChoice ::= CHOICE {
  2451.                 simple                  [0] OCTET STRING,
  2452.                                          -- 1 and 2 reserved
  2453.                 sasl                    [3] SaslCredentials }
  2454.  
  2455.         SaslCredentials ::= SEQUENCE {
  2456.                 mechanism               LDAPString,
  2457.                 credentials             OCTET STRING }
  2458.  
  2459.         BindResponse ::= [APPLICATION 1] SEQUENCE {
  2460.              COMPONENTS OF LDAPResult,
  2461.              supportedVersion   [5] INTEGER (1..127) OPTIONAL,
  2462.              serverURL          [6] LDAPURL OPTIONAL,
  2463.              serverCreds        [7] AuthenticationChoice OPTIONAL }
  2464.                 
  2465.         UnbindRequest ::= [APPLICATION 2] NULL
  2466.  
  2467.         SessionRequest ::= [APPLICATION 17] Controls
  2468.  
  2469.         SessionResponse ::= [APPLICATION 18] SEQUENCE {
  2470.                 COMPONENTS OF LDAPResult,
  2471.                 unsupportedCtls         [12] SEQUENCE OF LDAPString }
  2472.  
  2473.         Controls ::= SEQUENCE OF SEQUENCE {
  2474.                 controlType             LDAPString,
  2475.                 criticality             BOOLEAN DEFAULT FALSE,
  2476.                 controlValue            OCTET STRING }
  2477.  
  2478.         SearchRequest ::= [APPLICATION 3] SEQUENCE {
  2479.                 baseObject      LDAPDN,
  2480.                 scope           ENUMERATED {
  2481.                         baseObject              (0),
  2482.                         singleLevel             (1),
  2483.                         wholeSubtree            (2) },
  2484.                 derefAliases    ENUMERATED {
  2485.                         neverDerefAliases       (0),
  2486.                         derefInSearching        (1),
  2487.                         derefFindingBaseObj     (2),
  2488.                         derefAlways             (3) },
  2489.                 sizeLimit       INTEGER (0 .. maxInt),
  2490.                 timeLimit       INTEGER (0 .. maxInt),
  2491.                 typesOnly       BOOLEAN,
  2492.                 filter          Filter,
  2493.                 attributes      AttributeDescriptionList,
  2494.                 pageSizeLimit   [0] INTEGER     OPTIONAL,
  2495.                 sortKeys        [1] SortKeyList OPTIONAL, 
  2496.                 prevSearchId    [2] MessageID   OPTIONAL,
  2497.                 startLocation   [3] INTEGER     OPTIONAL }
  2498.  
  2499. Wahl, Howes & Kille                                              [Page 41]
  2500.  
  2501. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2502.  
  2503.  
  2504.         SortKeyList ::= SEQUENCE OF SEQUENCE {
  2505.                 attributeType   AttributeType,
  2506.                 orderingRule    [0] MatchingRuleId OPTIONAL,
  2507.                 reverseOrder    [1] BOOLEAN DEFAULT FALSE }
  2508.  
  2509.         Filter ::= CHOICE {
  2510.                 and             [0] SET OF Filter,
  2511.                 or              [1] SET OF Filter,
  2512.                 not             [2] Filter,
  2513.                 equalityMatch   [3] AttributeValueAssertion,
  2514.                 substrings      [4] SubstringFilter,
  2515.                 greaterOrEqual  [5] AttributeValueAssertion,
  2516.                 lessOrEqual     [6] AttributeValueAssertion,
  2517.                 present         [7] AttributeType,
  2518.                 approxMatch     [8] AttributeValueAssertion,
  2519.                 extensibleMatch [9] MatchingRuleAssertion }     
  2520.  
  2521.         SubstringFilter ::= SEQUENCE {
  2522.                 type            AttributeDescription,
  2523.                 -- at least one must be present
  2524.                 substrings      SEQUENCE OF CHOICE { 
  2525.                         initial [0] LDAPString,
  2526.                         any     [1] LDAPString,
  2527.                         final   [2] LDAPString } }
  2528.  
  2529.         MatchingRuleAssertion ::= SEQUENCE {
  2530.                 matchingRule    [1] MatchingRuleId OPTIONAL,
  2531.                 type            [2] AttributeType OPTIONAL,
  2532.                 matchValue      [3] AssertionValue,
  2533.                 dnAttributes    [4] BOOLEAN DEFAULT FALSE }
  2534.  
  2535.         SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
  2536.                 objectName      LDAPDN,
  2537.                 attributes      PartialAttributeList }
  2538.  
  2539.         PartialAttributeList ::= SEQUENCE OF SEQUENCE { 
  2540.                 type    AttributeDescription,
  2541.                 vals    SET OF AttributeValue } 
  2542.         -- implementors should note that the PartialAttributeList may have
  2543.         -- zero elements (if none of the attributes of that entry were 
  2544.         -- requested, or could be returned), and that the vals set may also 
  2545.         -- have zero elements (if types only was requested, or all the values
  2546.         -- exceeded the attribute size limit or were excluded because of 
  2547.         -- access control).
  2548.  
  2549.         SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
  2550.         -- at least one LDAPURL element must be present
  2551.                
  2552.         SearchResultDone ::= [APPLICATION 5] SEQUENCE {
  2553.            COMPONENTS OF LDAPResult,
  2554.            totalCount [8] INTEGER OPTIONAL }
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560. Wahl, Howes & Kille                                              [Page 42]
  2561.  
  2562. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2563.  
  2564.  
  2565.         SearchResultFull ::= SEQUENCE OF CHOICE {
  2566.                         entry           SearchResultEntry,
  2567.                         reference       SearchResultReference,
  2568.                         resultCode      SearchResultDone }
  2569.  
  2570.         ModifyRequest ::= [APPLICATION 6] SEQUENCE {
  2571.                 object          LDAPDN,
  2572.                 modification    SEQUENCE OF SEQUENCE {
  2573.                         operation       ENUMERATED {
  2574.                                                 add     (0),
  2575.                                                 delete  (1),
  2576.                                                 replace (2) },
  2577.                         modification    AttributeTypeAndValues } }
  2578.  
  2579.         AttributeTypeAndValues ::= SEQUENCE {
  2580.                 type    AttributeDescription,
  2581.                 vals    SET OF AttributeValue }
  2582.  
  2583.         ModifyResponse ::= [APPLICATION 7] LDAPResult
  2584.  
  2585.         AddRequest ::= [APPLICATION 8] SEQUENCE {
  2586.                 entry           LDAPDN,
  2587.                 attributes      AttributeList }
  2588.  
  2589.         AttributeList ::= SEQUENCE OF SEQUENCE {
  2590.                 type    AttributeDescription,
  2591.                 vals    SET OF AttributeValue }    
  2592.  
  2593.         AddResponse ::= [APPLICATION 9] LDAPResult
  2594.  
  2595.         DelRequest ::= [APPLICATION 10] LDAPDN
  2596.  
  2597.         DelResponse ::= [APPLICATION 11] LDAPResult
  2598.  
  2599.         ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {
  2600.                 entry           LDAPDN,
  2601.                 newrdn          RelativeLDAPDN,
  2602.                 deleteoldrdn    BOOLEAN,
  2603.                 newSuperior     [0] LDAPDN OPTIONAL }
  2604.                
  2605.         ModifyDNResponse ::= [APPLICATION 13] LDAPResult
  2606.  
  2607.         CompareRequest ::= [APPLICATION 14] SEQUENCE {
  2608.                 entry           LDAPDN,
  2609.                 ava             AttributeValueAssertion }
  2610.  
  2611.         CompareResponse ::= [APPLICATION 15] SEQUENCE {
  2612.            COMPONENTS OF LDAPResult,
  2613.            matchedSubtype [9] AttributeDescription OPTIONAL }
  2614.  
  2615.         AbandonRequest ::= [APPLICATION 16] MessageID
  2616.  
  2617.         ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
  2618.                 requestName      [0] LDAPOID,
  2619.                 requestValue     [1] OCTET STRING }
  2620.  
  2621. Wahl, Howes & Kille                                              [Page 43]
  2622.  
  2623. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2624.  
  2625.  
  2626.         ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
  2627.                 COMPONENTS OF LDAPResult,
  2628.                 responseName     [10] LDAPOID OPTIONAL,
  2629.                 response         [11] OCTET STRING OPTIONAL }
  2630.     
  2631.         -- not part of LDAP core protocol, see Appendix B --
  2632.  
  2633.         ProtectedPassword ::= SEQUENCE {
  2634.                 time1                   [0] UTCTime OPTIONAL,
  2635.                 time2                   [1] UTCTime OPTIONAL,
  2636.                 random1                 [2] BIT STRING OPTIONAL,
  2637.                 random2                 [3] BIT STRING OPTIONAL,
  2638.                 algorithmIdentifier     [4] LDAPOID,
  2639.                 encipheredPassword      [5] BIT STRING }
  2640.  
  2641.         StrongCredentials ::= SEQUENCE {
  2642.                 certification-path      [0] AF.CertificationPath OPTIONAL,
  2643.                 bind-token              [1] DAS.Token }
  2644.  
  2645.         END
  2646.  
  2647. Appendix B - X.500 Authentication Mechanisms
  2648.  
  2649.    This Appendix defines two SASL authentication mechanisms which may
  2650.    be used with LDAP.  These mechanisms are only for authentication, they
  2651.    have no effect on the protocol encodings and are not designed to 
  2652.    provide integrity or confidentiality services.
  2653.  
  2654.    If an implementation supports these elements, then the following 
  2655.    additional encoding restrictions apply to these elements:
  2656.  
  2657.    - BIT STRING values are to be encoded in primitive form only. Unused bits 
  2658.      in the final octet of the encoding of a BIT STRING value, if there are 
  2659.      any, should always be set to zero.
  2660.  
  2661.    - UTC Times must be encoded with the "Z" suffix, not as a local time. 
  2662.         
  2663.    The client may include one of these mechanisms and its credential in the 
  2664.    BindRequest. The server will return a BindResponse of either:
  2665.     - success, and the serverCreds field absent, implying that the server
  2666.       successfully authenticated the client but is not returning any 
  2667.       authentication information about the server,
  2668.     - success, and the serverCreds field present, with the same mechanism
  2669.       as that requested by the client, and the credentials of the server 
  2670.       itself,
  2671.     - any of the resultCodes listen in 4.2.3, with the serverCreds field 
  2672.       absent, indicating that the server did not successfully authenticate
  2673.       the client or another problem occurred.
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682. Wahl, Howes & Kille                                              [Page 44]
  2683.  
  2684. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2685.  
  2686.  
  2687.  
  2688. B.1. X.511-Protected
  2689.  
  2690.    The "X.511-Protected" authentication mechanism allows a hash of the 
  2691.    password, combined optionally with the current time and random 
  2692.    numbers, to be sent to or returned from the server.  The protected field 
  2693.    contains the hash value.  This prevents a password from being carried in 
  2694.    the clear.
  2695.  
  2696.    The mechanism field is set to the string "X.511-Protected", and the 
  2697.    credentials field contain the DER encoding of a value of the following 
  2698.    ASN.1 type:
  2699.  
  2700.         ProtectedPassword ::= SEQUENCE {
  2701.                 time1                   [0] UTCTime OPTIONAL,
  2702.                 time2                   [1] UTCTime OPTIONAL,
  2703.                 random1                 [2] BIT STRING OPTIONAL,
  2704.                 random2                 [3] BIT STRING OPTIONAL,
  2705.                 algorithmIdentifier     [4] LDAPOID,
  2706.                 encipheredPassword      [5] BIT STRING }
  2707.  
  2708.    The use of the time1, time2, random1, random2 and encryptedPassword fields 
  2709.    are as defined in ITU-T Rec. X.509 [12] and the functional profile for X.500
  2710.    for the environment in which this authentication mechanism is to be used.
  2711.  
  2712.    The name field of the BindRequest must be a nonempty string when this
  2713.    mechanism is being used to authenticate the client.  Note that this 
  2714.    security mechanism is not intended to protect against attackers 
  2715.    modifying the bind name field or other protocol elements.
  2716.  
  2717. B.2. X.511-Strong
  2718.  
  2719.    Strong authentication to the directory can be accomplished using the 
  2720.    "X.511-Strong".
  2721.  
  2722.    The mechanism field is set to the string "X.511-Strong", and the 
  2723.    credentials field set to a DER-encoding of a value of the following 
  2724.    ASN.1 type: 
  2725.  
  2726.         StrongCredentials ::= SEQUENCE {
  2727.                 certification-path      [0] AF.CertificationPath OPTIONAL,
  2728.                 bind-token              [1] DAS.Token }
  2729.  
  2730.    The ASN.1 type "CertificationPath" is defined in [12], and the ASN.1 
  2731.    type "Token" is defined in [13].  
  2732.  
  2733.    When the credentials are being used to authenticate the client, it is 
  2734.    recommended that the certification-path field be present, which will
  2735.    contain minimally the client's certificate. If the certification-path 
  2736.    field is supplied, then the name field of the BindRequest must be an 
  2737.    empty string, and the server will obtain the name of the client from 
  2738.    the subject field of the certification-path userCertificate.
  2739.  
  2740.  
  2741.  
  2742.  
  2743. Wahl, Howes & Kille                                              [Page 45]
  2744.  
  2745. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2746.  
  2747.  
  2748.  
  2749.    It is recommended for interoperability that if the server's or client's 
  2750.    certificates contain RSA public keys, the PKCS md5WithRSAEncryption 
  2751.    (1.2.840.113549.1.1.4) algorithm should be used.
  2752.  
  2753. Table of Contents 
  2754.  
  2755.    1.  Status of this Memo ....................................  1
  2756.    2.  Abstract ...............................................  1
  2757.    3.  Models .................................................  2
  2758.    3.1. Protocol Model ........................................  2
  2759.    3.2. Data Model ............................................  3
  2760.    3.2.1 Attributes of Entries ................................  3
  2761.    3.2.2 Subschema Subentry ...................................  4
  2762.    3.3. Relationship to X.500 .................................  5
  2763.    3.4. Server-specific Data Requirements .....................  5
  2764.    4.  Elements of Protocol ...................................  6
  2765.    4.1. Common Elements .......................................  6
  2766.    4.1.1. Message Envelope ....................................  6
  2767.    4.1.2. String Types ........................................  8
  2768.    4.1.3. Distinguished Name and Relative Distinguished Name ..  8
  2769.    4.1.4. Attribute Type and Description ......................  9
  2770.    4.1.5. Attribute Value ..................................... 10
  2771.    4.1.6. Attribute Value Assertion ........................... 11
  2772.    4.1.7. Attribute ........................................... 11
  2773.    4.1.8. Matching Rule Identifier ............................ 11
  2774.    4.1.9. Result Message ...................................... 11
  2775.    4.1.10. Referral ........................................... 13
  2776.    4.2.  Bind Operation ....................................... 14
  2777.    4.2.1. Sequencing of the Bind Request ...................... 15
  2778.    4.2.2 Authentication and Other Security Services ........... 15
  2779.    4.2.3. Bind Response ....................................... 16
  2780.    4.3.  Unbind Operation ..................................... 17
  2781.    4.4.  Session Control Operation ............................ 17
  2782.    4.5.  Search Operation ..................................... 20
  2783.    4.5.1. Search Request ...................................... 20
  2784.    4.5.2. Search Result ....................................... 24
  2785.    4.5.3. Continuation References in the Search Result ........ 26
  2786.    4.5.3.1. Example ........................................... 27
  2787.    4.6.  Modify Operation ..................................... 28
  2788.    4.7.  Add Operation ........................................ 30
  2789.    4.8.  Delete Operation ..................................... 30
  2790.    4.9.  Modify DN Operation .................................. 31
  2791.    4.10.  Compare Operation ................................... 32
  2792.    4.11.  Abandon Operation ................................... 32
  2793.    4.12.  Extended Operation .................................. 33
  2794.    5.  Protocol Element Encodings and Transfer ................ 33
  2795.    5.1.  Mapping Onto BER-based Transport Services ............ 34
  2796.    5.1.1.  Transmission Control Protocol (TCP) ................ 34
  2797.    5.1.2.  Connection Oriented Transport Service (COTS) ....... 34
  2798.    5.1.3.  User Datagram Protocol (UDP) ....................... 34
  2799.    5.1.4.  Secure Socket Layer over TCP (SSL) ................. 35
  2800.    6.  Implementation Guidelines .............................. 35
  2801.    6.1.  Server Implementations ............................... 35
  2802.  
  2803. Wahl, Howes & Kille                                              [Page 46]
  2804.  
  2805. INTERNET-DRAFT  Lightweight Directory Access Protocol (v3)   October 1996
  2806.  
  2807.    6.2.  Client Implementations ............................... 35
  2808.    6.2.1. CLDAP Retry ......................................... 35
  2809.    6.2.2. Loop Detection ...................................... 35
  2810.    7.  Security Considerations ................................ 35
  2811.    8.  Acknowledgements ....................................... 36
  2812.    9.  Bibliography ........................................... 36
  2813.    10.  Authors' Address ...................................... 37
  2814.    Appendix A - Complete ASN.1 Definition ..................... 38
  2815.    Appendix B - X.500 Authentication Mechanisms ............... 44
  2816.    B.1. X.511-Protected ....................................... 45
  2817.    B.2. X.511-Strong .......................................... 45
  2818.  
  2819.  
  2820. <draft-ietf-asid-ldapv3-protocol-03.txt> Expires: April 5, 1997 [Page 47]
  2821.