home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2378.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  39.3 KB  |  1,236 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                       R. Hedberg
  8. Request for Comments: 2378                             Umea University
  9. Category: Informational                                       P. Pomes
  10.                                                         QUALCOMM, Inc.
  11.                                                         September 1998
  12.  
  13.  
  14.                  The CCSO Nameserver (Ph) Architecture
  15.  
  16. Status of this Memo
  17.  
  18.    This memo provides information for the Internet community.  It does
  19.    not specify an Internet standard of any kind.  Distribution of this
  20.    memo is unlimited.
  21.  
  22. Copyright Notice
  23.  
  24.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  25.  
  26. Abstract
  27.  
  28.    The Ph Nameserver from the Computing and Communications Services
  29.    Office (CCSO), University of Illinois at Urbana-Champaign has for
  30.    some time now been used by several organizations as their choice of
  31.    publicly available database for information about people as well as
  32.    other things.  This document provides a formal definition of the
  33.    client-server protocol.  The Ph service as specified in this document
  34.    is built around an information model, a client command language and
  35.    the server responses.
  36.  
  37. 1.  Overview
  38.  
  39. 1.1.  Basic Information Model
  40.  
  41.    At its simplest the Ph database can be thought of as a computer-
  42.    resident "phone book".  However, it can be used to collect arbitrary
  43.    information about people, and in response to a query about an object
  44.    named in the database, return information about that entity.  It is
  45.    in short a nameserver for people and objects.  It was designed to
  46.    keep a relatively small amount of arbitrary information about a
  47.    relatively large number of people or things, and provide access to
  48.    that information over the Internet.  In order to structure the
  49.    information the manager of the database has to decide which views to
  50.    present of the real-world objects that are to be represented in the
  51.    database.  Each view is then composed of a number of fields and their
  52.    values.  To support this concept Ph has the notion of named
  53.    information, i.e., categorizing information into what are called
  54.    fields and assigning descriptive names to those fields.
  55.  
  56.  
  57.  
  58. Hedberg & Pomes              Informational                      [Page 1]
  59.  
  60. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  61.  
  62.  
  63.    Even if the database resides and is reachable from the Internet it is
  64.    local in the meaning that no server is supposed to be able to refer a
  65.    client to another server which might hold the wanted information.
  66.    However a server may contain a list of other Nameservers which can be
  67.    used by clients to query other Nameservers for information.
  68.  
  69. 1.1.1.  Fields
  70.  
  71.    A field descriptor is associated with each field and is used to
  72.    describe the type and behavior of the field.  A field descriptor
  73.    includes the fieldname, the maximum length of information the field
  74.    can store before truncation, keywords describing the properties of
  75.    the field as well as free text describing what kind of information
  76.    the field is supposed to hold.
  77.  
  78.    The keywords can be any of the following:
  79.  
  80.    Always:   Forces the field's contents to be always printed in
  81.              addition to whatever fields specified by the query.
  82.  
  83.    Any:      This field is always searched by queries. To be most
  84.              use ful, a field marked as Any should also have the Indexed
  85.              and Lookup keywords as well.
  86.  
  87.    Change:   Can be changed by the owner of the entry.
  88.  
  89.    Default:  Printed if no return clause is given in the query.
  90.  
  91.    Encrypt:  Must be encrypted before transmission.
  92.  
  93.    ForcePub: Viewable/searchable regardless of the content of the
  94.              suppress field
  95.  
  96.    Indexed:  Fields that are kept track of in the database's index for
  97.              efficient lookups.  At least one indexed field must be
  98.              present in each query.
  99.  
  100.    LocalPub: May be viewed by anyone in the "local" domain or address
  101.              space.  Fields with this keyword are completely invisible
  102.              outside of the "local" domain.  They will not be shown with
  103.              the fields command (section 3.3), and are disallowed in
  104.              query commands or return clauses (section 3.8).
  105.  
  106.    Lookup:   May be used in the selection part of a query.  A Field
  107.              without this keyword may not be used to select entries.
  108.  
  109.    NoMeta:   Wildcard searches are disallowed.
  110.  
  111.  
  112.  
  113.  
  114. Hedberg & Pomes              Informational                      [Page 2]
  115.  
  116. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  117.  
  118.  
  119.    NoPeople: No entry of type "person" may include this field.
  120.  
  121.    Private:  Field may be viewed by Heros (section 1.4) only.
  122.  
  123.    Public:   May be viewed by anyone.  Fields not marked with this
  124.              keyword may only be viewed by the entry's owner or a Hero.
  125.  
  126.    Sacred:   Changes to the field are prohibited except via non-network
  127.              invocations of the server, i.e., from a tty, file, or pipe.
  128.  
  129.    Turn:     Users may turn off visibility of a field to everyone except
  130.              themselves and Heros by prefixing the field text with '*'.
  131.  
  132.    Unique:   Any change to the field will be rejected if the change
  133.              causes the modified field to match the same field in any
  134.              other entry.
  135.  
  136. 1.1.2.  Character Sets
  137.  
  138.    Historically Ph has been restricted to only handle printable
  139.    characters, that is characters with hexadecimal values between 0x20
  140.    and 0x7f.  Lately with the spreading of 8-bit clean Operating Systems
  141.    there is no reason to keep this limitation.
  142.  
  143.    This document therefore proposes that ISO-8859-1 shall be regarded as
  144.    an alternative character set for Ph, the default still being US-
  145.    ASCII.
  146.  
  147.    Clients that utilize ISO-8859-1 should request that the server return
  148.    ISO-8859-1 by using the "set"-command.
  149.  
  150.    In the instance that values are stored using ISO-8859-1 and are to be
  151.    shown to a client expecting US-ASCII, the characters with character
  152.    codes outside of the US-ASCII range should be displayed in the
  153.    "Quoted-Printable" content-transfer-encoding form defined in RFC-2045
  154.    [MIME].
  155.  
  156.    1.2.  Standardization issues
  157.  
  158.    Each Nameserver manager is in essence free to name new fields to suit
  159.    the special needs of his/her organization.  But in order to make the
  160.    directory service useful outside of the organization it is
  161.    recommended that a core set of standard fields always should be
  162.    present.
  163.  
  164.    Therefore this document defines a couple of standard collections of
  165.    fields (Appendix A).
  166.  
  167.  
  168.  
  169.  
  170. Hedberg & Pomes              Informational                      [Page 3]
  171.  
  172. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  173.  
  174.  
  175.    Also note that the architecture makes no assumption about the search
  176.    and retrieval mechanisms used within individual servers.  Operators
  177.    are thereby free to use any kind of dedicated databases, fast
  178.    indexing software or even gateways to other directory services to
  179.    store and retrieve the information, if desired.
  180.  
  181.    Ph simply functions as a known front-end, offering a simple data
  182.    model in addition to a well known port and simple query language.
  183.  
  184. 1.3.  Conventions Used in this Document
  185.  
  186.    In examples, "C:" and "S:" indicate lines sent by the client and
  187.    server respectively.
  188.  
  189. 1.4.  Heros
  190.  
  191.    For Ph a Hero is equivalent to a superuser or operator.  Being in
  192.    Hero mode means that some or all artificial limits are removed; full
  193.    Heros may change any field in any entry in the database, as well as
  194.    view as many entries as they wish.  Heros can also be limited to one
  195.    field of one other entry.  Hero mode is used mostly for
  196.    administrative purposes, delegation of group authority over selected
  197.    fields, and is controlled by the acl field.
  198.  
  199. 2.  Basic Operation
  200.  
  201.    Initially, the server host starts the Ph service by listening on TCP
  202.    port 105.  When a client host wishes to make use of the service, it
  203.    establishes a TCP connection to the server host.  The client and the
  204.    Ph server then exchange commands and responses (respectively) until
  205.    the connection is closed or aborted.
  206.  
  207. 2.1.  Command syntax
  208.  
  209.    Commands in Ph consist of a keyword optionally followed by zero or
  210.    more keywords or values, separated by spaces, tabs or newlines, and
  211.    followed by a carriage return-linefeed (CRLF) pair. A more thorough
  212.    description using BNF is given in Appendix C.
  213.  
  214.    Values containing spaces, tabs or newlines must be enclosed in double
  215.    quotes ('"').  In addition the sequences "\n", "\t","\"" and "\\" may
  216.    be used to mean newline, tab, double quote and backslash,
  217.    respectively.
  218.  
  219.    Keywords must be given in lower case; case in the values of fields is
  220.    preserved, although queries are not case-sensitive.
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Hedberg & Pomes              Informational                      [Page 4]
  227.  
  228. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  229.  
  230.  
  231. 2.2.  Response syntax
  232.  
  233.    Responses consist of a result code followed by additional information
  234.    possibly separated by entry index and/or field name and are
  235.    terminated by a CRLF pair.
  236.  
  237.       result code:[entry index:][field name:]text
  238.  
  239.    Responses to some commands might be multi-lined.  In these cases each
  240.    line in the response, except the last, has the appropriate result
  241.    code negated (prefaced with "-").  The last line then starts with the
  242.    appropriate result code without negation.  Each line must be
  243.    terminated by a CRLF pair.
  244.  
  245.    If a particular command can apply to more than one entry, then the
  246.    multilined response must be so organized that all information
  247.    pertaining to each entry is returned on consecutive lines, and that
  248.    each of those lines must have one and the same entry index directly
  249.    following the resultcode.  The first entry index should be 1 and
  250.    incremented each time a new entry is referred to.
  251.  
  252.       C: query hedberg return email name title
  253.       S: 102:There were 3 matches to your request.
  254.       S: -200:1:        email: canheg95@student.umu.se
  255.       S: -200:1:         name: Carl Johan Hedberg
  256.       S: -200:1:        title: Student
  257.       S: -200:2:        email: parheg95@student.umu.se
  258.       S: -200:2:         name: Par Hedberg
  259.       S: -200:2:        title: Student
  260.       S: -200:3:        email: Roland.Hedberg@umdac.umu.se
  261.       S: -200:3:         name: Roland Hedberg
  262.       S: -200:3:        title: Boss of the Network group
  263.       S: 200:Ok
  264.  
  265.    Commands that can apply to more than one field must have the name of
  266.    the field to which the response applies directly following the entry
  267.    index.
  268.  
  269.    The text of the response will be either an error message in human
  270.    readable format, or data from the Nameserver.  Whitespace (spaces or
  271.    tabs) may appear anywhere in the response, but the field name and
  272.    text columns if present must each begin with a whitespace character.
  273.  
  274.    Since more than one specific piece of information may be manipulated
  275.    by a particular command, it is possible for parts of a command to
  276.    succeed, while other parts of the same command fail.  This situation
  277.    is handled as a single multi-line response with the result code
  278.    changing as appropriate.
  279.  
  280.  
  281.  
  282. Hedberg & Pomes              Informational                      [Page 5]
  283.  
  284. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  285.  
  286.  
  287.    As for FTP, the result codes are in the range 100-699 (or from -699
  288.    to -100 for multiline responses), where the leading digit has the
  289.    following significance:
  290.  
  291.       1: In progress
  292.       2: Success
  293.       3: More information needed
  294.       4: Temporary failure; it may be worthwhile to try again.
  295.       5: Permanent failure
  296.       6: Phquery specific codes
  297.  
  298.    Many commands generate more than one line of response; every client
  299.    should be prepared to deal with such continued responses.  Note that
  300.    a command is finished when and only when the result code on a
  301.    response line (treated as a signed integer) is greater than or equal
  302.    to 200.
  303.  
  304.    Clients should assume that any numeric response, within the above
  305.    mentioned ranges, are valid.  Also note that the server is allowed to
  306.    send one or more lines with result codes between -199 - -100 (the
  307.    leading "-" indicates a continuation line) and 100 - 199, as status
  308.    information, before the actual results are transmitted.
  309.  
  310. 2.3.  Format of a search string
  311.  
  312.    Matching is not sensitive to upper or lower case letters and is
  313.    normally done on a word-by-word basis. That is, both the query
  314.    expression and the entry information is broken up into words, and
  315.    individual words are compared using exact matching.  If the order of
  316.    the words is important in a query, then the query string can be
  317.    surrounded by '"' (double quotes), whereby the complete search string
  318.    is matched against the information in the Nameserver database.
  319.  
  320.    Word delimiters are the following characters: <SPACE>, <TAB>, <NEW-
  321.    LINE>, ",", ";" and ":" .  These characters are not indexed and
  322.    should not be part of the search string.
  323.  
  324.    However, special symbols, called "wildcard" characters, can be used
  325.    if the exact spelling is unknown.  The '*' (asterisk, 0x2A) is used
  326.    in place of zero or more characters, '+' (plus, 0x2B) in place of one
  327.    or more unknown characters, and '?' (question mark, 0x3F) can be used
  328.    when exactly one character is unknown.  If the unknown character can
  329.    be one of a limited set this can be specified by surrounding the set
  330.    with brackets, e.g., [ei] means that in that place an 'e' or an 'i'
  331.    would match.
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Hedberg & Pomes              Informational                      [Page 6]
  339.  
  340. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  341.  
  342.  
  343. 3.  Commands
  344.  
  345. 3.1.  status
  346.  
  347.    status
  348.  
  349.    Prints the message of the day and the current status of the
  350.    nameserver.
  351.  
  352.       C: status
  353.       S: 100:Qi server $Revision: 1.6 $
  354.       S: 100:Ph passwords may be obtained at CCSO Accounting,
  355.       S: 100:1420 Digital Computer Lab, between 8:30 and 5 Monday-Friday.
  356.       S: 100:Be sure to bring your U of I ID card.
  357.       S: 200:Database ready
  358.  
  359. 3.2.  siteinfo
  360.  
  361.    siteinfo
  362.  
  363.    Returns information about the servers site. Possible fields are
  364.  
  365.    Version        Version information for the server.
  366.    Maildomain     The mail domain to use for phquery-type mail.
  367.    Mailfield      The field containing the specific email address.
  368.    Mailbox        Mandatory entry that names the field to use as
  369.                   maildrop.
  370.    Administrator  Guru in charge of service.
  371.    Passwords      Person in charge of ordinary password/change requests.
  372.    Authenticate   Authentication methods supported by the server,
  373.                   ordered in the site-preferred way.  Presently the
  374.                   following options are defined:
  375.  
  376.                     1   attempt auto login
  377.                     2   allowed to be interactive if needed
  378.                     4   use ANSI X9.9 challenge/response
  379.                     8   use v4 Kerberos login
  380.                     16  use v5 Kerberos [KRB5] login
  381.                     32  use GSS-API [GSS-API] login
  382.                     64  use email login
  383.                     128 password encrypted response to challenge
  384.                     256 use clear-text password
  385.                     512 use HMAC [HMAC] with SHA-1 of challenge string
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Hedberg & Pomes              Informational                      [Page 7]
  395.  
  396. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  397.  
  398.  
  399.    Example
  400.  
  401.         C: siteinfo
  402.         S: -200:1:version:3.1
  403.         S: -200:2:maildomain:umu.se
  404.         S: -200:3:mailfield:alias
  405.         S: -200:4:mailbox:email
  406.         S: -200:5:administrator:roland.hedberg@umdac.umu.se
  407.         S: -200:6:passwords:roland.hedberg@umdac.umu.se
  408.         S: -200:7:authenticate:64:32:128
  409.         S: 200: Ok.
  410.  
  411.    The mail fields in the siteinfo command direct how address
  412.    information stored in the Nameserver is to be used for delivering
  413.    mail.
  414.  
  415.    The specific (username, host) pair to where a user's mail should be
  416.    sent for final delivery is stored in the field named by {mailbox}.
  417.    Phquery and like utilities will use this field.
  418.  
  419.    To construct a useable email address from Nameserver information, the
  420.    algorithm below is followed:
  421.  
  422.         if ({maildomain} is not null) then
  423.              address = (contents of {mailfield})@{maildomain}
  424.         else
  425.              address = (contents of {mailfield})
  426.  
  427.    Some existing client software will not format email addresses
  428.    correctly if the value of {mailbox} is set to anything other than
  429.    "email" when {maildomain} is non-empty.
  430.  
  431.    If {mailbox} is set to anything other than {email}, {maildomain} must
  432.    be reported empty by the siteinfo command.  Also reformatting of each
  433.    record's {mailfield} must be done by the server before reporting it
  434.    to the client.
  435.  
  436. 3.3.  fields
  437.  
  438.    fields [field ...]
  439.  
  440.    Without an argument, a list of all available field descriptors should
  441.    be delivered.  Any space-separated argument(s) restricts the list to
  442.    the named fields.  Fields marked with the "LocalPub" keyword (section
  443.    1.1.1) should not be delivered outside of the local domain.
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Hedberg & Pomes              Informational                      [Page 8]
  451.  
  452. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  453.  
  454.  
  455.    The output of the command consists of two lines describing each
  456.    field.  The first line defines the field in technical terms (max
  457.    length and field attributes), while the second line is a brief
  458.    description of what the field is intended to    hold.  The second
  459.    number of each response is the field id number.
  460.  
  461.       C: fields
  462.       S: -200:6:alias:max 32 Indexed Lookup Public Default
  463.       S: -200:6:alias:Unique name for user.
  464.       S: -200:3:name:max 64 Indexed Lookup Public Default
  465.       S: -200:3:name:Fullname
  466.       S: -200:2:email:max 128 Lookup Public Default
  467.       S: -200:2:email:Account to receive electronic mail.
  468.       S: -200:16:other:max 256 Lookup Public Default Change
  469.       S: -200:16:other:Other info the user finds important.
  470.       S: -200:33:home_phone:max 60 Lookup Public Change Turn
  471.       S: -200:33:home_phone:Home telephone number.
  472.       S: 200:Ok.
  473.  
  474. 3.4.  id
  475.  
  476.    id information
  477.  
  478.    Enters the given information in the Nameserver's log.  This command
  479.    is used by the Ph client to enter the user id of the person running
  480.    it.
  481.  
  482. 3.5.  set
  483.  
  484.    set [option[=value] ...]
  485.  
  486.    Sets the named option for this nameserver session to a value.  The
  487.    default string "on" is used if no value is supplied.  Used without
  488.    arguments it return the settable options and their current value.
  489.    Some common options are
  490.  
  491.    echo      If on, echo the client's commands back to the client.
  492.    limit     Changes that affect more than the specified number of
  493.                 entries results in an error.
  494.    charset   Return responses to the client in the character set
  495.                 specified.
  496.    verbose   If on, report interim progress messages to the client.
  497.    addonly   If on, change commands can only create fields in entries,
  498.                 not modify them.
  499.    nolog     If on, disable logging.
  500.    external  If on, make Fields marked as "LocalPub" invisible.
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Hedberg & Pomes              Informational                      [Page 9]
  507.  
  508. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  509.  
  510.  
  511.    Example
  512.  
  513.       C: set verbose=off
  514.       S: 200:Done.
  515.  
  516.       C: set
  517.       S: -200:echo:off
  518.       S: -200:limit:2
  519.       S: -200:charset:iso-8859-1
  520.       S: -200:verbose:off
  521.       S: -200:addonly:off
  522.       S: -200:nolog:off
  523.       S: -200:external:on
  524.       S: 200:Done.
  525.  
  526. 3.6.  login, logout, answer, clear, email, and xlogin
  527.  
  528. 3.6.1.  login
  529.  
  530.    login [alias]
  531.  
  532.    The "login" command allows client users to identify themselves to the
  533.    Nameserver. More specifically it identifies a client user with a
  534.    particular entry in the Nameserver and allows them to change fields
  535.    in that entry and possibly other entries.  It is also necessary to be
  536.    logged in to the Nameserver to view certain sensitive fields in the
  537.    user's own entry.
  538.  
  539.    In order to use the "login" command the client must prompt the user
  540.    for their ph alias and password.  The client is then responsible for
  541.    (optionally) encrypting the password and sending it to the server.
  542.    This will be covered in sections 3.6.3 (answer) and 3.6.4 (clear).
  543.  
  544.       C: login foo
  545.       S: 301:,:P"_Y$ONU%"SDUQ6&^`ZZ'?*#Y`A_.Z/A>?@SH>*-
  546.  
  547. 3.6.2.  logout
  548.  
  549.    logout
  550.  
  551.    The "logout" command allows a user who is logged in to the Nameserver
  552.    to logout.
  553.  
  554.       C: logout S: 200:Ok.
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Hedberg & Pomes              Informational                     [Page 10]
  563.  
  564. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  565.  
  566.  
  567. 3.6.3.  answer
  568.  
  569.    answer encrypted-response
  570.  
  571.    In response to the login command, the Nameserver responds with a
  572.    random challenge string.  The Nameserver client encrypts the
  573.    challenge with the password supplied by the user, uuencodes the
  574.    result into US-ASCII, and returns the printable result in the
  575.    "answer" command:
  576.  
  577.    C: login ppomes
  578.    S: 301:.%$&.D^67$*1?<.2S@DR:Z@M*)AV-<:4QM>#R>M*HT
  579.    C: answer M5K'F:NI(a?M?O2+-a9`48RA#ZF=L9)G)/XRS7Q^0>0@-R7X$WGb`50B]
  580.    S: 200:ppomes:Hi how are you?
  581.  
  582.    The encryption algorithm is based on a three rotor Enigma engine.
  583.    There are known attacks on the security of this approach.
  584.  
  585.    The answer command is also used to return method-specific responses
  586.    to the xlogin command (section 3.6.6).
  587.  
  588. 3.6.4.  clear
  589.  
  590.    clear cleartext-password
  591.  
  592.    The "clear" command can be used instead of the "answer" command to
  593.    complete a login sequence.  It's argument is the user's cleartext
  594.    password.  This command is supplied only to support those clients
  595.    that have not implemented one of the encryption engines used by the
  596.    "answer" command.  It's use is strongly discouraged.
  597.  
  598.       C: login ppomes
  599.       S: 301:E=@Y&VW^_9YVI;D5.[EB0:B)9Z#_&X$:2)/eL$VJC87
  600.       C: clear MySecret
  601.       S: 200:ppomes:Hi how are you?
  602.  
  603. 3.6.5.  email
  604.  
  605.    email local-userid
  606.  
  607.    The "email" command can also be used instead of the "answer" command
  608.    to complete a login sequence.  The value of local-userid is the
  609.    user's login name on the local machine.  If all of the following
  610.    conditions are true, then the email command will be accepted by the
  611.    server:
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618. Hedberg & Pomes              Informational                     [Page 11]
  619.  
  620. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  621.  
  622.  
  623.    1) The connection to the server originates on port 1023 or less on
  624.       the client.  Note: This is a system port.  Port 1023 is not
  625.       allocated to this use.
  626.  
  627.    2) The canonical name of the client's host matches the right-hand
  628.       side of the email address of the requested alias specified in the
  629.       "login" command.
  630.  
  631.    3) The "local-userid" matches the left-hand side of the email
  632.       address belonging to the requested alias.
  633.  
  634.    This is a weak but convenient form of authentication.  Depending on
  635.    the information users are allowed to change about themselves and the
  636.    threat environment the server operates in, this method may be
  637.    appropriate.  Servers should take care to avoid DNS spoofing.
  638.  
  639. 3.6.6.  xlogin
  640.  
  641.    xlogin option alias
  642.  
  643.    Extended login command for GSS, Kerberos v4 and v5, ANSI X9.9 token
  644.    devices (e.g., SNK/4), etc. The option is one of the values returned
  645.    in the Authenticate field of the "siteinfo" command (section 3.2).
  646.    Alias is the user's alias.
  647.  
  648.       C: xlogin 16 ppomes
  649.       S: 301:DoKrbLogin started; send Kerberos mutual authenticator.
  650.       C: answer MJa8QO1cJHYz2IdWyg7uhAnixVqgCZQBWr64ciXYku1ktdu....
  651.       S: 200:ppomes:Hi how are you?
  652.  
  653.       C: xlogin 4 ppomes
  654.       S: 302:SNK Challenge "024142":
  655.       C: answer 82344338
  656.       S: 200:ppomes:Hi how are you?
  657.  
  658.    The answer command returns the requested quantity, Kerberos
  659.    authenticator, X9.9 device response, etc.  Binary quantities are
  660.    first uuencoded into US-ASCII.
  661.  
  662. 3.7.  add
  663.  
  664.    add field=value...
  665.  
  666.    This command is used to add new entries to the database.  You must be
  667.    logged in and have full Hero privileges (section 1.4) to use "add".
  668.  
  669.       C: add name="doe john" id="123456789" alias="j-doe"
  670.       S: 200:Ok.
  671.  
  672.  
  673.  
  674. Hedberg & Pomes              Informational                     [Page 12]
  675.  
  676. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  677.  
  678.  
  679. 3.8.  query
  680.  
  681.    query [field=]value [field=value] . . . [return field1 [field2]]
  682.  
  683.    If no field is specified together with a value then the field is
  684.    assumed to be "name" and/or "nickname".  When more than one field-
  685.    value specification are given in a query, entries matching all
  686.    specifications are returned (implicit AND).
  687.  
  688.    It is possible to define which fields should be returned by adding a
  689.    "return" clause.  If no return clause is defined the Ph server will
  690.    return a default list of fields.  Typical default fields are "alias",
  691.    "name", "title", "email", "phone", "address", "department", "www",
  692.    and "other".  A return clause consists of the word "return" followed
  693.    by a list of fields or the word "all".  If the word "all" is used
  694.    then all viewable fields will be returned.
  695.  
  696.       C: query name=doe name=john
  697.       S: 102:There was 1 match to your request.
  698.       S: -200:1:            alias: j-doe
  699.       S: -200:1:             name: doe john
  700.       S: 200:Ok.
  701.  
  702. 3.9.  delete
  703.  
  704.    delete [field=]value...
  705.  
  706.    This command is used to delete entire entries from the database.  You
  707.    must be logged in and have full Hero (section 1.4) privileges to use
  708.    "delete".
  709.  
  710.    The arguments to the "delete" command are the same as the selection
  711.    part of a "query" command.  "Delete" finds all the entries that match
  712.    the argument(s) and deletes them.
  713.  
  714.    The "delete" command obeys the Nameserver "limit" option, which can
  715.    be used to prevent deletion of more entries than intended.
  716.  
  717.       C: delete name="doe john" id="123456789" alias="j-doe"
  718.       S: 200:1 entries deleted.
  719.  
  720. 3.10.  change
  721.  
  722.    change [field=]value    [make|force] field="value"...
  723.  
  724.    This command is used to change one or more fields in one or more
  725.    entries to the values specified.  The "change" command consists of
  726.    two clauses, the "change" clause and the "make" or "force" clause.
  727.  
  728.  
  729.  
  730. Hedberg & Pomes              Informational                     [Page 13]
  731.  
  732. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  733.  
  734.  
  735.    The "change" clause determines which entries will be affected by the
  736.    command.  It uses the same arguments as the selection clause of a
  737.    "query" command.  The "make" or "force" clause specifies which
  738.    field(s) will be changed and the new value(s) of the specified
  739.    field(s).  The "force" clause is only used to make non-encrypted
  740.    changes to fields marked "Encrypt".
  741.  
  742.    You must be logged in to use "change".
  743.  
  744.    The "change" command obeys the Nameserver "limit" option, which can
  745.    be used to prevent changing the field contents of more entries than
  746.    intended.
  747.  
  748.       C: change alias=j-doe force password=NewSecret
  749.       S: 200:1 entry changed.
  750.  
  751.       C: set limit=500
  752.       S: 200:Done.
  753.       C: change fax="(619) 555-1212" make fax="(760) 555-1212"
  754.       S: 200: 113 entries changed.
  755.  
  756. 3.11.  help
  757.  
  758.    help    [{native|client} [topic ...]]
  759.  
  760.    Prints help on the Nameserver or on specific clients.  If client is
  761.    specified, it should be a valid Nameserver client identifier, such as
  762.    "ph".  The client-specific help will first be searched for topic, and
  763.    then the native help will be searched.  If topic is omitted, a list
  764.    of all available help texts will be returned.  If "native" or client
  765.    are also omitted, a list of clients will be returned.
  766.  
  767. C: help native 101
  768. -200:1:101:
  769. -200:1: The Nameserver echo option is set.  The text of this response is
  770. -200:1: the command you just gave, which has not (yet) been executed.
  771. 200:Ok.
  772.  
  773. 3.12.  quit/exit/stop
  774.  
  775.    quit
  776.  
  777.    Terminates the session with the Nameserver and causes the client to
  778.    exit.
  779.  
  780.       C: quit
  781.       S: 200:Bye!
  782.  
  783.  
  784.  
  785.  
  786. Hedberg & Pomes              Informational                     [Page 14]
  787.  
  788. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  789.  
  790.  
  791. 4.  Security
  792.  
  793. 4.1.  Transport Layer
  794.  
  795.    In the absence of encryption between client and server, all
  796.    Nameserver traffic is unsecure.  Kerberos v4, v5, and the GSS-API all
  797.    provide encryption mechanisms, however the Nameserver protocol does
  798.    not support the means to negotiate encryption between client and
  799.    server.  This implies that all traffic can be seen by other machines
  800.    having access to the network linking the client and server.
  801.    Furthermore clear-text traffic is subject to modification in transit
  802.    between client and server.  Possible ways of augmenting this would be
  803.    to use something like TLS [TLS] or IPSec [IPSEC].
  804.  
  805. 4.2.  Server Authentication
  806.  
  807.    Unless one of the mutual authentication mechanisms is used, e.g.,
  808.    Kerberos 4/5 or GSS-API, there is no way to prove the identity of a
  809.    server.  Further, there is no mechanism to prove a given server is
  810.    authoritative for a set of information.
  811.  
  812. 4.3.  Secure User Authentication
  813.  
  814.    The Ph protocol allows the negotiation of several authentication
  815.    protocols between client and server, some weak and some strong.  It
  816.    does not prohibit the use of cleartext passwords, something which
  817.    should be depreciated, but is useful when dealing with some clients.
  818.  
  819. 4.4.  Privacy and Access Lists
  820.  
  821.    Directory services like the CCSO white pages server that contain
  822.    information on persons have to consider privacy issues.  This paper
  823.    describes one way of partitioning specific attributes from unwanted
  824.    access by designating them visible only to the "local" community,
  825.    visible only to the person connected with the information, or visible
  826.    only to the database administrator.
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Hedberg & Pomes              Informational                     [Page 15]
  843.  
  844. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  845.  
  846.  
  847. 4.5.  References
  848.  
  849.    [GSS-API] Linn, J., "Generic Security Service Application Program
  850.              Interface, Version 2", RFC 2078, January 1997.
  851.  
  852.    [HMAC]    Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
  853.              Hashing for Message Authentication", RFC 2104, February
  854.              1997.
  855.  
  856.    [IPSEC]   Atkinson, R., "Security Architecture for the Internet
  857.              Protocol", RFC 1825, August 1995.
  858.  
  859.    [KRB5]    Kohl, J., and C. Neuman, "The Kerberos Network
  860.              Authentication Service (V5)", RFC 1510, September 1993.
  861.  
  862.    [TLS]     Dierks, T., and C. Allen, "The TLS Protocol,
  863.              Version 1.0", Work in Progress.
  864.  
  865.    [MIME]    Freed, N., and N. Borenstein, "Multipurpose Internet Mail
  866.              Extensions, (MIME) Part One: Format of Internet Message
  867.              Bodies", RFC 2045, November 1996.
  868.  
  869. 5.  Miscellaneous
  870.  
  871. 5.1.  Authors' Addresses
  872.  
  873.    Roland Hedberg
  874.    Umdac
  875.    Umea University
  876.    901 87 Umea
  877.    Sweden
  878.  
  879.    EMail: Roland.Hedberg@umdac.umu.se
  880.  
  881.  
  882.    Paul Pomes
  883.    Qualcomm Inc
  884.    6455 Lusk Blvd
  885.    San Diego, CA
  886.    USA
  887.  
  888.    EMail: ppomes@qualcomm.com
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Hedberg & Pomes              Informational                     [Page 16]
  899.  
  900. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  901.  
  902.  
  903. Appendix A
  904.  
  905.    Default fields and suggested lengths connected to different object
  906.    types.
  907.  
  908.    All entries:  Information common to all entries
  909.    type              64
  910.    name              256
  911.    address           128
  912.    proxy             32
  913.    password          32
  914.  
  915.    type=phone:   Information found in a phonebook
  916.    phone             64
  917.    fax               64
  918.  
  919.    type=person:  Information about a human being
  920.    alias             32
  921.    forename          64
  922.    surname           64
  923.    group             32
  924.    email             128
  925.    public_key        4096
  926.    nickname          128
  927.    www               256
  928.    acl               128
  929.  
  930.    type=staff:   Information about an employee
  931.    empno             16
  932.    department        64
  933.    supervisor        64
  934.    secretary         64
  935.    office_location   128
  936.    office_address    128
  937.    office_phone      64
  938.    title             64
  939.    pager             64
  940.    hours             128
  941.  
  942.    type=unit:   Information about an organizational unit
  943.    email             128
  944.    www               256
  945.    public_key        4096
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Hedberg & Pomes              Informational                     [Page 17]
  955.  
  956. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  957.  
  958.  
  959. Appendix B
  960.  
  961.    Result codes
  962.  
  963.    100 In progress (general).
  964.    101 Echo of current command.
  965.    102 Count of number of matches to query.
  966.    103 No hostname found for IP address.
  967.    200 Success (general).
  968.    201 Database ready, but read-only.
  969.    300 More information (general).
  970.    301 Encrypt this string.
  971.    302 Print this prompt.
  972.    400 Temporary error (general).
  973.    401 Internal database error.
  974.    402 Lock not obtained within timeout period.
  975.    403 Login would have been OK, but database read-only
  976.    475 Database unavailable; try later.
  977.    500 Permanent error (general).
  978.    501 No matches to query.
  979.    502 Too many matches to query.
  980.    503 Not authorized for requested information.
  981.    504 Not authorized for requested search criteria.
  982.    505 Not authorized to change requested field.
  983.    506 Request refused; must be logged in to execute.
  984.    507 Field does not exist.
  985.    508 Field is not present in requested entry.
  986.    509 Alias already in use.
  987.    510 Not authorized to change this entry.
  988.    511 Not authorized to add entries.
  989.    512 Illegal value.
  990.    513 Unknown option.
  991.    514 Unknown command.
  992.    515 No indexed field in query.
  993.    516 No authorization for request.
  994.    517 Operation failed because database is read-only.
  995.    518 To many entries selected by change command.
  996.    520 CPU usage limit exceeded.
  997.    521 Change command would have overridden existing field,
  998.    and the "addonly" option is on.
  999.    522 Attempt to view "Encrypted" field.
  1000.    523 Expecting "answer" or "clear".
  1001.    524 Names of help topics may not contain "/".
  1002.    525 Email authentication failed
  1003.    526 Host name address not found in DNS
  1004.    527 Reverse DNS lookup does not match forward DNS lookup
  1005.    528 General Kerberos database error.
  1006.    529 Selected authentication method not available
  1007.  
  1008.  
  1009.  
  1010. Hedberg & Pomes              Informational                     [Page 18]
  1011.  
  1012. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  1013.  
  1014.  
  1015.    590 Remote queries not allowed.
  1016.    598 Command unknown.
  1017.    599 Syntax error.
  1018.    600 Ambiguous or multiple match
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Hedberg & Pomes              Informational                     [Page 19]
  1067.  
  1068. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  1069.  
  1070.  
  1071. Appendix  C
  1072.  
  1073.    Description of the client command language using the augmented
  1074.    Backus-Naur Form (RFC822).
  1075.  
  1076.    response = code [index] [field] text CRLF
  1077.  
  1078.    code     = [-] LDIG 2DIGIT ":"
  1079.    index    = number ":"
  1080.    field    = 1*SPACE attribute ":" 1*SPACE
  1081.    text     = 1*( CHAR / LWSP-char )
  1082.  
  1083.  
  1084.    command     = ph-command CRLF
  1085.  
  1086.    ph-command  =  "status" / a-command / oa-command
  1087.    ph-command  =/ av-command / answer-command / query-command
  1088.    ph-command  =/ delete-command / change-command / "help" / quit-command
  1089.  
  1090.    a-command       = ("siteinfo"/"fields"/"id"/"login"/"help"/"email"/
  1091.               "clear") [attribute]
  1092.    oa-command      = ("xlogin") number attribute
  1093.    av-command      = ("set"/"add"/"make") 1*attribute-value
  1094.    answer-command  = ("answer") 1*printable
  1095.    query-command   = ("query"/"ph") 1*selection ["return" 1*attribute]
  1096.    quit-command    = "quit" / "exit" / "stop"
  1097.    change-command  = "change" 1*selection make 1*attribute-value
  1098.    delete-command  = "delete" selection
  1099.  
  1100.    selection       = value / attribute-value
  1101.  
  1102.    attribute-value = attribute "=" value
  1103.  
  1104.    value           = 1*(cstring / quoted-string / set)
  1105.  
  1106.    cstring         = 1*( ALPHA / DIGIT / S_SPEC / set / quoted-pair )
  1107.    attribute       = 1*( ALPHA / DIGIT / "_" / "-" )
  1108.    number          = 1*(DIGIT)
  1109.  
  1110.    quoted-string   = <"> 1*(qtext/quoted-pair) <">
  1111.  
  1112.    quoted-pair  =  "\" CHAR
  1113.    qtext        = 1*( CHAR / CR / SPEC1 / DELIMIT1 / DELIMIT2 / LWS )
  1114.    set          = '[' 1*(ALPHA/DIGIT) ']'
  1115.  
  1116.    LWSP-char    = SPACE / HTAB
  1117.    LWS          = 1*([CRLF] (LWSP-char))
  1118.    CRLF         = CR LF
  1119.  
  1120.  
  1121.  
  1122. Hedberg & Pomes              Informational                     [Page 20]
  1123.  
  1124. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  1125.  
  1126.  
  1127.    S_SPEC       = '*'/'+'/'?'
  1128.    SPEC1        = "=" / "*" / "?" / "+" / "[" / "]"
  1129.    SPEC2        = "\" / """
  1130.    DELIMIT1     = SPACE / HTAB / LF
  1131.    DELIMIT2     = "," / ";" / ":"
  1132.    PRINTABLE    = %d32..%d126
  1133.    CTL          = %d0..%d31 / %d127..%d160
  1134.    ALPHA        = %d65..%d90 / %d97..%d122
  1135.    DIGIT        = %d48..%d57
  1136.    LDIG         = %d49..%d54
  1137.    SPACE        = %d32
  1138.    SEP          = (CR LF) / LF
  1139.    CR           = %d13
  1140.    LF           = %d10
  1141.    HTAB         = %d9
  1142.    CHAR         = %d33..%d126 / %d160..%d255
  1143.    OTHER        = "(" / ")" / "-" / "." / "/"
  1144.           "@" / "$" / "_" / "!" / "~" /
  1145.           "'" / "#" / "&" / "<" / ">" /
  1146.           "^" / "`" / "{" / "|" / "}"
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Hedberg & Pomes              Informational                     [Page 21]
  1179.  
  1180. RFC 2378         The CCSO Nameserver (Ph) Architecture    September 1998
  1181.  
  1182.  
  1183. Full Copyright Statement
  1184.  
  1185.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  1186.  
  1187.    This document and translations of it may be copied and furnished to
  1188.    others, and derivative works that comment on or otherwise explain it
  1189.    or assist in its implementation may be prepared, copied, published
  1190.    and distributed, in whole or in part, without restriction of any
  1191.    kind, provided that the above copyright notice and this paragraph are
  1192.    included on all such copies and derivative works.  However, this
  1193.    document itself may not be modified in any way, such as by removing
  1194.    the copyright notice or references to the Internet Society or other
  1195.    Internet organizations, except as needed for the purpose of
  1196.    developing Internet standards in which case the procedures for
  1197.    copyrights defined in the Internet Standards process must be
  1198.    followed, or as required to translate it into languages other than
  1199.    English.
  1200.  
  1201.    The limited permissions granted above are perpetual and will not be
  1202.    revoked by the Internet Society or its successors or assigns.
  1203.  
  1204.    This document and the information contained herein is provided on an
  1205.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  1206.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  1207.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  1208.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  1209.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Hedberg & Pomes              Informational                     [Page 22]
  1235.  
  1236.