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