home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_a_c / draft-ietf-asid-rwhois-00.txt < prev    next >
Text File  |  1997-08-06  |  85KB  |  2,145 lines

  1.  
  2. ASID Working Group                                          
  3. INTERNET-DRAFT                         Network Solutions, Inc.
  4. draft-ietf-asid-rwhois-00.txt                      July 30, 1997
  5. Expires: Jan 30, 1998                                
  6. Intended category: Standards Track
  7.  
  8.                     Referral Whois Protocol (RWhois) 2.0
  9.  
  10. Status of this Memo
  11.  
  12. This document is an Internet-Draft. Internet-Drafts are working documents
  13. of the Internet Engineering Task Force (IETF), its areas, and its working
  14. groups. Note that other groups may also distribute working documents as
  15. Internet-Drafts.
  16.  
  17. Internet-Drafts are draft documents valid for a maximum of six months
  18. and may be updated, replaced, or obsoleted by other documents at any time.
  19. It is inappropriate to use Internet-Drafts as reference material or to
  20. cite them other than as work in progress.
  21.  
  22. To learn the current status of any Internet-Draft, please check the
  23. 1id-abstracts.txt listing contained in the Internet-Drafts Shadow Directories
  24. on ds.internic.net (US East Coast), nic.nordu.net (Europe), ftp.isi.edu
  25. (US West Coast), or munnari.oz.au (Pacific Rim).
  26.  
  27. Abstract
  28.  
  29. This memo describes Version 2.0 of the client/server interaction of RWhois.
  30. RWhois provides a distributed system for the display of hierarchical and
  31. non-hierarchical information. This system is primarily hierarchical by
  32. design, allowing for the deterministic reduction of a query and the referral
  33. of the user closer to the maintainer of the information. It also identifies
  34. the attributes that are non-hierarchical so that they may be indexed into a
  35. mesh.
  36.  
  37. RWhois differentiates itself from other directory service protocols with its
  38. ability to reduce the query (narrow in on a hierarchical server that may be
  39. able to help) and with its integrated awareness of authority areas.
  40.  
  41.  
  42.  
  43. Table of Contents
  44.  
  45.    * Abstract
  46.    * Summary Of Changes Between RWhois Spec 1.5 And 2.0
  47.    * Open Issues
  48.    * 1.0 Introduction
  49.         o 1.1 Definitions
  50.    * 2.0 Connection Model
  51.         o 2.1 Standard Query (TCP)
  52.         o 2.2 Quick Query (UDP)
  53.    * 3.0 Client/Server Interaction Model
  54.         o 3.1 Banner
  55.              + 3.1.1 From the Server
  56.              + 3.1.2 From the Client
  57.         o 3.2 Base MIME Objects
  58.              + 3.2.1 Directives
  59.              + 3.2.2 Responses
  60.              + 3.2.3 Results
  61.         o 3.3 Directive and Response Specifications
  62.              + 3.3.1 rwhois
  63.              + 3.3.2 directive
  64.              + 3.3.3 display
  65.              + 3.3.4 forward
  66.              + 3.3.5 limit
  67.              + 3.3.6 notify
  68.              + 3.3.7 quit
  69.              + 3.3.8 register
  70.              + 3.3.9 class
  71.              + 3.3.10 attribute
  72.              + 3.3.11 security
  73.              + 3.3.12 soa
  74.              + 3.3.13 status
  75.              + 3.3.14 xfer
  76.              + 3.3.15 X-
  77.    * 4.0 Data Model
  78.         o 4.1 Base Class
  79.         o 4.2 Defining a New Class
  80.              + 4.2.1 Attribute Class
  81.              + 4.2.2 Class Class
  82.         o 4.3 RWhois Standard Schemas
  83.              + 4.3.1 Referral Class
  84.              + 4.3.2 SOA Class
  85.              + 4.3.3 Guardian Class
  86.              + 4.3.4 Status Class
  87.              + 4.3.5 Directive Class
  88.              + 4.3.6 TOC Class
  89.    * 5.0 Search Model
  90.         o 5.1 Query
  91.         o 5.2 Constraints
  92.         o 5.3 Query Reduction
  93.              + 5.3.1 Search Algorithm
  94.              + 5.3.2 Reduction Rules
  95.         o 5.4 Referral
  96.         o 5.5 Other Elements Affecting Query Completion
  97.    * 6.0 Security Model
  98.         o 6.1 Stream Privacy
  99.         o 6.2 Authentication of Reading/Writing of Objects
  100.    * 7.0 Tree Management
  101.    * 8.0 References
  102.    * 9.0 Authors' Addresses
  103.    * Appendix A: Error Codes
  104.    * Appendix B: Capabilities ID
  105.    * Appendix B: General ABNF definitions
  106.  
  107. Summary Of Changes Between RWhois Spec 1.5 And 2.0
  108.  
  109.    * Internationalization
  110.         o Character set specification within an object and within a query
  111.         o Encoding specification within an object and within a query
  112.         o Entire protocol _can_ be MIME encoded
  113.    * Query Language
  114.         o Per-attribute constraints
  115.         o Boolean operations
  116.         o Nested operations
  117.    * Revised Data Model
  118.         o More object oriented
  119.         o Start Of Authority (SOA) and Schema objectified
  120.    * Response Formats
  121.    * Display Formats
  122.    * Generic Query Reduction Rules
  123.         o Standardization of reducible fields
  124.         o Reduction token specified by regular expression match
  125.    * Support for Secondarying
  126.         o Complete and partial
  127.    * Authority Area Enforcement
  128.    * Registration
  129.    * Security
  130.         o Enhanced guardian support
  131.         o Per-attribute access control lists
  132.  
  133. Open Issues
  134.  
  135. This is an Internet-Draft, which means that more work needs to be done. In
  136. the opinion of the original authors, there are several open issues that need
  137. to addressed before this protocol can move forward; they include the
  138. following.
  139.  
  140.    * Registration
  141.      Registrations need to be examined for the demands they make on
  142.      implementations with respect to the atomicity of operations. It is the
  143.      authors intention to not require a system that would need to implement
  144.      roll backs within its database. It is also desirable for the protocol
  145.      to be able to support multiple masters so that updates can take place
  146.      at multiple locations.
  147.    * Caching
  148.      Caching should be discussed in relation to schema and how a cache is
  149.      searched locally given so not to have to implement a server's database
  150.      in the client.
  151.    * Security
  152.      As mentioned in Section 6, security will be reworked.
  153.    * Common Indexing Protocol (CIP)
  154.      RWhois 2.0 is intended to work very closely with the CIP. As CIP is
  155.      standardized, RWhois 2.0 should be modified to operate with it. This
  156.      document may need to specify a CIP-index object type.
  157.    * Incremental Updates
  158.      To scale in large application domains, a secondary should be able to be
  159.      updated incrementally. One aspect of this is a 'diff' style update,
  160.      where only the differences between objects are transported.
  161.  
  162. 1.0 Introduction
  163.  
  164. Originally, the RWhois protocol [RFC1714] was designed primarily around the
  165. data found at the InterNIC and other domain-name and IP registrants such as
  166. Internet Service Providers (ISPs). Versions 1.0 [RFC1714] and 1.5 [RFC2167]
  167. of the protocol illustrated that the system is useful and works well within
  168. certain constraints. During this time, several problems appeared that
  169. require an update to the protocol. First, RWhois will be used as a more
  170. generic directory services tool in the near future, so the protocol must be
  171. able to deal with much more disparately organized data. Some of the data may
  172. be in other character sets, its hierarchy may not be '.' delimited, and the
  173. users may need a richer query language.
  174.  
  175. Until Version 1.5 of RWhois, RWhois retained the basic functionality of the
  176. whois server and client, making all of the extensions optional. This
  177. requirement changed in Version 1.5, however. This version of the RWhois
  178. protocol is NOT backward compatible with any of the previous versions. The
  179. server MAY respond to a whois or RWhois Version 1.0 or 1.5 client, but it is
  180. not required to do so. The RWhois Version 2.0 client MAY also interact with
  181. whois [RFC954] servers or RWhois Version 1.0 or 1.5 servers, but it is not
  182. required to do so. This is an implementation choice.
  183.  
  184. RWhois Version 2.0 has been designed as an extensible protocol to ensure
  185. that many uses can be accommodated. Public extensions to the protocol sho=
  186. uld
  187. be documented as RFCs. Private extensions can be used with agreement left up
  188. to the client and server. Since the protocol is MIME oriented, any
  189. extensions should use the x- convention for specifying experimental or
  190. non-standard MIME Content-Types. If extensions are not implemented at the
  191. server in question, an appropriate error message must be sent.
  192.  
  193. This document uses words such as SHOULD and SHALL with the special meaning
  194. specified in "Key Words For Use In RFCs To Indicate Requirement Levels."
  195. [RFC2119]
  196.  
  197. 1.1 Definitions
  198.  
  199. Class
  200.      A type of object.
  201. Class Definition/Schema
  202.      Identifies all of the attributes allowed within an object of that
  203.      class.
  204. Attribute
  205.      A variable within a class. (Example: Organization-Name contains the
  206.      value for the name of an organization.)
  207. Object
  208.      An instance of a class that contains data.
  209. SOA - Start Of Authority
  210.      This object contains the administrative variable of an authority area.
  211. Guardian Object
  212.      This object, when linked to another object, specifies the method of
  213.      protection for that object.
  214. Authority Area
  215.      An authority area is an identifier for an RWhois database containing
  216.      data and its schema [1]. It has a hierarchical structure that helps
  217.      identify the position of the database in the global RWhois data
  218.      information tree. This version of the protocol specifically allows for
  219.      hierarchy based on arbitrary and possibly complex criteria. Thus, an
  220.      authority area can be in any character set as well as a complex set of
  221.      data. For example, CIDR blocks have fairly complex ideas of how to
  222.      allocate a given space; this is not easy to specify as a authority
  223.      area.
  224. Primary RWhois Server
  225.      A primary (or master) RWhois server is where data is registered for an
  226.      authority area. It answers authoritatively to queries for data in that
  227.      authority area. There MUST be one and only one primary server for a
  228.      particular authority area, and an RWhois server may be primary for
  229.      multiple authority areas.
  230. Secondary RWhois Server
  231.      A secondary (or slave) RWhois server is where data is replicated from a
  232.      primary server for an authority area. It, like its primary server,
  233.      answers authoritatively to queries for data in that authority area.
  234.      There can be multiple secondary servers for a particular authority
  235.      area. An RWhois server may be secondary for multiple authority areas.
  236.  
  237. 2.0 Connection Model
  238.  
  239. 2.1 Standard Query (TCP)
  240.  
  241. This document describes how RWhois Version 2.0 would behave using
  242. Transmission Control Protocol (TCP).
  243.  
  244. 2.2 Quick Query (UDP)
  245.  
  246. The overhead incurred by establishing a TCP connection and interacting with
  247. an RWhois server may be unnecessary if the client only wishes to ask one
  248. question. A separate document will describe the User Datagram Protocol (UDP)
  249. facility for RWhois. Adjustments to the query must be made to make this a
  250. practical option. The only function allowed while utilizing UDP is a single
  251. query.
  252.  
  253. Unless the client is told that a certain host supports both TCP and UDP the
  254. client should attempt UDP first. If the server has not responded after a
  255. one-second interval, the client should then attempt to connect via TCP. If
  256. the server responds via UDP while the client is connecting/connected via
  257. TCP, the client should remember this and set the UDP timeout to the delay
  258. for the returned packet plus one second.
  259.  
  260. The SRV DNS record provides for a future method of discovering the existence
  261. of either TCP or UDP services by querying DNS for tcp.rwhois.<domain> and
  262. udp.rwhois.<domain>. RFC2052 states that if a service is not available the
  263. target of the SRV record should be "." (NULL in DNS parlance). Thus, an
  264. RWhois client can discover which services are available.
  265.  
  266. 3.0 Client/Server Interaction Model
  267.  
  268. For RWhois Version 2.0 to support multiple character sets and encodings
  269. requires that some method be used to identify those encodings and character
  270. sets. Instead of developing yet another encoding scheme, an off-the-shelf
  271. system can be used. MIME is currently being used by several protocols as a
  272. method for encoding objects: therefore, the model for RWhois Version 2.0
  273. will be encoded as a sequence of directives and responses encoded as MIME
  274. objects. Most of the client/server interaction concerns three types of
  275. objects: directives, responses, and results. Section 2.2 outlines these
  276. objects and their relationship to each other. The protocol is the
  277. specification of the interaction between the client and the server with
  278. respect to when and how these objects are exchanged.
  279.  
  280. However, the protocol may seem 'ugly' or too 'large' on the wire since every
  281. directive is encoded in its own set of MIME headers. Also, it is rare that
  282. one element of a client/server interaction would be in a different character
  283. set/encoding than the previous element. Both considerations are specifically
  284. addressed by two design decisions.
  285.  
  286. First, while internationalization is a goal, in the near future a majority
  287. of users will still be using the English language represented with US-ASCII.
  288. To optimize for this and to allow some degree of backward interoperability,
  289. the default character set and encoding will be US-ASCII. The default
  290. language will be English.
  291.  
  292. Second, the client can specify its own default encoding, character set, and
  293. language in its response to the server's banner. This is specified in
  294. Section 3.1.2 as part of the response to the server's banner. For example,
  295. when a client contacts a server that supports multiple character sets, the
  296. server uses US-ASCII by default. When the client connects, it specifies that
  297. it wants to talk Unicode using a UTF-8 encoding for queries in Inuit, the
  298. language used by the native people of northern Canada. From that point, the
  299. default encoding is as specified by the client.
  300.  
  301. There are four distinct processes involved in the interaction between a
  302. client and a server.
  303.  
  304.   1. Initial connection and subsequent protocol and capability negotiation.
  305.      This is accomplished with the server sending the Banner and the client
  306.      sending either a directive or a client capability object. When the
  307.      client simply sends a directive and not a client capability object, the
  308.      client implicitly states that it has accepted the servers defaults. See
  309.      Section 2.1 Banner for a detailed description of this process.
  310.   2. Exchange of zero or more MIME objects containing directives and
  311.      responses. These are used to set up the environment and specify the
  312.      query. These objects are listed in Section X.0, Directive and Response
  313.      Objects.
  314.   3. Exchange of zero or more query object. These objects are explained in
  315.      Section X.0, Query Objects, and in Section X.0, The Search Model.
  316.   4. Exchange of zero or more Result objects. Result objects are explained
  317.      in section X.0 Result Objects.
  318.   5. Final disconnect. The final disconnect sequence is explained in Section
  319.      X.0. While the client SHOULD issue a disconnect sequence, server
  320.      developers should handle the very common occurrence of clients simply
  321.      disappearing. It should also be noted that the client can specify a
  322.      disconnect sequence at any time; it does not need to follow the above
  323.      sequence before it can disconnect.
  324.  
  325. 3.1 Banner
  326.  
  327. Even though this version of the RWhois protocol does not require backward
  328. compatibility with both whois and whois++, there is some desire to allow
  329. older clients to realize that the server they have connected to is of a
  330. later revision. It is also common practice for most Internet protocols to
  331. greet the client with some sort of banner that fits on one line. This banner
  332. must be followed by either a directive from the client or a client
  333. capability object.
  334.  
  335. While it is not a requirement that server developers support all past
  336. versions of the RWhois protocol, developers should realize that old clients
  337. may (and will) connect to new servers. When a client responds in such a way
  338. that illustrates that it does not understand the banner (i.e., it picked a
  339. protocol version that is not supported by the server) then the server should
  340. respond with an error message the client can understand. For older clients
  341. (versions 1.0 and 1.5), the server should send back the appropriate "%error"
  342. message as specified in RFC 1714.
  343.  
  344. Defaults for the MIME attributes and headers are as follows.
  345.  
  346.  MIME header/attribute    Value
  347.  Content-Transfer-Encoding8bit
  348.  Content-Language         en-US
  349.  charset parameter        US-ASCII
  350.  
  351. The server MUST assume these values if the client does not specify
  352. otherwise. All clients must assume that all RWhois Version 2.0 servers
  353. assume these defaults. It should be considered an error for a client to try
  354. to interact with a server in anything other than these defaults without
  355. first specifying its desire to do so.
  356.  
  357. 3.1.1 From the Server
  358.  
  359. rwhois-banner =3D "%rwhois" space version-list space host-name=20
  360.    [space implementation] crlf
  361. version-list =3D version *("," version)
  362. version =3D version-number [":" capability-id] / "V-2.0" ":" capability-id
  363. version-number =3D "V-" 1*digit "." 1*digit
  364. capability-id =3D response-id ":" extra-id
  365. response-id =3D 6hex-digit
  366. extra-id =3D 2hex-digit
  367. implementation =3D 1*any-char
  368.  
  369. Version-list indicates all of the protocol versions that this server
  370. supports. The versions should be listed from oldest to newest so clients do
  371. not need to understand potential future changes to the format of this list.
  372. The client=92s behavior beyond this point depends on which version of the
  373. protocol the client chooses. This document is only concerned with the
  374. ensuing dialogue if the version number is 2.0 or lower.
  375.  
  376. Capability-id identifies the server's capabilities. Each optional directive
  377. has a bit that is set if the server can understand the directive. Clients
  378. should use this information to determine which of the optional capabilities
  379. can be used. The value information for each directive can be found in the
  380. definition for that directive. All of the capability ids are listed in
  381. Appendix B.
  382.  
  383. Host-name is the host name of the computer hosting the RWhois server.
  384.  
  385. Implementation contains information about the server implementation. It is
  386. recommended that the version number of the software be indicated. This
  387. version may differ from the specification version number.
  388.  
  389. Example of Use:
  390.  
  391. %rwhois V-1.0:04ffff:0f:0f,V-2.0:04ffff:0f root.rwhois.net (NSI V-1.6)
  392.  
  393. 3.1.2 From the Client
  394.  
  395. The client=92s response to this banner depends upon which version of the
  396. supported protocol the client picks. As stated earlier, this document is
  397. only concerned with the response for Version 2.0 and lower. If the client
  398. wishes to respond as a Version 1.0 client, then it will issue the
  399. appropriate -RWhois response as specified in RWhois Version 1.0 and 1.5
  400. RFCs. If the client wishes to connect as a Version 2.0 client, it has two
  401. options.
  402.  
  403. The first option is to simply accept the server=92s defaults and to specify
  404. the directives it wishes to execute. If the response sent from the client is
  405. not a valid MIME object that includes the client capability response, the
  406. server should assume that the client has accepted its defaults and that what
  407. is being sent is a directive of some type.
  408.  
  409. The second option is for the client to send a valid "rwhois" directive to
  410. the server. See Section 5.X for the definition of the "rwhois" directive.
  411. The server MUST either accept the defaults as specified by this directive or
  412. issue the "504 Specified Defaults Unsupported...Goodbye" message.
  413.  
  414. 3.2 Base MIME Objects
  415.  
  416. There are two design criteria used to decide on the MIME objects. The first
  417. is that there be as few MIME objects as possible. This reduces the amount of
  418. time spent in the MIME parser and ensures the MIME Content-Type does not
  419. bloat. The second criteria generalizes the specific parts of the protocol so
  420. that developers can re-use large amounts of code for different
  421. directives/responses. Therefore, the following MIME objects will be used for
  422. ALL protocol interactions. As soon as this draft has been finalized these
  423. Content-Types will be registered with the Internet Address and Naming
  424. Authority (IANA).
  425.  
  426. All MIME objects MUST follow Simple Mail Type Protocol (SMTP)-style body
  427. termination. The data contained in the body is sent octet-for-octet, except
  428. when the pattern ``<cr><lf>.<cr><lf>''occurs. In that case, the period is
  429. repeated, resulting in the following pattern: ``<cr><lf>..<cr><lf>''. When
  430. the data is finished, the octet pattern ``<cr><lf>.<cr><lf>'' is
  431. transmitted. On the receiver's side, the reverse transformation is applied,
  432. and the message read consists of all bytes up to, but not including, the
  433. terminating pattern. This object termination is used whether the default
  434. MIME encoding is used or not. Thus, the following two representations of a
  435. response are valid and MUST be considered equal.
  436.  
  437. Object given with no header:
  438.  
  439. XXX Message
  440. =2E
  441.  
  442. Both terminator and header specified:
  443.  
  444. Content-Type: application/rwhoisv2-response
  445.  
  446. XXX Message
  447. =2E
  448.  
  449. 3.2.1 Directives
  450.  
  451. Directives are used to set up the environment that the client needs and to
  452. specify the query to execute in that environment. The Content-Type is
  453. "application/rwhoisv2-directive". The body of the object contains exactly
  454. one directive. An empty body is an error, and more than one directive in a
  455. body is also an error.
  456.  
  457. The body follows a format of the directive name being the first space
  458. delimited token on the first line. Arguments on the same line and the format
  459. of subsequent lines are defined by the directive. The directive name will be
  460. encoded in 7-bit ASCII; each directive definition can specify other values
  461. that must be 7-bit ASCII. Arguments that are NOT specified to be 7-bit ASCII
  462. follow the character set/language as specified in the MIME header for that
  463. set of directives.
  464.  
  465. For example:
  466.  
  467. Content-Type: application/rwhoisv2-directive;
  468.  
  469. limit 200
  470. =2E
  471. Content-Type: application/rwhoisv2-directive;
  472. Content-Language: en-UK
  473.  
  474. query first-name=3D"Winston" and last-name=3D"Churchill"
  475. =2E
  476.  
  477. MIME headers can be defaulted, and the above two directives can also be
  478. specified like this:
  479.  
  480. limit 200
  481. =2E
  482. Content-Type: application/rwhoisv2-directive;
  483. Content-Language: en-UK
  484.  
  485. query first-name=3D"Winston" and last-name=3D"Churchill"
  486. =2E
  487.  
  488. It should also be noted that the limit and language directives also have
  489. global constraint counterparts as specified in the query directive. Thus,
  490. the previous interaction could be compressed even further to this:
  491.  
  492. query first-name=3D"Winston" and last-name=3D"Churchill":limit=3D200;language=3Den-UK
  493. =2E
  494.  
  495. Some may say that there are redundant constraints, directives, and MIME
  496. attributes. However, these enable one to specify attributes at several
  497. levels of granularity within the protocol. While US-ASCII may be the
  498. default, some servers may want to specify the French language for certain
  499. attributes to allow soundex matches. This flexibility is intentional so that
  500. those building fast servers need not be encumbered by a full MIME
  501. implementation. Those wanting a truly robust system, therefore, are not
  502. crippled by the "need for speed".
  503.  
  504. 3.2.2 Responses
  505.  
  506. Responses are the return codes and other directive output that is not
  507. normally considered to an RWhois data object. The Content-Type is
  508. "application/rwhois-response". The body follows the format of the code and
  509. its textual representation takes up the first line. Subsequent lines are
  510. reserved for each response code to be able to specify its own format.
  511.  
  512. An application/rwhois-response MUST have one and only one response within
  513. the body. Zero responses must be considered an error. More than one response
  514. must be considered an error.
  515.  
  516. Content-Type: application/rwhoisv2-response;
  517.  
  518. 200 Directive ok
  519. =2E
  520.  
  521. 3.2.3 Results
  522.  
  523. Results are actual data objects returned from a directive. Only certain
  524. directives return result sets instead of responses in their normal case.
  525. These results can be any MIME-encoded object. The user can request which
  526. Content-Type to return by using the 'display' directive.
  527.  
  528. When there are multiple, separate objects to be returned, the results will
  529. be encoded in a stream of objects in a multipart/mixed MIME object. When an
  530. object has sub-parts, such as when an image is sent along with the results,
  531. the object must be encoded within a MIME multipart/related object.
  532.  
  533. Additionally, if a client sets the 'display' directive to
  534. 'multipart/related' then no matter how many returned objects or their
  535. complexity, the server MUST return a 'multipart/related'. In this case, the
  536. server should set the root of the multipart/related object to the TOC
  537. Object, which is used to point to the subsequent objects. See Section 4.3.6
  538. for a description of the TOC Object.
  539.  
  540. When the client does not specify a display type or the data itself does not
  541. specify its own encoding, the default MIME type used will be
  542. 'text/directory'. This means that text/directory will be used as the
  543. standard and canonical exchange format for all native RWhois objects. The
  544. text/directory MIME type requires the 'profile' parameter, which is the
  545. 'scheme' or class of the body. To alleviate name clashes, the profile
  546. namespace for all native RWhois objects is required to start with "rwhois- -".
  547. The Attribute Class would use the profile "rwhois-attribute", for example.
  548.  
  549. 3.3 Directive and Response Specifications
  550.  
  551. All directives encoded within the application/rwhois-directive object are
  552. optional with the exception of the rwhois directive that is discussed in
  553. Section 3.1.2. This is the only required directive, and without it the
  554. server would have no idea with what it was communicating. The directives
  555. given here are those that are required to fully cooperate within the RWhois
  556. Tree. It is up to implementers to choose whether or not to fully cooperate.
  557.  
  558. Responses that are specific to a given directive are detailed with that
  559. corresponding directive. General responses are listed at the end of this
  560. section.
  561.  
  562. It is also important to note that several directives return objects. Since
  563. all objects can be queried it follows that any directive that returns an
  564. object could have also been specified via a query. For example, the
  565. =91attribute=92 directive returns objects found in the Attribute class. This
  566. directive can also be specified by querying directly against the Attribute
  567. class. In each instance where this is true a query form and a directive form
  568. are given. These two forms MUST be considered identical. Implementers are
  569. STRONGLY encouraged to implement the directive by simply translating it into
  570. the query or vice versa. This cannot be stressed enough. Any deviation
  571. between the two specifications can reek havoc with the protocol.
  572.  
  573. 3.3.1 rwhois
  574.  
  575. Description
  576.  
  577. The "rwhois" directive is used by the client to identify itself as an RWhois
  578. client, identify the version of the RWhois protocol that it desires to
  579. speak, and the defaults that the client wants the server to use. It is the
  580. client=92s version of the server's banner.
  581.  
  582. ABNF
  583.  
  584. rwhois-dir =3D "rwhois" crlf *(rwhois-av) "." crlf
  585. rwhois-av =3D "Protocol-Version:" space version-val crlf
  586.             "Implementation:" space impl-val crlf
  587.             "Default-Content-Encoding:" space encoding-val crlf
  588.             "Default-charset:" space charset-val crlf
  589.             "Default-Content-Language:" space language-val crlf
  590.             attribute-name ":" attribute-value crlf
  591. version-val =3D version-number
  592. version-number =3D "V-" 1*digit "." 1*digit
  593. response-id =3D 6hex-digit
  594. extra-id =3D 2hex-digit
  595. impl-val =3D 1*any-char
  596. encoding-val =3D 1*any-char
  597. charset-val  =3D 1*any-char
  598. language-val =3D 1*any-char
  599.  
  600. The version-val is a required argument that identifies the client's protocol
  601. version and capabilities. Each bit represents the optional responses the
  602. client can understand. Servers should use this information to determine
  603. which of the optional capabilities can be used. The value information for
  604. each server response can be found in Section 7.0 of this document. Note that
  605. no list of versions is given as in the server=92s banner. This is because the
  606. onus is on the client to pick which version of the protocol will be spoken.
  607. This is the client's way of saying "I'll take that one."
  608.  
  609. The impl-val argument is optional and identifies client implementation
  610. information. It is recommended that the implementer maintain a version
  611. number separate from the specification version.
  612.  
  613. The encoding-val is a required argument that specifies the default MIME
  614. encoding that will be used by the client. The value MUST be the value of the
  615. Content-Transfer-Encoding MIME header as specified in [RFC1521].
  616.  
  617. The charset-val argument is required and specifies the default character set
  618. that will be used by the client. This value MUST be a valid value for the
  619. 'charset' attribute of the text MIME Content Type as specified in [RFC1521].
  620.  
  621. The language-val is a required argument that specifies the default language
  622. that will be used by the client. This value MUST be a valid value for the
  623. Content-Language header as defined in [RFC822] and extended in [RFC1766].
  624.  
  625. Errors
  626.  
  627. 338 Invalid directive syntax
  628. 300 Not compatible with version
  629. 301 Server not capable of using client defaults
  630.  
  631. Examples
  632.  
  633. Content-Type: application/rwhois-directive;
  634.  
  635. rwhois
  636. Protocol-Version: V-2.0
  637. Implementation: InterNIC B.0.9.7
  638. Default-Content-Encoding: 8bit
  639. Default-charset: ISO-8859-1
  640. Default-Content-Language: en-US
  641. =2E
  642. 200 Directive ok
  643. =2E
  644.  
  645. 3.3.2 directive
  646.  
  647. Description
  648.  
  649. The "directive" directive can be used by the client to get information about
  650. the directives that the server supports. The response must contain the name
  651. and description of each specified directive and may be expanded in the
  652. future with additional attributes. When no directive name is given, the
  653. server must return information about all the directives.
  654.  
  655. As with other directives, the result is an object of the Directive class
  656. and, as such, can also be returned by a standard query against that class.
  657.  
  658. ABNF
  659.  
  660. directive-dir =3D "directive" *(space directive-name) crlf
  661. directive-query =3D "query Class-Name=3Ddirective" *(space directive-name) crlf
  662. directive-name =3D 1*id-char
  663.  
  664. Errors
  665.  
  666. 338 Invalid directive syntax
  667. 400 Directive not available
  668. 401 Not authorized for directive
  669.  
  670. Examples
  671.  
  672. Without parameters:
  673.  
  674. directive
  675. =2E
  676. Content-Type: multipart/mixed; boundary=3D"foo"
  677.  
  678. - --foo
  679. Content-Type: text/directory; profile=3Drwhois-directive
  680.  
  681. directive:query
  682. description:RWhois query directive. Used to retrieve an object.
  683. - --foo
  684. Content-Type: text/directory; profile=3Drwhois-directive
  685.  
  686. directive:directive
  687. description:RWhois directive directive
  688. - --foo
  689. Content-Type: text/directory; profile=3Drwhois-directive
  690.  
  691. directive:limit
  692. description:RWhois limit directive used to limit the number of hits.
  693. - --foo--
  694. =2E
  695.  
  696. With parameters:
  697.  
  698. directive quit
  699. =2E
  700. Content-Type: text/directory; profile=3Drwhois-directive
  701.  
  702. directive:quit
  703. description:Quit connection
  704. =2E
  705.  
  706. 3.3.3 display
  707.  
  708. Description
  709.  
  710. By default, the server returns a text/directory representation of an object
  711. in a result set. This default format can be changed with the "display"
  712. directive. When no parameter is given, the server must list all the display
  713. formats it supports.
  714.  
  715. ABNF
  716.  
  717. display-dir =3D "display" crlf
  718. / "display" space IMT crlf
  719. display-response =3D *display-record
  720. display-record =3D "name" ":" IMT crlf *display-line crlf crlf
  721. display-line =3D attribute-name ":" attribute-value crlf
  722.  
  723. Errors
  724.  
  725. 338 Invalid directive syntax
  726. 400 Directive not available
  727. 401 Not authorized for directive
  728. 436 Invalid display type
  729.  
  730. Examples
  731.  
  732. # Get the available display formats.
  733. display
  734. =2E
  735. name:text/directory
  736.  
  737. name:text/html
  738.  
  739. name:text/plain
  740. =2E
  741.  
  742. # Change the active display format.
  743. display text/plain
  744. =2E
  745. 200 Directive ok
  746. =2E
  747.  
  748. 3.3.4 forward
  749.  
  750. Description
  751.  
  752. The "forward" directive instructs the server to follow all referrals and
  753. return the results to the client. This directive can be used to run an
  754. RWhois server as a proxy server. The default value must be "off". When the
  755. value is set to "on", the server must not return referrals.
  756.  
  757. ABNF
  758.  
  759. forward-dir =3D "forward" space on-off crlf
  760.  
  761. Errors
  762.  
  763. 338 Invalid directive syntax
  764. 400 Directive not available
  765. 401 Not authorized for directive
  766.  
  767. Examples
  768.  
  769. forward on
  770. =2E
  771. 200 Command ok
  772. =2E
  773.  
  774. forward off
  775. =2E
  776. 200 Command ok
  777. =2E
  778.  
  779. 3.3.5 limit
  780.  
  781. Description
  782.  
  783. When returning a query result, the server should limit the number of objects
  784. returned to the client. The "limit" directive changes this limit. The
  785. default and maximum limit is server-dependent. The client can get the
  786. current limit by using the "status" directive (see Section 3.3.13).
  787.  
  788. ABNF
  789.  
  790. limit-dir =3D "limit" space 1*digit crlf
  791.  
  792. Errors
  793.  
  794. 331 Invalid limit
  795. 338 Invalid directive syntax
  796. 400 Directive not available
  797. 401 Not authorized for directive
  798.  
  799. Examples
  800.  
  801. limit 100
  802. =2E
  803. 200 Command ok
  804. =2E
  805.  
  806. 3.3.6 notify
  807.  
  808. Description
  809.  
  810. The "notify" directive performs several functions.
  811.  
  812.    * If the server returns a referral that results in an error, the client
  813.      can report the bad referral to the server using the "badref" option.
  814.    * When the client follows referrals and goes through the same referral
  815.      twice, that referral is a recursive referral and causes a referral
  816.      loop. The client can report the recursive referral to the server using
  817.      the "recurref" option.
  818.    * When the data in an authority area changes, a master server can use the
  819.      "update" option to notify its slave servers to update the data.
  820.    * The "inssec" option allows an RWhois server to register itself as a
  821.      slave server for an authority area with a master server. The master
  822.      server may reject the request on the basis of its registration policy.
  823.    * The "delsec" option allows a slave server to cancel its registration
  824.      with the master server.
  825.  
  826. ABNF
  827.  
  828. notify-dir =3D "notify" space "badref" space referral-url crlf
  829.         / "notify" space "recurref" space referral-url crlf
  830.         / "notify" space "update" space host-port ":" authority-area crlf
  831.         / "notify" space "inssec" space host-port ":" authority-area crlf
  832.         / "notify" space "delsec" space host-port ":" authority-area crlf
  833. referral-url =3D rwhois-url / uri
  834.  
  835. Errors
  836.  
  837. 338 Invalid directive syntax
  838. 340 Invalid authority area
  839. 342 Invalid host/port
  840. 400 Directive not available
  841. 401 Not authorized for directive
  842.  
  843. Examples
  844.  
  845. The client reports a bad referral to rwhois.foobar.com to the server:
  846.  
  847. notify badref rwhois://rwhois.foobar.com:4321/class=3Ddomain%20 \
  848.     auth-area=3Dfoobar.com
  849. =2E
  850. 200 Directive ok
  851. =2E
  852.  
  853. The client reports a recursive referral to rwhois.foobar.com to the server:
  854.  
  855. notify recurref rwhois://rwhois.foobar.com:4321/class=3Dcontact%20
  856.    auth-area=3Dfoobar.com%20Last-Name=3D"Beeblebrox"
  857. =2E
  858. 200 Directive ok
  859. =2E
  860.  
  861. The master server for the foobar.com authority area notifies its slave
  862. servers to update the data:
  863.  
  864. notify update master.foobar.com:4321:foobar.com
  865. =2E
  866. 200 Command ok
  867. =2E
  868.  
  869. The server rwhois2.foobar.com registers as a slave server for the foobar.com
  870. authority area:
  871.  
  872. notify inssec rwhois2.foobar.com:4321:foobar.com
  873. =2E
  874. 200 Command ok
  875. =2E
  876.  
  877. The server rwhois2.foobar.com cancels its registration as a slave server for
  878. the foobar.com authority area:
  879.  
  880. notify delsec rwhois2.foobar.com:4321:foobar.com
  881. =2E
  882. 200 Command ok
  883. =2E
  884.  
  885. 3.3.7 quit
  886.  
  887. Description
  888.  
  889. The "quit" directive can be used by the client to close the connection.
  890. Before the server closes the connection, it must respond with the "203
  891. Goodbye" response.
  892.  
  893. ABNF
  894.  
  895. quit-dir =3D "quit" crlf "." crlf
  896. quit-response =3D response
  897.  
  898. Errors
  899.  
  900. No errors.
  901.  
  902. Examples
  903.  
  904. quit
  905. =2E
  906. 203 Goodbye
  907. =2E
  908.  
  909. 3.3.8 register
  910.  
  911. Description
  912.  
  913. The "register" directive can be used by the client to add, modify, or delete
  914. objects in the server's database.
  915.  
  916. The "register" directive is slightly different than most directives in that,
  917. instead of simply receiving one application/rwhois-directive object, the
  918. server receives a multipart/related body whose 'start' parameter points to
  919. the application/rwhois-directive object that contains the "register"
  920. directive. The "register" directive can contain any number of operations and
  921. any combination of those operations. These operations must be considered
  922. atomic with respect to the other operations within the directive. For
  923. example, a "register" directive contains three adds and three mods. If any
  924. one of these operations fails, they ALL fail.
  925.  
  926. An operation within a register directive can also contain multiple objects
  927. on which the operation must be done. These must also be considered atomic;
  928. if the operation fails for any object, the whole operation fails (and thus
  929. the entire "register" directive fails).
  930.  
  931. The operations available within a register directive are:
  932.  
  933.    * The "add" option indicates that the object being sent should be added
  934.      to the server's database. The objects are identified by their
  935.      content-ids.
  936.    * The "mod" option indicates that the object being sent is a modification
  937.      of an object that already resides on the server's database. These
  938.      database objects are identified by their IDs and updated times. The
  939.      objects to replace them are identified by their content-ids.
  940.    * The "del" option indicates that the objects being sent should be
  941.      deleted from the server's database. The database objects are identified
  942.      by their ID and updated times.
  943.  
  944. After a register operation (add, modify, or delete an object) in an
  945. authority area, the server should update the "Serial-Number" variable in the
  946. SOA information for the authority area. This is useful for data replication,
  947. because a slave server checks the "Serial-Number" variable to detect a data
  948. change at the master server (see Section 3.6.2).
  949.  
  950. ABNF
  951.  
  952. register-dir =3D "register" crlf *(register-line crlf)
  953. register-line =3D  "add:" register-add-tuple *( register-add-tuple )
  954.         / "mod:" space register-mod-tuple *( space register-mod-tuple )
  955.         / "del:" space register-del-tuple *( register-del-tuple )
  956. register-add-tuple =3D space cid
  957. register-del-tuple =3D rwhois-id "," rwhois-updated
  958. register-mod-tuple =3D rwhois-id "," rwhois-updated "," cid
  959.  
  960. register-updated =3D time-stamp
  961. register-response =3D register-response-header crlf  *(register-operation- -result)
  962. register-response-header =3D "241" space register-response-text
  963. register-response-text =3D 1*any-char
  964. register-operation-result =3D "object:" space cid rwhois-id rwhois-updated crlf
  965.  
  966.    * For the "add" operation, the client must send all required attributes
  967.      for the object, including the Class-Name and Auth-Area attributes.
  968.      However, the client must not send the ID and Updated attributes. These
  969.      attributes are assigned by the server and returned in the response.
  970.    * The rwhois-response contains references only to those objects who were
  971.      added. The cid is used to identify the object to the client. The ID and
  972.      rwhois-updated fields are those that were assigned by the server at the
  973.      moment the object was inserted into the database.
  974.  
  975. Errors
  976.  
  977. 120 Registration deferred
  978. 241 Register complete
  979. 320 Invalid attribute
  980. 321 Invalid attribute syntax
  981. 322 Required attribute missing
  982. 323 Object reference not found
  983. 324 Primary key not unique
  984. 325 Failed to update outdated object
  985. 336 Object not found
  986. 338 Invalid directive syntax
  987. 340 Invalid authority area
  988. 341 Invalid class
  989. 400 Directive not available
  990. 401 Not authorized for directive
  991.  
  992. Examples
  993.  
  994. # Add an object.
  995. Content-Type: multipart/related; type=3Dapplication/rwhois-directive;=20
  996.  start=3Dcid1@foo.com; boundary=3Dexample-1
  997.  
  998. - --example-1
  999. Content-Type: application/rwhois-directive
  1000. Content-ID: <cid1@foo.com
  1001.  
  1002. register
  1003. Add: <cid2@foo.com>
  1004. Mod: 23456789.a.com,19961205124403000,<cid3@foo.com>
  1005. Del: 23456789.a.com,19961205224403000
  1006. - --example-1
  1007. Content-Type: text/directory
  1008. Content-ID: <cid2@foo.co>
  1009.  
  1010. Class-Name:contact
  1011. Auth-Area:a.com
  1012. First-Name:Scott
  1013. Last-Name:Williamson
  1014. Name:Williamson, Scott
  1015. Email:scottw@a.com
  1016. - --example-1
  1017. Content-Type: text/directory
  1018. Content-ID: <cid3@foo.com>
  1019.  
  1020. Class-Name:contact
  1021. Auth-Area:a.com
  1022. ID:23456789.a.com
  1023. First-Name:Scott
  1024. Last-Name:Williamson
  1025. Name:Williamson, Scott
  1026. Email:sw@a.com
  1027. - --example-1--
  1028. =2E
  1029. 241 Register complete
  1030. Object: <cid2@foo.com> 23456789.a.com 19961205224403000
  1031. Object: <cid3@foo.com> 56789.a.com 19961205224404444
  1032. =2E
  1033.  
  1034. 3.3.9 class
  1035.  
  1036. Description
  1037.  
  1038. The "class" directive is used by the client to get the meta-information for
  1039. one or more classes in an authority area. The response is an object of the
  1040. type Class. This directive and the Attribute directive work together to
  1041. specify other classes.
  1042.  
  1043. The version number of each specified class may be expanded in the future
  1044. with additional attributes. When no class name is given, the server must
  1045. return the meta-information for all of the classes in the authority area.
  1046.  
  1047. As with the Attribute directive, this directive can also be handled via a
  1048. query of the Class class. Thus, the following two ABNF grammars must be
  1049. considered equal:
  1050.  
  1051. ABNF
  1052.  
  1053. class-dir =3D "class" space authority-area *(space class-name) crlf
  1054. class-query =3D "query Class-Name=3DClass auth-area=3D" authority-area
  1055. *(space "Name=3D" class-name space "or") crlf
  1056.  
  1057. See Section 3.3 for information on directive and query equality. The
  1058. response to this directive/query is either an error or a result set of CLASS
  1059. objects. See Section 4.2.2 for the definition of a CLASS object.
  1060.  
  1061. Errors
  1062.  
  1063. 338 Invalid directive syntax
  1064. 340 Invalid authority area
  1065. 341 Invalid class
  1066. 400 Directive not available
  1067. 401 Not authorized for directive
  1068.  
  1069. Examples
  1070.  
  1071. class rwhois.net domain host
  1072. =2E
  1073.  
  1074. or
  1075.  
  1076. query Class-Name=3DClass and auth-area=3Drwhois.net and Name=3Ddomain or Name=3Dhost
  1077. =2E
  1078.  
  1079. 3.3.10 attribute
  1080.  
  1081. Description
  1082.  
  1083. The "attribute" directive can be used by the client to get attribute
  1084. definitions. Each definition is complete by itself. It is up to the Class
  1085. object to aggregate Attribute objects together to define a new Class. As
  1086. with the "class" directive, this directive can be handled via a standard
  1087. query of the Attribute class.
  1088.  
  1089. ABNF
  1090.  
  1091. attribute-dir =3D "attribute" space authority-area
  1092.        *(space class-name:attribute-name) crlf
  1093. attribute-query =3D "query Class-Name=3Dattribute"
  1094.                   (" and auth-area=3D" authority-area)
  1095. *(space "and Name=3D" attribute-name) crlf
  1096.  
  1097. Errors
  1098.  
  1099. 338 Invalid directive syntax
  1100. 340 Invalid authority area
  1101. 341 Invalid class
  1102. 400 Directive not available
  1103. 401 Not authorized for directive
  1104.  
  1105. Examples
  1106.  
  1107. attribute map
  1108. =2E
  1109. Content-Type: multipart/mixed; boundary=3Dexample1
  1110.  
  1111. - --example1
  1112. Content-Type: text/directory
  1113.  
  1114. attribute:Class-Name
  1115. description:Type of the object
  1116. type:TEXT
  1117. format:re:[a-zA-Z0-9-]+
  1118. indexed:OFF
  1119. required:ON
  1120. multi-line:OFF
  1121. repeatable:OFF
  1122. primary:OFF
  1123. hierarchical:OFF
  1124. private:OFF
  1125. - --example1
  1126. Content-Type: text/directory
  1127.  
  1128. attribute:ID
  1129. description:Globally unique object identifier
  1130. type:TEXT
  1131. format:re:[0-9]+\.[a-zA-Z0-9\.-]+
  1132. indexed:ON
  1133. required:ON
  1134. multi-line:OFF
  1135. repeatable:OFF
  1136. primary:ON
  1137. hierarchical:OFF
  1138. private:OFF
  1139. # This is an abbreviated example, more attributes usually follow.
  1140. - --example1--
  1141. =2E
  1142.  
  1143. 3.3.11 security
  1144.  
  1145. Description
  1146.  
  1147. The "security" directive enables either a client request or a server
  1148. response to be authenticated and/or encrypted. This directive can be used to
  1149. securely access or update any information (meta or data) in an authority
  1150. area that is protected by one or more guardian objects.
  1151.  
  1152. This is an area that needs further work. The examples below that use
  1153. encrypted passwords and Pretty Good Privacy (PGP) are for illustrative
  1154. purposes only.
  1155.  
  1156. ABNF
  1157.  
  1158. security-dir =3D "security" space "on" space direction space security-method=20
  1159.   [space security-data] crlf security-payload ["-security" space "off" crlf]
  1160. direction =3D "request" / "response"
  1161. security-method =3D "password" / "pgp" / 1*id-char
  1162. security-data =3D password-data / pgp-data / 1*any-char
  1163. password-data =3D 1*any-char
  1164. pgp-data =3D "signed" / "encrypt" [space key-id] / "signed-encrypt" [space key-id]
  1165. security-payload =3D *(*any-char crlf)
  1166. security-response =3D "251" / "252" security-response-text crlf "." crlf
  1167. security-response-text =3D 1*any-char
  1168.  
  1169.    * The "password" security-method is available in the "request" direction
  1170.      only. For password, the security-data is a cleartext password.
  1171.    * The "pgp" security-method is available in both the "request" and
  1172.      "response" directions. For PGP, the security-data indicates how to
  1173.      treat the security-payload: signed, encrypted, or signed and encrypted.
  1174.      To encrypt the security-payload in the "response" direction, the
  1175.      security-data must include the public key ID with which to encrypt it.
  1176.  
  1177. Errors
  1178.  
  1179. 251 Security mode on
  1180. 252 Security mode off
  1181. 338 Invalid directive syntax
  1182. 352 Invalid security method
  1183. 353 Authentication failed
  1184. 354 Encryption failed
  1185. 400 Directive not available
  1186. 401 Not authorized for directive
  1187.  
  1188. Examples
  1189.  
  1190. # Authenticate a request using password.
  1191. security on request password hello!1
  1192. =2E
  1193. 251 Security mode on
  1194. =2E
  1195.  
  1196. # Authenticate a PGP signed request.
  1197. security on request pgp signed
  1198. =2E
  1199. 251 Security mode on
  1200. =2E
  1201. Content-Type: multipart/related; type=3Dapplication/rwhois-directive;=20
  1202.   start=3D<cid1@foo.com; bounday=3Dexample1
  1203.  
  1204. - --example1
  1205. Content-Type: application/rwhois-directive
  1206. Content-ID: <cid1@foo.com
  1207.  
  1208. register
  1209. Add: <cid2@foo.com
  1210. - --example1
  1211. Content-Type: application/rwhois-directive
  1212. Content-ID: <cid2@foo.com
  1213.  
  1214. - -----BEGIN PGP MESSAGE-----
  1215. Version: 2.6.2
  1216.  
  1217. owHrZJjKzMpgdP9D9crUhdpBYnwHGRnPbmVhmHlV7Hef9je/n7vyzhmE6589/+Dg
  1218. jPpVm59tNz92vPSmrFB/4ankBRz+xgY+7z9OUYjefGahbWSNwzzxbw6TpWZGerU+
  1219. uOUg/Cygs33JBdHqjwEc+wyfZPp+N5p2bu+ywoaOu8eLPyn+m2Mt/T9p1UaG68vP
  1220. Zd2d9EPw+Ywpio7dco6yh3b/v7zmQxJHcWpyaVFmSSUDEHi6WBkZm5iamVtY6iXq
  1221. JefnKnCFFqQklqSmWBlaWpoZGhmYGhqZmBgYGxgYKHA55yQWF+v6JeamWiXn55Uk
  1222. JpcocDmWlmToOhalJlpB9cf7uYbHE6kWi/VumUXFJRB9wcn5JUBdPokwgfDMnJzM
  1223. xNzi/DwFLjQBHQWoatfcxMwcq+JyB6h5AA=3D=3D
  1224. =3Da0sQ
  1225. - -----END PGP MESSAGE-----
  1226. - --example1--
  1227. =2E
  1228. 241 Register complete
  1229. Object: <cid2@foo.com 23456789.a.com 19961205224403000
  1230. =2E
  1231. security off
  1232. =2E
  1233. 252 Security mode off
  1234. =2E
  1235.  
  1236. # Encrypt a response using PGP. 52160EC1 is the public key ID with which
  1237. # the response is encrypted.
  1238. security on response pgp encrypt 52160EC1
  1239. =2E
  1240. 251 Security mode on
  1241. =2E
  1242. xfer com class=3Ddomain attribute=3DDomain-Name attribute=3DOrganization-Name
  1243. =2E
  1244. Content-Type: application/pgp-signed-XXX
  1245.  
  1246. - -----BEGIN PGP MESSAGE-----
  1247. Version: 2.6.2
  1248.  
  1249. hIwDqWWhK1IWDsEBBACOXssTzD2CbB7Vjj2cNURScpJc2as2TbUDOQiwkT+8qFgG
  1250. ZyRfktpwNNTawRIcGOk1Kcs84z8a3vvTA/oje9vZexHtzfJwBHFdiIZxPuCEpvgv
  1251. 2ppK7WqlmHGcQKVBJJHYw7Fq83CUkeGJB9P1M3CQiXeW8h8MwAuhxSgbgt23PKYA
  1252. AABuhknJrXeh9Owm81+MvyzgLOyM7sjDYmttU9sj/yuOYmAhS9V+34MT/Mwn4wO8
  1253. 2BCsJqBHXbwOuYKs02p0se4jyKFtZR8MDPWNm9QyAP+oNMTjsufy6ZRa9PegUC6t
  1254. HDhXymkiP03mKMMVK1//7X0=3D
  1255. =3DvZ2x
  1256. - -----END PGP MESSAGE-----
  1257. =2E
  1258. security off
  1259. =2E
  1260. 252 Security mode off
  1261. =2E
  1262.  
  1263. 3.3.12 soa
  1264.  
  1265. Description
  1266.  
  1267. The "soa" directive can be used by the client to retrieve the SOA
  1268. information for one or more authority areas. When no authority area name is
  1269. given, the server must return the SOA information for all the authority
  1270. areas.
  1271.  
  1272. As with the Class and Attribute directives, this directive can also be
  1273. handled via a query of the SOA class. Thus, the following two ABNF grammars
  1274. must be considered equal:
  1275.  
  1276. ABNF
  1277.  
  1278. soa-dir =3D "soa" *(space authority-area) crlf
  1279. soa-query =3D "query" space "auth-area=3D" authority-area crlf "." crlf
  1280.  
  1281. The server must return the following SOA information for an authority are=
  1282. a.
  1283. This information is also included in Section 4.3.2, which describes the SOA
  1284. class.
  1285.  
  1286.  attribute-nameattribute-value Comments
  1287.  
  1288.  authority     authority-area  This is the name of the
  1289.                                authority area.
  1290.                                This is the default time-to-live
  1291.  ttl           1*digit         for the data in the authority
  1292.                                area.
  1293.                                This is the serial number of the
  1294.  serial        time-stamp      data in the authority area; it
  1295.                                changes when the data changes.
  1296.                                This is the time interval before
  1297.  refresh       1*digit         a slave server checks for
  1298.                                complete replication.
  1299.                                This is the time interval before
  1300.  increment     1*digit         a slave server checks for
  1301.                                incremental replication.
  1302.                                This is the time interval before
  1303.  retry         1*digit         a slave server tries again to
  1304.                                connect to a master server that
  1305.                                appears to be out-of-service.
  1306.  
  1307.  tech-contact  email           This is the contact for the
  1308.                                operation of the master server.
  1309.  
  1310.  admin-contact email           This is the contact for the data
  1311.                                integrity at the master server.
  1312.                                This is the contact for sending
  1313.  hostmaster    email           update requests at the master
  1314.                                server.
  1315.                                This is the host name (or IP
  1316.  primary       host-port       address) and port number of the
  1317.                                master server.
  1318.  
  1319. Errors
  1320.  
  1321. 338 Invalid directive syntax
  1322. 340 Invalid authority area
  1323. 400 Directive not available
  1324. 401 Not authorized for directive
  1325.  
  1326. Examples
  1327.  
  1328. soa org
  1329. =2E
  1330. Content-Type: text/directory; profile=3D"rwhois-soa"
  1331.  
  1332. authority:org
  1333. ttl:86400
  1334. serial:19961119111535000
  1335. refresh:3600
  1336. increment:1800
  1337. retry:180
  1338. tech-contact:tech@internic.net
  1339. admin-contact:admin@internic.net
  1340. hostmaster:hostmaster@internic.net
  1341. primary:rs.internic.net:4321
  1342. =2E
  1343.  
  1344. 3.3.13 status
  1345.  
  1346. Description
  1347.  
  1348. The "status" directive can be used by the client to retrieve an object
  1349. belonging to the Status class, which is used to contain various status flags
  1350. for the server. The result must include the number of objects in all of the
  1351. authority areas, the current display format, the server contact information,
  1352. and the status flags for the state-oriented directives: "limit" and
  1353. "forward".
  1354.  
  1355. Since the directive returns a result, it can also be handled by a query
  1356. against the Status class. Since the client has no way of knowing the values
  1357. in advance, the only thing the client can ask for is the Class itself.
  1358.  
  1359. ABNF
  1360.  
  1361. status-dir =3D "status" crlf
  1362. status-query =3D "query Class-Name=3Dstatus"
  1363.  
  1364. Errors
  1365.  
  1366. 338 Invalid directive syntax
  1367. 400 Directive not available
  1368. 401 Not authorized for directive
  1369.  
  1370. Examples
  1371.  
  1372. status
  1373. =2E
  1374. Content-Type: text/directory; profile=3Drwhois-status
  1375. limit: 20
  1376. forward: OFF
  1377. objects: 12345
  1378. display: text/directory
  1379. contact: joe@rwhois.net
  1380. =2E
  1381.  
  1382. 3.3.14 xfer
  1383.  
  1384. Description
  1385.  
  1386. The "xfer" directive can be used by the client (generally, a slave server)
  1387. to transfer the data in an authority area. The client can control the amount
  1388. of data transferred using one of the following options. NOTE: The "xfer"
  1389. directive is identical to the "query" directive. It is included for backward
  1390. interoperability.
  1391.  
  1392. Updating secondary servers is a work in progress. Specifically, some method
  1393. is needed for sending information on what was deleted. Some of these same
  1394. issues arose during discussions of incremental updates in CIP and the same
  1395. problems developed.
  1396.  
  1397. In RWhois 1.5, the "xfer" directive had several options. Below are
  1398. descriptions of how these options should be handled:
  1399.  
  1400.    * serial-number: In 1.5, the client can transfer all the objects that
  1401.      have been added, modified, or deleted since a certain time, specifying
  1402.      the serial-number that indicates that time. This option was used for
  1403.      incremental replication. In 2.0, this function is handled by querying
  1404.      for objects that have an updated time that is after the time specified
  1405.      in the serial-number.
  1406.    * class: In 1.5, the client could limit the data transfer to one or more
  1407.      classes, using the "class=3D<class-name>" option. This is handled simply
  1408.      by specifying the class or classes to which the query would apply.
  1409.    * attribute: In 1.5, the client could limit the data transfer to one or
  1410.      more attributes of a class. In 2.0, this is handled by the INCLUDE
  1411.      global constraint.
  1412.  
  1413. Implementers are encouraged to implement security surrounding queries that
  1414. exhibit security problems. The XFER behavior is one of these.
  1415.  
  1416. 3.3.15 X-
  1417.  
  1418. Description
  1419.  
  1420. The "X-" directive is used to specify an additional, non-standard directive.
  1421. It can be implemented by executing an external program, by internal
  1422. functions, or by other means. It may interact with the client or simply
  1423. produce output like one of the standard directives.
  1424.  
  1425. ABNF
  1426.  
  1427. x-dir =3D "X-" x-directive [space x-arguments] crlf *x-line "." crlf
  1428. x-directive =3D 1*id-char
  1429. x-arguments =3D *any-char
  1430. x-response =3D "X6X" x-response-text *(*any-char crlf) crlf "." crlf
  1431. x-response-text =3D 1*any-char
  1432. x-line =3D *any-char crlf
  1433.  
  1434. Errors
  1435.  
  1436. 338 Invalid directive syntax
  1437. 400 Directive not available
  1438. 401 Not authorized for directive
  1439.  
  1440. Examples
  1441.  
  1442. The following example uses an implementation that executes an external
  1443. program, the UNIX "date" command. The server runs the "date" command and
  1444. returns its output to the client.
  1445.  
  1446. X-date
  1447. =2E
  1448. 261 X-date output
  1449. Mon Jan 6 13:21:20 EST 1997
  1450. =2E
  1451.  
  1452. 4.0 Data Model
  1453.  
  1454. The RWhois protocol is primarily concerned with directory-services-type
  1455. information. Historically, this has been formatted in a series of
  1456. colon-delimited attribute/value pairs. Thus, the RWhois protocol's primary
  1457. interaction will be via encoded A/V pairs. In addition to these types, it is
  1458. also apparent that RWhois will need to deal with objects of different types
  1459. such as the image of a particular user, a company=92s logo, or an encoded
  1460. representation of a sales pitch. It is also recognized that in the future
  1461. other directory services encoding formats that have a richer markup language
  1462. may become popular. Astute readers may pay attention to the interaction
  1463. between SGML and MIME for future application to the world of directory
  1464. services.
  1465.  
  1466. The A/V type objects have a specific base class from which all objects are
  1467. derived. In addition to the base class, there is the schema object, which is
  1468. used to define other objects that inherit from the base class.
  1469.  
  1470. 4.1 Base Class
  1471.  
  1472. While RWhois does not have or advocate using a specific, standardized
  1473. schema, it does impose a few requirements. It requires that all defined
  1474. classes inherit attributes from a particular base class (or base schema).
  1475. The RWhois specification does not require the actual implementation of
  1476. inheritance. Instead, all classes must include the attributes defined in the
  1477. base class.
  1478.  
  1479. The base class has the following attributes.
  1480.  
  1481.              This attribute contains the name of the class to which the
  1482. Class-Name   object belongs. It is the type of the object itself. It is
  1483.              of type TEXT and is required.
  1484.              This attribute contains the name of the authority area to
  1485. Auth-Area    which the object belongs. It, along with Class-Name,
  1486.              definitively defines the type of the object. It is of type
  1487.              TEXT and is required.
  1488.              This attribute is a universal identifier for the object. It
  1489.              is formed by choosing a string that is unique within an
  1490.              authority area and appending the authority area to it,
  1491.              separating the local string from the authority area name
  1492. ID           with a period. The only restrictions on the local string are
  1493.              that it must be unique within the authority area and must
  1494.              not contain the period character. This attribute is
  1495.              hierarchical in nature. It is always generated by the server
  1496.              (for example, during a register operation). It is of type
  1497.              TEXT and is required.
  1498.              This attribute is a time/date stamp that indicates the time
  1499.              of last modification of the object. It is both informational
  1500. Updated      and a form of record locking. It prevents two clients from
  1501.              modifying the same object at the same time. It is of type
  1502.              TEXT and is required.
  1503.              This attribute is a link to a guardian object (described
  1504. Guardian     below). Its value is the ID of a guardian object. It is of
  1505.              type ID and is optional. It is repeatable, since an object
  1506.              may have multiple guardians.
  1507.              This attribute is a true or false flag that indicates
  1508.              whether or not an object is private (that is, not publicly
  1509.              viewable). It defaults to false. If it is true, only the
  1510. Private      clients that satisfy the authentication/encryption
  1511.              requirements of one of the object's guardians are able to
  1512.              view the object. If the object is publicly viewable, then
  1513.              the Private attribute property of each of its attributes
  1514.              still applies.
  1515.              This attribute is the "time-to-live " of a given object. It
  1516.              is included only if an object has a different time-to-live
  1517. TTL          than the default given in the Start of Authority
  1518.              information. Its value is specified in seconds. It is of
  1519.              type TEXT and is optional.
  1520.  
  1521. 4.2 Defining a New Class
  1522.  
  1523. One of the more useful but underutilized aspects of X.500 is the encoding of
  1524. a particular attributes=92 definition within the actual protocol. The problem
  1525. was that its existence was not discoverable.
  1526.  
  1527. In this version of RWhois, this feature is specifically made to be part of
  1528. the protocol. Thus, two objects are specified: "Attribute" and "Class".
  1529. "Attribute" is used to define objects that describe the characteristics of
  1530. an attribute. The "Class" class is used to define a class of objects by
  1531. specifying the "Attribute" objects that make up the class.
  1532.  
  1533. 4.2.1 Attribute Class
  1534.  
  1535. Attributes have a number of properties, some mandated by the RWhois protocol
  1536. and some that are implementation dependent. These properties are usually a
  1537. reflection of the database system used by the server. The following is a
  1538. list of the protocol-mandated properties and their descriptions.
  1539.  
  1540. Attribute   This is the name of the attribute.
  1541. Description This is a natural-language description of the attribute.
  1542.             This is a parameter that broadly indicates the use of the
  1543.             attribute to the protocol. There are three standard types:
  1544.             TEXT, ID, and SEE-ALSO. The default is TEXT, which indicates
  1545.             that the value is a text string. ID indicates that the
  1546. Type        attribute contains the ID of another RWhois object; this type
  1547.             of attribute is used for database normalization. SEE-ALSO
  1548.             indicates that the attribute contains a pointer (a Uniform
  1549.             Resource Identifier (URI)) to some other kind of external
  1550.             data; for example, a World Wide Web page or FTP site.
  1551.             This is an interpretable string that describes the acceptance
  1552.             format of the value. The server (and optionally the client)
  1553.             should match the value to the format string to determine if
  1554. Format      the value is acceptable. The format of this property is a
  1555.             keyword indicating the syntax of the format string, followed
  1556.             by a colon, followed by the format string itself. Currently,
  1557.             the only keyword recognized is "re" for POSIX.2 extended
  1558.             regular expressions.
  1559.  
  1560. Indexed     This is a true or false flag indicating that this attribute
  1561.             should be indexed (and therefore able to be searched).
  1562.  
  1563. Required    This is a true or false flag indicating that this attribute
  1564.             must have a value in an instance of the class.
  1565.             This is a true or false flag indicating that there may be
  1566.             multiple instances of this attribute in a class and each
  1567. Repeatable  instance is to be interpreted as a separate instance (in
  1568.             contrast to Multi-Line). This flag is mutually exclusive with
  1569.             Multi-Line: if Multi-Line is true, then Repeatable must be
  1570.             false and vice versa.
  1571.             This is a true or false flag that indicates that this
  1572.             attribute is a primary key. If more than one attribute in a
  1573.             class is marked as primary, then these attributes together
  1574. Primary     form a single primary key. The primary key is intended to be
  1575.             used to force uniqueness among class instances. Therefore,
  1576.             there can be only one instance of a primary key in a
  1577.             database. The Primary flag implies that the attribute is also
  1578.             required.
  1579.             This is either a regular expression or a URI. If it is a
  1580.             regular expression, any value should be matched with the
  1581. Hierarchicalregexp to find the character(s) that form the separator
  1582.             between each sub-part. If it is a URI, the URI is used to
  1583.             uniquely identify a well known rule set that is used to
  1584.             define how hierarchy is expressed in a given value.
  1585.             This is a true or false flag that indicates whether or not
  1586.             this attribute is private (that is, not publicly viewable).
  1587. Private     It defaults to false. If it is true, only the clients that
  1588.             satisfy the authentication/encryption requirements of a
  1589.             guardian (described below) are able to view the
  1590.             attribute-value pair.
  1591.  
  1592. 4.2.2 Class Class
  1593.  
  1594. A class is not as difficult to specify as an attribute, since the class is
  1595. defined by its attributes. Thus, the only required attribute is the ID of
  1596. the attribute objects contained within the class. Additionally, a
  1597. description of the class should be included for human discovery and
  1598. searching. The following attributes make up the "Class" class.
  1599.  
  1600. Description   This is the free-text description of the class that is
  1601.               intended for the consumption of the user.
  1602.               This is the link-style attribute that points to the
  1603. Attribute-NameAttribute object(s) that make up this class by using the ID
  1604.               of the object. This attribute is repeatable.
  1605.  
  1606. Constructor   This is a URI that identifies an object that acts as the
  1607.               Constructor for objects that belong to the defined class.
  1608.  
  1609. The constructor is used to create new objects since all of the semantics
  1610. associated with creating an object would be nearly impossible to express in
  1611. the Attribute definition. For example, an Attribute object might define a
  1612. given attribute to be an IP address. A client would know what to do with an
  1613. IP address. But the semantics for how to assign an IP address are simply too
  1614. complicated to express without some programming language. This is an area
  1615. for additional standardization.
  1616.  
  1617. 4.3 RWhois Standard Schemas
  1618.  
  1619. The following RWhois standard schema definitions are required for any RWhois
  1620. installation that wishes to participate in the RWhois tree. The RWhois tree
  1621. is a mapping of referrals from one RWhois server to another.
  1622.  
  1623. Every schema defined below inherits the base result class defined above. The
  1624. attributes defined in Base Schema as REQUIRED will still be REQUIRED in
  1625. RWhois standard schemas, while the OPTIONAL attributes will still be the
  1626. OPTIONAL.
  1627.  
  1628. 4.3.1 Referral Class
  1629.  
  1630. The referral class is defined to hold referral information (typically for
  1631. link referrals). It consists of attributes defined as part of the base
  1632. class, the protocol-specific attributes described below, and any
  1633. installation-specific attributes.
  1634.  
  1635.                  This attribute contains the referral itself; it is an
  1636.                  RWhois URL. It is of type TEXT and is required. It is
  1637.                  repeatable, since more than one server can host a
  1638. Referral         Referred-Auth-Area. In RWhois 1.5, the referred
  1639.                  authority area was in a separate field. In this version,
  1640.                  the authority area MUST be included within the URL
  1641.                  contained in this field.
  1642.  
  1643. 4.3.2 SOA Class
  1644.  
  1645. Each authority area has some administrative variables, defined at the master
  1646. server, to control data replication. These variables are called the SOA
  1647. variables. They are listed below.
  1648.  
  1649.                   This is the serial number of the data in an authority
  1650. Serial-Number     area. The master server should update this variable
  1651.                   whenever the data in the authority area is changed. Its
  1652.                   value is a time/date stamp.
  1653.                   This is the time interval before a slave server checks
  1654. Refresh-Interval  for complete replication. Its value is specified in
  1655.                   seconds.
  1656.                   This is the time interval before a slave server checks
  1657. Increment-Intervalfor incremental replication. Its value is specified in
  1658.                   seconds.
  1659.                   This is the time interval before a slave server tries
  1660. Retry-Interval    again to connect to a master server that appears to be
  1661.                   out-of-service. Its value is specified in seconds.
  1662.                   This is the default time-to-live for the data in an
  1663. Time-To-Live      authority area at a slave server. The slave server
  1664.                   should not answer authoritatively to queries for such
  1665.                   stale data. Its value is specified in seconds.
  1666.                   This is the minimum time interval for which a server
  1667.                   will keep information about the deletion of a given
  1668. Time-To-Die       object. If a slave server asks for an update after this
  1669.                   time has expired, it may not receive information that a
  1670.                   given object was deleted.
  1671.                   This is the email address of an individual or a role
  1672. Admin-Contact     account responsible for the data integrity in an
  1673.                   authority area at the master server.
  1674.                   This is the email address of an individual or a role
  1675. Tech-Contact      account responsible for the operation of the master
  1676.                   server for an authority area.
  1677.                   This is the email address of an individual or a role
  1678. Hostmaster        account to whom email messages to update the data in an
  1679.                   authority area at the master server are sent.
  1680.                   This is the location of the master server for an
  1681. Primary-Server    authority area. Its value must contain both the host
  1682.                   name (or IP address) and port number of the master
  1683.                   server.
  1684.  
  1685. 4.3.3 Guardian Class
  1686.  
  1687. The guardian class is defined to hold security information. The fundamental
  1688. concept behind the guardian class is that an object (or another structure)
  1689. is "guarded" by containing a pointer to a guardian object [Guardian]. To
  1690. modify, delete, or possibly view the guarded object, the authentication (or
  1691. encryption, or both) scheme must be satisfied. Guardians are intended to not
  1692. have rank: if an object is guarded by more than one guardian object,
  1693. satisfying any one of those guardians is sufficient. A guardian object that
  1694. does not have any Guardian attribute linking it to other guardians guards
  1695. itself. That is, the authentication scheme in the guardian object itself
  1696. must be satisfied to modify, delete, or possibly view it.
  1697.  
  1698. Guardian objects are typically linked to actual database objects with the
  1699. Guardian attribute found in the base class. However, a guardian may also be
  1700. linked to an entire authority area, in which case the guardian becomes
  1701. implicitly linked to all of the objects contained within the authority area.
  1702.  
  1703. The guardian class consists of the base class, the protocol-specific
  1704. attributes described below, and any installation-specific attributes.
  1705.  
  1706.             This attribute contains a keyword indicating the
  1707.             authentication methodology. Its value must be
  1708. Guard-Schemeunderstood by both the client and server, and its
  1709.             value dictates the contents of the Guard-Info
  1710.             attribute. It is of type TEXT and is required.
  1711.             This attribute contains that data that is used by
  1712.             the Guard-Scheme to verify the authentication. Its
  1713.             actual format is dictated by the Guard-Scheme, for
  1714. Guard-Info  example, it could contain a password or PGP public
  1715.             key id [RFC 1991]. For security reasons, it should
  1716.             not be displayed, and its Private attribute
  1717.             property should be set to true. It is of type TEXT
  1718.             and is required.
  1719.  
  1720. 4.3.4 Status Class
  1721.  
  1722. This class is used to define objects that are used to store the current
  1723. status of the server. As with any object text/directory object, locally
  1724. defined attributes can be added to the object that are not defined by that
  1725. object=92s class definition. This class will be subject to such treatment, as
  1726. certain server implementations will want to return additional implementation
  1727. specific information.
  1728.  
  1729. It is important to note that querying this class is usually meaningless,
  1730. since the client should not know the values in advance. Objects of this type
  1731. are usually created as they are returned. See the 'status' directive for how
  1732. to ask for an object of this class.
  1733.  
  1734. Limit       This is the current hit limit.
  1735. Forward     This is the status of the Forward flag.
  1736. Objects     This is the current number of objects stored by the server.
  1737. Display     This is the current display type.
  1738. Contact     This is the email address of the server maintainer.
  1739.  
  1740. 4.3.5 Directive Class
  1741.  
  1742. This class is used to define objects that describe the directives currently
  1743. supported by the server in question. See the 'directive' directive for more
  1744. information on this class and how to query it.
  1745.  
  1746. Directive-NameThis is the name of the directive as it should be entered
  1747.               to invoke it.
  1748.  
  1749. Description   A natural-language description of what the directive does,
  1750.               that is intended for human consumption.
  1751.  
  1752. 4.3.6 TOC Class
  1753.  
  1754. This class is used to =91point=92 to other objects in a multipart/related
  1755. result. It is not normally queried and doing so may simply not make sense.
  1756. There is only one attribute/value pair which will usually be repeated
  1757. several times.
  1758.  
  1759. Object      The value for this attribute contains information about each
  1760.             object contained within the multipart/related object.
  1761.  
  1762. The format of the value follows the following ABNF:
  1763.  
  1764. value =3D cid [directory-profile] [rwhois-id] [user-string]
  1765.  
  1766. directory-profile =3D 1*any-char
  1767.  
  1768. user-string =3D 1*any-char
  1769.  
  1770. directory-profile is the value of the profile attribute of the
  1771. application/directory object who=92s content-id is contained in cid.
  1772.  
  1773. user-string is descriptive text formed from the object itself and is meant
  1774. as a summary of the object so that the TOC object can be displayed somewhat
  1775. like a menu. How this descriptive string is formed is completely
  1776. implementation specific.
  1777.  
  1778. 5.0 Search Model
  1779.  
  1780. The search model is made up of four distinct aspects. There is the query
  1781. itself, which is specified by the client. The server then takes that query
  1782. and looks in its local database. If it finds an appropriate object, it
  1783. returns the results. If it cannot find an appropriate object, the server
  1784. uses query reduction to find a referral to a server that may know more about
  1785. the object in question. Returned objects can also have a see-also, which
  1786. provides a pointer to another object that contains additional information
  1787. that may be of use to the client.
  1788.  
  1789. 5.1 Query
  1790.  
  1791. The query is generally the final directive sent to the server. The query is
  1792. the question that the client wants the server to answer. It has two primary
  1793. parts: the query terms themselves and global constraints that apply to the
  1794. entire query and the display of its output. There is a similarity between
  1795. this query syntax and the whois++ query syntax, but there are differences.
  1796.  
  1797. Format for Use:
  1798.  
  1799. query <query terms>:<global constraints>;<global constraints>;...
  1800.  
  1801. A query term is defined as one or more terms followed by an optional
  1802. semicolon and one or more local constraints. Local constraints are bound
  1803. only to the term they follow. All local constraints can be global
  1804. constraints, but only some global constraints make sense as local
  1805. constraints.
  1806.  
  1807. Terms can be separated by the logical operators AND, OR, or NOT. The lack of
  1808. an operator between two terms MUST be interpreted as an implicit AND. A term
  1809. itself can have several formats.
  1810.  
  1811.   1. A value string by itself is considered a search on all attributes.
  1812.   2. A term followed by a semicolon and a semicolon-delimited list of local
  1813.      constraints.
  1814.   3. An attribute specifier or an abbreviated attribute specifier followed
  1815.      by an "=3D" and a single value string followed by an optional semicolon
  1816.      and a semicolon delimited list of local constraints.
  1817.  
  1818. Special characters that need to be quoted are preceded by a backslash (\).
  1819. Special characters are space (' '), tab, equal sign (=3D), comma (,), colon
  1820. (:), backslash (\), semicolon (;), asterisk (*), period (.), parenthesis
  1821. [()], square brackets ([]), dollar sign ($), and circumflex (^).
  1822.  
  1823. NOTE: Unlike the whois++ syntax, values may be enclosed within double
  1824. quotes. In this case the only values that need to be escaped are '"'.
  1825.  
  1826. Example query:
  1827.  
  1828. query Name=3D"Scott Williamson";Language=3Den;Charset=3DISO-8859-1 AND \
  1829.  Country=3Dus:output=3DMIME
  1830.  
  1831. NOTE: The query should be all on one line. In the above example, the query
  1832. is continued over two lines for readability only.
  1833.  
  1834. 5.2 Constraints
  1835.  
  1836. Local constraints are generally used to override some global constraint or
  1837. default. Any local constraint can be a global constraint.
  1838.  
  1839. There are two groups of Global constraints: those that make sense only in
  1840. the query and those that are also directives in their own right. For
  1841. example, specifying a global query match type of regular expression makes no
  1842. sense for other types of client/server interaction. Thus, it only appears in
  1843. the query. Setting a language and/or character set, on the other hand, has
  1844. value for other functions such as info directives and schema definitions.
  1845.  
  1846. Experimental constraints can be constructed by using the "X-" convention
  1847. used by many protocols.
  1848.  
  1849.  Constraint       Allowed Values         Local or   Equivalent
  1850.                                           Global    Directive
  1851.  
  1852. SEARCH      { exact-string | regex |   LOCAL/      search
  1853.             fuzzy | substring | }      GLOBAL
  1854. LIMIT       { 1-<max-allowed> }        GLOBAL      limit
  1855.  
  1856. CASE        { ignore | consider }      LOCAL/      case
  1857.                                        GLOBAL
  1858.  
  1859. INCHARSET   { us-ascii | iso-8859-* }  LOCAL/      rwhois
  1860.                                        GLOBAL
  1861.  
  1862. LANGUAGE    <As defined in ISO         LOCAL/      language
  1863.             639:1988>                  GLOBAL
  1864. IGNORE      {attributelist}            GLOBAL      ignore
  1865. INCLUDE     {attributelist}            GLOBAL      include
  1866.  
  1867. CLASS       {NAME of a valid object    LOCAL/
  1868.             type}                      GLOBAL
  1869.  
  1870. AUTH_AREA   {NAME of a valid authority LOCAL/
  1871.             area}                      GLOBAL
  1872.  
  1873. NOTE: IGNORE is used to specify attributes that should specifically be
  1874. ignored when searching and displaying a given class of objects. Conversely,
  1875. INCLUDE is used to specifically ignore all cases except those specified in
  1876. the INCLUDE's values.
  1877.  
  1878. 5.3 Query Reduction
  1879.  
  1880. The critical component of the RWhois server is the ability to reduce the
  1881. query to find a server that is closer to the data. One of the fundamental
  1882. changes between Version 1.5 of RWhois and this version is that the reduction
  1883. rules for a given schema are much more codified. For any given schema
  1884. definition, a given A/V pair is denoted as being hierarchical in nature.
  1885. Whenever this is noted, a rule must be given in the schema definition that
  1886. specifically defines what the separation token for each reducible part is.
  1887. The rule is given as either a Posix Extended Regular Expression or URI. The
  1888. URI is used both to uniquely identify the rule being used and also to
  1889. retrieve that rule if some method for doing so is used in the future.
  1890.  
  1891. 5.3.1 Search Algorithm
  1892.  
  1893.   1. Accept a query.
  1894.   2. Find any local matches; display them.
  1895.   3. Find any referrals; display them.
  1896.   4. If no local or referral hits, reduce the query and go to Step 3.
  1897.  
  1898. Here is an example of the query ietf.cnri.reston.va.us:
  1899.  
  1900. Query whois for ietf.cnri.reston.va.us.
  1901.  
  1902.   1. Search rs.internic.net for information (no hits).
  1903.   2. Search referrals for ietf.cnri.reston.va.us (no hits).
  1904.   3. Search referrals for cnri.reston.va.us (no hits).
  1905.   4. Search referrals for reston.va.us (no hits).
  1906.   5. Search referrals for va.us (no hits).
  1907.   6. Search referrals for us (referral found)=97referral to isi.edu.
  1908.  
  1909. [currently on rs.internic.net:4343 for proof of concept]
  1910.  
  1911. 5.3.2 Reduction Rules
  1912.  
  1913. As specified in the schema definition section, each object type must specify
  1914. which of its A/V pairs are hierarchical (e.g., reducible). With that
  1915. specification comes a regular expression that states what the token is for
  1916. understanding what the separator is between each of the reducible parts. The
  1917. default will be "/\./", which matches a period. This default is used for the
  1918. majority of the searches, as it is used for domain names and IP addresses. A
  1919. good example would be HTTP-based URLs. Its rule would match on "/" and "."
  1920. thus giving a way to resolve URLs based on other criteria than simply
  1921. hostname and path. Other examples are ISBN numbers and OIDs.
  1922.  
  1923. 5.4 Referral
  1924.  
  1925. The result profile referral instructs the client to query another server,
  1926. which could be a Whois, RWhois, LDAP, or Whois++ server. Since the primary
  1927. referral field is in the form of a URI, the referral can happen to any
  1928. server via any protocol. If this is the case, many of the assertions made
  1929. here with respect to up or down referrals are considered meaningless.
  1930.  
  1931. Referrals are cumulative, and the first referral received during a session
  1932. must replace the default server list. Any subsequent referrals received must
  1933. be appended to the end of the server list. The type of a referral can be
  1934. determined by the client evaluating the authority area, which is part of the
  1935. referral RWhois URI response.
  1936.  
  1937. If the authority area received from a referral response is equal to the
  1938. original query, then it is a link referral. If the authority area is not
  1939. equal to the query, then it is a reduction referral. If no authority area is
  1940. sent, then it is a punt referral. Punt means the server is not a root and
  1941. cannot answer the query, and is therefore referring the client to a level up
  1942. the tree or to a server that can better answer the query. NOTE: The punt
  1943. referral may be used to direct a client into a CIP mesh.
  1944.  
  1945. The client may receive multiple referrals from a single query. If the SOA
  1946. for each of these referrals is the same, then the first referral is the
  1947. primary server and all subsequent servers are secondary. Each of the servers
  1948. will report the SOA for the authority area in question.
  1949.  
  1950. 5.5 Other Elements Affecting Query Completion
  1951.  
  1952. Earlier versions of RWhois contain the concept of a 'see-also'. This
  1953. response was used to direct a client to additional information outside an
  1954. RWhois tree. In this version of the protocol, this functionality is handled
  1955. by the text/directory MIME type through its use of 'value=3Durl' attribute
  1956. parameters. For example, a given record has the attribute Photo that
  1957. contains the image of the contact. This image is not returned with the
  1958. record. Instead, the client receives a record that has the following
  1959. attribute:
  1960.  
  1961. Photo;value=3Durl: http://www.foo.com/bla.gif
  1962.  
  1963. This means that the actual value for the Photo attribute is located at the
  1964. address specified in the URI.
  1965.  
  1966. In RWhois 1.5, this concept was also extended to the specific type of
  1967. see-also that dealt with objects within the RWhois tree. This type of value
  1968. was used to normalize databases and to have records share values. In this
  1969. version the text/directory MIME type also handles this simply by using the
  1970. RWhois URL as the URL in a value=3Durl attribute parameter. For example:
  1971.  
  1972. Admin-contact;value=3Durl: rwhois://rwhois.internic.net/BN123.NET
  1973.  
  1974. 6.0 Security Model
  1975.  
  1976. There are several areas within the protocol where security is needed. There
  1977. is the need for the privacy of the stream, authentication of the reading and
  1978. writing of objects, and the execution of certain directives. Security in
  1979. RWhois is an area that needs further development. The issues discussed below
  1980. are a guide for what needs to be done, not how to do it.
  1981.  
  1982. 6.1 Stream Privacy
  1983.  
  1984. There is the need to secure the flow of data between the client and server
  1985. to thwart eavesdroppers looking for secure information. There are two
  1986. possible solutions: encrypt the protocol stream at the protocol level or at
  1987. the stream level. The former would require RWhois to provide some
  1988. handshaking. The latter would use existing solutions such as Transport Layer
  1989. Security (TLS). The primary issue to be aware of is the desire to not
  1990. require the server to buffer an entire answer to encrypt it. In the case of
  1991. an Xfer this would be an impossibly large task.
  1992.  
  1993. 6.2 Authentication of Reading/Writing of Objects
  1994.  
  1995. There is a need to authenticate clients who need to create, update, or
  1996. delete objects. Currently, the Guardian model handles this to a certain
  1997. extent. That model does need to be extended due to its inability to deal
  1998. with attribute control lists so that certain values are visible depending on
  1999. the viewer.
  2000.  
  2001. 7.0 Tree Management
  2002.  
  2003. Data replication and tree management for RWhois 2.0 currently follows the
  2004. same procedures and models as RWhois 1.5. See Section 3.6 of that RFC for
  2005. further information.
  2006.  
  2007. 8.0 References
  2008.  
  2009. [RFC-954] Harrenstien, K., Stahl, M., Feinler, E., NICNAME/WHOIS,
  2010. RFC 954, SRI, October 1985.
  2011.  
  2012. [RFC-1521] Borenstein, N., Freed, N., MIME (Multipurpose Internet Mail
  2013. Extensions) Part One: Mechanisms for Specifying and Describing the Format of
  2014. Internet Message Bodies, RFC 1521, Bellcore, Innosoft, September 1993.
  2015.  
  2016. [RFC2167] Williamson, S., M. Kosters, D. Blacka, J. Singh, K. Zeilstra.
  2017. Referral Whois (RWhois) Protocol V1.5. RFC 2167, Network Solutions, June 1997.
  2018.  
  2019. [RFC1714] Williamson, S., M. Kosters. Referral Whois Protocol (RWhois).
  2020. RFC 1714, InterNIC, November 1994.
  2021.  
  2022. 9.0 Authors' Addresses
  2023.  
  2024. The following employees of Network Solutions were involved in the
  2025. discussions used to formulate the ideas expressed in this document. While
  2026. specific credit is difficult to express, Scott Williamson and Mark Kosters
  2027. are recognized for their original work with the first version of RWhois.
  2028.  
  2029. David Blacka     davidb@rwhois.net
  2030. Mark Kosters     markk@rwhois.net
  2031. Ming Lu          cming@rwhois.net
  2032. Leslie Meador    lesliem@rwhois.net
  2033. Michael Mealling michaelm@rwhois.net
  2034. Greg Pierce      gregp@rwhois.net
  2035. Amar Rao         amarr@rwhois.net
  2036. Jasdip Singh     jasdips@rwhois.net
  2037. Scott Williamson scottw@rwhois.net
  2038. Koert Zeilstra   kzeil@rwhois.net
  2039.  
  2040.  
  2041. Appendix A: Error Codes
  2042.  
  2043. The definitions of the error codes are provided below. The error codes are
  2044. descriptive so that the client can group the error messages to determine
  2045. group action that must be taken before taking error specific action. Error
  2046. codes should remain consistent without variable extensions except for
  2047. messages associated with the registration process. If a client receives a
  2048. '6' in the second position of the error code and the client does not support
  2049. the extended code received, the client must act on the first position code.
  2050. (Example: If a client received 561 and the client did not support the
  2051. extended error codes for the server currently connected, the client would
  2052. exit based on the '5' in the first position of the error code.)
  2053.  
  2054. X00
  2055.  
  2056.    * 1 - Information only, no action required
  2057.    * 2 - Information, action required
  2058.    * 3 - Specific directive error, retry that directive or try another
  2059.      directive
  2060.    * 4 - Serious for current directive, may correct with another directive
  2061.    * 5 - Fatal, must disconnect
  2062.  
  2063. 0X0
  2064.  
  2065.    * 0(1) - System wide, no specific directive
  2066.    * 2 - Registration error
  2067.    * 3(4,5) - Specific directive
  2068.    * 6 - Extended message (version specific)
  2069.  
  2070. 00X
  2071.  
  2072. Sequential order
  2073.  
  2074. Appendix B: Capabilities ID
  2075.  
  2076. The server and client must send their capabilities to each other during the
  2077. initial handshaking after connection. The server indicates which optional
  2078. directives that it can accept. The client responds with the server responses
  2079. that it can understand. Below is the capabilities list.
  2080.  
  2081. Directives: (Sent by the server)
  2082.  
  2083.   Directive   ID
  2084.     load      1h
  2085.     limit     2h
  2086.    schema     4h
  2087.     xfer      8h
  2088.     quit     10h
  2089.    status    20h
  2090.     cache    40h
  2091.  holdconnect 80h
  2092.    forward   100h
  2093.      soa     200h
  2094.    notify    400h
  2095.   register   800h
  2096.    object   1000h
  2097.    define   2000h
  2098.    private  4000h
  2099.      X-     8000h
  2100.   directive 10000h
  2101.    display  20000h
  2102.   language  40000h
  2103.  
  2104. Appendix B: General ABNF definitions
  2105.  
  2106. These definitions are used to define several widely used tokens.
  2107.  
  2108. alpha =3D "a".."z" / "A".."Z"
  2109. digit =3D "0".."9"
  2110. hex-digit =3D digit / "a".."f" / "A".. "F"
  2111. id-char =3D alpha / digit / "_" / "-"
  2112. any-char =3D <ASCII 1..255, except LF (linefeed) and CR (carriage return)>
  2113. dns-char =3D alpha / digit / "-"
  2114. email-char =3D <see [RFC 822]>
  2115. space =3D " "
  2116. tab =3D <ASCII TAB (tab)>
  2117. lf =3D <ASCII LF (linefeed)>
  2118. cr =3D <ASCII CR (carriage return)>
  2119. crlf =3D cr lf
  2120.  
  2121.    Grammar
  2122.  
  2123. year =3D 4digit
  2124. month =3D 2digit
  2125. day =3D 2digit
  2126. hour =3D 2digit
  2127. minute =3D 2digit
  2128. second =3D 2digit
  2129. milli-second =3D 3digit
  2130. host-name =3D dns-char *(dns-char / ".")
  2131. ip-address =3D 1*3digit "." 1*3digit "." 1*3digit "." 1*3digit
  2132. authority-area =3D 1*id-char
  2133. rwhois-id =3D 1*id-char "." authority-area
  2134. email =3D 1*email-char "@" host-name
  2135. host-port =3D (host-name / ip-address) ":" 1*5digit
  2136. class-name =3D 1*id-char
  2137. attribute-name =3D 1*id-char
  2138. attribute-value =3D 1*any-char
  2139. time-stamp =3D year month day hour minute second millisecond
  2140. on-off =3D "on" / "off"
  2141.  
  2142. Note that the time-stamp must be in the Greenwich Mean Time (GMT) time zone.
  2143.  
  2144.  
  2145.