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