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-08.txt < prev    next >
Text File  |  1997-10-20  |  111KB  |  2,581 lines

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