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-acap-spec-04.txt < prev    next >
Text File  |  1997-06-24  |  155KB  |  4,038 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          C. Newman
  8. Internet Draft: ACAP                                            Innosoft
  9. Document: draft-ietf-acap-spec-04.txt                        J. G. Myers
  10.                                                                 Netscape
  11.                                                                June 1997
  12.                                                    Expires in six months
  13.  
  14.  
  15.            ACAP -- Application Configuration Access Protocol
  16.  
  17.  
  18. 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,
  22.    and its working groups.  Note that other groups may also distribute
  23.    working 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
  28.    material or to cite them other than as "work in progress."
  29.  
  30.    To view the entire list of current Internet-Drafts, please check the
  31.    "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  32.    Directories on ftp.is.co.za (Africa), ftp.nordu.net (Europe),
  33.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  34.    ftp.isi.edu (US West Coast).
  35.  
  36. Abstract
  37.  
  38.    The Application Configuration Access Protocol (ACAP) is designed to
  39.    support remote storage and access of program option, configuration
  40.    and preference information.  The data store model is designed to
  41.    allow a client relatively simple access to interesting data, to allow
  42.    new information to be easily added without server re-configuration,
  43.    and to promote the use of both standardized data and custom or
  44.    proprietary data.  Key features include "inheritance" which can be
  45.    used to manage default values for configuration settings and access
  46.    control lists which allow interesting personal information to be
  47.    shared and group information to be restricted.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Newman                                                          [Page i]
  59.  
  60. Internet DRAFT                    ACAP                     June 19, 1997
  61.  
  62.  
  63.  
  64.  
  65.  
  66.                            Table of Contents
  67.  
  68.  
  69.  
  70. Status of this Memo ...............................................    i
  71. Abstract ..........................................................    i
  72. ACAP Protocol Specification .......................................    1
  73. 0.       Changes from version -03 to version -04 ..................    1
  74. 0.1.     Open Issues ..............................................    3
  75. 1.       Introduction .............................................    3
  76. 1.1.     Conventions Used in this Document ........................    3
  77. 1.2.     ACAP Data Model ..........................................    3
  78. 1.3.     ACAP Design Goals ........................................    3
  79. 1.4.     Validation ...............................................    4
  80. 1.5.     Definitions ..............................................    4
  81. 1.6.     ACAP Command Overview ....................................    6
  82. 2.       Protocol Framework .......................................    6
  83. 2.1.     Link Level ...............................................    6
  84. 2.2.     Commands and Responses ...................................    6
  85. 2.2.1.   Client Protocol Sender and Server Protocol Receiver ......    6
  86. 2.2.2.   Server Protocol Sender and Client Protocol Receiver ......    7
  87. 2.3.     Server States ............................................    8
  88. 2.3.1.   Non-Authenticated State ..................................    8
  89. 2.3.2.   Authenticated State ......................................    8
  90. 2.3.3.   Logout State .............................................    8
  91. 2.4.     Operational Considerations ...............................    9
  92. 2.4.1.   Untagged Status Updates ..................................    9
  93. 2.4.2.   Response when No Command in Progress .....................    9
  94. 2.4.3.   Auto-logout Timer ........................................    9
  95. 2.4.4.   Multiple Commands in Progress ............................   10
  96. 2.5.     Server Command Continuation Request ......................   10
  97. 2.6.     Data Formats .............................................   10
  98. 2.6.1.   Atom .....................................................   11
  99. 2.6.2.   Number ...................................................   11
  100. 2.6.3.   String ...................................................   11
  101. 2.6.3.1. 8-bit and Binary Strings .................................   12
  102. 2.6.4.   Parenthesized List .......................................   12
  103. 2.6.5.   NIL ......................................................   12
  104. 3.       Protocol Elements ........................................   12
  105. 3.1.     Entries and Attributes ...................................   12
  106. 3.1.1.   Predefined Attributes ....................................   13
  107. 3.1.2.   Attribute metadata .......................................   14
  108. 3.2.     ACAP URL scheme ..........................................   15
  109. 3.2.1.   ACAP URL User Name and Authentication Mechanism ..........   15
  110. 3.2.2.   Relative ACAP URLs .......................................   16
  111.  
  112.  
  113.  
  114. Newman                                                         [Page ii]
  115.  
  116. Internet DRAFT                    ACAP                     June 19, 1997
  117.  
  118.  
  119. 3.3.     Contexts .................................................   16
  120. 3.4.     Comparators ..............................................   17
  121. 3.5.     Access Control Lists (ACLs) ..............................   18
  122. 3.6.     Server Response Codes ....................................   20
  123. 4.       Namespace Conventions ....................................   22
  124. 4.1.     Dataset Namespace ........................................   22
  125. 4.2.     Attribute Namespace ......................................   23
  126. 4.3.     Formal Syntax for Dataset and Attribute Namespace ........   23
  127. 5.       Dataset Management .......................................   25
  128. 5.1.     Dataset Inheritance ......................................   25
  129. 5.2.     Dataset Attributes .......................................   25
  130. 5.3.     Dataset Creation .........................................   26
  131. 5.4.     Dataset Class Capabilities ...............................   26
  132. 5.5.     Dataset Quotas ...........................................   27
  133. 6.       Command and Response Specifications ......................   28
  134. 6.1.     Initial Connection .......................................   29
  135. 6.1.1.   ACAP Untagged Response ...................................   29
  136. 6.2.     Any State ................................................   30
  137. 6.2.1.   NOOP Command .............................................   30
  138. 6.2.2.   LANG Command .............................................   30
  139. 6.2.3.   LANG Untagged Response ...................................   31
  140. 6.2.4.   LOGOUT Command ...........................................   31
  141. 6.2.5.   OK Response ..............................................   31
  142. 6.2.6.   NO Response ..............................................   32
  143. 6.2.7.   BAD Response .............................................   32
  144. 6.2.8.   BYE Untagged Response ....................................   33
  145. 6.2.9.   ALERT Untagged Response ..................................   33
  146. 6.3.     Non-Authenticated State ..................................   33
  147. 6.3.1.   AUTHENTICATE Command .....................................   34
  148. 6.4.     Searching ................................................   35
  149. 6.4.1.   SEARCH Command ...........................................   35
  150. 6.4.2.   ENTRY Intermediate Response ..............................   40
  151. 6.4.3.   MODTIME Intermediate Response ............................   40
  152. 6.4.4.   REFER Intermediate Response ..............................   40
  153. 6.5.     Contexts .................................................   41
  154. 6.5.1.   FREECONTEXT Command ......................................   41
  155. 6.5.2.   UPDATECONTEXT Command ....................................   41
  156. 6.5.3.   ADDTO Untagged Response ..................................   42
  157. 6.5.4.   REMOVEFROM Untagged Response .............................   42
  158. 6.5.5.   CHANGE Untagged Response .................................   43
  159. 6.5.6.   MODTIME Untagged Response ................................   43
  160. 6.6.     Dataset modification .....................................   44
  161. 6.6.1.   STORE Command ............................................   44
  162. 6.6.2.   DELETEDSINCE Command .....................................   45
  163. 6.6.3.   DELETED Intermediate Response ............................   46
  164. 6.7.     Access Control List Commands .............................   46
  165. 6.7.1.   SETACL Command ...........................................   46
  166. 6.7.2.   DELETEACL Command ........................................   47
  167.  
  168.  
  169.  
  170. Newman                                                        [Page iii]
  171.  
  172. Internet DRAFT                    ACAP                     June 19, 1997
  173.  
  174.  
  175. 6.7.3.   MYRIGHTS Command .........................................   47
  176. 6.7.4.   MYRIGHTS Intermediate Response ...........................   48
  177. 6.7.5.   LISTRIGHTS Command .......................................   48
  178. 6.7.6.   LISTRIGHTS Intermediate Response .........................   49
  179. 6.8.     Quotas ...................................................   49
  180. 6.8.1.   GETQUOTA Command .........................................   49
  181. 6.8.3.   QUOTA Untagged Response ..................................   50
  182. 6.9.     Extensions ...............................................   50
  183. 7.       Registration Procedures ..................................   50
  184. 7.1.     Comparators ..............................................   51
  185. 7.2.     ACAP Capabilities ........................................   51
  186. 7.3.     ACAP Response Codes ......................................   52
  187. 7.4.     Dataset Classes ..........................................   52
  188. 7.5.     Vendor Subtree ...........................................   53
  189. 8.       Formal Syntax ............................................   53
  190. 9.       Multi-lingual Considerations .............................   63
  191. 10.      Security Considerations ..................................   64
  192. 11.      Acknowledgments ..........................................   64
  193. 12.      Authors' Addresses .......................................   64
  194. Appendices ........................................................   65
  195. A.       References ...............................................   65
  196. B.       ACAP Keyword Index .......................................   67
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Newman                                                         [Page iv]
  227.  
  228. Internet DRAFT                    ACAP                     June 19, 1997
  229.  
  230.  
  231. ACAP Protocol Specification
  232.  
  233.  
  234. 0.       Changes from version -03 to version -04
  235.  
  236.    1) Changed ABNF reference to use new ABNF spec, added UTF-8 syntax
  237.    and got rid of all <description> stuff in grammar.
  238.  
  239.    2) Added length limit of 32 on tags.
  240.  
  241.    3) Renamed "ordering function" to "comparator"
  242.  
  243.    4) Put "" around comparator, made "+" / "-" optional.
  244.  
  245.    5) Added SUBSTRING and PREFIX search keys.
  246.  
  247.    6) Added multi-valued attributes.
  248.  
  249.    7) Restricted numbers to 32-bit values.
  250.  
  251.    8) Added description of data model and design goals.
  252.  
  253.    9) Permit multiple referrals.
  254.  
  255.    10) Simplified ACAP URL.
  256.  
  257.    11) Noted that UNCHANGEDSINCE with a time of "00000101000000" will
  258.    always fail if the entry exists.
  259.  
  260.    12) Used "base dataset" rather than "inherited dataset"
  261.  
  262.    13) Fixed ABNF to group results for each RETURN item.
  263.  
  264.    14) Forbid use of "*" or "%" in attribute name.
  265.  
  266.    15) Added TRYCACHE response code.
  267.  
  268.    16) Clarified that any two STORE operations must result in different
  269.    modtimes, even if simultaneous.
  270.  
  271.    17) Added recommendation that all servers support the PLAIN SASL
  272.    mechanism and SHOULD support an encryption layer or stronger
  273.    standards track SASL mechanism.
  274.  
  275.    18) Added a bunch of text to security considerations section after
  276.    being warned that the IESG is becoming much more stringent about
  277.    security considerations.  Comments would be appreciated.
  278.  
  279.  
  280.  
  281.  
  282. Newman                                                          [Page 1]
  283.  
  284. Internet DRAFT                    ACAP                     June 19, 1997
  285.  
  286.  
  287.    19) Noted that change responses are not issued for implicit
  288.    renumbering.
  289.  
  290.    20) Removed ".bin" attribute naming convention.
  291.  
  292.    21) Removed partial fetch attribute.
  293.  
  294.    22) Removed "o" ACL bit.
  295.  
  296.    23) Added acl-object argument to PERMISSION error.
  297.  
  298.    24) Atoms must begin with a letter to distinguish them from numbers.
  299.    Added that atoms are used for protocol keywords.
  300.  
  301.    25) Make ALERT a separate untagged response
  302.  
  303.    26) Change NOTIFYCONTEXT to MAKECONTEXT [ENUMERATE] [NOTIFY]
  304.  
  305.    27) Added Multi-lingual considerations section
  306.  
  307.    28) Updated STORE grammar to deal with multiple writable metadata
  308.    items and multi-valued attributes.
  309.  
  310.    29) make metadata item names be quoted strings
  311.  
  312.    30) Fixed LISTRIGHTS, SETACL examples.
  313.  
  314.    31) Added dataset creation section, dataset capabilities section.
  315.  
  316.    32) Added NOINHERIT SEARCH modifier.
  317.  
  318.    33) Added NOEXIST response code and NOCREATE store modifier.
  319.  
  320.    34) Added LANG command.
  321.  
  322.    35) Added user specific and site specific attribute namespaces.
  323.  
  324.    36) Removed SETQUOTA command, added description of /quota dataset
  325.    class.  SETQUOTA was broken because it didn't fall under the auspices
  326.    of ACAP's ACL system.
  327.  
  328.    37) Allow servers to implement schemes to defeat client polling with
  329.    UPDATECONTEXT.
  330.  
  331.    38) Forbid duplicate search modifiers, store modifiers, store
  332.    entries, store entry attributes, store attribute metadata.
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Newman                                                          [Page 2]
  339.  
  340. Internet DRAFT                    ACAP                     June 19, 1997
  341.  
  342.  
  343. 0.1.     Open Issues
  344.  
  345.    1) Consider making ACL model more precise.  Would like to pick AFS
  346.    semantics over POSIX semantics since AFS semantics are more
  347.    intuitive.  Currently both ACL semantics are permitted.
  348.  
  349.    2) Need more examples.
  350.  
  351.    3) Descriptive comparator naming, including vendor naming.
  352.  
  353. 1.       Introduction
  354.  
  355. 1.1.     Conventions Used in this Document
  356.  
  357.    In examples, "C:" and "S:" indicate lines sent by the client and
  358.    server respectively.  If such lines are wrapped without a new "C:" or
  359.    "S:" label, then the wrapping is for editorial clarity and is not
  360.    part of the command.
  361.  
  362.    The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD NOT",
  363.    and "MAY" in this document are to be interpreted as described in "Key
  364.    words for use in RFCs to Indicate Requirement Levels" [KEYWORDS].
  365.  
  366. 1.2.     ACAP Data Model
  367.  
  368.    An ACAP server exports a hierarchical tree of entries.  Each level of
  369.    the tree is called a dataset, and each dataset is made up of a list
  370.    of entries.  Each entry has a unique name and may contain any number
  371.    of named attributes.  Each attribute within an entry may be single
  372.    valued or multi-valued and may have associated metadata to assist
  373.    access and interpretation of the value.
  374.  
  375.    The rules with which a client interprets the data within a portion of
  376.    ACAP's tree of entries are called a dataset class.
  377.  
  378. 1.3.     ACAP Design Goals
  379.  
  380.    ACAP's primary purpose is to allow users access to their
  381.    configuration data from multiple network-connected computers.  Users
  382.    can then sit down in front of any network-connected computer, run any
  383.    ACAP-enabled application and have access to their own configuration
  384.    data.  Because it is hoped that many applications will become ACAP-
  385.    enabled, client simplicity was preferred to server or protocol
  386.    simplicity whenever reasonable.
  387.  
  388.    ACAP is designed to be easily manageable.  For this reason, it
  389.    includes "inheritance" which allows one dataset to inherit default
  390.    attributes from another dataset.  In addition, access control lists
  391.  
  392.  
  393.  
  394. Newman                                                          [Page 3]
  395.  
  396. Internet DRAFT                    ACAP                     June 19, 1997
  397.  
  398.  
  399.    are included to permit delegation of management and quotas are
  400.    included to prevent storage abuse.  Finally, an ACAP server which is
  401.    conformant to this base specification should be able to support most
  402.    dataset classes defined in the future without requiring a server
  403.    reconfiguration or upgrade.
  404.  
  405.    ACAP is designed to operate well with a client that only has
  406.    intermittent access to an ACAP server.  For this reason, each entry
  407.    has a server maintained modification time so that the client may
  408.    detect changes.  In addition, the client may ask the server for a
  409.    list of entries which have been removed since it last accessed the
  410.    server.
  411.  
  412.    ACAP presumes that a dataset may be potentially large and/or the
  413.    client's network connection may be slow, and thus offers server
  414.    sorting, selective fetching and change notification for entries
  415.    within a dataset.
  416.  
  417.    As required for most Internet protocols, security, scalability and
  418.    internationalization were important design goals.
  419.  
  420.    Given these design goals, an attempt was made to keep ACAP as simple
  421.    as possible.  It is a traditional Internet text based protocol which
  422.    massively simplifies protocol debugging.  It was designed based on
  423.    the successful IMAP [IMAP4] protocol framework, with a few minor
  424.    simplifications.
  425.  
  426. 1.4.     Validation
  427.  
  428.    By default, any value may be stored in any attribute for which the
  429.    user has appropriate permission and quota.  This rule is necessary to
  430.    allow the addition of new simple dataset classes without
  431.    reconfiguring or upgrading the server.
  432.  
  433.    In some cases, such as when the value has special meaning to the
  434.    server, it is useful to have the server enforce validation by
  435.    returning the INVALID response code to a STORE command. These cases
  436.    MUST be explicitly identified in the dataset class specification
  437.    which SHOULD include specific fixed rules for validation.  Since a
  438.    given ACAP server may be unaware of any particular dataset class
  439.    specification, clients MUST NOT depend on the presence of enforced
  440.    validation on the server.
  441.  
  442. 1.5.     Definitions
  443.  
  444.  
  445.    access control list (ACL)
  446.         A set of identifier, rights pairs associated with an object.  An
  447.  
  448.  
  449.  
  450. Newman                                                          [Page 4]
  451.  
  452. Internet DRAFT                    ACAP                     June 19, 1997
  453.  
  454.  
  455.         ACL is used to determine which operations a user is permitted to
  456.         perform on that object.  See section ###.
  457.  
  458.    attribute
  459.         A named value within an entry.  See section ###.
  460.  
  461.    comparator
  462.         A named function which can be used to perform one or more of
  463.         three comparison operations: ordering, equality and substring
  464.         matching.  See section ###.
  465.  
  466.    context
  467.         An ordered subset of entries in a dataset, created by a SEARCH
  468.         command with a MAKECONTEXT modifier.  See section ###.
  469.  
  470.    dataset
  471.         One level of hierarchy in ACAP's tree of entries.  See section
  472.         ###.
  473.  
  474.    dataset class specification
  475.         The rules which allow a client to interpret the data within a
  476.         portion of ACAP's tree of entries.
  477.  
  478.    entry
  479.         A set of attributes with a unique entry name.  See section ###.
  480.  
  481.    metadata
  482.         Information describing an attribute, its value and any access
  483.         controls associated with that attribute.  See section ###.
  484.  
  485.    NIL  This represents the non-existence of a particular data item.
  486.  
  487.    NUL  A control character encoded as 0 in US-ASCII [US-ASCII].
  488.  
  489.    octet
  490.         An 8-bit value.  On most modern computer systems, an octet is
  491.         one byte.
  492.  
  493.    SASL Simple Authentication and Security Layer [SASL].
  494.  
  495.    UTC  Universal Coordinated Time as maintained by the Bureau
  496.         International des Poids et Mesures (BIPM).
  497.  
  498.    UTF-8
  499.         An 8-bit transformation format of the Universal Character Set
  500.         [UTF8].  Note that an incompatible change was made to the coded
  501.         character set referenced by [UTF8], so for the purpose of this
  502.         document, UTF-8 refers to the UTF-8 encoding as defined by
  503.  
  504.  
  505.  
  506. Newman                                                          [Page 5]
  507.  
  508. Internet DRAFT                    ACAP                     June 19, 1997
  509.  
  510.  
  511.         version 2.0 of Unicode [UNICODE-2], or ISO 10646 [ISO-10646]
  512.         including amendments one through seven.
  513.  
  514.  
  515. 1.6.     ACAP Command Overview
  516.  
  517.    The AUTHENTICATE, NOOP, LANG and LOGOUT commands provide basic
  518.    protocol services.  The SEARCH command is used to select, sort, fetch
  519.    and monitor changes to attribute values and metadata.  The
  520.    UPDATECONTEXT and FREECONTEXT commands are also used to assist in
  521.    monitoring changes in attribute values and metadata.  The STORE
  522.    command is used to add, modify and delete entries and attributes.
  523.    The DELETEDSINCE command is used to assist a client in
  524.    re-synchronizing a cache with the server.  The GETQUOTA, SETACL,
  525.    DELETEACL, LISTRIGHTS and MYRIGHTS commands are used to examine
  526.    storage quotas and examine or modify access permissions.
  527.  
  528. 2.       Protocol Framework
  529.  
  530. 2.1.     Link Level
  531.  
  532.    The ACAP protocol assumes a reliable data stream such as provided by
  533.    TCP.  When TCP is used, an ACAP server listens on port 674.
  534.  
  535. 2.2.     Commands and Responses
  536.  
  537.    An ACAP session consists of the establishment of a client/server
  538.    connection, an initial greeting from the server, and client/server
  539.    interactions.  These client/server interactions consist of a client
  540.    command, server data, and a server completion result.
  541.  
  542.    All interactions transmitted by client and server are in the form of
  543.    lines; that is, strings that end with a CRLF.  The protocol receiver
  544.    of an ACAP client or server is either reading a line, or is reading a
  545.    sequence of octets with a known count followed by a line.  Both
  546.    clients and servers must be capable of handling lines of arbitrary
  547.    length.
  548.  
  549. 2.2.1.   Client Protocol Sender and Server Protocol Receiver
  550.  
  551.    The client command begins an operation.  Each client command is
  552.    prefixed with a identifier (an alphanumeric string of no more than 32
  553.    characters, e.g., A0001, A0002, etc.) called a "tag".  A different
  554.    tag is generated by the client for each command.
  555.  
  556.    There are two cases in which a line from the client does not
  557.    represent a complete command.  In one case, a command argument is
  558.    quoted with an octet count (see the description of literal in section
  559.  
  560.  
  561.  
  562. Newman                                                          [Page 6]
  563.  
  564. Internet DRAFT                    ACAP                     June 19, 1997
  565.  
  566.  
  567.    ###); in the other case, the command arguments require server
  568.    feedback (see the AUTHENTICATE command).  In some of these cases, the
  569.    server sends a command continuation request if it is ready for the
  570.    next part of the command.  This response is prefixed with the token
  571.    "+".
  572.  
  573.         Note: If, instead, the server detected an error in the
  574.         command, it sends a BAD completion response with tag
  575.         matching the command (as described below) to reject the
  576.         command and prevent the client from sending any more of the
  577.         command.
  578.  
  579.         It is also possible for the server to send a completion or
  580.         intermediate response for some other command (if multiple
  581.         commands are in progress), or untagged data.  In either
  582.         case, the command continuation request is still pending;
  583.         the client takes the appropriate action for the response,
  584.         and reads another response from the server.
  585.  
  586.    The ACAP server reads a command line from the client, parses the
  587.    command and its arguments, and transmits server data and a server
  588.    command completion result.
  589.  
  590. 2.2.2.   Server Protocol Sender and Client Protocol Receiver
  591.  
  592.    Data transmitted by the server to the client come in four forms:
  593.    command continuation requests, command completion results,
  594.    intermediate responses, and untagged responses.
  595.  
  596.    A command continuation request is prefixed with the token "+".
  597.  
  598.    A command completion result indicates the success or failure of the
  599.    operation.  It is tagged with the same tag as the client command
  600.    which began the operation.  Thus, if more than one command is in
  601.    progress, the tag in a server completion response identifies the
  602.    command to which the response applies.  There are three possible
  603.    server completion responses: OK (indicating success), NO (indicating
  604.    failure), or BAD (indicating protocol error such as unrecognized
  605.    command or command syntax error).
  606.  
  607.    An intermediate response returns data which can only be interpreted
  608.    within the context of a command in progress.  It is tagged with the
  609.    same tag as the client command which began the operation.  Thus, if
  610.    more than one command is in progress, the tag in an intermediate
  611.    response identifies the command to which the response applies.  A
  612.    tagged response other than "OK", "NO", or "BAD" is an intermediate
  613.    response.
  614.  
  615.  
  616.  
  617.  
  618. Newman                                                          [Page 7]
  619.  
  620. Internet DRAFT                    ACAP                     June 19, 1997
  621.  
  622.  
  623.    An untagged response returns data or status messages which may be
  624.    interpreted outside the context of a command in progress.  It is
  625.    prefixed with the token "*".  Untagged data may be sent as a result
  626.    of a client command, or may be sent unilaterally by the server.
  627.    There is no syntactic difference between untagged data that resulted
  628.    from a specific command and untagged data that were sent
  629.    unilaterally.
  630.  
  631.    The protocol receiver of an ACAP client reads a response line from
  632.    the server.  It then takes action on the response based upon the
  633.    first token of the response, which may be a tag, a "*", or a "+" as
  634.    described above.
  635.  
  636.    A client MUST be prepared to accept any server response at all times.
  637.    This includes untagged data that it may not have requested.
  638.  
  639.    This topic is discussed in greater detail in the Server Responses
  640.    section.
  641.  
  642. 2.3.     Server States
  643.  
  644.    An ACAP server is in one of three states.  Most commands are valid in
  645.    only certain states.  It is a protocol error for the client to
  646.    attempt a command while the server is in an inappropriate state for
  647.    that command.  In this case, a server will respond with a BAD command
  648.    completion result.
  649.  
  650. 2.3.1.   Non-Authenticated State
  651.  
  652.    In non-authenticated state, the user must supply authentication
  653.    credentials before most commands will be permitted.  This state is
  654.    entered when a connection starts.
  655.  
  656. 2.3.2.   Authenticated State
  657.  
  658.    In authenticated state, the user is authenticated and most commands
  659.    will be permitted.  This state is entered when acceptable
  660.    authentication credentials have been provided.
  661.  
  662. 2.3.3.   Logout State
  663.  
  664.    In logout state, the session is being terminated, and the server will
  665.    close the connection.  This state can be entered as a result of a
  666.    client request or by unilateral server decision.
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Newman                                                          [Page 8]
  675.  
  676. Internet DRAFT                    ACAP                     June 19, 1997
  677.  
  678.  
  679.             +--------------------------------------+
  680.             |initial connection and server greeting|
  681.             +--------------------------------------+
  682.                       || (1)                  || (2)
  683.                       VV                      ||
  684.             +-----------------+               ||
  685.             |non-authenticated|               ||
  686.             +-----------------+               ||
  687.              || (4)      || (3)               ||
  688.              ||          VV                   ||
  689.              ||          +----------------+   ||
  690.              ||          | authenticated  |   ||
  691.              ||          +----------------+   ||
  692.              ||            || (4)             ||
  693.              VV            VV                 VV
  694.             +--------------------------------------+
  695.             |     logout and close connection      |
  696.             +--------------------------------------+
  697.  
  698.          (1) connection (ACAP greeting)
  699.          (2) rejected connection (BYE greeting)
  700.          (3) successful AUTHENTICATE command
  701.          (4) LOGOUT command, server shutdown, or connection closed
  702.  
  703. 2.4.     Operational Considerations
  704.  
  705.  
  706. 2.4.1.   Untagged Status Updates
  707.  
  708.    At any time, a server can send data that the client did not request.
  709.  
  710. 2.4.2.   Response when No Command in Progress
  711.  
  712.    Server implementations are permitted to send an untagged response
  713.    while there is no command in progress.  Server implementations that
  714.    send such responses MUST deal with flow control considerations.
  715.    Specifically, they must either (1) verify that the size of the data
  716.    does not exceed the underlying transport's available window size, or
  717.    (2) use non-blocking writes.
  718.  
  719. 2.4.3.   Auto-logout Timer
  720.  
  721.    If a server has an inactivity auto-logout timer, that timer MUST be
  722.    of at least 30 minutes duration.  The receipt of ANY command from the
  723.    client during that interval MUST suffice to reset the auto-logout
  724.    timer.
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Newman                                                          [Page 9]
  731.  
  732. Internet DRAFT                    ACAP                     June 19, 1997
  733.  
  734.  
  735. 2.4.4.   Multiple Commands in Progress
  736.  
  737.    The client is not required to wait for the completion result of a
  738.    command before sending another command, subject to flow control
  739.    constraints on the underlying data stream.  Similarly, a server is
  740.    not required to process a command to completion before beginning
  741.    processing of the next command, unless an ambiguity would result
  742.    because of a command that would affect the results of other commands.
  743.    If there is such an ambiguity, the server executes commands to
  744.    completion in the order given by the client.
  745.  
  746. 2.5.     Server Command Continuation Request
  747.  
  748.    The command continuation request is indicated by a "+" token instead
  749.    of a tag.  This indicates that the server is ready to accept the
  750.    continuation of a command from the client.
  751.  
  752.    This response is used in the AUTHENTICATE command to transmit server
  753.    data to the client, and request additional client data.  This
  754.    response is also used if an argument to any command is a
  755.    synchronizing literal.
  756.  
  757.    The client is not permitted to send the octets of a synchronizing
  758.    literal unless the server indicates that it expects it.  This permits
  759.    the server to process commands and reject errors on a line-by-line
  760.    basis, assuming it checks for non-synchronizing literals at the end
  761.    of each line.  The remainder of the command, including the CRLF that
  762.    terminates a command, follows the octets of the literal.  If there
  763.    are any additional command arguments the literal octets are followed
  764.    by a space and those arguments.
  765.  
  766.    Example:    C: A099 FREECONTEXT {10}
  767.                S: + "Ready for additional command text"
  768.                C: FRED
  769.                C: FOOB
  770.                S: A099 OK "FREECONTEXT completed"
  771.                C: A044 BLURDYBLOOP {102856}
  772.                S: A044 BAD "No such command as 'BLURDYBLOOP'"
  773.  
  774.  
  775. 2.6.     Data Formats
  776.  
  777.    ACAP uses textual commands and responses.  Data in ACAP can be in one
  778.    of five forms: atom, number, string, parenthesized list or NIL.
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Newman                                                         [Page 10]
  787.  
  788. Internet DRAFT                    ACAP                     June 19, 1997
  789.  
  790.  
  791. 2.6.1.   Atom
  792.  
  793.    An atom consists of one to 1024 non-special characters.  It must
  794.    begin with a letter.  Atoms are used for protocol keywords.
  795.  
  796. 2.6.2.   Number
  797.  
  798.    A number consists of one or more digit characters, and represents a
  799.    numeric value.  Numbers are restricted to the range of an unsigned
  800.    32-bit integer: 0 < number < 4,294,967,296.
  801.  
  802. 2.6.3.   String
  803.  
  804.    A string is in one of two forms: literal and quoted string.  The
  805.    literal form is the general form of string.  The quoted string form
  806.    is an alternative that avoids the overhead of processing a literal at
  807.    the cost of restrictions of what may be in a quoted string.
  808.  
  809.    A literal is a sequence of zero or more octets (including CR and LF),
  810.    prefix-quoted with an octet count in the form of an open brace ("{"),
  811.    the number of octets, close brace ("}"), and CRLF.  In the case of
  812.    literals transmitted from server to client, the CRLF is immediately
  813.    followed by the octet data.
  814.  
  815.    There are two forms of literals transmitted from client to server.
  816.    The form where the open brace ("{") and number of octets is
  817.    immediately followed by a close brace ("}") and CRLF is called a
  818.    synchronizing literal.  When sending a synchronizing literal, the
  819.    client must wait to receive a command continuation request (described
  820.    later in this document) before sending the octet data (and the
  821.    remainder of the command).  The other form of literal, the
  822.    non-synchronizing literal, is used to transmit a string from client
  823.    to server without waiting for a command continuation request.  The
  824.    non-synchronizing literal differs from the synchronizing literal by
  825.    having a plus ("+") between the number of octets and the close brace
  826.    ("}") and by having the octet data immediately following the CRLF.
  827.  
  828.    A quoted string is a sequence of zero to 1024 octets excluding NUL,
  829.    CR and LF, with double quote (<">) characters at each end.
  830.  
  831.    The empty string is represented as "" (a quoted string with zero
  832.    characters between double quotes), as {0} followed by CRLF (a
  833.    synchronizing literal with an octet count of 0), or as {0+} followed
  834.    by a CRLF (a non-synchronizing literal with an octet count of 0).
  835.  
  836.         Note: Even if the octet count is 0, a client transmitting a
  837.         synchronizing literal must wait to receive a command
  838.         continuation request.
  839.  
  840.  
  841.  
  842. Newman                                                         [Page 11]
  843.  
  844. Internet DRAFT                    ACAP                     June 19, 1997
  845.  
  846.  
  847. 2.6.3.1. 8-bit and Binary Strings
  848.  
  849.    Most strings in ACAP are restricted to UTF-8 characters and may not
  850.    contain NUL octets.  Attribute values MAY contain any octets
  851.    including NUL.
  852.  
  853. 2.6.4.   Parenthesized List
  854.  
  855.    Data structures are represented as a "parenthesized list"; a sequence
  856.    of data items, delimited by space, and bounded at each end by
  857.    parentheses.  A parenthesized list can contain other parenthesized
  858.    lists, using multiple levels of parentheses to indicate nesting.
  859.  
  860.    The empty list is represented as () -- a parenthesized list with no
  861.    members.
  862.  
  863. 2.6.5.   NIL
  864.  
  865.    The special atom "NIL" represents the non-existence of a particular
  866.    data item that is represented as a string or parenthesized list, as
  867.    distinct from the empty string "" or the empty parenthesized list ().
  868.  
  869. 3.       Protocol Elements
  870.  
  871.    This section defines data formats and other protocol elements used
  872.    throughout the ACAP protocol.
  873.  
  874. 3.1.     Entries and Attributes
  875.  
  876.    Within a dataset, each entry name is made up of zero or more UTF-8
  877.    characters other than slash ("/").  A slash separated list of
  878.    entries, one at each level of the hierarchy, forms the full path to
  879.    an entry.
  880.  
  881.    Each entry is made up of a set of attributes.  Each attribute has a
  882.    hierarchical name in UTF-8, with each component of the name separated
  883.    by a period (".").
  884.  
  885.    The value of an attribute is either single or multi-valued.  A single
  886.    value is NIL (has no value), or a string of zero or more octets.  A
  887.    multi-value is a list of zero or more strings, each of zero or more
  888.    octets.
  889.  
  890.    Attribute names are not permitted to contain asterisk ("*") or
  891.    percent ("%") and MUST be valid UTF-8 strings which do not contain
  892.    NUL.  Invalid attribute names result in a BAD response.  Entry names
  893.    are not permitted to begin with "." or contain slash ("/") and MUST
  894.    be valid UTF-8 strings which do not contain NUL.  Invalid entry names
  895.  
  896.  
  897.  
  898. Newman                                                         [Page 12]
  899.  
  900. Internet DRAFT                    ACAP                     June 19, 1997
  901.  
  902.  
  903.    in the entry field of a command result in a BAD response.
  904.  
  905.    Use of non-visible UTF-8 characters in attribute and entry names is
  906.    discouraged.
  907.  
  908. 3.1.1.   Predefined Attributes
  909.  
  910.    Attribute names which do not contain a dot (".") are reserved for
  911.    standardized attributes which have meaning in any dataset.  The
  912.    following attributes are defined by the ACAP protocol.
  913.  
  914.    entry
  915.         Contains the name of the entry.  MUST be single valued.
  916.         Attempts to use illegal or multi-valued values for the entry
  917.         attribute are protocol errors and MUST result in a BAD
  918.         completion response.  This is a special case.
  919.  
  920.    modtime
  921.         Contains the date and time any read-write metadata in the entry
  922.         was last modified.  This value MUST be in UTC, MUST be
  923.         automatically updated by the server.
  924.  
  925.         The value consists of 14 or more US-ASCII digits.  The first
  926.         four indicate the year, the next two indicate the month, the
  927.         next two indicate the day of month, the next two indicate the
  928.         hour (0 - 23), the next two indicate the minute, and the next
  929.         two indicate the second.  Any further digits indicate fractions
  930.         of a second.
  931.  
  932.         The time, particularly fractions of a second, need not be
  933.         accurate.  It is REQUIRED, however, that any two entries in a
  934.         dataset changed by successive modifications have strictly
  935.         ascending modtime values.  In addition, each STORE command
  936.         within a dataset (including simultaneous stores from different
  937.         connections) MUST use different modtime values.
  938.  
  939.         This attribute has enforced validation, so any attempt to STORE
  940.         a value in this attribute MUST result in a NO response with an
  941.         INVALID response code.
  942.  
  943.    subdataset
  944.         If this attribute is set, it indicates the existence of a sub-
  945.         dataset of this entry.
  946.  
  947.         The value consists of a list of relative ACAP URLs (see section
  948.         ###) which may be used to locate the sub-dataset.  The base URL
  949.         is the full path to the entry followed by a slash ("/").  The
  950.         value "." indicates a subdataset is located directly under this
  951.  
  952.  
  953.  
  954. Newman                                                         [Page 13]
  955.  
  956. Internet DRAFT                    ACAP                     June 19, 1997
  957.  
  958.  
  959.         one.  Multiple values indicate replicated copies of the
  960.         subdataset.
  961.  
  962.         For example, if the dataset "/folder/site/" has an entry
  963.         "public-folder" with a subdataset attribute of ".", then there
  964.         exists a dataset "/folder/site/public-folder/".  If the value of
  965.         the subdataset attribute was instead
  966.         "//other.acap.domain//folder/site/public-folder/" that would
  967.         indicate the dataset is actually located on a different ACAP
  968.         server.
  969.  
  970.         A dataset can be created by storing a "subdataset" attribute
  971.         including ".", and a sub-hierarchy of datasets is deleted by
  972.         storing a NIL value to the "subdataset" attribute on the entry
  973.         in the parent dataset.
  974.  
  975.         This attribute has enforced syntax validation.  Specifically, if
  976.         an attempt is made to STORE a single-value (other than NIL), an
  977.         empty list, or one of the values does not follow the URL syntax
  978.         rules [BASIC-URL], then this will result in a NO response with
  979.         an INVALID response code.
  980.  
  981.  
  982. 3.1.2.   Attribute metadata
  983.  
  984.    Each attribute is made up of metadata items which describe that
  985.    attribute, its value and any associated access controls.  Metadata
  986.    items may be either read-only in which case the client is never
  987.    permitted to modify the item, or read-write, in which case the client
  988.    may modify the item if the access control list (ACL) permits.
  989.  
  990.    The following metadata items are defined in this specification:
  991.  
  992.    acl    The access control list for the attribute, if one exists.  If
  993.           the attribute does not have an ACL, NIL is returned.
  994.           Read-write.  See section ### for the contents of an ACL.
  995.  
  996.    attribute
  997.           The attribute name.  Read-only.
  998.  
  999.    myrights
  1000.           The set of rights that the client has to the attribute.
  1001.           Read-only.  See section ### for the possible rights.
  1002.  
  1003.    size   This is the length of the value.  In the case of a
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Newman                                                         [Page 14]
  1011.  
  1012. Internet DRAFT                    ACAP                     June 19, 1997
  1013.  
  1014.  
  1015.           multi-value, this is a list of lengths for each of the values.
  1016.  
  1017.    value  The value.  For a multi-value, this is a list of single
  1018.           values.
  1019.  
  1020.    Additional items of metadata may be defined in extensions to this
  1021.    protocol.  Servers MUST respond to queries of unrecognized metadata
  1022.    by returning a BAD command completion result.
  1023.  
  1024. 3.2.     ACAP URL scheme
  1025.  
  1026.    ACAP URLs are used within the ACAP protocol for the "subdataset"
  1027.    attribute, referrals and inheritance.  They provide a convenient
  1028.    syntax for referring to other ACAP datasets.  The ACAP URL follows
  1029.    the common Internet scheme syntax as defined in [BASIC-URL].  If
  1030.    :<port> is omitted, the port defaults to 674.
  1031.  
  1032.    An ACAP URL has the following general form:
  1033.  
  1034.    url-acap  = "acap://" url-server "/" url-enc-entry [url-filter]
  1035.  
  1036.    The <url-server> element includes the hostname, and optional user
  1037.    name, authentication mechanism and port number.  The <url-enc-entry>
  1038.    element contains the name of an entry path encoded according to the
  1039.    rules in [BASIC-URL].
  1040.  
  1041.    The <url-filter> element is an optional list of interesting attribute
  1042.    names.  If omitted, the URL refers to all attributes of the named
  1043.    entry.
  1044.  
  1045.    Note that unsafe or reserved characters such as " " or "?" MUST be
  1046.    hex encoded as described in the URL specification [BASIC-URL].  Hex
  1047.    encoded octets are interpreted according to UTF-8 [UTF8].
  1048.  
  1049. 3.2.1.   ACAP URL User Name and Authentication Mechanism
  1050.  
  1051.    A user name and/or authentication mechanism may be supplied.  They
  1052.    are used in the "AUTHENTICATE" command after making the connection to
  1053.    the ACAP server.  If no user name or authentication mechanism is
  1054.    supplied, then the SASL ANONYMOUS [SASL-ANON] mechanism is used by
  1055.    default.  If the URL supplies just a user name, the program
  1056.    interpreting the ACAP URL SHOULD request a password from the user if
  1057.    necessary.
  1058.  
  1059.    An authentication mechanism can be expressed by adding
  1060.    ";AUTH=<enc_auth_type>" to the end of the user name.  When such an
  1061.    <enc_auth_type> is indicated, the client SHOULD request appropriate
  1062.    credentials from that mechanism and use the "AUTHENTICATE" command.
  1063.  
  1064.  
  1065.  
  1066. Newman                                                         [Page 15]
  1067.  
  1068. Internet DRAFT                    ACAP                     June 19, 1997
  1069.  
  1070.  
  1071.    If no user name is specified, one SHOULD be obtained from the
  1072.    mechanism or requested from the user as appropriate.
  1073.  
  1074.    The string ";AUTH=*" indicates that the client SHOULD select an
  1075.    appropriate authentication mechanism.  It MAY use any mechanism
  1076.    listed in the initial ACAP response.  If no user name is specified
  1077.    and no appropriate authentication mechanisms are available, the
  1078.    client SHOULD fall back to anonymous login as described above.  This
  1079.    allows a URL which grants read-write access to authorized users, and
  1080.    read-only anonymous access to other users.
  1081.  
  1082.    Note that if unsafe or reserved characters such as " " or ";" are
  1083.    present in the user name or authentication mechanism, they MUST be
  1084.    encoded as described in the URL specification [BASIC-URL].
  1085.  
  1086. 3.2.2.   Relative ACAP URLs
  1087.  
  1088.    Because ACAP uses "/" as the hierarchy separator for dataset paths,
  1089.    it works well with the relative URL rules defined in the relative URL
  1090.    specification [REL-URL].
  1091.  
  1092.    The <aauth> grammar element is considered part of the user name for
  1093.    purposes of resolving relative ACAP URLs.
  1094.  
  1095.    The base URL for a relative URL stored in an attribute's value is
  1096.    formed by taking the path to the dataset containing that attribute,
  1097.    appending a "/" followed by the entry name of the entry containing
  1098.    that attribute followed by "/".
  1099.  
  1100. 3.3.     Contexts
  1101.  
  1102.    A context is subset of entries in a dataset or datasets, created by a
  1103.    SEARCH command with a MAKECONTEXT modifier.  Context names are
  1104.    client-generated strings and must not start with the slash ('/')
  1105.    character.
  1106.  
  1107.    When a client creates a context, it may request automatic
  1108.    notification of changes.  A client may also request enumeration of
  1109.    entries within a context.  Enumeration simplifies the implementation
  1110.    of a "virtual scrollbar" by the client.
  1111.  
  1112.    A context exists only within the ACAP session it was created.  When
  1113.    the connection is closed, all contexts associated with that
  1114.    connection are automatically discarded.  A server is required to
  1115.    support at least 100 active contexts within a session.  If the server
  1116.    supports a larger limit it must advertise it in a CONTEXTLIMIT
  1117.    capability.
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Newman                                                         [Page 16]
  1123.  
  1124. Internet DRAFT                    ACAP                     June 19, 1997
  1125.  
  1126.  
  1127. 3.4.     Comparators
  1128.  
  1129.    A comparator is a named function which takes two input values and can
  1130.    be used to perform one or more of three comparison operations:
  1131.    ordering, equality and substring matching.
  1132.  
  1133.    The ordering operation is used both for the SORT search modifier and
  1134.    the COMPARE and COMPARESTRICT search keys.  Ordering comparators can
  1135.    determine the ordinal precedence of any two values.  When used for
  1136.    ordering, a comparator's name can be prefixed with "+" or "-" to
  1137.    indicate that the ordering should be normal order or reversed order
  1138.    respectively.  If no prefix is included, "+" is assumed.
  1139.  
  1140.    For the purpose of ordering, a comparator may designate certain
  1141.    values as having an undefined ordinal precedence.  Such values always
  1142.    collate with equal value after all other values regardless of whether
  1143.    normal or reversed ordering is used.  Unless the comparator
  1144.    definition specifies otherwise, multi-values and NIL values have an
  1145.    undefined ordinal precedence.
  1146.  
  1147.    The equality operation is used for the EQUAL search modifier, and
  1148.    simply determines if the two values are considered equal under the
  1149.    comparator function.  When comparing a single value to a multi-value,
  1150.    the two are considered equal if any one of the multiple values is
  1151.    equal to the single value.
  1152.  
  1153.    The substring match operation is used for the PREFIX and SUBSTRING
  1154.    search modifiers, and simply determines if search value is a prefix
  1155.    or a substring of the item being searched.  In the case of substring
  1156.    search on a multi-valued attribute, the match is successful if the
  1157.    value is a prefix or substring of any one of the multiple values.
  1158.  
  1159.    Additional comparators may be registered with the Internet Assigned
  1160.    Number Authority (IANA) according to the rules in section ###.
  1161.    Servers MUST respond to unknown or improperly used comparators with a
  1162.    BAD command completion result.
  1163.  
  1164.    The following comparators are defined by this standard:
  1165.  
  1166.       octet
  1167.            Operations: Ordering, Equality, Substring match
  1168.  
  1169.            For collation, the octet comparator interprets the value of
  1170.            an attribute as a series of unsigned octets with ordinal
  1171.            values from 0 to 255.  When ordering two strings, each octet
  1172.            pair is compared in sequence until the octets are unequal or
  1173.            the end of the string is reached.  When collating two strings
  1174.            where the shorter is a prefix of the longer, the shorter
  1175.  
  1176.  
  1177.  
  1178. Newman                                                         [Page 17]
  1179.  
  1180. Internet DRAFT                    ACAP                     June 19, 1997
  1181.  
  1182.  
  1183.            string is interpreted as having a smaller ordinal value.  The
  1184.            "octet" or "+octet" forms collate smaller ordinal values
  1185.            earlier, and the "-octet" form collates larger ordinal values
  1186.            earlier.
  1187.  
  1188.            For the equality function, two strings are equal if they are
  1189.            the same length and contain the same octets in the same
  1190.            order.  NIL is equal only to itself.
  1191.  
  1192.            For non-binary, non-nil single values, octet ordering is
  1193.            equivalent to the ANSI C [ISO-C] strcmp() function applied to
  1194.            C string representations of the values.  For non-binary,
  1195.            non-nil single values, octet substring match is equivalent to
  1196.            the ANSI C strstr() function applied to the C string
  1197.            representations of the values.
  1198.  
  1199.       en-nocase
  1200.            Operations: Ordering, Equality, Substring match
  1201.  
  1202.            The en-nocase comparator first applies a mapping to the
  1203.            attribute values which translates all US-ASCII letters to
  1204.            uppercase (octet values 0x61 to 0x7A are translated to octet
  1205.            values 0x41 to 0x5A respectively), then applies the octet
  1206.            comparator as described above.  With this function the values
  1207.            "hello" and "HELLO" have the same ordinal value and are
  1208.            considered equal.
  1209.  
  1210.       numeric
  1211.            Operations: Ordering, Equality
  1212.  
  1213.            The numeric comparator interprets strings as decimal positive
  1214.            integers represented as US-ASCII digits.  All values which do
  1215.            not begin with a US-ASCII digit are considered equal with an
  1216.            ordinal value higher than all non-NIL single-valued
  1217.            attributes.  Otherwise, all US-ASCII digits (octet values
  1218.            0x30 to 0x39) are interpreted starting from the beginning of
  1219.            the string to the first non-digit or the end of the string.
  1220.  
  1221.  
  1222. 3.5.     Access Control Lists (ACLs)
  1223.  
  1224.    An access control list is a set of identifier,rights pairs used to
  1225.    restrict access to a given dataset, attribute or attribute within an
  1226.    entry.  An ACL is represented by a multi-value with each value
  1227.    containing the identifier followed by a tab character followed by the
  1228.    rights.  The syntax is defined by the "acl" rule in the formal syntax
  1229.    in section ###.
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Newman                                                         [Page 18]
  1235.  
  1236. Internet DRAFT                    ACAP                     June 19, 1997
  1237.  
  1238.  
  1239.    Identifier is a UTF-8 string.  The identifier "anyone" is reserved to
  1240.    refer to the universal identity (all authentications, including
  1241.    anonymous).  All user name strings accepted by the AUTHENTICATE
  1242.    command to authenticate to the ACAP server are reserved as
  1243.    identifiers for the corresponding user.  Identifiers starting with a
  1244.    dash ("-") are reserved for "negative rights", described below.  All
  1245.    other identifier strings have implementation-defined meanings.
  1246.  
  1247.    Rights is a string listing a (possibly empty) set of alphanumeric
  1248.    characters, each character listing a set of operations which is being
  1249.    controlled.  Letters are reserved for "standard" rights, listed
  1250.    below.  The set of standard rights may only be extended by a
  1251.    standards-track or IESG approved experimental RFC.  Digits are
  1252.    reserved for implementation or site defined rights.  The currently
  1253.    defined standard rights are:
  1254.  
  1255.    r - read
  1256.    w - write
  1257.    i - insert (perform store on a previously NIL value)
  1258.    a - administer (perform store on ACL attribute/metadata)
  1259.  
  1260.    An implementation may force rights to always or never be granted.  In
  1261.    particular, implementations are expected to grant implicit read and
  1262.    administer rights to a user's personal dataset storage in order to
  1263.    avoid denial of service problems.  Rights are never tied, unlike the
  1264.    IMAP ACL extension [IMAP-ACL].
  1265.  
  1266.    It is possible for multiple identifiers in an access control list to
  1267.    apply to a given user (or other authentication identity).  For
  1268.    example, an ACL may include rights to be granted to the identifier
  1269.    matching the user, one or more implementation-defined identifiers
  1270.    matching groups which include the user, and/or the identifier
  1271.    "anyone".  How these rights are combined to determine the user's
  1272.    access is implementation-defined.  An implementation may choose, for
  1273.    example, to use the union of the rights granted to the applicable
  1274.    identifiers.  An implementation may instead choose, for example, to
  1275.    only use those rights granted to the most specific identifier present
  1276.    in the ACL.  A client may determine the set of rights granted to the
  1277.    logged-in user for a given mailbox by using the MYRIGHTS command.
  1278.  
  1279.    When an identifier in an ACL starts with a dash ("-"), that indicates
  1280.    that associated rights are to be removed from the identifier that is
  1281.    prefixed by the dash.  For example, if the identifier "-fred" is
  1282.    granted the "w" right, that indicates that the "w" right is to be
  1283.    removed from users matching the identifier "fred".  Implementations
  1284.    need not support having identifiers which start with a dash in ACLs.
  1285.  
  1286.    Each attribute of each entry of a dataset may potentially have an
  1287.  
  1288.  
  1289.  
  1290. Newman                                                         [Page 19]
  1291.  
  1292. Internet DRAFT                    ACAP                     June 19, 1997
  1293.  
  1294.  
  1295.    ACL.  If an attribute in an entry does not have an ACL, then access
  1296.    is controlled by a default ACL for that attribute in the dataset, if
  1297.    it exists.  If there is no default ACL for that attribute in the
  1298.    dataset, access is controlled by a default ACL for that dataset.  The
  1299.    default ACL for a dataset must exist.
  1300.  
  1301.    In order to perform any access or manipulation on an entry in a
  1302.    dataset, the client must have 'r' rights on the "entry" attribute of
  1303.    the entry.  Implementations should take care not to reveal via error
  1304.    messages the existence of an entry for which the client does not have
  1305.    attribute of the parent dataset in order to access the contents of a
  1306.    dataset.
  1307.  
  1308.    Many of the ACL commands and responses include an "acl object"
  1309.    parameter, for specifying what the ACL applies to.  This is a
  1310.    parenthesized list.  The list contains just the dataset name when
  1311.    referring to the default ACL for a dataset.  The list contains a
  1312.    dataset name and an attribute name when referring to the default ACL
  1313.    for an attribute in a dataset.  The list contains a dataset name, an
  1314.    attribute name, and an entry name when referring to the ACL for an
  1315.    attribute of an entry of a dataset.
  1316.  
  1317.  
  1318. 3.6.     Server Response Codes
  1319.  
  1320.    An OK, NO, BAD, ALERT or BYE response from the server MAY contain a
  1321.    response code to describe the event in a more detailed machine
  1322.    parsable fashion.  A response code consists of data inside
  1323.    parentheses in the form of an atom, possibly followed by a space and
  1324.    arguments.  Response codes are defined when there is a specific
  1325.    action that a client can take based upon the additional information.
  1326.  
  1327.    The currently defined response codes are:
  1328.  
  1329.       ENCRYPT-NEEDED
  1330.            This response code is returned on a tagged NO result from an
  1331.            AUTHENTICATE command.  It indicates that site security policy
  1332.            requires the use of a strong encryption mechanism for the
  1333.            specified authentication identity.
  1334.  
  1335.       INVALID
  1336.            This response code indicates that a STORE command included
  1337.            data which the server implementation does not permit.  It
  1338.            MUST NOT be used unless the dataset class specification for
  1339.            the attribute in question explicitly permits enforced server
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Newman                                                         [Page 20]
  1347.  
  1348. Internet DRAFT                    ACAP                     June 19, 1997
  1349.  
  1350.  
  1351.            validation.  The argument is the attribute which was invalid.
  1352.  
  1353.       MODIFIED
  1354.            This response code indicates that a conditional store failed
  1355.            because the modtime on the entry is later than the modtime
  1356.            specified with the STORE command UNCHANGEDSINCE modifier.
  1357.            The argument is the entry which had been modified.
  1358.  
  1359.       NOEXIST
  1360.            This response code indicates that a search or NOCREATE store
  1361.            failed because a specified dataset did not exist.  The
  1362.            argument is the dataset which does not exist.
  1363.  
  1364.       PERMISSION
  1365.            A command failed due to insufficient permission based on the
  1366.            access control list or implicit rights.  The argument is the
  1367.            acl-object which caused the permission failure.
  1368.  
  1369.       PLAINTEXT-DENIED
  1370.            This response code is returned on a tagged NO result from an
  1371.            AUTHENTICATE PLAIN command.  It indicates that site security
  1372.            policy forbids the use of plain text passwords for the
  1373.            specified authentication identity.
  1374.  
  1375.       QUOTA
  1376.            A STORE command which would have increased the size of the
  1377.            dataset failed due to insufficient quota.
  1378.  
  1379.       REFER
  1380.            This response code may be returned in a tagged NO response to
  1381.            any command that takes a dataset name as a parameter.  It has
  1382.            one or more arguments with the syntax of relative URLs.  It
  1383.            is a referral, indicating that the command should be retried
  1384.            using one of the relative URLs.
  1385.  
  1386.       TOOMANY
  1387.            This response code may be returned in a tagged OK response to
  1388.            a SEARCH command which includes the LIMIT modifier.  The
  1389.            argument returns the total number of matching entries.
  1390.  
  1391.       TRANSITION-NEEDED
  1392.            This response code occurs on a NO response to an AUTHENTICATE
  1393.            command with a mechanism other than PLAIN or ANONYMOUS.  It
  1394.            indicates that the PLAIN SASL [SASL-PLAIN] mechanism is
  1395.            needed prior to using the stronger mechanism requested.
  1396.  
  1397.       TRYCACHE
  1398.            A STORE or SETACL command failed due to a temporary server
  1399.  
  1400.  
  1401.  
  1402. Newman                                                         [Page 21]
  1403.  
  1404. Internet DRAFT                    ACAP                     June 19, 1997
  1405.  
  1406.  
  1407.            failure.  If the client caches the command, it may succeed
  1408.            during a later cache replay.
  1409.  
  1410.       TRYFREECONTEXT
  1411.            This response code may be returned in a tagged NO response to
  1412.            a SEARCH command which includes the MAKECONTEXT modifier.  It
  1413.            indicates that a new context may not be created due to the
  1414.            server's limit on the number of existing contexts.
  1415.  
  1416.       WAYTOOMANY
  1417.            This response code may be returned in a tagged NO response to
  1418.            a SEARCH command which includes a HARDLIMIT search modifier.
  1419.            It indicates that the SEARCH would have returned more entries
  1420.            than the HARDLIMIT permitted.
  1421.  
  1422.       Additional response codes MUST be registered with IANA according
  1423.       to the proceedures in section ###.  Client implementations MUST
  1424.       ignore response codes that they do not recognize.
  1425.  
  1426. 4.       Namespace Conventions
  1427.  
  1428. 4.1.     Dataset Namespace
  1429.  
  1430.    The dataset namespace is a slash-separated hierarchy.  The first
  1431.    component of the dataset namespace is a dataset class.  Dataset
  1432.    classes MUST have a vendor prefix (vendor.<vendor/product>) or be
  1433.    standards track or IESG approved experimental RFCs.  See section ###
  1434.    for the registration template.
  1435.  
  1436.    The second component of the dataset name is "site", "group", "host",
  1437.    or "user" referring to server-wide data, administrative group data,
  1438.    per-host data and per-user data respectively.
  1439.  
  1440.    For "group", "host", and "user" areas, the third component of the
  1441.    path is the group name, the fully qualified host domain name, or the
  1442.    user name.  A path of the form "/<dataset-class>/~/" is a convenient
  1443.    abbreviation for "/<dataset-class>/user/<current-user>/".
  1444.  
  1445.    Dataset names which begin with "/byowner/" are reserved as an
  1446.    alternate view of the namespace.  This provides a way to see all the
  1447.    dataset classes which a particular owner uses.  For example,
  1448.    "/byowner/~/<dataset-class>/" is an alternate name for "/<dataset-
  1449.    class>/~/".  Byowner provides a way to view a list of dataset classes
  1450.    owned by a given user; this is done using the dataset
  1451.    "/byowner/user/<current-user>/" with the NOINHERIT SEARCH modifier.
  1452.  
  1453.    The dataset "/" may be used to find all dataset classes visible to
  1454.    the current user.  A dataset of the form "/<dataset-class>/user/" may
  1455.  
  1456.  
  1457.  
  1458. Newman                                                         [Page 22]
  1459.  
  1460. Internet DRAFT                    ACAP                     June 19, 1997
  1461.  
  1462.  
  1463.    be used to find all users which have made a dataset or entry of that
  1464.    class visible to the current user.
  1465.  
  1466.    The formal syntax for a dataset name is defined by the "dataset-name"
  1467.    terminal in section ###.
  1468.  
  1469. 4.2.     Attribute Namespace
  1470.  
  1471.    Attribute names which do not contain a dot (".") are reserved for
  1472.    standardized attributes which have meaning in any dataset.  In order
  1473.    to simplify implementations, the attribute namespace is intended to
  1474.    be unique across all datasets.  To achieve this, attribute names are
  1475.    prefixed with the dataset class name followed by a dot (".").
  1476.    Attributes which effect management of the dataset are prefixed with
  1477.    "dataset.".  In addition, a subtree of the "vendor." attribute
  1478.    namespace may be registered with IANA according to the rules in
  1479.    section ###.  ACAP implementors are encouraged to help define
  1480.    interoperable dataset classes specifications rather than using the
  1481.    private attribute namespace.
  1482.  
  1483.    Finally, the "user.<user-name>." and "site." subtrees of the
  1484.    attribute namespace are reserved for user-specific and site-specific
  1485.    attributes respectively.  Such attributes are not interoperable so
  1486.    are discouraged in favor of defining standard attributes. A future
  1487.    extension is expected to permit discovery of syntax for user or
  1488.    site-specific attributes.  Clients wishing to support display of user
  1489.    or site-specific attributes should display the value of any non-NIL
  1490.    single-valued "user.<user-name>." or "site." attribute which has
  1491.    valid UTF-8 syntax.
  1492.  
  1493.    The formal syntax for an attribute name is defined by the
  1494.    "attribute-name" terminal in the next section.
  1495.  
  1496. 4.3.     Formal Syntax for Dataset and Attribute Namespace
  1497.  
  1498.    The naming conventions for datasets and attributes are defined by the
  1499.    following ABNF.   Note that this grammar is not part of the ACAP
  1500.    protocol syntax in section ###, as dataset names and attribute names
  1501.    are encoded as strings within the ACAP protocol.
  1502.  
  1503.    attribute-dacl  = "dataset.acl" *("." name-component)
  1504.  
  1505.    attribute-dset  = dataset-std 1*("." name-component)
  1506.                      ;; MUST be defined in a dataset class specification
  1507.  
  1508.    attribute-name  = attribute-std / attr-site / attr-user / vendor-name
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Newman                                                         [Page 23]
  1515.  
  1516. Internet DRAFT                    ACAP                     June 19, 1997
  1517.  
  1518.  
  1519.    attribute-std   = "entry" / "subdataset" / "modtime" / "dataset.inherit"
  1520.                      / attribute-dacl / attribute-dset
  1521.  
  1522.    attr-site       = "site" 1*("." name-component)
  1523.  
  1524.    attr-user       = "user." name-component 1*("." name-component)
  1525.  
  1526.    byowner         = "/byowner/" owner "/" [dataset-class "/" dataset-sub]
  1527.  
  1528.    dataset-class   = dataset-std / vendor-name
  1529.  
  1530.    dataset-normal  = "/" [dataset-class "/" (owner-prefix / dataset-tail)]
  1531.  
  1532.    dataset-name    = byowner / dataset-normal
  1533.  
  1534.    dataset-std     = name-component
  1535.                      ;; MUST be registered with IANA and the spec MUST
  1536.                      ;; be published as a standards track or
  1537.                      ;; IESG-approved experimental RFC
  1538.  
  1539.    dataset-sub     = *(dname-component "/")
  1540.                      ;; The rules for this portion of the namespace may
  1541.                      ;; be further restricted by the dataset class
  1542.                      ;; specification.
  1543.  
  1544.    dataset-tail    = owner "/" dataset-sub
  1545.  
  1546.    dname-component = 1*UTF8-CHAR
  1547.                      ;; MUST NOT begin with "." or contain "/"
  1548.  
  1549.    name-component  = 1*UTF8-CHAR
  1550.                      ;; MUST NOT contain ".", "/", "%", or "*"
  1551.  
  1552.    owner           = "site" / owner-host / owner-group / owner-user / "~"
  1553.  
  1554.    owner-group     = "group/" dname-component
  1555.  
  1556.    owner-host      = "host/" dname-component
  1557.  
  1558.    owner-prefix    = "group/" / "host/" / "user/"
  1559.  
  1560.    owner-user      = "user/" dname-component
  1561.  
  1562.    vendor-name     = vendor-token *("." name-component)
  1563.  
  1564.    vendor-token    = "vendor." name-component
  1565.                      ;; MUST be registered with IANA
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Newman                                                         [Page 24]
  1571.  
  1572. Internet DRAFT                    ACAP                     June 19, 1997
  1573.  
  1574.  
  1575. 5.       Dataset Management
  1576.  
  1577.    The entry with an empty name ("") in the dataset is used to hold
  1578.    management information for the dataset as a whole.
  1579.  
  1580. 5.1.     Dataset Inheritance
  1581.  
  1582.    It is possible for one dataset to inherit data from another.  The
  1583.    dataset from which the data is inherited is called the base dataset.
  1584.    Data in the base dataset appears in the inheriting dataset, except
  1585.    where overridden by data in the inheriting dataset.
  1586.  
  1587.    The base dataset is usually a system-wide or group-wide set of
  1588.    defaults.  A system-wide dataset usually has one inheriting dataset
  1589.    per user, allowing each user to add to or modify the defaults as
  1590.    appropriate.
  1591.  
  1592.    An entry which exists in both the inheriting and inherited dataset
  1593.    has a modtime equal to the greater of the modtimes for the purposes
  1594.    of a SEARCH command and context notification.  Inheritance has no
  1595.    effect on the STORE command, except that if NIL is stored to an
  1596.    attribute and there is a default value in a base dataset, then an
  1597.    ENTRY response is returned to notify the client of the change.
  1598.  
  1599.    The "subdataset" attribute is not directly inherited.  If the base
  1600.    dataset includes a "subdataset" attribute and the inheriting dataset
  1601.    does not, then the "subdataset" attribute will inherit a virtual
  1602.    value of a list containing a ".".  The subdataset at that node is
  1603.    said to be a "virtual" dataset as it is simply a virtual copy of the
  1604.    appropriate base dataset with all "subdataset" attributes changed to
  1605.    a list containing a ".".  A virtual dataset is not visible if
  1606.    NOINHERIT is specified on the SEARCH command.
  1607.  
  1608.    Servers MUST support at least two levels of inheritance.  This
  1609.    permits a user's dataset such as "/options/user/fred/common" to
  1610.    inherit from a group dataset such as "/options/group/dinosaur
  1611.    operators/common" which in turn inherits from a server-wide dataset
  1612.    such as "/options/site/common".
  1613.  
  1614. 5.2.     Dataset Attributes
  1615.  
  1616.    The following attributes apply to management of the dataset when
  1617.    stored in the "" entry of a dataset.  These attributes are not
  1618.    inherited.
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626. Newman                                                         [Page 25]
  1627.  
  1628. Internet DRAFT                    ACAP                     June 19, 1997
  1629.  
  1630.  
  1631.    dataset.acl
  1632.         This holds the default access control list for the dataset.  It
  1633.         can not be modified by the STORE command, only by the SETACL and
  1634.         DELETEACL commands.
  1635.  
  1636.    dataset.acl.<attribute>
  1637.         This holds the default access control list for an attribute
  1638.         within the dataset. It can not be modified by the STORE command,
  1639.         only by the SETACL and DELETEACL commands.
  1640.  
  1641.    dataset.inherit
  1642.         This holds the name of a dataset to inherit according to the
  1643.         rules in section ###.  This attribute may refer to a non-
  1644.         existent dataset, in which case nothing is inherited.
  1645.  
  1646.  
  1647. 5.3.     Dataset Creation
  1648.  
  1649.    When a dataset is first created (by storing a "." in the subdataset
  1650.    attribute or storing an entry in a previously non-existent dataset),
  1651.    the dataset attributes are initialized with the values from the
  1652.    parent dataset in the "/byowner/" hierarchy.  In the case of the
  1653.    "dataset.inherit" attribute, the appropriate hierarchy component is
  1654.    added.  For example, given the following entry:
  1655.  
  1656.    entry path        "/byowner/user/joe/"
  1657.    dataset.acl       ("joe" "rwia")
  1658.    dataset.inherit   "/byowner/site"
  1659.  
  1660.    If a new dataset class "/byowner/~/new" is created, it will have the
  1661.    following dataset attributes:
  1662.  
  1663.    entry path        "/byowner/user/joe/new/"
  1664.    dataset.acl       ("joe" "rwia")
  1665.    dataset.inherit   "/byowner/site/new"
  1666.  
  1667.    Note that the dataset "/byowner/user/joe/new/" is equivalent to
  1668.    "/new/user/joe/".
  1669.  
  1670. 5.4.     Dataset Class Capabilities
  1671.  
  1672.    Certain dataset classes or dataset class features may only be useful
  1673.    if there is an active updating client or integrated server support
  1674.    for the feature.  The dataset class "capability" is reserved to allow
  1675.    clients or servers to advertise such features.  The "entry" attribute
  1676.    within this dataset class is the name of the dataset class whose
  1677.    features are being described.  The attributes are prefixed with
  1678.    "capability.<dataset-class>." and are defined by the appropriate
  1679.  
  1680.  
  1681.  
  1682. Newman                                                         [Page 26]
  1683.  
  1684. Internet DRAFT                    ACAP                     June 19, 1997
  1685.  
  1686.  
  1687.    dataset class specification.
  1688.  
  1689.    Since it is possible for an unprivileged user to run an active client
  1690.    for himself, a per-user capability dataset is useful.  The dataset
  1691.    "/capability/~/" holds information about all features available to
  1692.    the user (via inheritance), and the dataset "/capability/site/" holds
  1693.    information about all features supported by the site.
  1694.  
  1695. 5.5.     Dataset Quotas
  1696.  
  1697.    The dataset class "quota" is reserved for quota management.  Each
  1698.    node of the "/byowner" view of the ACAP namespace MAY have an
  1699.    associated entry in the quota dataset class. A quota root is a quota
  1700.    limit and usage listed in the "quota" dataset class which applies to
  1701.    a sub-tree of the ACAP "/byowner" name-space exempting all parts of
  1702.    that sub-tree with their own quota root.
  1703.  
  1704.    A quota limit specifies the total number of bytes a sub-tree of the
  1705.    ACAP name-space may consume exempting all parts of that sub-tree with
  1706.    their own quota roots.  The actual number of bytes which a dataset or
  1707.    entry consumes is implementation dependent.  However two rules are
  1708.    necessary to promote interoperability:
  1709.  
  1710.    1) Removing an entry or dataset MUST reduce the quota usage.
  1711.  
  1712.    2) A STORE command MUST NOT fail with a quota error if for all entry
  1713.    modifications under a given quota root the sum of the lengths of the
  1714.    attribute names and values is less then the quota limit minus the
  1715.    quota usage.  For some implementations, it MAY be necessary to allow
  1716.    the quota usage to exceed the quota limit in order to satisfy this
  1717.    rule.  Note that a STORE command MAY succeed even if there does not
  1718.    appear to be enough space.
  1719.  
  1720.    The algorithm for locating a quota root for a dataset is as follows.
  1721.    First, if the dataset name does not begin with "/byowner", then the
  1722.    name is mapped appropriately.  Second, the "/byowner" is replaced
  1723.    with "/quota".  Third, any trailing "/" is removed.  If the resulting
  1724.    entry-path contains a "quota.limit" attribute, that is the quota
  1725.    root.  Otherwise, the last component of the entry path is removed,
  1726.    and the previous step is repeated.  The GETQUOTA command implements
  1727.    this algorithm in order to simplify ACAP clients.
  1728.  
  1729.    The quota dataset class itself is exempt from quota management.  ACAP
  1730.    implementations SHOULD apply a very restrictive default ACL to quota
  1731.    datasets.
  1732.  
  1733.    The creation of a new quota root SHOULD NOT be automatically linked
  1734.    to the creation of a dataset.  Quota roots MAY be completely
  1735.  
  1736.  
  1737.  
  1738. Newman                                                         [Page 27]
  1739.  
  1740. Internet DRAFT                    ACAP                     June 19, 1997
  1741.  
  1742.  
  1743.    independent, or MAY reduce the limit of their parent quota root on
  1744.    creation.  Quota roots SHOULD NOT be nested -- modifying data should
  1745.    only effect the usage within one quota root.  When a quota limit is
  1746.    removed (by storing NIL in quota.limit), its usage is added to the
  1747.    parent quota root, and its limit MAY be added to the parent quota
  1748.    root.
  1749.  
  1750.    The following attributes are defined within the quota dataset class:
  1751.  
  1752.  
  1753.    quota.limit
  1754.         This is single-valued.  The syntax for this value follows the
  1755.         "number" rule defined below.  This represents the quota limit,
  1756.         in bytes, as defined in section ###.
  1757.  
  1758.    quota.usage
  1759.         This is single-valued.  The syntax for this value follows the
  1760.         "number" rule defined below.  This is the quota usage in bytes.
  1761.         It MAY be greater than the quota limit.
  1762.  
  1763.    Because it can require excessive computation for some
  1764.    implementations, ACAP servers MAY respond with NO to a SEARCH command
  1765.    requesting context notification for the quota.usage attribute.
  1766.  
  1767. 6.       Command and Response Specifications
  1768.  
  1769.    ACAP commands and responses are described in this section.  Commands
  1770.    are organized first by the state in which the command is permitted,
  1771.    then by a general category of command type.
  1772.  
  1773.    Command arguments, identified by "Arguments:" in the command
  1774.    descriptions below, are described by function, not by syntax.  The
  1775.    precise syntax of command arguments is described in the Formal Syntax
  1776.    section.
  1777.  
  1778.    Some commands cause specific server data to be returned; these are
  1779.    identified by "Data:" in the command descriptions below.  See the
  1780.    response descriptions in the Responses section for information on
  1781.    these responses, and the Formal Syntax section for the precise syntax
  1782.    of these responses.  It is possible for server data to be transmitted
  1783.    as a result of any command; thus, commands that do not specifically
  1784.    require server data specify "no specific data for this command"
  1785.    instead of "none".
  1786.  
  1787.    The "Result:" in the command description refers to the possible
  1788.    tagged status responses to a command, and any special interpretation
  1789.    of these status responses.
  1790.  
  1791.  
  1792.  
  1793.  
  1794. Newman                                                         [Page 28]
  1795.  
  1796. Internet DRAFT                    ACAP                     June 19, 1997
  1797.  
  1798.  
  1799. 6.1.     Initial Connection
  1800.  
  1801.    Upon session startup, the server sends one of two untagged responses:
  1802.    ACAP or BYE.  The untagged BYE response is described in section ###.
  1803.  
  1804. 6.1.1.   ACAP Untagged Response
  1805.  
  1806.    Data:       capability list
  1807.  
  1808.       The untagged ACAP response indicates the session is ready to
  1809.       accept commands and contains a space-separated listing of
  1810.       capabilities that the server supports.  Each capability is
  1811.       represented by a list containing the capability name optionally
  1812.       followed by capability specific string arguments.
  1813.  
  1814.       ACAP capability names MUST be defined in a standards track or IESG
  1815.       approved experimental RFC and registered with IANA according to
  1816.       the rules in section ###.
  1817.  
  1818.       Client implementations SHOULD NOT require any capability name, and
  1819.       MUST ignore any unknown capability names.
  1820.  
  1821.       The following initial capabilities are defined:
  1822.  
  1823.       COMPARATORS
  1824.            The COMPARATORS capability includes a list of the comparator
  1825.            functions which the server supports.  See section ### for a
  1826.            description of comparators.
  1827.  
  1828.       CONTEXTLIMIT
  1829.             The CONTEXTLIMIT capability has one argument which is a
  1830.             number describing the maximum number of contexts the server
  1831.             supports per connection.  The number 0 indicates the server
  1832.             has no limit, otherwise this number MUST be greater than
  1833.             100.
  1834.  
  1835.       IMPLEMENTATION
  1836.             The IMPLEMENTATION capability has one argument which is a
  1837.             string describing the server implementation.  ACAP clients
  1838.             MUST NOT alter their behavior based on this value.  It is
  1839.             intended primarily for debugging purposes.
  1840.  
  1841.       SASL  The SASL capability includes a list of the authentication
  1842.             mechanisms supported by the server.  See section ###.
  1843.  
  1844.  
  1845.    Example:    S: * ACAP (IMPLEMENTATION "ACME v3.5")
  1846.                          (SASL "CRAM-MD5" "PLAIN") (CONTEXTLIMIT "200")
  1847.  
  1848.  
  1849.  
  1850. Newman                                                         [Page 29]
  1851.  
  1852. Internet DRAFT                    ACAP                     June 19, 1997
  1853.  
  1854.  
  1855. 6.2.     Any State
  1856.  
  1857.    The following commands and responses are valid in any state.
  1858.  
  1859.  
  1860. 6.2.1.   NOOP Command
  1861.  
  1862.    Arguments:  none
  1863.  
  1864.    Data:       no specific data for this command (but see below)
  1865.  
  1866.    Result:     OK - noop completed
  1867.                BAD - command unknown or arguments invalid
  1868.  
  1869.       The NOOP command always succeeds.  It does nothing.  It can be
  1870.       used to reset any inactivity auto-logout timer on the server.
  1871.  
  1872.    Example:    C: a002 NOOP
  1873.                S: a002 OK "NOOP completed"
  1874.  
  1875.  
  1876. 6.2.2.   LANG Command
  1877.  
  1878.    Arguments:  optional list of language preferences
  1879.  
  1880.    Data:       untagged response: LANG
  1881.  
  1882.    Result:     OK - lang completed
  1883.                NO - no matching language available
  1884.                BAD - command unknown or arguments invalid
  1885.  
  1886.       The LANG command with no arguments generates an untagged LANG
  1887.       response including a list of languages which the server supports
  1888.       for localized error text strings.  If one or more arguments are
  1889.       supplied they indicate the client's preferred languages for error
  1890.       messages.  The server will match each client preference in order
  1891.       against its internal table of available error strings languages.
  1892.       For a client preference to match a server language table, the
  1893.       client's language tag MUST be a prefix of the server's tag and
  1894.       match up to a "-" or the end of string.  If a match is found, the
  1895.       server returns an OK response.  If no match is found, the server
  1896.       returns an untagged LANG response followed by a NO response.
  1897.  
  1898.       If no LANG command is issued, all error text strings MUST be in
  1899.       English.  This rule is necessary because the default error text
  1900.       has to be in a language which is understandable by any pair of
  1901.       client and server vendors (since both have to diagnose problems).
  1902.       In addition, the default language for errors has to use the
  1903.  
  1904.  
  1905.  
  1906. Newman                                                         [Page 30]
  1907.  
  1908. Internet DRAFT                    ACAP                     June 19, 1997
  1909.  
  1910.  
  1911.       US-ASCII subset of UTF-8, since it can be displayed on the largest
  1912.       number of computers.
  1913.  
  1914.    Example:    C: A003 LANG "fr-ca" "fr" "en-ca" "en-uk"
  1915.                S: A003 OK "Bonjour"
  1916.  
  1917.  
  1918. 6.2.3.   LANG Untagged Response
  1919.  
  1920.    Data:       list of supported language tags
  1921.  
  1922.       The LANG response indicates the languages supported for server
  1923.       error messages.
  1924.  
  1925.    Example:    C: N004 LANG
  1926.                S: * LANG "fr-ca" "en-ca"
  1927.                S: N004 OK "LANG completed"
  1928.  
  1929.  
  1930. 6.2.4.   LOGOUT Command
  1931.  
  1932.    Arguments:  none
  1933.  
  1934.    Data:       mandatory untagged response: BYE
  1935.  
  1936.    Result:     OK - logout completed
  1937.                BAD - command unknown or arguments invalid
  1938.  
  1939.       The LOGOUT command informs the server that the client is done with
  1940.       the session.  The server must send a BYE untagged response before
  1941.       the (tagged) OK response, and then close the network connection.
  1942.  
  1943.    Example:    C: A023 LOGOUT
  1944.                S: * BYE "ACAP Server logging out"
  1945.                S: A023 OK "LOGOUT completed"
  1946.                (Server and client then close the connection)
  1947.  
  1948.  
  1949. 6.2.5.   OK Response
  1950.  
  1951.    Data:       optional response code
  1952.                human-readable text
  1953.  
  1954.       The OK response indicates an information message from the server.
  1955.       When tagged, it indicates successful completion of the associated
  1956.       command.  The human-readable text may be presented to the user as
  1957.       an information message.  The untagged form indicates an
  1958.       information-only message; the nature of the information may be
  1959.  
  1960.  
  1961.  
  1962. Newman                                                         [Page 31]
  1963.  
  1964. Internet DRAFT                    ACAP                     June 19, 1997
  1965.  
  1966.  
  1967.       indicated by a response code.
  1968.  
  1969.    Example:    S: * OK "XXX - need good example"
  1970.  
  1971.  
  1972. 6.2.6.   NO Response
  1973.  
  1974.    Data:       optional response code
  1975.                human-readable text
  1976.  
  1977.       The NO response indicates an operational error message from the
  1978.       server.  When tagged, it indicates unsuccessful completion of the
  1979.       associated command.  The untagged form indicates a warning; the
  1980.       command may still complete successfully.  The human-readable text
  1981.       describes the condition.
  1982.  
  1983.    Example:    C: A010 SEARCH ...
  1984.                S: * NO "Master ACAP server is down, your data may
  1985.                         be out of date."
  1986.                S: A010 OK "search done"
  1987.                   ...
  1988.                C: A222 STORE ("/folder/comp.mail.misc"
  1989.                               "folder.creation-time" "19951206103412")
  1990.                S: A222 NO (PERMISSION ("/folder/")) "Permission denied"
  1991.  
  1992.  
  1993. 6.2.7.   BAD Response
  1994.  
  1995.    Data:       optional response code
  1996.                human-readable text
  1997.  
  1998.       The BAD response indicates an error message from the server.  When
  1999.       tagged, it reports a protocol-level error in the client's command;
  2000.       the tag indicates the command that caused the error.  The untagged
  2001.       form indicates a protocol-level error for which the associated
  2002.       command can not be determined; it may also indicate an internal
  2003.       server failure.  The human-readable text describes the condition.
  2004.  
  2005.    Example:    C: ...empty line...
  2006.                S: * BAD "Empty command line"
  2007.                C: A443 BLURDYBLOOP
  2008.                S: A443 BAD "Unknown command"
  2009.                C: A444 NOOP Hello
  2010.                S: A444 BAD "invalid arguments"
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018. Newman                                                         [Page 32]
  2019.  
  2020. Internet DRAFT                    ACAP                     June 19, 1997
  2021.  
  2022.  
  2023. 6.2.8.   BYE Untagged Response
  2024.  
  2025.    Data:       optional response code
  2026.                human-readable text
  2027.  
  2028.       The untagged BYE response indicates that the server is about to
  2029.       close the connection.  The human-readable text may be displayed to
  2030.       the user in a status report by the client.  The BYE response may
  2031.       be sent as part of a normal logout sequence, or as a panic
  2032.       shutdown announcement by the server.  It is also used by some
  2033.       server implementations as an announcement of an inactivity auto-
  2034.       logout.
  2035.  
  2036.       This response is also used as one of two possible greetings at
  2037.       session startup.  It indicates that the server is not willing to
  2038.       accept a session from this client.
  2039.  
  2040.    Example:    S: * BYE "Auto-logout; idle for too long"
  2041.  
  2042.  
  2043. 6.2.9.   ALERT Untagged Response
  2044.  
  2045.    Data:       optional response code
  2046.                human-readable text
  2047.  
  2048.       The human-readable text contains a special human generated alert
  2049.       message that MUST be presented to the user in a fashion that calls
  2050.       the user's attention to the message.  This is intended to be used
  2051.       for vital messages from the server administrator to the user, such
  2052.       as a warning that the server will soon be shut down for
  2053.       maintenance.
  2054.  
  2055.    Example:    S: * ALERT "This ACAP server will be shut down in
  2056.                            10 minutes for system maintenance."
  2057.  
  2058.  
  2059. 6.3.     Non-Authenticated State
  2060.  
  2061.    In non-authenticated state, the AUTHENTICATE command establishes
  2062.    authentication and enters authenticated state.  The AUTHENTICATE
  2063.    command provides a general mechanism for a variety of authentication
  2064.    techniques.
  2065.  
  2066.    Server implementations may allow non-authenticated access to certain
  2067.    information by supporting the SASL ANONYMOUS [SASL-ANON] mechanism.
  2068.  
  2069.    Once authenticated (including as anonymous), it is not possible to
  2070.    re-enter non-authenticated state.
  2071.  
  2072.  
  2073.  
  2074. Newman                                                         [Page 33]
  2075.  
  2076. Internet DRAFT                    ACAP                     June 19, 1997
  2077.  
  2078.  
  2079.    Only the any-state commands (NOOP, LANG and LOGOUT) and the
  2080.    AUTHENTICATE command are valid in non-authenticated state.
  2081.  
  2082.  
  2083. 6.3.1.   AUTHENTICATE Command
  2084.  
  2085.    Arguments:  SASL mechanism name
  2086.                optional initial response
  2087.  
  2088.    Data:       continuation data may be requested
  2089.  
  2090.    Result:     OK - authenticate completed, now in authenticated state
  2091.                NO - authenticate failure: unsupported authentication
  2092.                     mechanism, credentials rejected
  2093.                BAD - command unknown or arguments invalid,
  2094.                     authentication exchange cancelled
  2095.  
  2096.       The AUTHENTICATE command indicates an authentication mechanism to
  2097.       the server.  If the server supports the requested authentication
  2098.       mechanism, it performs an authentication protocol exchange to
  2099.       authenticate and identify the user.  Optionally, it also
  2100.       negotiates a security layer for subsequent protocol interactions.
  2101.       If the requested authentication mechanism is not supported, the
  2102.       server rejects the AUTHENTICATE command by sending a tagged NO
  2103.       response.
  2104.  
  2105.       The authentication protocol exchange consists of a series of
  2106.       server challenges and client answers that are specific to the
  2107.       authentication mechanism.  A server challenge consists of a
  2108.       command continuation request with the "+" token followed by a
  2109.       BASE64 encoded string.  The client answer consists of a line
  2110.       consisting of a BASE64 encoded string.  If the client wishes to
  2111.       cancel an authentication exchange, it should issue a line with a
  2112.       single "*".  If the server receives such an answer, it must reject
  2113.       the AUTHENTICATE command by sending a tagged BAD response.
  2114.  
  2115.       The optional initial-response argument to the AUTHENTICATE command
  2116.       is used to save a round trip when using authentication mechanisms
  2117.       that are defined to send no data in the initial challenge.  When
  2118.       the initial-response argument is used with such a mechanism, the
  2119.       initial empty challenge is not sent to the client and the server
  2120.       uses the data in the initial-response argument as if it were sent
  2121.       in response to the empty challenge.  If the initial-response
  2122.       argument to the AUTHENTICATE  command is used with a mechanism
  2123.       that sends data in the initial challenge, the server rejects the
  2124.       AUTHENTICATE command by sending a tagged NO response.
  2125.  
  2126.       The service name specified by this protocol's profile of SASL is
  2127.  
  2128.  
  2129.  
  2130. Newman                                                         [Page 34]
  2131.  
  2132. Internet DRAFT                    ACAP                     June 19, 1997
  2133.  
  2134.  
  2135.       "acap".
  2136.  
  2137.       If a security layer is negotiated through the SASL authentication
  2138.       exchange, it takes effect immediately following the CRLF that
  2139.       concludes the authentication exchange for the client, and the CRLF
  2140.       of the tagged OK response for the server.
  2141.  
  2142.       All ACAP implementations MUST support the PLAIN SASL mechanism
  2143.       [SASL-PLAIN], although they MAY offer a configuration option to
  2144.       disable plaintext passwords if site security policy dictates.
  2145.       ACAP implementations SHOULD support an external encryption service
  2146.       or a stronger standards track SASL mechanism.
  2147.  
  2148.       If an AUTHENTICATE command fails with a NO response, the client
  2149.       may try another authentication mechanism by issuing another
  2150.       AUTHENTICATE command.  In other words, the client may request
  2151.       authentication types in decreasing order of preference.
  2152.  
  2153.  
  2154.    Example:    S: * ACAP (IMPLEMENTATION "Blorfysoft v3.5")
  2155.                          (SASL "PLAIN" "KERBEROS_V4")
  2156.                C: A001 AUTHENTICATE KERBEROS_V4
  2157.                S: + AmFYig==
  2158.                C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
  2159.                   +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
  2160.                   WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
  2161.                S: + or//EoAADZI=
  2162.                C: DiAF5A4gA+oOIALuBkAAmw==
  2163.                S: A001 OK "Kerberos V4 authentication successful"
  2164.  
  2165.  
  2166. 6.4.     Searching
  2167.  
  2168.    This section describes the SEARCH command, for retrieving data from
  2169.    datasets.
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186. Newman                                                         [Page 35]
  2187.  
  2188. Internet DRAFT                    ACAP                     June 19, 1997
  2189.  
  2190.  
  2191. 6.4.1.   SEARCH Command
  2192.  
  2193.    Arguments:  dataset or context name
  2194.                optional list of modifiers
  2195.                search criteria
  2196.  
  2197.    Data:       intermediate responses: ENTRY, MODTIME, REFER
  2198.                untagged responses: ADDTO, REMOVEFROM, CHANGE, MODTIME
  2199.  
  2200.    Result:     OK - search completed
  2201.                NO - search failure: can't perform search
  2202.                BAD - command unknown or arguments invalid
  2203.  
  2204.       The SEARCH command identifies a subset of entries in a dataset and
  2205.       returns information on that subset to the client.
  2206.  
  2207.       The first argument to SEARCH identifies what is to be searched.
  2208.       If the string begins with a slash ("/"), it is the name of a
  2209.       dataset to be searched, otherwise it is a name of a context that
  2210.       was created by a SEARCH command given previously in the session.
  2211.  
  2212.       A successful SEARCH command MUST result in a MODTIME intermediate
  2213.       response.
  2214.  
  2215.       Following that are zero or more modifiers to the search.  Each
  2216.       modifier may be specified at most once.  The defined modifiers
  2217.       are:
  2218.  
  2219.       DEPTH number
  2220.            The SEARCH command will traverse the dataset tree up to the
  2221.            specified depth.  ENTRY responses will include the full path
  2222.            to the entry.  A value of "0" indicates that the search
  2223.            should traverse the entire tree.  A value of "1" is the
  2224.            default and indicates only the specified dataset should be
  2225.            searched.  If a dataset is traversed which is not located on
  2226.            the current server, then a REFER intermediate response is
  2227.            returned for that subtree and the search continues.
  2228.  
  2229.       HARDLIMIT number
  2230.            If the SEARCH command would result in more than number
  2231.            entries, the SEARCH fails with a NO completion result with a
  2232.            WAYTOOMANY response code.
  2233.  
  2234.       LIMIT number number
  2235.            Limits the number of intermediate ENTRY responses that the
  2236.            search may generate.  The first numeric argument specifies
  2237.            the limit, the second number specifies the number of entries
  2238.            to return if the number of matches exceeds the limit.  If the
  2239.  
  2240.  
  2241.  
  2242. Newman                                                         [Page 36]
  2243.  
  2244. Internet DRAFT                    ACAP                     June 19, 1997
  2245.  
  2246.  
  2247.            limit is exceeded, the SEARCH command still succeeds,
  2248.            returning the total number of matches in a TOOMANY response
  2249.            code in the tagged OK response.
  2250.  
  2251.       MAKECONTEXT [ENUMERATE] [NOTIFY] context
  2252.            The SEARCH command creates a context with the name given in
  2253.            the argument to refer to the matching entries.  If the SEARCH
  2254.            is successful, the context name may then be given as an
  2255.            argument to subsequent SEARCH commands to search the set of
  2256.            matching entries. If a context with the specified name
  2257.            already exists, it is first freed.  If a new context may not
  2258.            be created due to the server's limit on the number of
  2259.            existing contexts, the command fails, returning a
  2260.            TRYFREECONTEXT response code in the NO completion response.
  2261.  
  2262.            The optional "ENUMERATE" and "NOTIFY" arguments may be
  2263.            included to request enumeration of the context (for virtual
  2264.            scroll bars) or change notifications for the context.
  2265.  
  2266.            ENUMERATE requests that the contents of the context be
  2267.            ordered according to the SORT modifier and that sequential
  2268.            numbers, starting with one, be assigned to the entries in the
  2269.            context.  This permits the RANGE modifier to be used to fetch
  2270.            portions of the ordered context.
  2271.  
  2272.            NOTIFY requests that the server send untagged ADDTO,
  2273.            REMOVEFROM, CHANGE, and MODTIME responses while the context
  2274.            created by this SEARCH command exists.  The server MAY issue
  2275.            untagged ADDTO, REMOVEFROM, CHANGE and MODTIME notifications
  2276.            for a context at any time between the issuing of the SEARCH
  2277.            command with MAKECONTEXT NOTIFY and the completion of a
  2278.            FREECONTEXT command for the context.  Notifications are only
  2279.            issued for changes which occur after the server receives the
  2280.            SEARCH command which created the context.  After issuing a
  2281.            sequence of ADDTO, REMOVEFROM or CHANGE notifications, the
  2282.            server MUST issue an untagged MODTIME notification indicating
  2283.            that the client has all updates to the entries in the context
  2284.            up to and including the given modtime value.  Servers are
  2285.            permitted a reasonable delay to batch change notifications
  2286.            before sending them to the client.
  2287.  
  2288.            The position arguments of the ADDTO, REMOVEFROM and CHANGE
  2289.            notifications are 0 if ENUMERATE is not requested.
  2290.  
  2291.       NOINHERIT
  2292.            This causes the SEARCH command to operate without
  2293.            inheritance.  It can be used to tell which values are
  2294.            explicit overrides.  If MAKECONTEXT is also specified, the
  2295.  
  2296.  
  2297.  
  2298. Newman                                                         [Page 37]
  2299.  
  2300. Internet DRAFT                    ACAP                     June 19, 1997
  2301.  
  2302.  
  2303.            created context is also not effected by inheritance.
  2304.  
  2305.       RETURN (metadata...)
  2306.            Specifies what is to be returned in intermediate ENTRY
  2307.            responses.  If this modifier is not specified, no
  2308.            intermediate ENTRY responses are returned.
  2309.  
  2310.            Inside the parentheses is a list of attributes, each
  2311.            optionally followed by a parenthesized list of metadata.  If
  2312.            the parenthesized list of metadata is not specified, it
  2313.            defaults to "(value)".
  2314.  
  2315.            An attribute name with a trailing "*" requests all attributes
  2316.            with that prefix.  A "*" by itself requests all attributes.
  2317.            If the parenthesized list of metadata is not specified for an
  2318.            attribute with a trailing "*", it defaults to "(attribute
  2319.            value)".
  2320.  
  2321.            Following the last intermediate ENTRY response, the server
  2322.            returns a single intermediate MODTIME response.
  2323.  
  2324.       SORT (attribute comparator ...)
  2325.            Specifies the order in which any resulting ENTRY replies are
  2326.            to be returned to the client.  The SORT modifier takes as an
  2327.            argument a parenthesized list of one or more
  2328.            attribute/comparator pairs.  Attribute lists the attribute to
  2329.            sort on, comparator specifies the name of the collation rule
  2330.            to apply to the values of the attribute.  Successive
  2331.            attribute/comparator pairs are used to order two entries only
  2332.            when all preceding pairs indicate the two entries collate the
  2333.            same.
  2334.  
  2335.            If the SORT modifier is used in conjunction with the
  2336.            MAKECONTEXT modifier, the SORT modifier specifies the
  2337.            ordering of entries in the created context.
  2338.  
  2339.            If no SORT modifier is specified, or none of the
  2340.            attribute/comparator pairs indicates an order for the two
  2341.            entries, the server uses the order of the entries that exists
  2342.            in the context or dataset being searched.
  2343.  
  2344.  
  2345.       Following the modifiers is the search criteria.  Searching
  2346.       criteria consist of one or more search keys.  Search keys may be
  2347.       combined using the AND, and OR search keys.  For example, the
  2348.       criteria (the newline is for readability and not part of the
  2349.       criteria):
  2350.  
  2351.  
  2352.  
  2353.  
  2354. Newman                                                         [Page 38]
  2355.  
  2356. Internet DRAFT                    ACAP                     June 19, 1997
  2357.  
  2358.  
  2359.           AND COMPARE "modtime" "+octet" "19951206103400"
  2360.               COMPARE "modtime" "-octet" "19960112000000"
  2361.       refers to all entries modified between 10:34 December 6 1995 and
  2362.       midnight January 12, 1996 UTC.
  2363.  
  2364.       The currently defined search keys are as follows.
  2365.  
  2366.       ALL  This matches all entries.
  2367.  
  2368.       AND search-key1 search-key2
  2369.            Entries that match both search keys.
  2370.  
  2371.       COMPARE attribute comparator value
  2372.            Entries for which the value of the specified attribute
  2373.            collates using the specified comparator the same or later
  2374.            than the specified value.
  2375.  
  2376.       COMPARESTRICT attribute comparator value
  2377.            Entries for which the specified attribute collates using the
  2378.            specified comparator later than the specified value.
  2379.  
  2380.       EQUAL attribute comparator value
  2381.            Entries for which the value of the attribute is equal to the
  2382.            specified value using the specified comparator.
  2383.  
  2384.       NOT search-key
  2385.            Entries that do not match the specified search key.
  2386.  
  2387.       OR search-key1 search-key2
  2388.            Entries that match either search key.
  2389.  
  2390.       PREFIX attribute comparator value
  2391.            Entries which begin with the specified value using the
  2392.            specified comparator.  If the specified comparator doesn't
  2393.            support substring matching, a BAD response is returned.
  2394.  
  2395.       RANGE start end time
  2396.            Entries which are within the specified range of the
  2397.            enumerated context's ordering.  The lowest-ordered entry in
  2398.            the context is assigned number one, the next lowest entry is
  2399.            assigned number two, and so on.  The numeric arguments
  2400.            specify the lowest and highest numbers to match. The time
  2401.            specifies that the client has processed notifications for the
  2402.            context up to the specified time.  If the context has been
  2403.            modified since then, the server MUST either return a NO with
  2404.            a MODIFIED response code, or return the results that the
  2405.            SEARCH would have returned if none of the changes since that
  2406.            time had been made.
  2407.  
  2408.  
  2409.  
  2410. Newman                                                         [Page 39]
  2411.  
  2412. Internet DRAFT                    ACAP                     June 19, 1997
  2413.  
  2414.  
  2415.            RANGE is only permitted on contexts.  If RANGE is used with a
  2416.            dataset, the server MUST return a BAD response.
  2417.  
  2418.       SUBSTRING attribute comparator value
  2419.            Entries which contain the specified value, using the
  2420.            specified comparator.  If the specified comparator doesn't
  2421.            support substring matching, a BAD response is returned.
  2422.  
  2423.  
  2424.    Example:    C: [TODO - write examples]
  2425.  
  2426.  
  2427. 6.4.2.   ENTRY Intermediate Response
  2428.  
  2429.    Data:       entry name
  2430.                entry data
  2431.  
  2432.       The ENTRY intermediate response occurs as a result of a SEARCH
  2433.       command.  This is the means by which dataset entries are returned
  2434.       to the client.  The entry with the given name matches the search.
  2435.       Following the entry name is a set of zero or more lists, one for
  2436.       each item in the RETURN search modifier, each containing the
  2437.       requested metadata for the requested attribute(s) within the
  2438.       entry.
  2439.  
  2440. 6.4.3.   MODTIME Intermediate Response
  2441.  
  2442.    Data:       modtime value
  2443.  
  2444.       The MODTIME intermediate response occurs as a result of a SEARCH
  2445.       command.  It indicates that the just created context or the
  2446.       previously returned ENTRY responses include all updates to the
  2447.       returned entries up to and including the modtime value in the
  2448.       argument.
  2449.  
  2450.  
  2451. 6.4.4.   REFER Intermediate Response
  2452.  
  2453.    Data:       dataset path
  2454.                ACAP URL
  2455.  
  2456.       The REFER intermediate response occurs as a result of a
  2457.       multi-level SEARCH where one of the levels is located on a
  2458.       different server.  The response indicates the dataset which is not
  2459.       located on the current server and an ACAP URL for where that
  2460.       dataset may be found.
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466. Newman                                                         [Page 40]
  2467.  
  2468. Internet DRAFT                    ACAP                     June 19, 1997
  2469.  
  2470.  
  2471. 6.5.     Contexts
  2472.  
  2473.    The following commands use contexts created by a SEARCH command with
  2474.    a MAKECONTEXT modifier.
  2475.  
  2476.  
  2477. 6.5.1.   FREECONTEXT Command
  2478.  
  2479.    Arguments:  context name
  2480.  
  2481.    Data:       no specific data for this command
  2482.  
  2483.    Result:     OK - freecontext completed
  2484.                NO - freecontext failure: no such context
  2485.                BAD - command unknown or arguments invalid
  2486.  
  2487.       The FREECONTEXT command causes the server to free all state
  2488.       associated with the named context.  The context may no longer be
  2489.       searched and the server will no longer issue any untagged
  2490.       responses for the context.  The context is no longer counted
  2491.       against the server's limit on the number of contexts.
  2492.  
  2493.    Example:    C: A683 FREECONTEXT "blurdybloop"
  2494.                S: A683 OK "Freecontext completed"
  2495.  
  2496.  
  2497. 6.5.2.   UPDATECONTEXT Command
  2498.  
  2499.    Arguments:  list of context names
  2500.  
  2501.    Data:       untagged responses: ADDTO REMOVEFROM CHANGE MODTIME
  2502.  
  2503.    Result:     OK - Updatecontext completed: all updates completed
  2504.                NO - Updatecontext failed: no such context
  2505.                                           not a notify context
  2506.                BAD - command unknown or arguments invalid
  2507.  
  2508.       The UPDATECONTEXT command causes the server to ensure that the
  2509.       client is notified of all changes to the contexts listed as
  2510.       arguments up to the current time.  The contexts listed in the
  2511.       arguments must have been previously given to a successful SEARCH
  2512.       command with a MAKECONTEXT NOTIFY modifier.  A MODTIME untagged
  2513.       response MUST be returned if any read-write metadata in the
  2514.       context changed since the last MODTIME for that context.  This
  2515.       includes metadata which is not listed in the RETURN modifier for
  2516.       the context.
  2517.  
  2518.       While a server may issue untagged ADDTO, REMOVEFROM, CHANGE, and
  2519.  
  2520.  
  2521.  
  2522. Newman                                                         [Page 41]
  2523.  
  2524. Internet DRAFT                    ACAP                     June 19, 1997
  2525.  
  2526.  
  2527.       MODTIME at any time, the UPDATECONTEXT command is used to "prod"
  2528.       the server to send any notifications it has not sent yet.
  2529.  
  2530.       The UPDATECONTEXT command SHOULD NOT be used to poll for updates.
  2531.       If two or more UPDATECONTEXT commands occur between the delay
  2532.       period the server uses to generate unsolicited change
  2533.       notifications, then the server MAY treat all UPDATECONTEXT
  2534.       commands after the first as NOOP commands to discourage client
  2535.       polling.
  2536.  
  2537.    Example:    C: Z4S9 UPDATECONTEXT "blurdybloop" "blarfl"
  2538.                S: Z4S9 OK "client has been notified of all changes"
  2539.  
  2540.  
  2541. 6.5.3.   ADDTO Untagged Response
  2542.  
  2543.    Data:       context name
  2544.                entry name
  2545.                position
  2546.                metadata list
  2547.  
  2548.       The untagged ADDTO response informs the client that an entry has
  2549.       been added to a context.  The response includes the position
  2550.       number of the added entry (the first entry in the context is
  2551.       numbered 1) and those metadata contained in the entry which match
  2552.       the RETURN statement when the context was created.
  2553.  
  2554.       The ADDTO response implicitly adds one to the position of all
  2555.       members of the context which had position numbers that were
  2556.       greater than or equal to the ADDTO position number.
  2557.  
  2558.    Example:    S: * ADDTO "blurdybloop" "fred" 15
  2559.                     ("addressbook.email" "fred@rock.org")
  2560.  
  2561.  
  2562. 6.5.4.   REMOVEFROM Untagged Response
  2563.  
  2564.    Data:       context name
  2565.                entry name
  2566.                old position
  2567.  
  2568.       The untagged REMOVEFROM response informs the client that an entry
  2569.       has been removed from a context.  The response includes the
  2570.       position number that the removed entry used to have (the first
  2571.       entry in the context is numbered 1).
  2572.  
  2573.       The REMOVEFROM response implicitly subtracts one from the position
  2574.       numbers of all members of the context which had position numbers
  2575.  
  2576.  
  2577.  
  2578. Newman                                                         [Page 42]
  2579.  
  2580. Internet DRAFT                    ACAP                     June 19, 1997
  2581.  
  2582.  
  2583.       greater than the REMOVEFROM position number.
  2584.  
  2585.    Example:    S: * REMOVEFROM "blurdybloop" "fred" 15
  2586.  
  2587.  
  2588. 6.5.5.   CHANGE Untagged Response
  2589.  
  2590.    Data:       context name
  2591.                entry name
  2592.                old position
  2593.                new position
  2594.                metadata list
  2595.  
  2596.       The untagged CHANGE response informs the client that an entry in a
  2597.       context has either changed position in the context or has changed
  2598.       the values of one or more of the attributes specified in the
  2599.       RETURN modifier when the context was created.
  2600.  
  2601.       The response includes the previous and current position numbers of
  2602.       the entry (if ENUMERATE was specified on the context) and the
  2603.       attribute metadata requested in the RETURN modifier when the
  2604.       context was created.
  2605.  
  2606.       The CHANGE response implicitly changes the position numbers of all
  2607.       entries which had position numbers between the old and new
  2608.       position.  If old position is less than new position, than one is
  2609.       subtracted from all entries which had position numbers in that
  2610.       range.  Otherwise one is added to all entries which had position
  2611.       numbers in that range.  If the old position and new position are
  2612.       the same, then no implicit position renumbering occurs.
  2613.  
  2614.       CHANGE responses are not issued for entries which have changed
  2615.       position implicitly due to another ADDTO, REMOVEFROM or CHANGE
  2616.       response.
  2617.  
  2618.    Example:    S: * CHANGE "blurdybloop" "fred" 15 10
  2619.                     ("addressbook.email" "fred@stone.org")
  2620.  
  2621.  
  2622. 6.5.6.   MODTIME Untagged Response
  2623.  
  2624.    Data:       context name
  2625.                modtime value
  2626.  
  2627.       The untagged MODTIME response informs the client that it has
  2628.       received all updates to entries in the context which have modtime
  2629.       values less than or equal to the modtime value in the argument.
  2630.  
  2631.  
  2632.  
  2633.  
  2634. Newman                                                         [Page 43]
  2635.  
  2636. Internet DRAFT                    ACAP                     June 19, 1997
  2637.  
  2638.  
  2639.    Example:    S: * MODTIME mycontext "19970320162338"
  2640.  
  2641. 6.6.     Dataset modification
  2642.  
  2643.    The following commands and responses handle modification of datasets.
  2644.  
  2645.  
  2646. 6.6.1.   STORE Command
  2647.  
  2648.    Arguments:  entry store list
  2649.  
  2650.    Data:       intermediate responses: ENTRY
  2651.  
  2652.    Result:     OK - store completed
  2653.                NO - store failure: can't store that name
  2654.                     UNCHANGEDSINCE specified and entry changed
  2655.                BAD - command unknown or arguments invalid
  2656.                      invalid UTF-8 syntax in attribute name
  2657.  
  2658.       Creates, modifies or deletes the named entries in the named
  2659.       datasets.  The values of metadata not specified in the command are
  2660.       not changed.  Setting the "value" metadata of an attribute to NIL
  2661.       removes that attribute from the entry.  Setting the "value" of the
  2662.       "entry" attribute to NIL removes that entry from the dataset.
  2663.       Changing the value of the "entry" attribute renames the entry.
  2664.  
  2665.       The STORE command is followed by one or more entry store lists.
  2666.       Each entry store list begins with an entry path followed by STORE
  2667.       modifiers, followed by zero or more attribute store items.  Each
  2668.       attribute store item is made up of the attribute name followed by
  2669.       a NIL (to remove the attribute's value), a single value (to set
  2670.       the attribute's single value), or a list of metadata items to
  2671.       modify.  The following STORE modifiers may be specified:
  2672.  
  2673.  
  2674.       NOCREATE
  2675.            By default, the server MUST create any datasets necessary to
  2676.            store the entry.  If NOCREATE is specified, the STORE command
  2677.            will fail with a NOEXIST error unless the containing dataset
  2678.            already exists.
  2679.  
  2680.       UNCHANGEDSINCE
  2681.            If the "modtime" of the entry is later than the
  2682.            unchangedsince time, then the store fails with a MODIFIED
  2683.            response code.  Use of UNCHANGEDSINCE with a time of
  2684.            "00000101000000" will always fail if the entry exists.
  2685.            Clients writing to a shared dataset are encouraged to use
  2686.            UNCHANGEDSINCE when modifying an existing entry.
  2687.  
  2688.  
  2689.  
  2690. Newman                                                         [Page 44]
  2691.  
  2692. Internet DRAFT                    ACAP                     June 19, 1997
  2693.  
  2694.  
  2695.       The server MUST either make all the changes specified or make none
  2696.       of them.  If successful, the server MUST update the "modtime"
  2697.       attribute for every entry which was changed.
  2698.  
  2699.       It is illegal to list any metadata item within an attribute twice,
  2700.       any attribute within an entry twice or to any entry path twice.
  2701.       The server MUST return a BAD response if this happens.  If the
  2702.       "modtime" attribute is included in the STORE command, then the
  2703.       server MUST return a NO response with an ILLEGAL response code.
  2704.  
  2705.       When NIL is stored to an attribute, and there is an inherited
  2706.       default value, then an ENTRY intermediate response is generated to
  2707.       notify the client of this change, this response includes the
  2708.       attribute name and value metadata for each attribute which
  2709.       reverted to a non-NIL inherited setting.
  2710.  
  2711.  
  2712.    Example:    C: A342 STORE ("/addressbook/user/fred/ABC547"
  2713.                        "addressbook.phone" "555-1234"
  2714.                        "addressbook.CommonName" "Barney Rubble"
  2715.                        "addressbook.email" NIL)
  2716.                S: A342 OK "Store completed"
  2717.                C: A343 STORE ("/addressbook/user/joe/ABD42"
  2718.                        UNCHANGEDSINCE "19970320162338"
  2719.                        "user.joe.hair-length" "10 inches")
  2720.                S: A343 NO (MODIFIED) "'ABD42' has been changed
  2721.                        by somebody else."
  2722.                C: A344 STORE ("/addressbook/group/Tech/ACD54"
  2723.                        "entry" NIL)
  2724.                S: A344 OK "Store completed"
  2725.                C: A345 STORE ("/option/~/mail/SMTPserver" "value" NIL)
  2726.                S: A345 ENTRY "SMTPserver" "value" "smtp.server.do.main"
  2727.                S: A345 OK "Store completed"
  2728.  
  2729.  
  2730. 6.6.2.   DELETEDSINCE Command
  2731.  
  2732.    Arguments:  dataset name
  2733.                time
  2734.  
  2735.    Data:       intermediate response: DELETED
  2736.  
  2737.    Result:     OK - DELETED completed
  2738.                NO - DELETED failure: can't read dataset
  2739.                     date too far in the past
  2740.                BAD - command unknown or arguments invalid
  2741.  
  2742.       The DELETEDSINCE command returns in intermediate DELETED replies
  2743.  
  2744.  
  2745.  
  2746. Newman                                                         [Page 45]
  2747.  
  2748. Internet DRAFT                    ACAP                     June 19, 1997
  2749.  
  2750.  
  2751.       the names of entries that have been deleted from the named dataset
  2752.       since the given time.
  2753.  
  2754.       Servers may impose a limit on the number or age of deleted entry
  2755.       names they keep track of.  If the server does not have information
  2756.       going back to the specified time, the command fails, returning a
  2757.       TOOOLD response code in the tagged NO response.
  2758.  
  2759.    Example:    C: Z4S9 DELETEDSINCE "/folder/site" 19951205103412
  2760.                S: Z4S9 DELETED "blurdybloop"
  2761.                S: Z4S9 DELETED "anteaters"
  2762.                S: Z4S9 OK "DELETEDSINCE completed"
  2763.                C: Z4U3 DELETEDSINCE "/folder/site" 19951009040854
  2764.                S: Z4U3 NO (TOOOLD) "Don't have that information"
  2765.  
  2766.  
  2767. 6.6.3.   DELETED Intermediate Response
  2768.  
  2769.    Data:       entry name
  2770.  
  2771.       The intermediate DELETED response occurs as a result of a
  2772.       DELETEDSINCE command. It returns an entry that has been deleted
  2773.       from the dataset specified in the DELETEDSINCE command.
  2774.  
  2775.    Example:    S: Z4S9 DELETED "blurdybloop"
  2776.  
  2777. 6.7.     Access Control List Commands
  2778.  
  2779.    The commands in this section are used to manage access control lists.
  2780.  
  2781.  
  2782. 6.7.1.   SETACL Command
  2783.  
  2784.    Arguments:  acl object
  2785.                authentication identifier
  2786.                access rights
  2787.  
  2788.    Data:       no specific data for this command
  2789.  
  2790.    Result:     OK - setacl completed
  2791.                NO - setacl failure: can't set acl
  2792.                BAD - command unknown or arguments invalid
  2793.  
  2794.       The SETACL command changes the access control list on the
  2795.       specified object so that the specified identifier is granted the
  2796.       permissions enumerated in rights.  If the object did not
  2797.       previously have an access control list, one is created.
  2798.  
  2799.  
  2800.  
  2801.  
  2802. Newman                                                         [Page 46]
  2803.  
  2804. Internet DRAFT                    ACAP                     June 19, 1997
  2805.  
  2806.  
  2807.    Example:    C: A123 SETACL ("/addressbook/~/public/") "anyone" "r"
  2808.                S: A123 OK "Setacl complete"
  2809.                C: A124 SETACL ("/folder/site/") "B1FF" "rwa"
  2810.                S: A124 NO (PERMISSION ("/folder/site/")) "'B1FF' not
  2811.                        permitted to modify access rights
  2812.                        for '/folder/site/'"
  2813.  
  2814.  
  2815.  
  2816. 6.7.2.   DELETEACL Command
  2817.  
  2818.    Arguments:  acl object
  2819.                optional authentication identifier
  2820.  
  2821.    Data:       no specific data for this command
  2822.  
  2823.    Result:     OK - deleteacl completed
  2824.                NO - deleteacl failure: can't delete acl
  2825.                BAD - command unknown or arguments invalid
  2826.  
  2827.       If given the optional identifier argument, the DELETEACL command
  2828.       removes any portion of the access control list on the specified
  2829.       object for the specified identifier.
  2830.  
  2831.       If not given the optional identifier argument, the DELETEACL
  2832.       command removes the ACL from the object entirely, causing access
  2833.       to be controlled by a higher-level default ACL.  This form of the
  2834.       DELETEACL command is not permitted on the default ACL for a
  2835.       dataset and servers MUST return a BAD.
  2836.  
  2837.  
  2838.    Example:    C: A223 DELETEACL ("/addressbook/~/public") "anyone"
  2839.                S: A223 OK "Deleteacl complete"
  2840.                C: A224 DELETEACL ("/folder/site")
  2841.                S: A224 BAD "Can't delete ACL from dataset"
  2842.                C: A225 DELETEACL ("/addressbook/user/fred"
  2843.                        "addressbook.email" "barney")
  2844.                S: A225 OK "Deleteacl complete"
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858. Newman                                                         [Page 47]
  2859.  
  2860. Internet DRAFT                    ACAP                     June 19, 1997
  2861.  
  2862.  
  2863. 6.7.3.   MYRIGHTS Command
  2864.  
  2865.    Arguments:  acl object
  2866.  
  2867.    Data:       intermediate responses: MYRIGHTS
  2868.  
  2869.    Result:     OK - myrights completed
  2870.                NO - myrights failure: can't get rights
  2871.                BAD - command unknown or arguments invalid
  2872.  
  2873.       The MYRIGHTS command returns the set of rights that the client has
  2874.       to the given dataset or dataset attribute.
  2875.  
  2876.  
  2877.    Example:    C: A003 MYRIGHTS ("/folder/site")
  2878.                S: A003 MYRIGHTS "r"
  2879.                S: A003 OK "Myrights complete"
  2880.  
  2881.  
  2882.  
  2883. 6.7.4.   MYRIGHTS Intermediate Response
  2884.  
  2885.    Data:       rights
  2886.  
  2887.       The MYRIGHTS response occurs as a result of a MYRIGHTS command.
  2888.       The argument is the set of rights that the client has for the
  2889.       object referred to in the MYRIGHTS command.
  2890.  
  2891.  
  2892. 6.7.5.   LISTRIGHTS Command
  2893.  
  2894.    Arguments:  acl object
  2895.                authentication identifier
  2896.  
  2897.    Data:       untagged responses: LISTRIGHTS
  2898.  
  2899.    Result:     OK - listrights completed
  2900.                NO - listrights failure: can't get rights list
  2901.                BAD - command unknown or arguments invalid
  2902.  
  2903.       The LISTRIGHTS command takes an object and an identifier and
  2904.       returns information about what rights may be granted to the
  2905.       identifier in the ACL for the object.
  2906.  
  2907.    Example:    C: a001 LISTRIGHTS ("/folder") "smith"
  2908.                S: a001 LISTRIGHTS "r" "w"
  2909.                S: a001 OK Listrights completed
  2910.                C: a005 LISTRIGHTS ("/folder/archive.imap") "anyone"
  2911.  
  2912.  
  2913.  
  2914. Newman                                                         [Page 48]
  2915.  
  2916. Internet DRAFT                    ACAP                     June 19, 1997
  2917.  
  2918.  
  2919.                S: a005 LISTRIGHTS "" "r" "w"
  2920.                S: a005 OK Listrights completed
  2921.  
  2922.  
  2923.  
  2924. 6.7.6.   LISTRIGHTS Intermediate Response
  2925.  
  2926.    Data:       required rights
  2927.                list of optional rights
  2928.  
  2929.       The LISTRIGHTS response occurs as a result of a LISTRIGHTS
  2930.       command.  The first argument is a string containing the (possibly
  2931.       empty) set of rights the identifier will always be granted on the
  2932.       dataset or attribute.
  2933.  
  2934.       Following this are zero or more strings each containing a single
  2935.       right the identifier may be granted in the dataset or attribute.
  2936.  
  2937.       The same right MUST NOT be listed more than once in the LISTRIGHTS
  2938.       response.
  2939.  
  2940.  
  2941. 6.8.     Quotas
  2942.  
  2943.    The section defines the commands and responses relating to quotas.
  2944.  
  2945.  
  2946. 6.8.1.   GETQUOTA Command
  2947.  
  2948.    Arguments:  dataset
  2949.  
  2950.    Data:       untagged responses: QUOTA
  2951.  
  2952.    Result:     OK - Quota information returned
  2953.                NO - Quota failure: can't access resource limit
  2954.                                    no resource limit
  2955.                BAD - command unknown or arguments invalid
  2956.  
  2957.       The GETQUOTA command takes the name of a dataset, and returns in
  2958.       an untagged QUOTA response the name of the dataset, its quota
  2959.       root, the quota limit on that root and the quota usage within that
  2960.       root.
  2961.  
  2962.    Example:    C: A043 GETQUOTA "/option/user/fred/common"
  2963.                S: * QUOTA "/option/user/fred/common" "/quota/user/fred"
  2964.                     1048576 2475
  2965.                S: A043 OK "Getquota completed"
  2966.  
  2967.  
  2968.  
  2969.  
  2970. Newman                                                         [Page 49]
  2971.  
  2972. Internet DRAFT                    ACAP                     June 19, 1997
  2973.  
  2974.  
  2975. 6.8.3.   QUOTA Untagged Response
  2976.  
  2977.    Data:       dataset
  2978.                quota root
  2979.                quota limit in bytes
  2980.                amount of quota limit used
  2981.  
  2982.       The QUOTA untagged response is generated as a result of a GETQUOTA
  2983.       command or MAY be generated by the server in response to a SEARCH
  2984.       or STORE command to warn about high usage of a quota.  It includes
  2985.       the name of the applicable dataset, the quota root, the quota
  2986.       limit in bytes and the quota usage.
  2987.  
  2988. 6.9.     Extensions
  2989.  
  2990.    In order to simplify the process of extending the protocol, clients
  2991.    MUST ignore unknown server responses which meet the syntax of
  2992.    response-extend.  In addition, clients MUST ignore server response
  2993.    codes which meet the syntax of resp-code-ext.  Availability of new
  2994.    commands MUST be announced via a capability on the initial greeting
  2995.    line and such commands SHOULD meet the syntax of command-extend.
  2996.  
  2997.    Servers MUST respond to unknown commands with a BAD command
  2998.    completion result.  Servers MUST skip over non-synchronizing literals
  2999.    contained in an unknown command.  This may be done by assuming the
  3000.    unknown command matches the command-extend syntax, or by reading a
  3001.    line at a time and checking for the non-synchronizing literal syntax
  3002.    at the end of the line.
  3003.  
  3004. 7.       Registration Procedures
  3005.  
  3006.    ACAP's usefulness comes from providing a structured storage model for
  3007.    all sorts of configuration data.  However, for its potential to be
  3008.    achieved, it is important that the Internet community strives for the
  3009.    following goals:
  3010.  
  3011.    (1) Standardization.  It is very important to standardize dataset
  3012.    classes.  The authors hope that ACAP achieves the success that SNMP
  3013.    has seen with the definition of numerous standards track MIBs.
  3014.  
  3015.    (2) Community Review.  In the absence of standardization, it is
  3016.    important to get community review on a proposal to improve its
  3017.    engineering quality.  Community review is strongly recommended prior
  3018.    to registration.  The ACAP implementors mailing list
  3019.    <ietf-acap@andrew.cmu.edu> should be used for this purpose.
  3020.  
  3021.    (3) Registration.  Registration serves a two-fold purpose.  First it
  3022.    prevents use of the same name for different purposes, and second it
  3023.  
  3024.  
  3025.  
  3026. Newman                                                         [Page 50]
  3027.  
  3028. Internet DRAFT                    ACAP                     June 19, 1997
  3029.  
  3030.  
  3031.    provides a one-stop list which can be used to locate existing
  3032.    extensions or dataset classes to prevent duplicate work.
  3033.  
  3034.    The following registration templates may be used to register ACAP
  3035.    protocol elements.
  3036.  
  3037. 7.1.     Comparators
  3038.  
  3039.    Additional comparators may be registered with IANA on a first-come,
  3040.    first-served basis.  Comparators intended for interoperable use MUST
  3041.    be defined as a standards-track or IESG-approved-experimental RFC.
  3042.  
  3043.    To: XXX@XXX.XXX
  3044.    Subject: Registration of new comparator
  3045.  
  3046.    Comparator name:
  3047.  
  3048.    Scope:
  3049.  
  3050.    (Describe any limitations on intended use in terms of standards scope,
  3051.     dataset classes, and specific locales.)
  3052.  
  3053.    Operations: Ordering, Equality, Substring match
  3054.  
  3055.    Published Specification(s):
  3056.  
  3057.    (If the published specification is not standards track, or no
  3058.     published specification is referenced then the comparator is
  3059.     assumed to be for limited use.)
  3060.  
  3061.    Person and email address to contact for further information:
  3062.  
  3063. 7.2.     ACAP Capabilities
  3064.  
  3065.    New ACAP capabilities MUST be standards track or IESG approved
  3066.    experimental RFCs.  Registration provides a simple way to locate all
  3067.    extensions.  Careful consideration should be made before extending
  3068.    the protocol, as it can lead to complexity or interoperability
  3069.    problems.
  3070.  
  3071.    To: XXX@XXX.XXX
  3072.    Subject: Registration of ACAP capability
  3073.  
  3074.    Capability name:
  3075.  
  3076.    Capability keyword:
  3077.  
  3078.    Capability arguments:
  3079.  
  3080.  
  3081.  
  3082. Newman                                                         [Page 51]
  3083.  
  3084. Internet DRAFT                    ACAP                     June 19, 1997
  3085.  
  3086.  
  3087.    Published Specification(s):
  3088.  
  3089.    (Standards track or IESG approved experimental RFC)
  3090.  
  3091.    Person and email address to contact for further information:
  3092.  
  3093. 7.3.     ACAP Response Codes
  3094.  
  3095.    ACAP response codes are registered on a first come, first served
  3096.    basis.  Proposals SHOULD be reviewed by the acap implementors mailing
  3097.    list mentioned above.
  3098.  
  3099.    To: XXX@XXX.XXX
  3100.    Subject: Registration of ACAP response code
  3101.  
  3102.    Response Code:
  3103.  
  3104.    Arguments:
  3105.  
  3106.    Purpose:
  3107.  
  3108.    Published Specification(s):
  3109.  
  3110.    (Optional, but encouraged)
  3111.  
  3112.    Person and email address to contact for further information:
  3113.  
  3114. 7.4.     Dataset Classes
  3115.  
  3116.    A dataset class provides a core set of attributes for use in a
  3117.    specified hierarchy.  It may also define rules for the dataset
  3118.    hierarchy underneath that class.  Dataset class specifications must
  3119.    be standards track or IESG approved experimental RFCs.
  3120.  
  3121.    To: XXX@XXX.XXX
  3122.    Subject: Registration of ACAP dataset class
  3123.  
  3124.    Dataset class name/attribute prefix:
  3125.  
  3126.    Purpose:
  3127.  
  3128.    Published Specification(s):
  3129.  
  3130.    (Standards track or IESG approved experimental RFC)
  3131.  
  3132.    Person and email address to contact for further information:
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138. Newman                                                         [Page 52]
  3139.  
  3140. Internet DRAFT                    ACAP                     June 19, 1997
  3141.  
  3142.  
  3143. 7.5.     Vendor Subtree
  3144.  
  3145.    Vendors may reserve a portion of the ACAP namespace for private use.
  3146.    Dataset class names beginning with "vendor.<company/product name>."
  3147.    are reserved for use by that company or product.  In addition, all
  3148.    attribute names beginning with "vendor.<company/product name>." are
  3149.    reserved for use by that company or product.  Registration is on a
  3150.    first come, first served basis.  Whenever possible, private
  3151.    attributes and dataset classes should be avoided in favor of
  3152.    improving interoperable dataset class definitions.
  3153.  
  3154.    To: XXX@XXX.XXX
  3155.    Subject: Registration of ACAP vendor subtree
  3156.  
  3157.    Private Prefix: vendor.<company/product name>.
  3158.  
  3159.    Person and email address to contact for further information:
  3160.  
  3161.    (company names and addresses should be included when appropriate)
  3162.  
  3163. 8.       Formal Syntax
  3164.  
  3165.    The following syntax specification uses the augmented Backus-Naur
  3166.    Form (BNF) notation as specified in [ABNF].
  3167.  
  3168.    Except as noted otherwise, all alphabetic characters are
  3169.    case-insensitive.  The use of upper or lower case characters to
  3170.    define token strings is for editorial clarity only.  Implementations
  3171.    MUST accept these strings in a case-insensitive fashion.
  3172.  
  3173.    The "command" rule below defines the syntax for commands sent by the
  3174.    client.  The "response" rule below defines the syntax for responses
  3175.    sent by the server.
  3176.  
  3177.    ALPHA              = %x41..5A / %x61..7A
  3178.                         ;; alphabetic letters
  3179.  
  3180.    ATOM-CHAR          = "!" / %x23..27 / %x2A..5B / %x5D..7A / %x7C..7E
  3181.                         ;; Any CHAR except ATOM-SPECIALS
  3182.  
  3183.    ATOM-SPECIALS      = "(" / ")" / "{" / SPACE / CTL / QUOTED-SPECIALS
  3184.  
  3185.    BASE64-CHAR        = ALPHA / DIGIT / "+" / "/"
  3186.                         ;; case-sensitive
  3187.  
  3188.    CHAR               = %x01..7F
  3189.  
  3190.    CR                 = %x0C
  3191.  
  3192.  
  3193.  
  3194. Newman                                                         [Page 53]
  3195.  
  3196. Internet DRAFT                    ACAP                     June 19, 1997
  3197.  
  3198.  
  3199.    CRLF               = CR LF
  3200.  
  3201.    CTL                = %x00..1F / %x7F
  3202.  
  3203.    DIGIT              = "0" / DIGIT-NZ
  3204.  
  3205.    DIGIT-NZ           = %x31..39
  3206.                         ; non-zero digits ("1" - "9")
  3207.  
  3208.    LF                 = %x0A
  3209.  
  3210.    OCTET              = %x00..FF
  3211.  
  3212.    QUOTED-CHAR        = SAFE-UTF8-CHAR / "\" QUOTED-SPECIALS
  3213.  
  3214.    QUOTED-SPECIALS    = <"> / "\"
  3215.  
  3216.    SAFE-CHAR          = %x01..09 / %x0B..0C / %x0E..21 /
  3217.                         %x23..5B / %x5D..7F
  3218.                         ;; any TEXT-CHAR except QUOTED-SPECIALS
  3219.  
  3220.    SAFE-UTF8-CHAR     = SAFE-CHAR / UTF8-2 / UTF8-3 / UTF8-4 /
  3221.                         UTF8-5 / UTF8-6
  3222.  
  3223.    SPACE              = %x20
  3224.  
  3225.    TAG-CHAR           = %x21 / %x23..27 / %x2C..5B / %x5D..7A / %x7C..7E
  3226.                         ;; Any ATOM-CHAR except "*" or "+"
  3227.  
  3228.    TEXT-CHAR          = %x01..09 / %x0B..0C / %x0E..7F
  3229.                         ;; any CHAR except CR and LF
  3230.  
  3231.    TEXT-UTF8-CHAR     = SAFE-UTF8-CHAR / QUOTED-SPECIALS
  3232.  
  3233.    UTF8-1             = %x80..BF
  3234.  
  3235.    UTF8-2             = %xC0..DF UTF8-1
  3236.  
  3237.    UTF8-3             = %xE0..EF 2UTF8-1
  3238.  
  3239.    UTF8-4             = %xF0..F7 3UTF8-1
  3240.  
  3241.    UTF8-5             = %xF8..FB 4UTF8-1
  3242.  
  3243.    UTF8-6             = %xFC..FD 5UTF8-1
  3244.  
  3245.    UTF8-CHAR          = TEXT-UTF8-CHAR / CR / LF
  3246.  
  3247.  
  3248.  
  3249.  
  3250. Newman                                                         [Page 54]
  3251.  
  3252. Internet DRAFT                    ACAP                     June 19, 1997
  3253.  
  3254.  
  3255.    acl                = "(" *acl-identrights ")"
  3256.  
  3257.    acl-identifier     = string-utf8
  3258.                         ;; MUST NOT contain TAB
  3259.  
  3260.    acl-identrights    = string-utf8
  3261.                         ;; The identifier followed by a TAB, followed by
  3262.                         ;; the rights.
  3263.  
  3264.    acl-object         = "(" dataset [SPACE attribute [SPACE entry-name]] ")"
  3265.  
  3266.    acl-rights         = quoted
  3267.  
  3268.    atom               = ALPHA *1023ATOM-CHAR
  3269.  
  3270.    attribute          = string-utf8
  3271.                         ;; dot-separated attribute name
  3272.                         ;; MUST NOT contain "*" or "%"
  3273.  
  3274.    attribute-store    = attribute SPACE (value-nil /
  3275.                         "(" 1*(metadata-write-q SPACE value-store) ")")
  3276.                         ;; MUST NOT include the same metadata twice
  3277.  
  3278.    auth-type          = iana-token
  3279.                         ;; as defined in SASL [SASL]
  3280.  
  3281.    base64-token       = *(4BASE64-CHAR) [base64-terminal]
  3282.  
  3283.    base64-terminal    = (2BASE64-CHAR "==") / (3BASE64-CHAR "=")
  3284.  
  3285.    command            = tag SPACE (command-any / command-auth /
  3286.                         command-nonauth) CRLF
  3287.                         ;; Modal based on state
  3288.  
  3289.    command-authent    = "AUTHENTICATE" SPACE auth-type [SPACE base64-token]
  3290.                         *(CRLF base64-token)
  3291.  
  3292.    command-any        = "NOOP" / command-lang / "LOGOUT"
  3293.  
  3294.    command-auth       = command-delacl / command-dsince /
  3295.                         command-freectx / command-getquota /
  3296.                         command-lrights / command-myrights /
  3297.                         command-search / command-setacl /
  3298.                         command-store
  3299.                         ;; only valid in authenticated state
  3300.  
  3301.    command-delacl     = "DELETEACL" SPACE acl-object [SPACE acl-identifier]
  3302.  
  3303.  
  3304.  
  3305.  
  3306. Newman                                                         [Page 55]
  3307.  
  3308. Internet DRAFT                    ACAP                     June 19, 1997
  3309.  
  3310.  
  3311.    command-dsince     = "DELETEDSINCE" SPACE dataset SPACE time
  3312.  
  3313.    command-extend     = extend-token [SPACE extension-data]
  3314.  
  3315.    command-freectx    = "FREECONTEXT" SPACE context
  3316.  
  3317.    command-getquota   = "GETQUOTA" SPACE dataset
  3318.  
  3319.    command-lang       = "LANG" *(SPACE lang-tag)
  3320.  
  3321.    command-lrights    = "LISTRIGHTS" SPACE acl-object
  3322.  
  3323.    command-myrights   = "MYRIGHTS" SPACE acl-object
  3324.  
  3325.    command-nonauth    = command-authent
  3326.                         ;; only valid in non-authenticated state
  3327.  
  3328.    command-search     = "SEARCH" SPACE (dataset / context)
  3329.                         *(SPACE search-modifier)
  3330.                         SPACE search-criteria
  3331.                         ;; MUST NOT include same search-modifier twice
  3332.  
  3333.    command-setacl     = "SETACL" SPACE acl-object SPACE acl-identifier
  3334.                         SPACE acl-rights
  3335.  
  3336.    command-store      = "STORE" SPACE store-entry-list
  3337.  
  3338.    comparator         = <"> comparator-name <">
  3339.  
  3340.    comparator-name    = ["+" / "-"] iana-token
  3341.  
  3342.    context            = string-utf8
  3343.                         ;; MUST NOT begin with slash ("/")
  3344.  
  3345.    dataset            = string-utf8
  3346.                         ;; slash-separated dataset name
  3347.                         ;; begins with slash
  3348.  
  3349.    entry              = entry-name / entry-path
  3350.  
  3351.    entry-name         = string-utf8
  3352.                         ;; entry name MUST NOT contain slash
  3353.                         ;; MUST NOT begin with "."
  3354.  
  3355.    entry-path         = string-utf8
  3356.                         ;; slash-separated path to entry
  3357.                         ;; begins with slash
  3358.  
  3359.  
  3360.  
  3361.  
  3362. Newman                                                         [Page 56]
  3363.  
  3364. Internet DRAFT                    ACAP                     June 19, 1997
  3365.  
  3366.  
  3367.    entry-relative     = string-utf8
  3368.                         ;; potentially relative path to entry
  3369.  
  3370.    extend-token       = atom
  3371.                         ;; MUST be defined by a standards track or
  3372.                         ;; IESG approved experimental protocol extension
  3373.  
  3374.    extension-data     = extension-item *(SPACE extension-item)
  3375.  
  3376.    extension-item     = extend-token / string / number /
  3377.                         "(" [extension-data] ")"
  3378.  
  3379.    iana-token         = atom
  3380.                         ;; MUST be registered with IANA
  3381.  
  3382.    initial-greeting   = "*" SPACE "ACAP" *(SPACE "(" init-capability ")") CRLF
  3383.  
  3384.    init-capability    = init-cap-compare / init-cap-context /
  3385.                         init-cap-extend / init-cap-implem / init-cap-sasl
  3386.  
  3387.    init-cap-compare   = "COMPARATORS" SPACE string-list
  3388.  
  3389.    init-cap-context   = "CONTEXTLIMIT" SPACE string
  3390.  
  3391.    init-cap-extend    = iana-token [SPACE string-list]
  3392.  
  3393.    init-cap-implem    = "IMPLEMENTATION" SPACE string
  3394.  
  3395.    init-cap-sasl      = "SASL" SPACE string-list
  3396.  
  3397.    lang-tag           = <"> Language-Tag <">
  3398.                         ;; Language-Tag rule is defined in [LANG-TAGS]
  3399.  
  3400.    literal            = "{" number [ "+" ] "}" CRLF *OCTET
  3401.                         ;; The number represents the number of octets
  3402.                         ;; MUST be literal-utf8 except for values
  3403.  
  3404.    literal-utf8       = "{" number [ "+" ] "}" CRLF *UTF8-CHAR
  3405.                         ;; The number represents the number of octets
  3406.                         ;; not the number of characters
  3407.  
  3408.    metadata           = attribute [ "(" metadata-type-list ")" ]
  3409.                         ;; attribute MAY end in "*" as wildcard.
  3410.  
  3411.    metadata-list      = metadata *(SPACE metadata)
  3412.  
  3413.    metadata-type      = "attribute" / "myrights" / "size" /
  3414.                         "count" / metadata-write
  3415.  
  3416.  
  3417.  
  3418. Newman                                                         [Page 57]
  3419.  
  3420. Internet DRAFT                    ACAP                     June 19, 1997
  3421.  
  3422.  
  3423.    metadata-type-q    = <"> metadata-type <">
  3424.  
  3425.    metadata-type-list = metadata-type-q *(SPACE metadata-type-q)
  3426.  
  3427.    metadata-write     = "value" / "acl"
  3428.  
  3429.    metadata-write-q   = <"> metadata-write <">
  3430.  
  3431.    nil                = "NIL"
  3432.  
  3433.    nstring            = nil / string
  3434.  
  3435.    number             = *DIGIT
  3436.                         ;; A 32-bit unsigned number.
  3437.                         ;; (0 <= n < 4,294,967,296)
  3438.  
  3439.    nz-number          = DIGIT-NZ *DIGIT
  3440.                         ;; A 32-bit unsigned non-zero number.
  3441.                         ;; (0 < n < 4,294,967,296)
  3442.  
  3443.    position           = number
  3444.                         ;; "0" if context is not enumerated
  3445.                         ;; otherwise this is non-zero
  3446.  
  3447.    quota-limit        = number
  3448.  
  3449.    quota-root         = entry-path
  3450.  
  3451.    quota-usage        = number
  3452.  
  3453.    quoted             = <"> *QUOTED-CHAR <">
  3454.                         ;; limited to 1024 octets between the <">s
  3455.  
  3456.    response           = response-addto / response-alert / response-bye /
  3457.                         response-change / response-cont /
  3458.                         response-deleted / response-done / response-entry /
  3459.                         response-extend / response-listr /
  3460.                         response-lang / response-mtimei / response-mtimeu /
  3461.                         response-myright / response-quota /
  3462.                         response-refer / response-remove / response-stat
  3463.  
  3464.    response-addto     = "*" SPACE "ADDTO" SPACE context SPACE entry-name
  3465.                         SPACE position SPACE return-data-list
  3466.  
  3467.    response-alert     = "*" SPACE "ALERT" SPACE resp-body CRLF
  3468.                        ;; Client MUST display alert text to user
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474. Newman                                                         [Page 58]
  3475.  
  3476. Internet DRAFT                    ACAP                     June 19, 1997
  3477.  
  3478.  
  3479.    response-bye       = "*" SPACE "BYE" SPACE resp-body CRLF
  3480.                        ;; Server will disconnect condition
  3481.  
  3482.    response-change    = "*" SPACE "CHANGE" SPACE context SPACE entry-name
  3483.                         SPACE position SPACE position SPACE return-data-list
  3484.  
  3485.    response-cont      = "+" SPACE (quoted / base64-token)
  3486.  
  3487.    response-deleted   = tag SPACE "DELETED" SPACE entry-name
  3488.  
  3489.    response-done      = tag SPACE resp-cond-state CRLF
  3490.  
  3491.    response-entry     = tag SPACE "ENTRY" SPACE entry SPACE return-data-list
  3492.  
  3493.    response-extend    = (tag / "*") SPACE extend-token [SPACE extension-data]
  3494.  
  3495.    response-lang      = "*" SPACE "LANG" SPACE lang-tag *(SPACE lang-tag)
  3496.  
  3497.    response-listr     = tag SPACE "LISTRIGHTS" SPACE acl-rights
  3498.                         *(SPACE acl-rights)
  3499.  
  3500.    response-mtimei    = tag SPACE "MODTIME" SPACE time
  3501.  
  3502.    response-mtimeu    = "*" SPACE "MODTIME" SPACE context SPACE time
  3503.  
  3504.    response-myright   = tag SPACE "MYRIGHTS" SPACE acl-rights
  3505.  
  3506.    response-quota     = "*" SPACE "QUOTA" SPACE dataset SPACE quota-root
  3507.                         SPACE quota-limit SPACE quota-usage
  3508.  
  3509.    response-refer     = tag SPACE "REFER" SPACE dataset 1*(SPACE
  3510.                         <"> url-relative <">)
  3511.  
  3512.    response-remove    = "*" SPACE "REMOVEFROM" SPACE context SPACE
  3513.                         entry-name SPACE position
  3514.  
  3515.    response-stat      = "*" SPACE resp-cond-state CRLF
  3516.  
  3517.    resp-body          = ["(" resp-code ")" SPACE] quoted
  3518.  
  3519.    resp-code          = "ENCRYPT-NEEDED" / resp-code-inval /
  3520.                         resp-code-many / resp-code-mod /
  3521.                         resp-code-noexist / resp-code-perm /
  3522.                         "PLAINTEXT-DENIED" / "QUOTA" / resp-code-refer /
  3523.                         "TRANSITION-NEEDED" / "TRYCACHE" /
  3524.                         "TRYFREECONTEXT" / resp-code-way / resp-code-ext
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530. Newman                                                         [Page 59]
  3531.  
  3532. Internet DRAFT                    ACAP                     June 19, 1997
  3533.  
  3534.  
  3535.    resp-code-ext      = iana-token [SPACE extension-data]
  3536.                         ;; unknown response codes are ignored by the client.
  3537.  
  3538.    resp-code-inval    = "INVALID" 1*(SPACE entry-path SPACE attribute)
  3539.  
  3540.    resp-code-many     = "TOOMANY" SPACE nz-number
  3541.  
  3542.    resp-code-mod      = "MODIFIED" SPACE entry-path
  3543.  
  3544.    resp-code-noexist  = "NOEXIST" SPACE dataset
  3545.  
  3546.    resp-code-perm     = "PERMISSION" SPACE acl-object
  3547.  
  3548.    resp-code-refer    = "REFER" 1*(SPACE <"> url-relative <">)
  3549.  
  3550.    resp-code-way      = "WAYTOOMANY"
  3551.  
  3552.    resp-cond-state    = ("OK" / "NO" / "BAD") SPACE resp-body
  3553.                         ;; Status condition
  3554.  
  3555.    return-data        = "(" return-metadata *(SPACE return-metadata) ")"
  3556.                         ;; one return-data list is included per item in
  3557.                         ;; the RETURN statement
  3558.  
  3559.    return-data-list   = return-data *(SPACE return-data)
  3560.  
  3561.    return-metadata    = nil / string / value-list / acl
  3562.  
  3563.    searchkey-equal    = "EQUAL" SPACE attribute SPACE comparator
  3564.                         SPACE value-nil
  3565.  
  3566.    searchkey-comp     = "COMPARE" SPACE attribute SPACE comparator SPACE value
  3567.  
  3568.    searchkey-prefix   = "PREFIX" SPACE attribute SPACE comparator SPACE value
  3569.  
  3570.    searchkey-range    = "RANGE" SPACE nz-number SPACE nz-number
  3571.                         SPACE time
  3572.  
  3573.    searchkey-strict   = "COMPARESTRICT" SPACE attribute SPACE comparator
  3574.                         SPACE value
  3575.  
  3576.    searchkey-substr   = "SUBSTRING" SPACE attribute SPACE comparator
  3577.                          SPACE value
  3578.  
  3579.    searchmod-depth    = "DEPTH" SPACE number
  3580.  
  3581.    searchmod-hard     = "HARDLIMIT" SPACE nz-number
  3582.  
  3583.  
  3584.  
  3585.  
  3586. Newman                                                         [Page 60]
  3587.  
  3588. Internet DRAFT                    ACAP                     June 19, 1997
  3589.  
  3590.  
  3591.    searchmod-limit    = "LIMIT" SPACE number SPACE number
  3592.  
  3593.    searchmod-make     = "MAKECONTEXT" [SPACE "ENUMERATE"]
  3594.                         [SPACE "NOTIFY"] SPACE context
  3595.  
  3596.    searchmod-ninh     = "NOINHERIT"
  3597.  
  3598.    searchmod-return   = "RETURN" SPACE "(" [metadata-list] ")"
  3599.  
  3600.    searchmod-sort     = "SORT" SPACE "(" sort-list ")"
  3601.  
  3602.    search-criteria    = "ALL" / searchkey-equal / searchkey-comp /
  3603.                         searchkey-strict / searchkey-range /
  3604.                         searchkey-prefix / searchkey-substr /
  3605.                         "NOT" SPACE search-criteria /
  3606.                         "OR" SPACE search-criteria SPACE search-criteria /
  3607.                         "AND" SPACE search-criteria SPACE search-criteria
  3608.  
  3609.    search-modifier    = searchmod-depth / searchmod-hard /
  3610.                         searchmod-limit / searchmod-make / searchmod-ninh /
  3611.                         searchmod-return / searchmod-sort
  3612.  
  3613.    sort-list          = sort-item *(SPACE sort-item)
  3614.  
  3615.    sort-item          = attribute SPACE comparator
  3616.  
  3617.    store-entry        = "(" entry-path *(SPACE store-modifier)
  3618.                             *(SPACE attribute-store) ")"
  3619.                         ;; MUST NOT include the same store-modifier twice
  3620.                         ;; MUST NOT include the same attribute twice
  3621.  
  3622.    store-entry-list   = store-entry *(SPACE store-entry)
  3623.                         ;; MUST NOT include the same entry twice
  3624.  
  3625.    store-modifier     = store-mod-unchang / store-mod-nocreate
  3626.  
  3627.    store-mod-nocreate = "NOCREATE"
  3628.  
  3629.    store-mod-unchang  = "UNCHANGEDSINCE" SPACE time
  3630.  
  3631.    string             = quoted / literal
  3632.  
  3633.    string-list        = string *(SPACE string)
  3634.  
  3635.    string-utf8        = quoted / literal-utf8
  3636.  
  3637.    tag                = 1*32TAG-CHAR
  3638.  
  3639.  
  3640.  
  3641.  
  3642. Newman                                                         [Page 61]
  3643.  
  3644. Internet DRAFT                    ACAP                     June 19, 1997
  3645.  
  3646.  
  3647.    time               = <"> time-year time-month time-day time-hour
  3648.                         time-minute time-second time-subsecond <">
  3649.                         ;; Timestamp in UTC
  3650.  
  3651.    time-day           = 2DIGIT ;; 01-31
  3652.  
  3653.    time-hour          = 2DIGIT ;; 00-23
  3654.  
  3655.    time-minute        = 2DIGIT ;; 00-59
  3656.  
  3657.    time-month         = 2DIGIT ;; 01-12
  3658.  
  3659.    time-second        = 2DIGIT ;; 00-60
  3660.  
  3661.    time-subsecond     = *DIGIT
  3662.  
  3663.    time-year          = 4DIGIT
  3664.  
  3665.    value              = string
  3666.  
  3667.    value-any          = value-nil / value-list
  3668.  
  3669.    value-list         = "(" [value *(SPACE value)] ")"
  3670.  
  3671.    value-nil          = value / nil
  3672.  
  3673.    value-store        = value-any / acl
  3674.  
  3675.    url-acap           = "acap://" url-server "/" url-enc-entry [url-filter]
  3676.                         ;; url-enc-entry interpreted relative to "/"
  3677.  
  3678.    url-attr-list      = url-enc-attr *("&" url-enc-attr)
  3679.  
  3680.    url-auth           = ";AUTH=" ("*" / url-enc-auth)
  3681.  
  3682.    url-achar          = uchar / "&" / "=" / "~"
  3683.                         ;; See RFC 1738 for definition of "uchar"
  3684.  
  3685.    url-char           = uchar / "=" / "~" / ":" / "@" / "/"
  3686.                         ;; See RFC 1738 for definition of "uchar"
  3687.  
  3688.    url-enc-attr       = 1*url-char
  3689.                         ;; encoded version of attribute name
  3690.  
  3691.    url-enc-auth       = 1*url-achar
  3692.                         ;; encoded version of auth-type above
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698. Newman                                                         [Page 62]
  3699.  
  3700. Internet DRAFT                    ACAP                     June 19, 1997
  3701.  
  3702.  
  3703.    url-enc-entry      = 1*url-char
  3704.                         ;; encoded version of entry-relative above
  3705.  
  3706.    url-enc-user       = *url-achar
  3707.                         ;; encoded version of login userid
  3708.  
  3709.    url-filter         = "?" url-attr-list
  3710.  
  3711.    url-relative       = url-acap / [url-enc-entry] [url-filter]
  3712.                         ;; url-enc-entry is relative to base URL
  3713.  
  3714.    url-server         = [url-user [url-auth] "@"] hostport
  3715.                         ;; See RFC 1738 for definition of "hostport"
  3716.  
  3717. 9.       Multi-lingual Considerations
  3718.  
  3719.    The IAB charset workshop [IAB-CHARSET] came to a number of
  3720.    conclusions which influenced the design of ACAP.  The decision to use
  3721.    UTF-8 as the character encoding scheme was based on that work.  The
  3722.    LANG command to negotiate a language for error messages is also
  3723.    included.
  3724.  
  3725.    Section 3.4.5 of the IAB charset workshop report states that there
  3726.    should be a way to identify the natural language for human readable
  3727.    strings.  Several promising proposals have been made for use within
  3728.    ACAP, but no clear consensus on a single method is apparent at this
  3729.    stage.  The following rules are likely to permit the addition of
  3730.    multi-lingual support in the future:
  3731.  
  3732.    (1) A work in progress called Multi-Lingual String Format (MLSF)
  3733.    proposes a layer on top of UTF-8 which uses otherwise illegal UTF-8
  3734.    sequences to store language tags.  In order to permit its addition to
  3735.    a future version of this standard, client-side UTF-8 interpreters
  3736.    SHOULD silently ignore illegal multi-byte UTF-8 characters, and treat
  3737.    illegal single-byte UTF-8 characters as end of string markers.
  3738.    Servers, for the time being, MUST silently accept illegal UTF-8
  3739.    characters, except in attribute names and entry names.  Clients MUST
  3740.    NOT send illegal UTF-8 characters to the server unless a future
  3741.    standard changes this rule.
  3742.  
  3743.    (2) There is a proposal to add language tags to Unicode.  To support
  3744.    this, servers MUST be able to store UTF-8 characters of up to 20 bits
  3745.    of data.
  3746.  
  3747.    (3) The metadata item "language" is reserved for future use.
  3748.  
  3749.    (4) The ";" character in attribute names is reserved for future use.
  3750.  
  3751.  
  3752.  
  3753.  
  3754. Newman                                                         [Page 63]
  3755.  
  3756. Internet DRAFT                    ACAP                     June 19, 1997
  3757.  
  3758.  
  3759. 10.      Security Considerations
  3760.  
  3761.    The AUTHENTICATE command uses SASL [SASL] to provide basic
  3762.    authentication, authorization, integrity and privacy services.  This
  3763.    is described in section ###.  The security considerations for the
  3764.    PLAIN SASL mechanism [SASL-PLAIN] also apply.
  3765.  
  3766.    ACAP protocol transactions are susceptible to passive observers or
  3767.    man in the middle attacks which alter the data, unless the optional
  3768.    encryption and integrity services of the AUTHENTICATE command are
  3769.    offered, or an external security mechanism is used for protection.
  3770.    It may be useful to allow configuration of both clients and servers
  3771.    to refuse to transfer sensitive information in the absence of strong
  3772.    encryption.
  3773.  
  3774.    ACAP access control lists provide fine grained authorization for
  3775.    access to attributes.  A number of related security issues are
  3776.    described in section ###.
  3777.  
  3778.    ACAP clients are encouraged to consider the security problems
  3779.    involved with a lab computer situation.  Specifically, a client cache
  3780.    of ACAP configuration information MUST NOT allow access by an
  3781.    unauthorized user.  One way to assure this is for an ACAP client to
  3782.    be able to completely flush any non-public cached configuration data
  3783.    when a user leaves.
  3784.  
  3785.    As laptop computers can be easily stolen and a cache of configuration
  3786.    data may contain sensitive information, a disconnected mode ACAP
  3787.    client may wish to encrypt and password protect cached configuration
  3788.    information.
  3789.  
  3790. 11.      Acknowledgments
  3791.  
  3792.    Many thanks to the follow people who helped design ACAP over the past
  3793.    four years: Wallace Colyer, Mark Crispin, Jack DeWinter, Rob Earhart,
  3794.    Ned Freed, Randy Gellens, Terry Gray, J. S. Greenfield, Steve Hole,
  3795.    Steve Hubert, Dave Roberts, Bart Schaefer, Matt Wall and other
  3796.    participants of the IETF ACAP working group.
  3797.  
  3798. 12.      Authors' Addresses
  3799.  
  3800.    Chris Newman
  3801.    Innosoft International, Inc.
  3802.    1050 Lakes Drive
  3803.    West Covina, CA 91790 USA
  3804.  
  3805.    Email: chris.newman@innosoft.com
  3806.  
  3807.  
  3808.  
  3809.  
  3810. Newman                                                         [Page 64]
  3811.  
  3812. Internet DRAFT                    ACAP                     June 19, 1997
  3813.  
  3814.  
  3815.    John Gardiner Myers
  3816.    Netscape Communications
  3817.    501 East Middlefield Road
  3818.    Mail Stop MV-029
  3819.    Mountain View, CA 94043
  3820.  
  3821.    Email: jgmyers@netscape.com
  3822.  
  3823. Appendices
  3824.  
  3825. A.       References
  3826.  
  3827.    [ABNF] Crocker, D., "Augmented BNF for Syntax Specifications: ABNF",
  3828.    Work in progress: draft-ietf-drums-abnf-xx.txt
  3829.  
  3830.    [BASIC-URL] Berners-Lee, Masinter, McCahill, "Uniform Resource
  3831.    Locators (URL)", RFC 1738, CERN, Xerox Coproration, University of
  3832.    Minnesota, December 1994.
  3833.  
  3834.        <ftp://ds.internic.net/rfc/rfc1738.txt>
  3835.  
  3836.    [IAB-CHARSET] Weider, Preston, Simonsen, Alvestrand, Atkinson,
  3837.    Crispin, Svanberg, "The Report of the IAB Character Set Workshop held
  3838.    29 February - 1 March, 1996", RFC 2130, April 1997.
  3839.  
  3840.        <ftp://ds.internic.net/rfc/rfc2130.txt>
  3841.  
  3842.    [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
  3843.    4rev1", RFC 2060, University of Washington, December 1996.
  3844.  
  3845.        <ftp://ds.internic.net/rfc/rfc2060.txt>
  3846.  
  3847.    [IMAP-ACL] Myers, J., "IMAP4 ACL extension", RFC 2086, Carnegie
  3848.    Mellon, January 1997.
  3849.  
  3850.        <ftp://ds.internic.net/rfc/rfc2086.txt>
  3851.  
  3852.    [ISO-10646] ISO/IEC 10646-1:1993(E) "Information Technology--
  3853.    Universal Multiple-octet Coded Character Set (UCS)." See also
  3854.    amendments 1 through 7, plus editorial corrections.
  3855.  
  3856.    [ISO-C] "Programming languages -- C", ISO/IEC 9899:1990,
  3857.    International Organization for Standardization.  This is effectively
  3858.    the same as ANSI C standard X3.159-1989.
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866. Newman                                                         [Page 65]
  3867.  
  3868. Internet DRAFT                    ACAP                     June 19, 1997
  3869.  
  3870.  
  3871.    [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
  3872.    Requirement Levels", RFC 2119, Harvard University, March 1997.
  3873.  
  3874.        <ftp://ds.internic.net/rfc/rfc2119.txt>
  3875.  
  3876.    [LANG-TAGS] Alvestrand, H., "Tags for the Identification of
  3877.    Languages", RFC 1766.
  3878.  
  3879.        <ftp://ds.internic.net/rfc/rfc1766.txt>
  3880.  
  3881.    [REL-URL] Fielding, "Relative Uniform Resource Locators", RFC 1808,
  3882.    UC Irvine, June 1995.
  3883.  
  3884.        <ftp://ds.internic.net/rfc/rfc1808.txt>
  3885.  
  3886.    [SASL] Myers, J., "Simple Authentication and Security Layer (SASL)",
  3887.    Work in progress: draft-myers-auth-sasl-xx.txt
  3888.  
  3889.    [SASL-ANON] Newman, "Anonymous SASL Mechanism", Work in progress:
  3890.    draft-newman-sasl-anon-xx.txt.
  3891.  
  3892.    [SASL-PLAIN] Newman, "Plaintext Password SASL Mechanism and
  3893.    Transition Codes", Work in progress: draft-newman-sasl-plaintrans-
  3894.    xx.txt.
  3895.  
  3896.    [UNICODE-2] The Unicode Consortium, "The Unicode Standard, Version
  3897.    2.0", Addison-Wesley, 1996. ISBN 0-201-48345-9.
  3898.  
  3899.    [US-ASCII] "USA Standard Code for Information Interchange," X3.4.
  3900.    American National Standards Institute: New York (1968).
  3901.  
  3902.    [UTF8] Yergeau, F. "UTF-8, a transformation format of Unicode and ISO
  3903.    10646", RFC 2044, Alis Technologies, October 1996.
  3904.  
  3905.        <ftp://ds.internic.net/rfc/rfc2044.txt>
  3906.  
  3907.  
  3908.  
  3909.  
  3910.  
  3911.  
  3912.  
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922. Newman                                                         [Page 66]
  3923.  
  3924. Internet DRAFT                    ACAP                     June 19, 1997
  3925.  
  3926.  
  3927. B.       ACAP Keyword Index
  3928.  
  3929.  
  3930.        ACAP (untagged response) ...................................   29
  3931.        ADDTO (untagged response) ..................................   42
  3932.        ALERT (untagged response) ..................................   33
  3933.        ALL (search keyword) .......................................   39
  3934.        AND (search keyword) .......................................   39
  3935.        AUTHENTICATE (command) .....................................   34
  3936.        BAD (response) .............................................   32
  3937.        BYE (untagged response) ....................................   33
  3938.        CHANGE (untagged response) .................................   43
  3939.        COMPARATORS (ACAP capability) ..............................   29
  3940.        COMPARE (search keyword) ...................................   39
  3941.        COMPARESTRICT (search keyword) .............................   39
  3942.        CONTEXTLIMIT (ACAP capability) .............................   29
  3943.        DELETEACL (command) ........................................   47
  3944.        DELETED (intermediate response) ............................   46
  3945.        DELETEDSINCE (command) .....................................   45
  3946.        DEPTH (search modifier) ....................................   36
  3947.        ENCRYPT-NEEDED (response code) .............................   20
  3948.        ENTRY (intermediate response) ..............................   40
  3949.        EQUAL (search keyword) .....................................   39
  3950.        FREECONTEXT (command) ......................................   41
  3951.        GETQUOTA (command) .........................................   49
  3952.        HARDLIMIT (search modifier) ................................   36
  3953.        IMPLEMENTATION (ACAP capability) ...........................   29
  3954.        INVALID (response code) ....................................   20
  3955.        LANG (command) .............................................   30
  3956.        LANG (untagged response) ...................................   31
  3957.        LIMIT (search modifier) ....................................   36
  3958.        LISTRIGHTS (command) .......................................   48
  3959.        LISTRIGHTS (intermediate response) .........................   49
  3960.        LOGOUT (command) ...........................................   31
  3961.        MAKECONTEXT (search modifier) ..............................   37
  3962.        MODIFIED (response code) ...................................   21
  3963.        MODTIME (intermediate response) ............................   40
  3964.        MODTIME (untagged response) ................................   43
  3965.        MYRIGHTS (command) .........................................   47
  3966.        MYRIGHTS (intermediate response) ...........................   48
  3967.        NO (response) ..............................................   32
  3968.        NOCREATE (store modifier) ..................................   44
  3969.        NOEXIST (response code) ....................................   21
  3970.        NOINHERIT (search modifier) ................................   37
  3971.        NOOP (command) .............................................   30
  3972.        NOT (search keyword) .......................................   39
  3973.        OK (response) ..............................................   31
  3974.        OR (search keyword) ........................................   39
  3975.        PERMISSION (response code) .................................   21
  3976.  
  3977.  
  3978.  
  3979. Newman                                                         [Page 67]
  3980.  
  3981. Internet DRAFT                    ACAP                     June 19, 1997
  3982.  
  3983.  
  3984.  
  3985.        PLAINTEXT-DENIED (response code) ...........................   21
  3986.        PREFIX (search keyword) ....................................   39
  3987.        QUOTA (response code) ......................................   21
  3988.        QUOTA (untagged response) ..................................   50
  3989.        RANGE (search keyword) .....................................   39
  3990.        REFER (intermediate response) ..............................   40
  3991.        REFER (response code) ......................................   21
  3992.        REMOVEFROM (untagged response) .............................   42
  3993.        RETURN (search modifier) ...................................   38
  3994.        SASL (ACAP capability) .....................................   29
  3995.        SEARCH (command) ...........................................   35
  3996.        SETACL (command) ...........................................   46
  3997.        SORT (search modifier) .....................................   38
  3998.        STORE (command) ............................................   44
  3999.        SUBSTRING (search keyword) .................................   40
  4000.        TOOMANY (response code) ....................................   21
  4001.        TRANSITION-NEEDED (response code) ..........................   21
  4002.        TRYCACHE (response code) ...................................   21
  4003.        TRYFREECONTEXT (response code) .............................   22
  4004.        UNCHANGEDSINCE (store modifier) ............................   44
  4005.        UPDATECONTEXT (command) ....................................   41
  4006.        WAYTOOMANY (response code) .................................   22
  4007.        acl (attribute metadata) ...................................   14
  4008.        anyone (ACL identifier) ....................................   19
  4009.        attribute (attribute metadata) .............................   14
  4010.        dataset.acl (dataset attribute) ............................   26
  4011.        dataset.acl.<attribute> (dataset attribute) ................   26
  4012.        dataset.inherit (dataset attribute) ........................   26
  4013.        en-nocase (comparator) .....................................   18
  4014.        entry (predefined attribute) ...............................   13
  4015.        modtime (predefined attribute) .............................   13
  4016.        myrights (attribute metadata) ..............................   14
  4017.        numeric (comparator) .......................................   18
  4018.        octet (comparator) .........................................   17
  4019.        quota.limit (predefined attribute) .........................   28
  4020.        quota.usage (predefined attribute) .........................   28
  4021.        size (attribute metadata) ..................................   14
  4022.        subdataset (predefined attribute) ..........................   13
  4023.        value (attribute metadata) .................................   15
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036. Newman                                                         [Page 68]
  4037.  
  4038.