rfc2167.txt 133 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868
  1. Network Working Group S. Williamson
  2. Request for Comments: 2167 M. Kosters
  3. Obsoletes: RFC 1714 D. Blacka
  4. Category: Informational J. Singh
  5. K. Zeilstra
  6. Network Solutions, Inc.
  7. June 1997
  8. Referral Whois (RWhois) Protocol V1.5
  9. Status of this Memo
  10. This memo provides information for the Internet community. This memo
  11. does not specify an Internet standard of any kind. Distribution of
  12. this memo is unlimited.
  13. Abstract
  14. This memo describes Version 1.5 of the client/server interaction of
  15. RWhois. RWhois provides a distributed system for the discovery,
  16. retrieval, and maintenance of directory information. This system is
  17. primarily hierarchical by design. It allows for the deterministic
  18. routing of a query based on hierarchical tags, referring the user
  19. closer to the maintainer of the information. While RWhois can be
  20. considered a generic directory services protocol, it distinguishes
  21. itself from other protocols by providing an integrated, hierarchical
  22. architecture and query routing mechanism.
  23. 1. Introduction
  24. Early in the development of the ARPANET, the SRI-NIC established a
  25. centralized Whois database that provided host and network information
  26. about the systems connected to the network and the electronic mail
  27. (email) addresses of the users on those systems [RFC 954]. The
  28. ARPANET experiment evolved into a global network, the Internet, with
  29. countless people and hundreds of thousands of end systems. The sheer
  30. size and effort needed to maintain a centralized database
  31. necessitates an alternate, decentralized approach to storing and
  32. retrieving this information.
  33. Williamson, et. al. Informational [Page 1]
  34. RFC 2167 RWhois Protocol June 1997
  35. The original Whois function was to be a central directory of
  36. resources and people on ARPANET. However, it could not adequately
  37. meet the needs of the expanded Internet. RWhois extends and enhances
  38. the Whois concept in a hierarchical and scaleable fashion. In
  39. accordance with this, RWhois focuses primarily on the distribution of
  40. "network objects", or the data representing Internet resources or
  41. people, and uses the inherently hierarchical nature of these network
  42. objects (domain names, Internet Protocol (IP) networks, email
  43. addresses) to more accurately discover the requested information.
  44. RWhois synthesizes concepts from other, established Internet
  45. protocols. The RWhois protocol and architecture derive a great deal
  46. of structure from the Domain Name System (DNS) [RFC 1034] and borrow
  47. directory service concepts from other directory service efforts,
  48. primarily [X.500]. The protocol is also influenced by earlier
  49. established Internet protocols, such as the Simple Mail Transport
  50. Protocol (SMTP) [RFC 821].
  51. This RWhois specification defines both a directory access protocol
  52. and a directory architecture. The directory access protocol
  53. specifically describes the syntax of the client/server interaction.
  54. It describes how an RWhois client can search for data on an RWhois
  55. server, or how the client can modify data on the server. It also
  56. describes how the server is to interpret input from the client, and
  57. how the client should interpret the results returned by the server.
  58. The architecture portion of this document describes the conceptual
  59. framework behind the RWhois protocol. It details the concepts upon
  60. which the protocol is based and describes its structural elements.
  61. The protocol implements the architecture.
  62. This document uses language like SHOULD and SHALL that have special
  63. meaning as specified in "Key words for use in RFCs to Indicate
  64. Requirement Levels". [RFC2119]
  65. Williamson, et. al. Informational [Page 2]
  66. RFC 2167 RWhois Protocol June 1997
  67. 2. Architecture
  68. 2.1 Overview
  69. As a directory service, RWhois is a distributed database, where data
  70. is split across multiple servers to keep database sizes manageable.
  71. The architecture portion of this document details the concepts upon
  72. which the protocol is based and describes its structural elements.
  73. Specifically, the architecture is concerned with how the data is
  74. split across the different servers. The basis of this splitting is
  75. the lexically hierarchical label (or tag), which is a text string
  76. whose position in a hierarchy can be determined from the structure of
  77. the string itself.
  78. All data can follow some sort of hierarchy, even if the hierarchy
  79. seems somewhat arbitrary. For example, person names can be arranged
  80. into hierarchical groups via geography. If all the people in
  81. particular towns are grouped into town groups, then all of the town
  82. groups can be grouped into state (or province) groups, and then all
  83. of the state groups can be grouped into a country group. Then, a
  84. particular name would belong in a town group, a state group, and a
  85. country group. However, just given a name, it would be impossible to
  86. determine where in the hierarchy it belongs. Therefore, a person
  87. name is not lexically hierarchical.
  88. However, there are certain types of data whose position in the
  89. hierarchy can be determined by deciphering the data itself, for
  90. example, phone numbers. A phone number is grouped according to
  91. country code, area code, local exchange, and local extension. By
  92. looking at a phone number, it is possible to determine to which of
  93. all these groups the number belongs: 1-303-555-2367 is in country
  94. code 1, area code 303, local exchange 555, and has a local extension
  95. of 2367. Therefore, a phone number is lexically hierarchical.
  96. On the Internet, two such types of data are widely used: domain names
  97. and IP networks. Domain names are organized via a label-dot system,
  98. reading from a more specific label to a more general label left to
  99. right; for example, war.west.netsol.com is a part of west.netsol.com,
  100. which is a part of netsol.com, which is a part of com. IP networks
  101. are also lexically hierarchical labels using the Classless Inter-
  102. Domain Routing (CIDR) notation, but their hierarchy is not easily
  103. determined with simple text manipulation; for example, 198.41.0.0/22
  104. is a part of 198.41.0.0/16, which is a part of 198.40.0.0/15.
  105. Instead, an IP network's hierarchy is determined by converting the
  106. network to binary notation and applying successively shorter bit
  107. masks.
  108. Williamson, et. al. Informational [Page 3]
  109. RFC 2167 RWhois Protocol June 1997
  110. It is important to note that, while very little real data is
  111. lexically hierarchical in nature, people often create label systems
  112. (or namespaces) to help manage the data and provide an element of
  113. uniqueness, for example, Social Security Numbers, ISBNs, or the Dewey
  114. Decimal System. RWhois leverages lexically hierarchical labels,
  115. domain names and IP networks, for its data splitting using the
  116. concepts of authority areas and referrals. An authority area is
  117. associated with an RWhois server and a lexically hierarchical label,
  118. which is considered to be its name. An authority area is a piece of
  119. the distributed database that speaks with authority about its
  120. assigned part of the hierarchy. All data associated with a particular
  121. lexically hierarchical tag should be located within that authority
  122. area's database. Authority areas are further explained in Section
  123. 2.4.
  124. RWhois directs clients toward the appropriate authority area by
  125. generating referrals. Referrals are pointers to other servers that
  126. are presumed to be closer to the desired data. The client uses this
  127. referral to contact the next server and ask the same question. The
  128. next server may respond with data, an error, or another referral (or
  129. referrals). By following this chain of referrals, the client will
  130. eventually reach the server with the appropriate authority area. In
  131. the RWhois architecture, referrals are generated by identifying a
  132. lexically hierarchical label and deciphering the label to determine
  133. the next server. Referrals are further explained in Section 2.5.
  134. When a number of RWhois servers containing authority areas are
  135. brought on line and informed about each other, they form an RWhois
  136. tree. The tree has a root authority area, which is the group that
  137. contains all other groups. The root authority area must keep
  138. pointers to the servers and authority areas that form the first level
  139. of the hierarchy. The authority areas in the first level of the
  140. hierarchy are then responsible for keeping pointers to the authority
  141. areas below them and for keeping a pointer to the root.
  142. 2.2 Design Philosophy
  143. The design goals for the RWhois protocol are as follows.
  144. * It should be a directory access protocol. The server should be
  145. able to access and update the data residing on it.
  146. * It should facilitate query routing. An unresolved query should
  147. be redirected to a server that is presumed to be closer to the
  148. desired data.
  149. * It should enable data replication. The server should be able to
  150. duplicate its data on another server.
  151. * The server should be lightweight and delegate more functions to
  152. the client.
  153. Williamson, et. al. Informational [Page 4]
  154. RFC 2167 RWhois Protocol June 1997
  155. The concepts used to achieve these design goals are explained in the
  156. remaining document.
  157. 2.3 Schema Model
  158. As a directory service, RWhois uses various database schema to store
  159. and represent data. Schema, in this document, has two definitions.
  160. First, it refers to the entire structure of a database, all the
  161. tables and fields forming a complete database. When schema is used in
  162. this context, it is called the "database schema". Database schema
  163. consists of attributes, classes, and objects. Schema may also refer
  164. to a single piece of the database, a single table with fields. When
  165. schema is used in this context, it is just called "schema" or it is
  166. preceded by the name of the particular piece: contact schema or
  167. domain schema, for example. In this usage, schema is equivalent to
  168. "class", defined below.
  169. There is no standard database schema in the RWhois architecture. Each
  170. authority area is presumed to be able to define its own local schema.
  171. However, an authority area that is part of a larger RWhois tree is
  172. expected to have some part of its schema pertain to the lexically
  173. hierarchical label upon which the RWhois tree is based. An authority
  174. area schema may not change throughout much of an RWhois tree.
  175. 2.3.1 Attributes
  176. An attribute is a named field and is the smallest typed unit in the
  177. database schema. It is equivalent to a relational database's field.
  178. An attribute is not considered to be data by itself; it is simply
  179. used to give data a type. When a piece of data has been typed by an
  180. attribute, it is typically referred to as a value and is represented
  181. as an attribute-value pair. The RWhois syntax for the attribute-value
  182. pair is to separate them with a colon, for example:
  183. First-Name:Bill
  184. Attributes have a number of properties, some mandated by the RWhois
  185. protocol and some that are implementation dependent. These properties
  186. are usually a reflection of the database system used by the server.
  187. The following is a list of the protocol-mandated properties and their
  188. descriptions.
  189. Attribute This is the name of the attribute.
  190. Description This is a natural language description of the
  191. attribute.
  192. Williamson, et. al. Informational [Page 5]
  193. RFC 2167 RWhois Protocol June 1997
  194. Type This is a parameter that broadly indicates the use
  195. of the attribute to the protocol. There are three
  196. standard types: TEXT, ID, and SEE-ALSO. The default is
  197. TEXT, which indicates that the value is a text string.
  198. ID indicates that the attribute contains the ID of
  199. another RWhois object. This type of attribute is used
  200. for database normalization. SEE-ALSO indicates that
  201. the attribute contains a pointer (a Uniform Resource
  202. Identifier (URI)) to some other kind of external data;
  203. for example, a World Wide Web page or FTP site.
  204. Format This is an interpretable string that describes the
  205. acceptance format of the value. The server (and
  206. optionally the client) should match the value to the
  207. format string to determine if the value is acceptable.
  208. The format of this property is a keyword indicating the
  209. syntax of the format string, followed by a colon,
  210. followed by the format string itself. Currently, the
  211. only keyword recognized is "re" for POSIX.2 extended
  212. regular expressions.
  213. Indexed This is a true or false flag indicating that this
  214. attribute should be indexed (and therefore able to be
  215. searched).
  216. Required This is a true or false flag indicating that this
  217. attribute must have a value in an instance of the
  218. class.
  219. Multi-Line This is a true or false flag indicating that this
  220. attribute may have multiple instances in a class, but
  221. all of the instances are to be considered as multiple
  222. lines of the same attribute instance. This allows
  223. normal line terminators to terminate values.
  224. Repeatable This is a true or false flag indicating that there may
  225. be multiple instances of this attribute in a class and
  226. each instance is to be interpreted as a separate
  227. instance (in contrast to Multi-Line). This flag is
  228. mutually exclusive with Multi-Line: if Multi-Line is
  229. true, then Repeatable must be false and vice versa.
  230. Williamson, et. al. Informational [Page 6]
  231. RFC 2167 RWhois Protocol June 1997
  232. Primary This is a true or false flag that indicates that this
  233. attribute is a primary key. If more than one attribute
  234. in a class is marked as primary, then these attributes
  235. together form a single primary key. The primary key is
  236. intended to be used to force uniqueness among class
  237. instances. Therefore, there can be only one instance of
  238. a primary key in a database. The Primary flag implies
  239. that the attribute is also required.
  240. Hierarchical This is a true or false flag that indicates that this
  241. attribute is lexically hierarchical.
  242. Private This is a true or false flag that indicates whether or
  243. not this attribute is private (that is, publicly not
  244. viewable). It defaults to false. If it is true, then
  245. only the clients that satisfy the
  246. authentication/encryption requirements of a guardian
  247. (described below) are able to view the attribute-value
  248. pair.
  249. 2.3.2 Class
  250. A class is a collection of attributes; it is a structure, not data.
  251. The concept is equivalent to that of a relational database table. It
  252. is also equivalent to the second definition of schema, above.
  253. A class also has some properties that are sometimes referred to as
  254. its "meta" information. These properties are listed below.
  255. Version This is a time/date stamp that is used to quickly detect
  256. when a class definition has been changed.
  257. Description This is a natural language description of the class.
  258. 2.3.3 Object
  259. An object is an instance of a class. It is data with a type of
  260. <class>.
  261. 2.3.4 Base Class
  262. While RWhois does not have or advocate using a specific, standardized
  263. schema, it does impose a few requirements. It requires that all
  264. defined classes inherit attributes from a particular base class (or
  265. base schema). The RWhois specification does not require the actual
  266. implementation of inheritance. Instead, all classes must include the
  267. attributes defined in the base class.
  268. Williamson, et. al. Informational [Page 7]
  269. RFC 2167 RWhois Protocol June 1997
  270. The base class has the following attributes.
  271. Class-Name This attribute contains the name of the class to which
  272. the object belongs. It is the type of the object
  273. itself. It is of type TEXT and is required.
  274. Auth-Area This attribute contains the name of the authority area
  275. to which the object belongs. It, along with Class-
  276. Name, definitively defines the type of the object. It
  277. is of type TEXT and is required.
  278. ID This attribute is a universal identifier for the
  279. object. It is formed by choosing a string that is
  280. unique within an authority area and appending the
  281. authority area to it, separating the local string from
  282. the authority area name with a period. The only
  283. restrictions on the local string are that it must be
  284. unique within the authority area and not contain the
  285. period character. This attribute is hierarchical in
  286. nature. It is always generated by the server (for
  287. example, during a register operation). It is of type
  288. TEXT and is required.
  289. Updated This attribute is a time/date stamp that indicates the
  290. time of last modification of the object. It is both
  291. informational and a form of record locking. It
  292. prevents two clients from modifying the same object at
  293. the same time. It is of type TEXT and is required.
  294. Guardian This attribute is a link to a guardian object
  295. (described below). Its value is the ID of a guardian
  296. object. It is of type ID and is optional. It is
  297. repeatable, since an object may have multiple
  298. guardians.
  299. Private This attribute is a true or false flag that indicates
  300. whether or not an object is private (that is, publicly
  301. not viewable). It defaults to false. If it is true,
  302. then only the clients that satisfy the
  303. authentication/encryption requirements of one of the
  304. object's guardians are able to view the object. If the
  305. object is publicly viewable, then the Private
  306. attribute property of each of its attributes still
  307. applies.
  308. Williamson, et. al. Informational [Page 8]
  309. RFC 2167 RWhois Protocol June 1997
  310. TTL This attribute is the "time-to-live" of a given
  311. object. It is included only if an object has a
  312. different time-to-live than the default given in the
  313. Start of Authority information. Its value is specified
  314. in seconds. It is of type TEXT and is optional.
  315. The RWhois specification defines two standard classes that should be
  316. included in all implementations: the referral and guardian classes.
  317. 2.3.5 Referral Class
  318. The referral class is defined to hold referral information (typically
  319. for link referrals). It consists of attributes defined as part of the
  320. base class, the protocol-specific attributes described below, and any
  321. installation-specific attributes.
  322. Referred-Auth-Area This attribute contains the name of the authority
  323. area to which the referral points. It is used as
  324. a search key during the query routing. It is of
  325. type TEXT and is required. It is repeatable,
  326. since referrals can point to servers hosting more
  327. than one authority area.
  328. Referral This attribute contains the referral itself. It
  329. is an RWhois URL. It is of type TEXT and is
  330. required. It is repeatable, since more than one
  331. server can host a Referred-Auth-Area.
  332. 2.3.6 Guardian Class
  333. The guardian class is defined to hold security information. The
  334. fundamental concept behind the guardian class is that an object (or
  335. another structure) is "guarded" by containing a pointer to a guardian
  336. object [Guardian]. To modify, delete, or possibly view the guarded
  337. object, the authentication (or encryption, or both) scheme must be
  338. satisfied. Guardians are intended to not have rank: if an object is
  339. guarded by more than one guardian object, satisfying any one of those
  340. guardians is sufficient. A guardian object that does not have any
  341. Guardian attribute linking it to other guardians guards itself. That
  342. is, the authentication scheme in the guardian object itself must be
  343. satisfied to modify, delete, or possibly view it.
  344. Guardian objects are typically linked to actual database objects with
  345. the Guardian attribute found in the base class. However, a guardian
  346. may also be linked to an entire authority area, in which case the
  347. guardian becomes implicitly linked to all of the objects contained
  348. within the authority area.
  349. Williamson, et. al. Informational [Page 9]
  350. RFC 2167 RWhois Protocol June 1997
  351. The guardian class consists of the base class, the protocol-specific
  352. attributes described below, and any installation-specific attributes.
  353. Guard-Scheme This attribute contains a keyword indicating the
  354. authentication methodology. Its value must be
  355. understood by both the client and server, and its value
  356. dictates the contents of the Guard-Info attribute. It
  357. is of type TEXT and is required.
  358. Guard-Info This attribute contains that data that is used by the
  359. Guard-Scheme to verify the authentication. Its actual
  360. format is dictated by the Guard-Scheme, for example, it
  361. could contain a password or Pretty Good Privacy (PGP)
  362. public key id [RFC 1991]. For security reasons, it
  363. should not be displayed, and its Private attribute
  364. property should be set to true. It is of type TEXT and
  365. is required.
  366. 2.4 Authority Areas
  367. The concept of authority areas is pivotal to the RWhois architecture.
  368. When an RWhois tree is created for a particular lexically
  369. hierarchical namespace, the different pieces of the hierarchy are
  370. mapped to authority areas. The most important concept behind an
  371. authority area is the ability for a portion of the RWhois tree to
  372. definitively control that portion of the hierarchy. This means that
  373. an authority area is able to state whether or not a hierarchical tag
  374. is in the whole RWhois tree. It does this either by returning the
  375. object containing this tag, returning a referral to a sub-authority
  376. area, or returning a response indicating that no objects were found.
  377. This structure enables efficient routing of queries based on the
  378. hierarchical label to the piece of the hierarchy responsible for it.
  379. For example, in the domain name namespace as served by RWhois, the
  380. root of the tree would be an authority area named ".", which would
  381. delegate a "us" sub-authority area, which would delegate "va", "co",
  382. "md", and "ca" authority areas, and so forth. When the server with
  383. the "va.us" authority area is asked about "loudoun.va.us", it will be
  384. able to authoritatively state that either no "loudoun.va.us" exists
  385. or it will provide an object for or a referral to "loudoun.va.us".
  386. Further, if the server is asked about "howard.md.us", it cannot
  387. answer authoritatively, so it must provide a referral to its
  388. hierarchical parent ("us" or the root).
  389. This use of authority area strongly indicates where data should be
  390. stored within an RWhois tree. Because RWhois uses a specific query
  391. routing model, data needs to be placed under the proper authority
  392. area. It is certainly possible to place a piece of data under the
  393. Williamson, et. al. Informational [Page 10]
  394. RFC 2167 RWhois Protocol June 1997
  395. wrong authority area, for example, putting an object for
  396. "howard.md.us" under the "va.us" authority area. In such cases, the
  397. data is considered to be misplaced and unable to be found within the
  398. RWhois tree. However, while data should be placed under the lowest
  399. (most specific) authority area, it is also possible that it could be
  400. placed in a higher (least specific) authority area, for example,
  401. putting an object for "loudoun.va.us" under the "us" authority. This
  402. may be acceptable since, in most cases, the data would be able to be
  403. found.
  404. In addition to controlling a part of an RWhois hierarchy, an
  405. authority area is considered to be autonomous. Each authority area is
  406. treated as a separate database by the protocol. However, it is
  407. recommended that an authority area share some core schema with the
  408. rest of the RWhois tree for interoperability reasons. Each authority
  409. area, however, is not bound by the database schema of its
  410. hierarchical parent or by any of its sub-authority areas.
  411. 2.5 Query Routing
  412. RWhois is not only a directory access protocol but it can also route
  413. queries. Routing a query involves redirecting the query to another
  414. server that is presumed to be closer to the desired data. To route a
  415. query, the server first determines the location of the next server.
  416. It then either forwards the query to that server and returns the
  417. result to the client or returns the location of that server to the
  418. client. The location of the server must contain its host name (or IP
  419. address), port number, and authority area.
  420. The location of the server to which a query is routed is called a
  421. referral. There are two types of referrals: punt and link referrals.
  422. A punt referral is a pointer to a server that is further up an RWhois
  423. tree, and a link referral is a pointer to a server that is further
  424. down the tree. For example, in Figure 1, when the server for the
  425. "va.us" authority area routes a query up to the server for the "us"
  426. authority area, it generates a punt referral. Alternatively, when it
  427. routes a query down to the server for the "loudon.va.us" authority
  428. area, it generates a link referral.
  429. Query routing depends on whether or not the search value in a query
  430. is lexically hierarchical. If the search value is hierarchical, the
  431. server can generate punt or link referrals using the association of
  432. authority areas with lexically hierarchical labels. Otherwise, the
  433. server may send the query to a special index server that gathers the
  434. indexing information for both hierarchical and non-hierarchical data
  435. from the directory servers and returns referrals to these servers
  436. [CIP]. If the server receives one or more referrals from the index
  437. server, it should return them to the client.
  438. Williamson, et. al. Informational [Page 11]
  439. RFC 2167 RWhois Protocol June 1997
  440. It is important to note that the server may route a query whether it
  441. could resolve the query or not. Even if a query has been resolved
  442. locally, the server may also return referrals to the client by
  443. sending the query to the index server. For example, if the server for
  444. the "com" authority area receives the "domain Org-Name=IBM" query, it
  445. may return all the domain objects for IBM within the "com" authority
  446. area. In addition, it may also return referrals to the server for the
  447. "nl" authority area if that server contains domain objects for IBM in
  448. the Netherlands and has fed the corresponding indexing information to
  449. the index server. This way the client can get back information for
  450. both "ibm.com" and "ibm.nl" domains.
  451. 2.5.1 Query Routing Rules
  452. An RWhois server routes a query based on certain rules. The objective
  453. is to determine the location of a server to which to route the query.
  454. A query may contain one or more query terms. The query routing rules
  455. are applied on each query term until a referral is found. The rules
  456. are listed below.
  457. * Is the search value in the query term hierarchical? If not, go
  458. to the next query term.
  459. * Parse the hierarchical portion of the search value. Is it is
  460. within one of the authority areas? If not, go to the next query
  461. term.
  462. * Does the found authority area have any referral objects
  463. (instances of the referral class)? If not, return the "230 No
  464. objects found" error to the client.
  465. * Is the hierarchical portion of the search value within the
  466. Referred-Auth-Area attribute of one of the referral objects? If
  467. it is, return the value of the Referral attribute of the found
  468. referral object as a link referral to the client.
  469. * Are the search values of some of the query terms hierarchical
  470. but not within any of the authority areas? If they are, return a
  471. punt referral to the client.
  472. * Are the search values of all the query terms non-hierarchical?
  473. If they are, send the query to a special index server that
  474. gathers the indexing information for both hierarchical and non-
  475. hierarchical data from the directory servers and returns
  476. referrals to these servers. If the server receives one or more
  477. referrals from the index server, return them to the client.
  478. Note that there can be more than one referral returned to the client.
  479. These referrals may point to servers serving different authority
  480. areas. The client may follow them in any order.
  481. Williamson, et. al. Informational [Page 12]
  482. RFC 2167 RWhois Protocol June 1997
  483. The pseudo code for the above rules is:
  484. for each query term in the query
  485. if the search value in the query term is hierarchical
  486. if the search value is within one of the authority areas
  487. if the search value is within one of the referred authority areas
  488. the server sends link referral(s)
  489. else
  490. the server sends a "230 No objects found" error
  491. endif
  492. endif
  493. endif
  494. endfor
  495. if the search values of some of the query terms are hierarchical but
  496. not within any of the authority areas
  497. the server sends Punt referral(s)
  498. endif
  499. if the search values of all the query terms are non-hierarchical
  500. the server sends Referral(s) from an index server
  501. endif
  502. 2.6 Data Replication
  503. An RWhois server can replicate (duplicate) data from another RWhois
  504. server on a per-authority area basis. Data replication makes the
  505. RWhois service more reliable. Further, it increases throughput by
  506. distributing queries to more than one server.
  507. There can be two types of servers serving an authority area: a master
  508. server and a slave server. A master server is where data is
  509. registered for an authority area. It answers authoritatively to
  510. queries in that authority area. There must be one and only one master
  511. server for an authority area. A master server is also called a
  512. primary server.
  513. A slave server is where data is replicated from the master server for
  514. an authority area. It also answers authoritatively to queries in that
  515. authority area. There may be one or more slave servers for an
  516. authority area. A slave server is also called a secondary server.
  517. Note that a slave server must not register data for an authority
  518. area.
  519. It is recommended that the master and slave servers for an authority
  520. area be geographically separate. Therefore, network unreachability at
  521. one site will not completely shut down the RWhois service for that
  522. authority area.
  523. Williamson, et. al. Informational [Page 13]
  524. RFC 2167 RWhois Protocol June 1997
  525. 2.6.1 Data to Replicate
  526. In RWhois, data is replicated on a per-authority area basis. The
  527. smallest type of data a slave server can replicate is an attribute of
  528. a class. Therefore, a slave server can replicate data for all the
  529. classes, some classes, or some attributes of some classes.
  530. The amount of data a slave server can replicate each time is either
  531. all of the data or the data that has changed since the last
  532. replication. The process of replicating all of the data is called
  533. complete replication. The process of replicating the data that has
  534. changed since the last replication is called incremental replication.
  535. 2.6.2 Start Of Authority Variables
  536. Each authority area has some administrative variables, defined at the
  537. master server, to control data replication. These variables are
  538. called the Start Of Authority (SOA) variables. They are listed below.
  539. Serial-Number This is the serial number of the data in an
  540. authority area. The master server should update
  541. this variable whenever the data in the authority
  542. area is changed. Its value is a time/date stamp.
  543. Refresh-Interval This is the time interval before a slave server
  544. checks for complete replication. Its value is
  545. specified in seconds.
  546. Increment-IntervalThis is the time interval before a slave server
  547. checks for incremental replication. Its value is
  548. specified in seconds.
  549. Retry-Interval This is the time interval before a slave server
  550. tries again to connect to a master server that
  551. appears to be out-of-service. Its value is
  552. specified in seconds.
  553. Time-To-Live This is the default time to live for the data in
  554. an authority area at a slave server. The slave
  555. server should not answer authoritatively to
  556. queries for such stale data. Its value is
  557. specified in seconds.
  558. Admin-Contact This is the email address of an individual or a
  559. role account responsible for the data integrity in
  560. an authority area at the master server.
  561. Williamson, et. al. Informational [Page 14]
  562. RFC 2167 RWhois Protocol June 1997
  563. Tech-Contact This is the email address of an individual or a
  564. role account responsible for the operation of the
  565. master server for an authority area.
  566. Hostmaster This is the email address of an individual or a
  567. role account to whom email messages to update the
  568. data in an authority area at the master server are
  569. sent.
  570. Primary-Server This is the location of the master server for an
  571. authority area. Its value must contain both the
  572. host name (or IP address) and port number of the
  573. master server.
  574. 3. Protocol
  575. 3.1 Overview
  576. The above sections describe the directory service architecture based
  577. on the RWhois protocol. The remaining sections describe the syntax of
  578. the protocol; the sequence and syntax of the information exchanged
  579. between a server and a client. There are five types of information
  580. that may be exchanged during a client/server session: directive,
  581. response, query, result, and info.
  582. 3.1.1 Directive
  583. A directive is a command that a client sends to a server to set a
  584. control parameter for the session, get the meta-information (class
  585. definitions and SOA information) about an authority area, or get the
  586. data in an authority area. The first character of a directive must be
  587. a "-". The server must support the "-rwhois" directive; all other
  588. directives are optional. The server must indicate in the banner which
  589. directives are implemented (see Section 3.1.9).
  590. 3.1.2 Response
  591. A response is the information that a server returns to a client for a
  592. directive. It is comprised of one or more lines, and the last line
  593. always indicates the success or failure of the directive. The first
  594. character of each response line must be a "%". If a server runs a
  595. directive successfully, the last response line must be "%ok".
  596. Otherwise, it must be "%error <error-code> <error-text>". A line with
  597. the string "%ok" or "%error" in the first position must occur only
  598. once in a server response and must always be the last line. The
  599. server may send the "%info" response for special messages.
  600. Williamson, et. al. Informational [Page 15]
  601. RFC 2167 RWhois Protocol June 1997
  602. A client must understand the "%ok", "%error", and "%info" responses.
  603. The client must also understand directive specific responses, if it
  604. uses the related directives to communicate with the server. For
  605. example, if the client sends the "-schema" directive to the server,
  606. the client must understand the "%schema" response.
  607. 3.1.3 Query
  608. A query is a command that a client sends to a server to access the
  609. data in an authority area. The first character of a query must not be
  610. a "-", since the server checks the first character of each command
  611. from a client to determine whether it is a directive or a query.
  612. 3.1.4 Result
  613. A result is the information that a server returns to a client for a
  614. query. It can be either the accessed data or referrals to other
  615. servers. It is comprised of one or more lines, and the last line
  616. always indicates the success or failure of the query. If a server
  617. returns either data or referrals for a query, the last result line
  618. must be "%ok". Otherwise, it must be "%error <error-code> <error-
  619. text>".
  620. 3.1.5 Info
  621. An info message contains miscellaneous information that a server
  622. sends to a client. The server may use it to send special messages,
  623. for example a "message of the day" (MOTD), to the client. The first
  624. info line must be "%info on", and the last info line must be "%info
  625. off".
  626. 3.1.6 Client/Server Session
  627. A typical RWhois client/server session has the following sequence of
  628. messages.
  629. * The client connects to the server.
  630. * The server returns a banner identifying its protocol versions
  631. and capabilities.
  632. * The client sends one or more directives to the server.
  633. * The server returns the response to each directive.
  634. * The client finally sends a query to the server.
  635. * The server returns the query results.
  636. * The server closes the connection, unless the client has directed
  637. it not to close the connection.
  638. Williamson, et. al. Informational [Page 16]
  639. RFC 2167 RWhois Protocol June 1997
  640. 3.1.7 Examples
  641. This section gives some common examples of the client/server
  642. interaction. The notation in the examples uses a prefix to indicate
  643. from where the information comes. A "C" indicates that the client
  644. sends the data to the server. An "S" indicates that the server sends
  645. the data to the client. The line is a comment when "#" is used. The
  646. space after the prefix is not part of the data.
  647. The following example illustrates a successful query.
  648. # The client connects to the server.
  649. # The server returns a banner identifying its protocol versions and
  650. # capabilities.
  651. S %rwhois V-1.5:00ffff:00 master.rwhois.net (Network Solutions V-1.5)
  652. # The client sends a directive to limit the number of search hits
  653. # to 20.
  654. C -limit 20
  655. # The server returns a successful response.
  656. S %ok
  657. # The client sends a query to search for rwhois.net domain.
  658. C domain rwhois.net
  659. # The server returns the data for rwhois.net domain.
  660. S domain:ID:dom-1.rwhois.net
  661. S domain:Auth-Area:rwhois.net
  662. S domain:Class-Name:domain
  663. S domain:Updated:19970107201111000
  664. S domain:Domain:rwhois.net
  665. S domain:Server;I:hst-1.rwhois.net
  666. S domain:Server;I:hst-2.rwhois.net
  667. S
  668. S %ok
  669. # The server closes the connection.
  670. The following example illustrates the link and punt referrals.
  671. # The client connects to the server.
  672. # The server returns a banner identifying its protocol versions and
  673. # capabilities.
  674. S %rwhois V-1.5:00ffff:00 master.rwhois.net (Network Solutions V-1.5)
  675. # The client sends a directive to hold the connection until it sends
  676. # a directive to close the connection.
  677. C -holdconnect on
  678. # The server returns a successful response.
  679. S %ok
  680. # The client sends a query to search for a.b.rwhois.net domain.
  681. C domain a.b.rwhois.net
  682. # The server returns a link referral to a server serving the
  683. Williamson, et. al. Informational [Page 17]
  684. RFC 2167 RWhois Protocol June 1997
  685. # b.rwhois.net authority area.
  686. S %referral rwhois://master.b.rwhois.net:4321/auth-area=b.rwhois.net
  687. S %ok
  688. # The client sends a query to search for internic.net domain.
  689. C domain internic.net
  690. # The server returns a punt referral to a server serving the root
  691. # authority area.
  692. S %referral rwhois://rs.internic.net:4321/auth-area=.
  693. S %ok
  694. # The client sends a directive to close the connection.
  695. C -quit
  696. S %ok
  697. # The server closes the connection.
  698. The following example illustrates a query error.
  699. # The client connects to the server.
  700. # The server returns a banner identifying its protocol versions and
  701. # capabilities.
  702. S %rwhois V-1.5:00ffff:00 master.rwhois.net (Network Solutions V-1.5)
  703. # The client sends a query to search for c.rwhois.net domain.
  704. C domain c.rwhois.net
  705. # The server returns an error, since neither data nor referrals for
  706. # c.rwhois.net domain are found within the rwhois.net authority area.
  707. S %error 230 No objects found
  708. # The server closes the connection.
  709. 3.1.8 Notation
  710. The following sections use the Augmented Backus-Naur Form (ABNF)
  711. notation to describe the syntax of the protocol. For further
  712. information, see Section 2 of [RFC822]. The notation in the examples
  713. uses a prefix to indicate from where the information comes. A "C"
  714. indicates that the client sends the data to the server. An "S"
  715. indicates that the server sends the data to the client. The line is a
  716. comment when "#" is used. The space after the prefix is not part of
  717. the data.
  718. 3.1.9 General ABNF definitions
  719. Lexical Tokens
  720. alpha = "a".."z" / "A".."Z"
  721. digit = "0".."9"
  722. hex-digit = digit / "a".."f" / "A".. "F"
  723. id-char = alpha / digit / "_" / "-"
  724. any-char = <ASCII 1..255,
  725. except LF (linefeed) and CR (carriage return)>
  726. Williamson, et. al. Informational [Page 18]
  727. RFC 2167 RWhois Protocol June 1997
  728. dns-char = alpha / digit / "-"
  729. email-char = <see [RFC 822]>
  730. space = " "
  731. tab = <ASCII TAB (tab)>
  732. lf = <ASCII LF (linefeed)>
  733. cr = <ASCII CR (carriage return)>
  734. crlf = cr lf
  735. Grammar
  736. year = 4digit
  737. month = 2digit
  738. day = 2digit
  739. hour = 2digit
  740. minute = 2digit
  741. second = 2digit
  742. milli-second = 3digit
  743. host-name = dns-char *(dns-char / ".")
  744. ip-address = 1*3digit "." 1*3digit "." 1*3digit "." 1*3digit
  745. email = 1*email-char "@" host-name
  746. authority-area = (dns-char / ".") *(dns-char / "." / "/")
  747. object-id = 1*id-char "." authority-area
  748. host-port = (host-name / ip-address) ":" 1*5digit
  749. class-name = 1*id-char
  750. attribute-name = 1*id-char
  751. attribute-value = 1*any-char
  752. time-stamp = year month day hour minute second milli-second
  753. on-off = "on" / "off"
  754. Note that the time-stamp must be in the Greenwich Mean Time (GMT)
  755. time zone. Also note that since in the above any-char is 1..255
  756. ASCII that the RWhois protocol is an 8 bit protocol.
  757. Response
  758. The general response for every directive and query is either "%ok" or
  759. "%error". In addition, a "%info" response may be sent.
  760. response = ok-response crlf / error-response crlf / info-response
  761. ok-response = "%ok"
  762. error-response = "%error" space error-code space error-text
  763. error-code = 3digit
  764. error-text = 1*any-char
  765. info-response = "%info" space "on" crlf *(*any-char crlf) "%info"
  766. space "off" crlf
  767. Williamson, et. al. Informational [Page 19]
  768. RFC 2167 RWhois Protocol June 1997
  769. Banner
  770. The server must send a banner to the client when the connection is
  771. opened. The banner contains the version(s) of the protocol the
  772. server supports and a capability ID of encoded bit flags that
  773. indicates which directives are implemented. If the server supports
  774. more than one version of the protocol, the lowest-numbered version
  775. must be specified first. The bits in extra-id are reserved for future
  776. use. The end of the banner should contain a free-form string
  777. indicating the name of the server implementation. A server must
  778. support at least one version of the protocol, and may accept more
  779. versions for compatibility reasons.
  780. rwhois-banner = "%rwhois" space version-list space host-name
  781. [space implementation] crlf
  782. version-list = version *("," version)
  783. version = version-number [":" capability-id]
  784. / "V-1.5" ":" capability-id
  785. version-number = "V-" 1*digit "." 1*digit
  786. capability-id = response-id ":" extra-id
  787. response-id = 6hex-digit
  788. extra-id = 2hex-digit
  789. implementation = 1*any-char
  790. Protocol
  791. The entire RWhois protocol can be defined as a series of directives,
  792. responses, queries, and results.
  793. rwhois-protocol = client-sends / server-returns
  794. client-sends = *(directives / rwhois-query)
  795. server-returns = *(responses / rwhois-query-result)
  796. 3.2 Required Directives
  797. The server must implement the following directives.
  798. Williamson, et. al. Informational [Page 20]
  799. RFC 2167 RWhois Protocol June 1997
  800. 3.2.1 rwhois
  801. Description
  802. The "-rwhois" directive may be issued by the client at the start of
  803. every session . It tells the server which version of the protocol the
  804. client can handle. The server must respond with a banner containing
  805. the protocol version and directives it implements. This banner is the
  806. same banner that is sent by the server when the connection is opened,
  807. except that the server must indicate only one version number. The
  808. banner issued when opening a connection may contain more than one
  809. version number. The directive flags are encoded into three octets,
  810. which are described in Appendix D.
  811. ABNF
  812. rwhois-dir = "-rwhois" space version-number [space implementation]
  813. crlf
  814. rwhois-response = "%rwhois" space version space host-name
  815. [space implementation] crlf
  816. Errors
  817. 300 Not compatible with version
  818. 338 Invalid directive syntax
  819. Examples
  820. # When a connection is opened, the server issues the banner.
  821. S %rwhois V-1.0,V-1.5:00ffff:00 rs.internic.net (NSI Server 1.5.4)
  822. # The client sends the rwhois directive.
  823. C -rwhois V-1.5 NSI Client 1.2.3
  824. S %rwhois V-1.5:00ffff:00 rs.internic.net (NSI Server 1.5.4)
  825. S %ok
  826. 3.3 Optional Directives
  827. The server should implement the following directives.
  828. Williamson, et. al. Informational [Page 21]
  829. RFC 2167 RWhois Protocol June 1997
  830. 3.3.1 class
  831. Description
  832. The "-class" directive can be used by the client to get the meta-
  833. information for one or more classes in an authority area. The
  834. response must contain the description and version number of each
  835. specified class and may be expanded in the future with additional
  836. attributes. When no class name is given, the server must return the
  837. meta-information for all the classes in the authority area. Every
  838. class record must end with an empty "%class" line.
  839. ABNF
  840. class-dir = "-class" space authority-area *(space class-name) crlf
  841. class-response = *class-record response
  842. class-record = *class-line "%class" crlf
  843. class-line = "%class" space class-name ":" "description" ":"
  844. 1*any-char crlf
  845. / "%class" space class-name ":" "version" ":" time-stamp crlf
  846. / "%class" space class-name ":" meta-field ":" meta-value crlf
  847. meta-field = 1*id-char
  848. meta-value = 1*any-char
  849. The following fields are required.
  850. meta-field meta-value Description
  851. description 1*any-char Class description.
  852. Time/date stamp indicating version of class,
  853. version time-stamp must be updated after class definition is
  854. changed.
  855. Errors
  856. 338 Invalid directive syntax
  857. 340 Invalid authority area
  858. 341 Invalid class
  859. 400 Directive not available
  860. 401 Not authorized for directive
  861. Examples
  862. C -class rwhois.net domain host
  863. S %class domain:description:Domain information
  864. S %class domain:version:19970103101232000
  865. S %class
  866. Williamson, et. al. Informational [Page 22]
  867. RFC 2167 RWhois Protocol June 1997
  868. S %class host:description:Host information
  869. S %class host:version:19970214213241000
  870. S %class
  871. S %ok
  872. 3.3.2 directive
  873. Description
  874. The "-directive" directive can be used by the client to get
  875. information about the directives that the server supports. The
  876. response must contain the name and description of each specified
  877. directive and may be expanded in the future with additional
  878. attributes. When no directive name is given, the server must return
  879. information about all the directives. Every directive record must end
  880. with an empty "%directive" line.
  881. ABNF
  882. directive-dir = "-directive" *(space directive-name) crlf
  883. directive-name = 1*id-char
  884. directive-response = *directive-record response
  885. directive-record = "%directive" space "directive" ":" directive-name
  886. crlf *directive-line "%directive" crlf
  887. directive-line = "%directive" space "description" ":" 1*any-char crlf
  888. / "%directive" space attribute-name ":" attribute-value crlf
  889. Errors
  890. 338 Invalid directive syntax
  891. 400 Directive not available
  892. 401 Not authorized for directive
  893. Examples
  894. Without parameters:
  895. C -directive
  896. S %directive directive:rwhois
  897. S %directive description:RWhois directive
  898. S %directive
  899. S %directive directive:quit
  900. S %directive description:Quit connection
  901. S %directive
  902. S %ok
  903. Williamson, et. al. Informational [Page 23]
  904. RFC 2167 RWhois Protocol June 1997
  905. With parameters:
  906. C -directive quit
  907. S %directive directive:quit
  908. S %directive description:Quit connection
  909. S %directive
  910. S %ok
  911. 3.3.3 display
  912. Description
  913. By default, the server uses the dump format for the output of a query
  914. result. The output format can be changed with the "-display"
  915. directive. When no parameter is given, the server must list all the
  916. display formats it supports. Every display record must end with an
  917. empty "%display" line.
  918. Currently, only the dump format is standard and must be supported by
  919. the server. Other output formats may be added in the future. See
  920. Section 3.4 for the definition of the dump format.
  921. ABNF
  922. display-dir = "-display" crlf
  923. / "-display" space display-name crlf
  924. display-name = 1*id-char
  925. display-response = *(display-record) response
  926. display-record = "%display" space "name" ":" display-name crlf
  927. *display-line "%display" crlf
  928. display-line = "%display" space attribute-name ":"
  929. attribute-value crlf
  930. Errors
  931. 338 Invalid directive syntax
  932. 400 Directive not available
  933. 401 Not authorized for directive
  934. 436 Invalid display format
  935. Examples
  936. # Get the available display formats.
  937. C -display
  938. S %display name:dump
  939. S %display
  940. S %ok
  941. Williamson, et. al. Informational [Page 24]
  942. RFC 2167 RWhois Protocol June 1997
  943. # Change the active display format.
  944. C -display dump
  945. S %ok
  946. 3.3.4 forward
  947. Description
  948. The "-forward" directive instructs the server to follow all the
  949. referrals and return the results to the client. This directive can be
  950. used to run an RWhois server as a proxy server. The default value
  951. must be "off". When the value is set to "on", the server must not
  952. return referrals.
  953. ABNF
  954. forward-dir = "-forward" space on-off crlf
  955. forward-response = response
  956. Errors
  957. 338 Invalid directive syntax
  958. 400 Directive not available
  959. 401 Not authorized for directive
  960. Examples
  961. C -forward on
  962. S %ok
  963. C -forward off
  964. S %ok
  965. 3.3.5 holdconnect
  966. Description
  967. Normally, the server closes the connection after each query. This
  968. behavior is controlled by the holdconnect state, which can be changed
  969. with the "-holdconnect" directive. When the holdconnect state is set
  970. to "off", the server must close the connection after a query; when it
  971. is set to "on", the server must not close the connection after a
  972. query. By default, the holdconnect state must be set to "off" for
  973. each connection.
  974. Williamson, et. al. Informational [Page 25]
  975. RFC 2167 RWhois Protocol June 1997
  976. ABNF
  977. holdconnect-dir = "-holdconnect" space on-off crlf
  978. holdconnect-response = response
  979. Errors
  980. 338 Invalid directive syntax
  981. 400 Directive not available
  982. 401 Not authorized for directive
  983. Examples
  984. C -holdconnect on
  985. S %ok
  986. C -holdconnect off
  987. S %ok
  988. 3.3.6 limit
  989. Description
  990. When returning a query result, the server should limit the number of
  991. objects returned to the client. The "-limit" directive changes this
  992. limit. The default and maximum limit is server-dependent. The client
  993. can get the current limit by using the "-status" directive (see
  994. Section 3.3.13).
  995. ABNF
  996. limit-dir = "-limit" space 1*digit crlf
  997. limit-response = response
  998. Errors
  999. 331 Invalid limit
  1000. 338 Invalid directive syntax
  1001. 400 Directive not available
  1002. 401 Not authorized for directive
  1003. Examples
  1004. C -limit 100
  1005. S %ok
  1006. Williamson, et. al. Informational [Page 26]
  1007. RFC 2167 RWhois Protocol June 1997
  1008. 3.3.7 notify
  1009. Description
  1010. The "-notify" directive performs several functions.
  1011. * If the server returns a referral that results in an error, the
  1012. client can report the bad referral to the server using the
  1013. "badref" option.
  1014. * When the client follows referrals and goes through the same
  1015. referral twice, that referral is a recursive referral and causes
  1016. a referral loop. The client can report the recursive referral to
  1017. the server using the "recurref" option.
  1018. * When the data in an authority area changes, a master server can
  1019. use the "update" option to notify its slave servers to update
  1020. the data.
  1021. * The "inssec" option allows an RWhois server to register itself
  1022. as a slave server for an authority area with a master server.
  1023. The master server may reject the request on the basis of its
  1024. registration policy.
  1025. * The "delsec" option allows a slave server to cancel its
  1026. registration with the master server.
  1027. ABNF
  1028. notify-dir = "-notify" space "badref" space referral-query crlf
  1029. / "-notify" space "recurref" space referral-query crlf
  1030. / "-notify" space "update" space host-port ":" authority-area crlf
  1031. / "-notify" space "inssec" space host-port ":"
  1032. authority-area crlf
  1033. / "-notify" space "delsec" space host-port ":"
  1034. authority-area crlf
  1035. referral-query = referral-url space [class-name space] query
  1036. notify-response = response
  1037. See Section 3.4 for the definitions of referral-url and query.
  1038. Errors
  1039. 338 Invalid directive syntax
  1040. 340 Invalid authority area
  1041. 342 Invalid host/port
  1042. 400 Directive not available
  1043. 401 Not authorized for directive
  1044. Williamson, et. al. Informational [Page 27]
  1045. RFC 2167 RWhois Protocol June 1997
  1046. Examples
  1047. # The client reports a bad referral to rwhois.foobar.com to the
  1048. # server.
  1049. C -notify badref rwhois://rwhois.foobar.com:4321/auth-area=foobar.com
  1050. domain foobar.com
  1051. S %ok
  1052. # The client reports a recursive referral to rwhois.foobar.com to the
  1053. # server.
  1054. C -notify recurref rwhois://rwhois.foobar.com:4321/auth-area=
  1055. foobar.com contact Last-Name="Beeblebrox"
  1056. S %ok
  1057. # The master server for the foobar.com authority area notifies its
  1058. # slave servers to update the data.
  1059. C -notify update master.foobar.com:4321:foobar.com
  1060. S %ok
  1061. # The server rwhois2.foobar.com registers as a slave server for the
  1062. # foobar.com authority area.
  1063. C -notify inssec rwhois2.foobar.com:4321:foobar.com
  1064. S %ok
  1065. # The server rwhois2.foobar.com cancels its registration as a slave
  1066. # server for the foobar.com authority area.
  1067. C -notify delsec rwhois2.foobar.com:4321:foobar.com
  1068. S %ok
  1069. 3.3.8 quit
  1070. Description
  1071. The "-quit" directive can be used by the client to close the
  1072. connection. Before the server closes the connection, it must respond
  1073. with "%ok".
  1074. ABNF
  1075. quit-dir = "-quit" crlf
  1076. quit-response = response
  1077. Errors
  1078. No errors.
  1079. Williamson, et. al. Informational [Page 28]
  1080. RFC 2167 RWhois Protocol June 1997
  1081. Examples
  1082. C -quit
  1083. S %ok
  1084. 3.3.9 register
  1085. Description
  1086. The "-register" directive can be used by the client to add, modify,
  1087. or delete objects in the server's database. The client must wait to
  1088. send the registration data until the "%ok" response is received from
  1089. the server. This directive has the following options.
  1090. * The "add" option indicates that the object being sent should be
  1091. added to the server's database.
  1092. * The "mod" option indicates that the object being sent is a
  1093. modification of an object that already resides on the server's
  1094. database. During a modify operation, the "_NEW_" tag is used to
  1095. delineate the end of the original (unmodified) object and the
  1096. beginning of the replacement object. That is, the identifying
  1097. characteristics of the original object are sent first, then the
  1098. "_NEW_" separator is sent, and then the entire replacement
  1099. object is sent.
  1100. The "del" option indicates that the object being sent should be
  1101. deleted from the server's database.
  1102. After a register operation (add, modify, or delete an object) in an
  1103. authority area, the server should update the "Serial-Number" variable
  1104. in the SOA information for the authority area. This is useful for
  1105. data replication because a slave server checks the "Serial-Number"
  1106. variable to detect a data change at the master server (see Section
  1107. 3.6.2).
  1108. ABNF
  1109. register-dir = register-on space "add" space maintainer-id crlf
  1110. register-add register-off
  1111. / register-on space "mod" space maintainer-id crlf
  1112. register-mod register-off
  1113. / register-on space "del" space maintainer-id crlf
  1114. register-del register-off
  1115. register-on = "-register" space "on"
  1116. register-off = "-register" space "off" crlf
  1117. register-add = 1*(register-line crlf)
  1118. register-mod = 1*(register-line crlf) "_NEW_" crlf
  1119. 1*(register-line crlf)
  1120. register-del = 1*(register-line crlf)
  1121. Williamson, et. al. Informational [Page 29]
  1122. RFC 2167 RWhois Protocol June 1997
  1123. maintainer-id = email
  1124. register-line = attribute-name ":" attribute-value
  1125. register-on-response = response
  1126. register-off-response = "%register" space "ID" ":" object-id crlf
  1127. response
  1128. / "%register" space "Updated" ":" time-stamp crlf response
  1129. / response
  1130. * The server must return the register-on-response for the
  1131. "-register on" directive and the register-off-response for the
  1132. "-register off" directive.
  1133. * The maintainer-id identifies, for maintenance purposes, the
  1134. sender of registration information. The server should not use it
  1135. to authenticate the sender.
  1136. * For the "add" option, the client must send all the required
  1137. attributes for the object, including the Class-Name and Auth-
  1138. Area attributes. However, the client must not send the ID and
  1139. Updated attributes. These attributes are assigned by the server
  1140. and returned in the response.
  1141. * For the "mod" option, the client must send the identifying
  1142. information for the object to be modified, followed by the
  1143. "_NEW_" separator and the entire replacement object. The
  1144. identifying information must contain the ID and Updated
  1145. attributes; it may contain other attributes, but the server may
  1146. not check them. The ID, Auth-Area, and Class-Name attributes
  1147. must match in both the original object data and the replacement
  1148. object. The original object data is sent before the replacement
  1149. object to enable the server to lock the record in the database.
  1150. * For the "del" option, the client must send the identifying
  1151. information for the object to be deleted. The identifying
  1152. information must contain the ID and Updated attributes; it may
  1153. contain other attributes, but the server may not check them.
  1154. Errors
  1155. 120 Registration deferred
  1156. 320 Invalid attribute
  1157. 321 Invalid attribute syntax
  1158. 322 Required attribute missing
  1159. 323 Object reference not found
  1160. 324 Primary key not unique
  1161. 325 Failed to update outdated object
  1162. 336 Object not found
  1163. 338 Invalid directive syntax
  1164. 340 Invalid authority area
  1165. 341 Invalid class
  1166. 400 Directive not available
  1167. 401 Not authorized for directive
  1168. Williamson, et. al. Informational [Page 30]
  1169. RFC 2167 RWhois Protocol June 1997
  1170. Examples
  1171. # Add an object.
  1172. C -register on add joe@netsol.com
  1173. S %ok
  1174. C Class-Name:contact
  1175. C Auth-Area:a.com
  1176. C First-Name:Scott
  1177. C Last-Name:Williamson
  1178. C Name:Williamson, Scott
  1179. C Email:scottw@a.com
  1180. C -register off
  1181. S %register ID:23456789.a.com
  1182. S %register Updated:19961205224403000
  1183. S %ok
  1184. # Modify an object.
  1185. C -register on mod joe@netsol.com
  1186. S %ok
  1187. C ID:23456789.a.com
  1188. C Updated:19961205124403000
  1189. C _NEW_
  1190. C Class-Name:contact
  1191. C Auth-Area:a.com
  1192. C ID:23456789.a.com
  1193. C First-Name:Scott
  1194. C Last-Name:Williamson
  1195. C Name:Williamson, Scott
  1196. C Email:sw@a.com
  1197. C -register off
  1198. S %ok
  1199. # Delete an object.
  1200. C -register on del joe@netsol.com
  1201. S %ok
  1202. C ID:23456789.a.com
  1203. C Updated:19961205224403000
  1204. C -register off
  1205. S %ok
  1206. 3.3.10 schema
  1207. Description
  1208. The "-schema" directive can be used by the client to get the
  1209. attribute definitions of one or more classes in an authority area. If
  1210. the client specifies class names, the server must return the
  1211. attribute definitions of the specified classes. Otherwise, the server
  1212. Williamson, et. al. Informational [Page 31]
  1213. RFC 2167 RWhois Protocol June 1997
  1214. must return the attribute definitions of all the classes in the
  1215. authority area. Every schema record must end with an empty "%schema"
  1216. line.
  1217. ABNF
  1218. schema-dir = "-schema" space authority-area *(space class-name) crlf
  1219. schema-response = *schema-record response
  1220. schema-record = *schema-line "%schema" crlf
  1221. schema-line = "%schema" space class-name ":" attribute-name ":"
  1222. attribute-value crlf
  1223. Errors
  1224. 338 Invalid directive syntax
  1225. 340 Invalid authority area
  1226. 341 Invalid class
  1227. 400 Directive not available
  1228. 401 Not authorized for directive
  1229. Examples
  1230. C -schema map
  1231. S %schema map:attribute:Class-Name
  1232. S %schema map:description:Type of the object
  1233. S %schema map:type:TEXT
  1234. S %schema map:format:re:[a-zA-Z0-9-]+
  1235. S %schema map:indexed:OFF
  1236. S %schema map:required:ON
  1237. S %schema map:multi-line:OFF
  1238. S %schema map:repeatable:OFF
  1239. S %schema map:primary:OFF
  1240. S %schema map:hierarchical:OFF
  1241. S %schema map:private:OFF
  1242. S %schema
  1243. S %schema map:attribute:ID
  1244. S %schema map:description:Globally unique object identifier
  1245. S %schema map:type:TEXT
  1246. S %schema map:format:re:[0-9]+.[a-zA-Z0-9.-]+
  1247. Williamson, et. al. Informational [Page 32]
  1248. RFC 2167 RWhois Protocol June 1997
  1249. S %schema map:indexed:ON
  1250. S %schema map:required:ON
  1251. S %schema map:multi-line:OFF
  1252. S %schema map:repeatable:OFF
  1253. S %schema map:primary:ON
  1254. S %schema map:hierarchical:OFF
  1255. S %schema map:private:OFF
  1256. S %schema
  1257. # This is an abbreviated example, more attributes usually follow.
  1258. S %ok
  1259. 3.3.11 security
  1260. Description
  1261. The "-security" directive enables either a client request or a server
  1262. response to be authenticated and/or encrypted. Currently, RWhois uses
  1263. two standard security methods: password and PGP. Password provides
  1264. authentication only, and PGP provides both authentication and
  1265. encryption. This directive can be used to securely access or update
  1266. any information (meta or data) in an authority area that is protected
  1267. by one or more guardian objects.
  1268. ABNF
  1269. security-dir = "-security" space "on" space direction space
  1270. security-method [space security-data] crlf
  1271. security-payload ["-security" space "off" crlf]
  1272. direction = "request" / "response"
  1273. security-method = "password" / "pgp" / 1*id-char
  1274. security-data = password-data / pgp-data / 1*any-char
  1275. password-data = 1*any-char
  1276. pgp-data = "signed" / "encrypt" [space key-id] / "signed-encrypt"
  1277. [space key-id]
  1278. security-payload = *(*any-char crlf)
  1279. security-response = response
  1280. * The "password" security-method is available in the "request"
  1281. direction only. For password, the security-data is a cleartext
  1282. password.
  1283. * The "pgp" security-method is available in both the "request" and
  1284. "response" directions. For PGP, the security-data indicates how
  1285. to treat the security-payload: signed, encrypted, or signed and
  1286. encrypted. To encrypt the security-payload in the "response"
  1287. direction, the security-data must include the public key ID with
  1288. which to encrypt it.
  1289. Williamson, et. al. Informational [Page 33]
  1290. RFC 2167 RWhois Protocol June 1997
  1291. Errors
  1292. 338 Invalid directive syntax
  1293. 352 Invalid security method
  1294. 353 Authentication failed
  1295. 354 Encryption failed
  1296. 400 Directive not available
  1297. 401 Not authorized for directive
  1298. Examples
  1299. # Authenticate a request using password.
  1300. C -security on request password hello!1
  1301. S %ok
  1302. # Authenticate a PGP signed request.
  1303. C -security on request pgp signed
  1304. S %ok
  1305. C -register on mod joe@netsol.com
  1306. S %ok
  1307. C -----BEGIN PGP MESSAGE-----
  1308. C Version: 2.6.2
  1309. C
  1310. C owHrZJjKzMpgdP9D9crUhdpBYnwHGRnPbmVhmHlV7Hef9je/n7vyzhmE6589/+Dg
  1311. C jPpVm59tNz92vPSmrFB/4ankBRz+xgY+7z9OUYjefGahbWSNwzzxbw6TpWZGerU+
  1312. C uOUg/Cygs33JBdHqjwEc+wyfZPp+N5p2bu+ywoaOu8eLPyn+m2Mt/T9p1UaG68vP
  1313. C Zd2d9EPw+Ywpio7dco6yh3b/v7zmQxJHcWpyaVFmSSUDEHi6WBkZm5iamVtY6iXq
  1314. C JefnKnCFFqQklqSmWBlaWpoZGhmYGhqZmBgYGxgYKHA55yQWF+v6JeamWiXn55Uk
  1315. C JpcocDmWlmToOhalJlpB9cf7uYbHE6kWi/VumUXFJRB9wcn5JUBdPokwgfDMnJzM
  1316. C xNzi/DwFLjQBHQWoatfcxMwcq+JyB6h5AA==
  1317. C =a0sQ
  1318. C -----END PGP MESSAGE-----
  1319. C -register off
  1320. S %ok
  1321. # Encrypt a response using PGP. 52160EC1 is the public key ID with
  1322. # which the response is encrypted.
  1323. C -security on response pgp encrypt 52160EC1
  1324. S %ok
  1325. C -xfer com class=domain attribute=Domain-Name
  1326. attribute=Organization-Name
  1327. S -----BEGIN PGP MESSAGE-----
  1328. S Version: 2.6.2
  1329. S
  1330. S hIwDqWWhK1IWDsEBBACOXssTzD2CbB7Vjj2cNURScpJc2as2TbUDOQiwkT+8qFgG
  1331. S ZyRfktpwNNTawRIcGOk1Kcs84z8a3vvTA/oje9vZexHtzfJwBHFdiIZxPuCEpvgv
  1332. S 2ppK7WqlmHGcQKVBJJHYw7Fq83CUkeGJB9P1M3CQiXeW8h8MwAuhxSgbgt23PKYA
  1333. S AABuhknJrXeh9Owm81+MvyzgLOyM7sjDYmttU9sj/yuOYmAhS9V+34MT/Mwn4wO8
  1334. Williamson, et. al. Informational [Page 34]
  1335. RFC 2167 RWhois Protocol June 1997
  1336. S 2BCsJqBHXbwOuYKs02p0se4jyKFtZR8MDPWNm9QyAP+oNMTjsufy6ZRa9PegUC6t
  1337. S HDhXymkiP03mKMMVK1//7X0=
  1338. S =vZ2x
  1339. S -----END PGP MESSAGE-----
  1340. S %ok
  1341. 3.3.12 soa
  1342. Description
  1343. The "-soa" directive can be used by the client to retrieve the SOA
  1344. information for one or more authority areas. When no authority area
  1345. name is given, the server must return the SOA information for all the
  1346. authority areas. Every SOA record must end with an empty "%soa" line.
  1347. ABNF
  1348. soa-dir = "-soa" *(space authority-area) crlf
  1349. soa-response = *soa-record response
  1350. soa-record = *soa-line "%soa" crlf
  1351. soa-line = "%soa" space "authority" ":" authority-area crlf
  1352. / "%soa" space "ttl" ":" 1*digit crlf
  1353. / "%soa" space "serial" ":" time-stamp crlf
  1354. / "%soa" space "refresh" ":" 1*digit crlf
  1355. / "%soa" space "increment" ":" 1*digit crlf
  1356. / "%soa" space "retry" ":" 1*digit crlf
  1357. / "%soa" space "tech-contact" ":" email crlf
  1358. / "%soa" space "admin-contact" ":" email crlf
  1359. / "%soa" space "hostmaster" ":" email crlf
  1360. / "%soa" space "primary" ":" host-port crlf
  1361. / "%soa" space attribute-name ":" attribute-value crlf
  1362. The server must return the following SOA information for an authority
  1363. area.
  1364. attribute-name attribute-value Comments
  1365. authority authority-area This is the name of the authority area.
  1366. ttl 1*digit This is the default time to live for
  1367. the data in the authority area.
  1368. serial time-stamp This is the serial number of the data
  1369. in the authority area; it changes
  1370. when the data changes.
  1371. Williamson, et. al. Informational [Page 35]
  1372. RFC 2167 RWhois Protocol June 1997
  1373. refresh 1*digit This is the time interval before a
  1374. slave server checks for complete
  1375. replication.
  1376. increment 1*digit This is the time interval before a
  1377. slave server checks for incremental
  1378. replication.
  1379. retry 1*digit This is the time interval before a
  1380. slave server tries again to connect
  1381. to a master server that appears to be
  1382. out-of-service.
  1383. tech-contact email This is the contact for the operation
  1384. of the master server.
  1385. admin-contact email This is the contact for the data
  1386. integrity at the master server.
  1387. hostmaster email This is the contact for sending update
  1388. requests at the master server.
  1389. primary host-port This is the host name (or IP address)
  1390. and port number of the master server.
  1391. Errors
  1392. 338 Invalid directive syntax
  1393. 340 Invalid authority area
  1394. 400 Directive not available
  1395. 401 Not authorized for directive
  1396. Examples
  1397. C -soa org
  1398. S %soa authority:org
  1399. S %soa ttl:86400
  1400. S %soa serial:19961119111535000
  1401. S %soa refresh:3600
  1402. S %soa increment:1800
  1403. S %soa retry:180
  1404. S %soa tech-contact:tech@internic.net
  1405. S %soa admin-contact:admin@internic.net
  1406. S %soa hostmaster:hostmaster@internic.net
  1407. S %soa primary:rs.internic.net:4321
  1408. S %soa
  1409. S %ok
  1410. Williamson, et. al. Informational [Page 36]
  1411. RFC 2167 RWhois Protocol June 1997
  1412. 3.3.13 status
  1413. Description
  1414. The "-status" directive can be used by the client to get various
  1415. status flags from the server. The response must include the number of
  1416. objects in all the authority areas, the current display format, the
  1417. server contact information, and the status flags for the state-
  1418. oriented directives: "-limit", "-holdconnect", and "-forward".
  1419. ABNF
  1420. status-dir = "-status" crlf
  1421. status-response = *status-line response
  1422. status-line = "%status" space "limit" ":" 1*digit crlf
  1423. / "%status" space "holdconnect" ":" on-off crlf
  1424. / "%status" space "forward" ":" on-off crlf
  1425. / "%status" space "objects" ":" 1*digit crlf
  1426. / "%status" space "display" ":" 1*any-char crlf
  1427. / "%status" space "contact" ":" email crlf
  1428. / "%status" space attribute-name ":" attribute-value crlf
  1429. Errors
  1430. 338 Invalid directive syntax
  1431. 400 Directive not available
  1432. 401 Not authorized for directive
  1433. Examples
  1434. C -status
  1435. S %status limit:20
  1436. S %status holdconnect:OFF
  1437. S %status forward:OFF
  1438. S %status objects:12345
  1439. S %status display:dump
  1440. S %status contact:joe@rwhois.net
  1441. S %ok
  1442. 3.3.14 xfer
  1443. Description
  1444. The "-xfer" directive can be used by the client (generally, a slave
  1445. server) to transfer the data in an authority area. The client can
  1446. control the amount of data transferred using one of the following
  1447. options.
  1448. Williamson, et. al. Informational [Page 37]
  1449. RFC 2167 RWhois Protocol June 1997
  1450. * serial-number: The client can transfer all the objects that have
  1451. been added, modified or deleted since a certain time, specifying
  1452. the serial-number that indicates that time. This option is used
  1453. for incremental replication.
  1454. * class: The client can limit the data transfer to one or more
  1455. classes, using the "class=<class-name>" option. The server must
  1456. return data for only the specified classes. If no class name is
  1457. specified, the server must return data for all the classes.
  1458. * attribute: The client can limit the data transfer to one or more
  1459. attributes of a class, using the "attribute=<attribute-name>"
  1460. option in combination with the "class=<class-name>" option. The
  1461. server must return data for only the specified attributes of the
  1462. class. The client can specify multiple "class=" and "attribute="
  1463. pairs.
  1464. ABNF
  1465. xfer-dir = "-xfer" space authority-area *attribute-def
  1466. [space serial-number] crlf
  1467. attribute-def = [space "class=" class-name] *(space "attribute="
  1468. attribute-name)
  1469. serial-number = time-stamp
  1470. xfer-response = *xfer-record response
  1471. xfer-record = *xfer-line "%xfer" crlf
  1472. xfer-line = "%xfer" space class-name ":" attribute-name ":"
  1473. attribute-value crlf
  1474. Errors
  1475. 332 Nothing to transfer
  1476. 333 Not master for authority area
  1477. 338 Invalid directive syntax
  1478. 340 Invalid authority area
  1479. 341 Invalid class
  1480. 342 Invalid attribute
  1481. 400 Directive not available
  1482. 401 Not authorized for directive
  1483. Williamson, et. al. Informational [Page 38]
  1484. RFC 2167 RWhois Protocol June 1997
  1485. Examples
  1486. C -xfer com class=domain attribute=Domain-Name
  1487. attribute=Organization-Name
  1488. S %xfer domain:Domain-Name:acme.com
  1489. S %xfer domain:Organization-Name:Acme Inc.
  1490. S %xfer
  1491. S %xfer domain:Domain-Name:vogon.com
  1492. S %xfer domain:Organization-Name:Vogon Heavy Industries
  1493. S %xfer
  1494. S %ok
  1495. 3.3.15 X
  1496. Description
  1497. The "-X" directive is used to specify an additional, non-standard
  1498. directive. It can be implemented by executing an external program, by
  1499. internal functions, or by other means. It may interact with the
  1500. client or simply produce output like one of the standard directives.
  1501. ABNF
  1502. x-dir = "-X-" x-directive [space x-arguments] crlf *x-line
  1503. x-directive = 1*id-char
  1504. x-arguments = *any-char
  1505. x-response = *(*any-char crlf) response
  1506. x-line = *any-char crlf
  1507. Errors
  1508. 338 Invalid directive syntax
  1509. 400 Directive not available
  1510. 401 Not authorized for directive
  1511. Examples
  1512. The following example uses an implementation that executes an
  1513. external program, the UNIX "date" command. The server runs the "date"
  1514. command and returns its output to the client.
  1515. C -X-date
  1516. S Mon Jan 6 13:21:20 EST 1997
  1517. S %ok
  1518. Williamson, et. al. Informational [Page 39]
  1519. RFC 2167 RWhois Protocol June 1997
  1520. 3.4 Query
  1521. Description
  1522. The query allows the client to retrieve objects from the server's
  1523. database. The server must support the following types of queries.
  1524. * Unrestricted query: It is a single word or a quoted string. The
  1525. server must return all the matching objects where one or more
  1526. attributes match the query, regardless of the class.
  1527. * Class-restricted query: It is a class name specified in front
  1528. of the unrestricted query. The server must return all the
  1529. matching objects where one or more attributes of the specified
  1530. class match the query.
  1531. * Attribute-restricted query: It is of the
  1532. "<attribute-name>=<search-string>" form. The server must return
  1533. all the matching objects where the specified attribute matches
  1534. the query.
  1535. The server may implement the following types of queries.
  1536. * Boolean operator query: It consists of simpler queries combined
  1537. using the "and" and "or" operators.
  1538. * Wild card query: It consists of an asterisk ("*") in the front
  1539. and/or at the end of the search string. The server may support
  1540. partial matching using the asterisk.
  1541. In response to the query, the server will return the objects that
  1542. match the query. If the server does not support complex queries,
  1543. with, for example, wild cards or boolean operators, the server may
  1544. return the "351 Query too complex" error. When the number of objects
  1545. found exceeds the limit (set by the "-limit" directive), the server
  1546. should return the objects, followed by the "330 Exceeded maximum
  1547. objects limit" error.
  1548. The default object output format is the dump format that uses the
  1549. "<class-name>:<attribute-name>;<type character>:<attribute-value>"
  1550. form. The type character is optional and identifies the type of the
  1551. attribute value. The type character is a shorthand for the Type field
  1552. of the attribute definition (see Section 2.3.1). The type characters
  1553. are defined as follows.
  1554. Williamson, et. al. Informational [Page 40]
  1555. RFC 2167 RWhois Protocol June 1997
  1556. Type Attribute
  1557. character Type
  1558. T TEXT
  1559. I ID
  1560. S SEE-ALSO
  1561. When no type character is given, the client should assume the "T"
  1562. type character. The server must provide the type character when the
  1563. attribute type is ID or SEE-ALSO. The purpose of the type character
  1564. is to aid the client in displaying the data. For example, when an
  1565. attribute value is an ID, the client may indicate to the end-user
  1566. that it is possible to retrieve the object indicated by the ID.
  1567. The server may return one or more referrals in the "%referral
  1568. rwhois://<host-name>:<port-number>/auth-area=<authority area>" form.
  1569. The client can distinguish multiple referrals by comparing their
  1570. authority areas; if all the referrals refer to the same authority
  1571. area, the client should follow only one of them. Otherwise, the
  1572. client should follow all of them. To follow a referral, the client
  1573. must connect to the specified host name and port number, and issue
  1574. the same query.
  1575. ABNF
  1576. rwhois-query = [class-name space] query crlf
  1577. query = query-string / attribute-query / query bin-boolean query
  1578. query-char = <any-char, except """, space, tab>
  1579. quoted-query-char = query-char / space / tab / "
  1580. query-string = ["*"] 1*query-char ["*"] / """ ["*"]
  1581. 1*quoted-query-char ["*"] """
  1582. attribute-query = attribute-name "=" query-string
  1583. bin-boolean = "and" / "or"
  1584. rwhois-query-result = *(query-record / referral-record) response
  1585. query-record = 1*query-line crlf
  1586. query-line = class-name ":" attribute-name [";" type-char] ":"
  1587. attribute-value crlf
  1588. type-char = "T" / "I" / "S"
  1589. referral-record = 1*(referral-line crlf)
  1590. referral-line = "%referral" space referral-url
  1591. referral-url = "rwhois" ":" "//" host-port "/" "auth-area="
  1592. authority-area
  1593. Williamson, et. al. Informational [Page 41]
  1594. RFC 2167 RWhois Protocol June 1997
  1595. Errors
  1596. 130 Object not authoritative
  1597. 230 No objects found
  1598. 330 Exceeded maximum objects limit
  1599. 340 Invalid authority area
  1600. 341 Invalid class
  1601. 342 Invalid attribute
  1602. 350 Invalid query syntax
  1603. 351 Query too complex
  1604. Examples
  1605. This example illustrates a query, where no objects are found.
  1606. C vogon
  1607. S %error 230 No objects found
  1608. This example illustrates a query, where two different objects are
  1609. returned.
  1610. C ibm
  1611. S domain:ID:IBMLIFEPRO-DOM.com
  1612. S domain:Auth-Area:com
  1613. S domain:Domain-Name:IBMLIFEPRO.COM
  1614. S domain:Org-Name:IBM
  1615. S domain:Server;I:NS12345-HST.NET
  1616. S domain:Server;I:NS12345-HST.NET
  1617. S domain:Admin-Contact;I:TW1234.COM
  1618. S domain:Tech-Contact;I:BN123.NET
  1619. S domain:Updated:19961120123455000
  1620. S domain:Updated-By:autoreg@internic.net
  1621. S domain:Class-Name:domain
  1622. S
  1623. S network:ID:NET-IBMNET-3.0.0.0/0
  1624. S network:Auth-Area:0.0.0.0/0
  1625. S network:Network-Name:IBMNET-3
  1626. S network:IP-Network:123.45.67.0/24
  1627. S network:Org-Name:IBM
  1628. S network:Street-Address:1234 Maneck Avenue
  1629. S network:City:Black Plains
  1630. S network:State:NY
  1631. S network:Postal-Code:12345
  1632. S network:Country-Code:US
  1633. S network:Tech-Contact;I:MG305.COM
  1634. S network:Updated:19931120123455000
  1635. S network:Updated-By:joeblo@nic.ddn.mil
  1636. S network:Class-Name:network
  1637. Williamson, et. al. Informational [Page 42]
  1638. RFC 2167 RWhois Protocol June 1997
  1639. S
  1640. S %ok
  1641. This example illustrates a query with a class restrictor, where the
  1642. number of objects found exceeds the limit set by the "-limit"
  1643. directive.
  1644. C -limit 1
  1645. S %ok
  1646. C domain ibm
  1647. S domain:ID:IBMLIFEPRO-DOM.com
  1648. S domain:Auth-Area:com
  1649. S domain:Domain-Name:IBMLIFEPRO.COM
  1650. S domain:Org-Name:IBM
  1651. S domain:Server;I:NS12345-HST.NET
  1652. S domain:Server;I:NS12345-HST.NET
  1653. S domain:Admin-Contact;I:TW1234.COM
  1654. S domain:Tech-Contact;I:BN123.NET
  1655. S domain:Updated:19961120123455000
  1656. S domain:Updated-By:erice@internic.net
  1657. S domain:Class-Name:domain
  1658. S
  1659. S %error 330 Exceeded maximum objects limit
  1660. This is an example of attribute matching.
  1661. C domain Domain-Name=konabo.com
  1662. S domain:ID:12345678.com
  1663. S domain:Auth-Area:com
  1664. S domain:Domain-Name:konabo.com
  1665. S domain:Org-Name:ACME
  1666. S domain:Server;I:12345670.com
  1667. S domain:Server;I:12345671.com
  1668. S domain:Admin-Contact;I:12345660.com
  1669. S domain:Tech-Contact;I:12345665.com
  1670. S domain:Updated:19961120123455000
  1671. S domain:Updated-By:joeblo@internic.net
  1672. S domain:Class-Name:domain
  1673. S
  1674. S %ok
  1675. This example illustrates a link referral.
  1676. C domain a.b.rwhois.net
  1677. # The server returns a link referral to a server serving the
  1678. # b.rwhois.net authority area.
  1679. S %referral rwhois://master.b.rwhois.net:4321/auth-area=b.rwhois.net
  1680. S %ok
  1681. Williamson, et. al. Informational [Page 43]
  1682. RFC 2167 RWhois Protocol June 1997
  1683. This example illustrates a punt referral.
  1684. C domain internic.net
  1685. # The server returns a punt referral to a server serving the root
  1686. # authority area.
  1687. S %referral rwhois://rs.internic.net:4321/auth-area=.
  1688. S %ok
  1689. This example illustrates multiple referrals that refer to the same
  1690. authority area. The client should follow only one of them.
  1691. C domain a.b.rwhois.net
  1692. # The server returns link referrals to two RWhois servers serving the
  1693. # b.rwhois.net authority area.
  1694. S %referral rwhois://master.b.rwhois.net:4321/auth-area=b.rwhois.net
  1695. S %referral rwhois://slave.b.rwhois.net:4321/auth-area=b.rwhois.net
  1696. S %ok
  1697. This example illustrates multiple referrals that refer to different
  1698. authority areas. The client should follow all of them.
  1699. C contact Last-Name="Beeblebrox"
  1700. # The server returns a link referral to a server serving the
  1701. # b.rwhois.net authority area.
  1702. S %referral rwhois://master.b.rwhois.net:4321/auth-area=b.rwhois.net
  1703. # The server also returns a punt referral to a server serving the
  1704. # net authority area since the query matched an entry in the
  1705. # non-hierarchical index received from it.
  1706. S %referral rwhois://rs.internic.net:4321/auth-area=net
  1707. S %ok
  1708. Williamson, et. al. Informational [Page 44]
  1709. RFC 2167 RWhois Protocol June 1997
  1710. This is an example of a boolean operator and wildcard matching.
  1711. C ibm and jubliana*
  1712. S host:ID:JUBLIANA-HST.root
  1713. S host:Auth-Area:.
  1714. S host:Host-Name:JUBLIANA.TRL.IBM.CO.JP
  1715. S host:IP-Address:123.156.220.68
  1716. S host:Org-Name:IBM
  1717. S host:Street-Address:1234 Maneck Avenue
  1718. S host:City:Black Plains
  1719. S host:State:NY
  1720. S host:Postal-Code:12345
  1721. S host:Country-Code:US
  1722. S host:Updated:19961120123455000
  1723. S host:Updated-By:joeblo@nic.ddn.mil
  1724. S host:Class-Name:host
  1725. S
  1726. S %ok
  1727. 3.5 Connection Model
  1728. An RWhois client can connect to an RWhois server using one of the
  1729. following transport protocols.
  1730. 3.5.1 Transmission Control Protocol (TCP)
  1731. TCP provides a reliable stream transport service between a client and
  1732. a server. In RWhois, TCP is the default transport protocol because,
  1733. during a particular session, a client can send more than one query
  1734. and a server can reliably return a large amount of data for each of
  1735. those queries. By default, a TCP RWhois server should run on the
  1736. standard, Internet Assigned Number Authority (IANA)-assigned port
  1737. 4321. However, if port 4321 is not available, it may run on an
  1738. available port in the non-reserved range (1024 - 65535).
  1739. 3.5.2 User Datagram Protocol (UDP)
  1740. UDP provides an unreliable connectionless transport service between a
  1741. client and a server. In RWhois, UDP may be used as the transport
  1742. protocol if a client wants to quickly send only one query, without
  1743. incurring the overhead of establishing a TCP connection with a
  1744. server. By default, a UDP RWhois server should run on the standard,
  1745. IANA-assigned port 4321. However, if port 4321 is not available, it
  1746. may run on an available port in the non-reserved range (1024 -
  1747. 65535). A separate document will describe the use of UDP as the
  1748. transport protocol in RWhois.
  1749. Williamson, et. al. Informational [Page 45]
  1750. RFC 2167 RWhois Protocol June 1997
  1751. 3.6 Data Replication
  1752. This section discusses when and how a slave server should replicate
  1753. data. Further, it describes the server registration and location
  1754. mechanisms.
  1755. 3.6.1 When to Replicate Data
  1756. The time when a slave server may replicate data for an authority area
  1757. is determined by the SOA variables for that authority area. The
  1758. possible times are the following.
  1759. * When the "Refresh-Interval" expires, a slave server may
  1760. completely replicate data.
  1761. * When the "Increment-Interval" expires, a slave server may
  1762. incrementally replicate data.
  1763. * A slave server fails to connect to its master server to
  1764. replicate data. When the "Retry-Interval" expires, it tries
  1765. again to replicate data.
  1766. * When the data in an authority area is changed and its "Serial-
  1767. Number" updated, a master server may notify its slave servers to
  1768. immediately update the data. To notify about the data change,
  1769. the master server should send the "-notify update <host-
  1770. name>:<port-number>:<authority-area>" directive to its slave
  1771. servers.
  1772. 3.6.2 How to Replicate Data
  1773. To replicate data, a slave server sends a series of directives to its
  1774. master server and checks each response before sending the next
  1775. directive. The following sections describe the protocols for
  1776. complete and incremental replication.
  1777. Complete Replication
  1778. The protocol between a master server and a slave server to completely
  1779. replicate data for an authority area is as follows.
  1780. 1. The slave server should connect to the master server. If there
  1781. is a connection error, the slave server should log an error and
  1782. exit.
  1783. 2. The slave server should send the "-soa <authority-area>"
  1784. directive to the master server and parse the SOA variables from
  1785. the response. Let the "Serial-Number" variable in this response
  1786. be called the "old-serial-number".
  1787. Williamson, et. al. Informational [Page 46]
  1788. RFC 2167 RWhois Protocol June 1997
  1789. 3. The slave server should send the "-class <authority-area>"
  1790. directive to the master server and parse the versions of all the
  1791. classes from the response.
  1792. 4. The slave server should send the "-schema <authority-area>"
  1793. directive to the master server and parse the definitions of all
  1794. the classes from the response.
  1795. 5. The slave server should send the "-xfer <authority-area>"
  1796. directive to the master server and parse the data objects from
  1797. the response. The master server should return all the data
  1798. objects, excluding the deleted ones, in the authority area. The
  1799. slave server should index these data objects.
  1800. 6. When the "Refresh-Interval" expires, the slave server should
  1801. to the master server. If there is a connection error, the slave
  1802. server should try again after the "Retry-Interval".
  1803. 7. The slave server should send the "-soa <authority-area>"
  1804. directive to the master server and parse the SOA variables from
  1805. the response. Let the "Serial-Number" variable in this response
  1806. be called the "new-serial-number". If the "new-serial-number" is
  1807. not greater than the "old-serial-number", go back to step 6.
  1808. Otherwise, it indicates a data change at the master server.
  1809. 8. The slave server should send the "-class <authority-area>"
  1810. directive to the master server and parse the versions of all the
  1811. classes from the response. If the version of any of the classes
  1812. has changed, the slave server should send the "-schema
  1813. <authority-area>" directive to the master server and parse the
  1814. definitions of all the classes from the response.
  1815. 9. The slave server should send the "-xfer <authority-area>"
  1816. directive the master server and parse the data objects from the
  1817. response. The master server should return all the data objects,
  1818. excluding the deleted ones, in the authority area. The slave
  1819. server should index these data objects and seamlessly replace
  1820. the old index with the new one. Further, it should assign the
  1821. "new-serial-number" to the "old-serial-number".
  1822. 10. Go back to step 6.
  1823. Note that the "-class", "-schema", and "-xfer" directives change when
  1824. a slave server replicates data for only a subset of the schema for an
  1825. authority area.
  1826. In the following example, a slave server completely replicates data
  1827. for all the classes in an authority area. The notation in the example
  1828. uses a prefix to indicate from where the information is coming. An
  1829. "M" indicates that the master server sends the data to the slave
  1830. server. An "S" indicates that the slave server sends the data to the
  1831. master server. The line is a comment when "#" is used. The space
  1832. after the prefix is not part of the data. The example authority area
  1833. is "rwhois.net".
  1834. Williamson, et. al. Informational [Page 47]
  1835. RFC 2167 RWhois Protocol June 1997
  1836. # The slave server connects to the master server.
  1837. M %rwhois V-1.5:00ffff:00 master.rwhois.net
  1838. S -soa rwhois.net
  1839. M ...
  1840. M %soa serial:19970103102258000
  1841. M %soa refresh:3600
  1842. M ...
  1843. S -class rwhois.net
  1844. # The master server returns the versions of all the classes in the
  1845. # rwhois.net authority area.
  1846. S -schema rwhois.net
  1847. # The master server returns the definitions of all the classes in the
  1848. # rwhois.net authority area.
  1849. S -xfer rwhois.net
  1850. # The master server returns all the data objects, excluding the
  1851. # deleted ones, in the rwhois.net authority area. The slave server
  1852. # indexes these data objects.
  1853. # The refresh interval of 3600 seconds expires.
  1854. S -soa rwhois.net
  1855. M ...
  1856. M %soa serial:19970103103258000
  1857. M %soa refresh:3600
  1858. M ...
  1859. # The new serial number 19970103103258000 is greater than the old
  1860. # serial number 19970103102258000. It indicates a data change at the
  1861. # master server.
  1862. S -class rwhois.net
  1863. # The master server returns the versions of all the classes in the
  1864. # rwhois.net authority area. If the version of any of the classes has
  1865. # changed, the slave server logs an error and closes the connection.
  1866. S -xfer rwhois.net
  1867. # The master server returns all the data objects, excluding the
  1868. # deleted ones, in the rwhois.net authority area. The slave server
  1869. # indexes these data objects and seamlessly replaces the old index.
  1870. # The refresh interval of 3600 seconds expires.
  1871. S ...
  1872. Incremental Replication
  1873. The protocol between a master server and a slave server to
  1874. incrementally replicate data for an authority area is as follows.
  1875. 1. The slave server should connect to the master server. If there
  1876. is a connection error, the slave server should log an error and
  1877. exit.
  1878. Williamson, et. al. Informational [Page 48]
  1879. RFC 2167 RWhois Protocol June 1997
  1880. 2. The slave server should send the "-soa <authority-area>"
  1881. directive to the master server and parse the SOA variables from
  1882. the response. Let the "Serial-Number" variable in this response
  1883. be called the "old-serial-number".
  1884. 3. The slave server should send the "-class <authority-area>"
  1885. directive to the master server and parse the versions of all the
  1886. classes from the response.
  1887. 4. The slave server should send the "-schema <authority-area>"
  1888. directive to the master server and parse the definitions of all
  1889. the classes from the response.
  1890. 5. The slave server should send the "-xfer <authority-area>"
  1891. directive to the master server and parse the data objects from
  1892. the response. The master server should return all the data
  1893. objects, excluding the deleted ones, in the authority area. The
  1894. slave server should index these data objects.
  1895. 6. When the "Increment-Interval" expires, the slave server should
  1896. connect to the master server. If there is a connection error,
  1897. the slave server should try again after the "Retry-Interval".
  1898. 7. The slave server should send the "-soa <authority-area>"
  1899. directive to the master server and parse the SOA variables from
  1900. the response. Let the "Serial-Number" variable in this response
  1901. be called the "new-serial-number". If the "new-serial-number" is
  1902. not greater than the "old-serial-number", go back to step 6.
  1903. Otherwise, it indicates a data change at the master server.
  1904. 8. The slave server should send the "-class <authority-area>"
  1905. directive to the master server and parse the versions of all the
  1906. classes from the response. If the version of any of the classes
  1907. has changed, the slave server should send the "-schema
  1908. <authority-area>" directive to the master server and parse the
  1909. definitions of all the classes from the response. The slave
  1910. server should then send the "-xfer <authority-area>" directive
  1911. to the master server and parse the data objects from the
  1912. response. The master server should return all the data objects,
  1913. excluding the deleted ones, in the authority area. The slave
  1914. server should index these data objects and seamlessly replace
  1915. the old index with the new one. Further, it should assign the
  1916. "new-serial-number" to the "old-serial-number". If the version
  1917. of any of the classes has changed, go back to step 6.
  1918. 9. The slave server should send the "-xfer <authority-area>
  1919. <old-serial-number>" directive to the master server and parse
  1920. the data objects from the response. The master server should
  1921. return all the data objects in the authority area that have been
  1922. inserted, updated, or deleted since the "old-serial-number". The
  1923. slave server should index all the data again after purging stale
  1924. data objects and seamlessly replace the old index with the new
  1925. one. Further, it should assign the "new-serial-number" to the
  1926. "old-serial-number".
  1927. 10. Go back to step 6.
  1928. Williamson, et. al. Informational [Page 49]
  1929. RFC 2167 RWhois Protocol June 1997
  1930. Note that the "-class", "-schema", and "-xfer" directives change when
  1931. a slave server replicates data for only a subset of the schema for an
  1932. authority area.
  1933. In the following example, a slave server incrementally replicates
  1934. data for all the classes in an authority area. The notation in the
  1935. example uses a prefix to indicate from where the information is
  1936. coming. An "M" indicates that the master server sends the data to the
  1937. slave server. An "S" indicates the slave server sends the data to the
  1938. master server. The line is a comment when "#" is used. The space
  1939. after the prefix is not part of the data. The example authority area
  1940. is "rwhois.net".
  1941. # The slave server connects to the master server.
  1942. M %rwhois V-1.5:00ffff:00 master.rwhois.net
  1943. S -soa rwhois.net
  1944. M ...
  1945. M %soa serial:19970103102258000
  1946. M %soa increment:1800
  1947. M ...
  1948. S -class rwhois.net
  1949. # The master server returns the versions of all the classes in the
  1950. # rwhois.net authority area.
  1951. S -schema rwhois.net
  1952. # The master server returns the definitions of all the classes in the
  1953. # rwhois.net authority area.
  1954. S -xfer rwhois.net
  1955. # The master server returns all the data objects, excluding the
  1956. # deleted ones, in the rwhois.net authority area. The slave server
  1957. # indexes these data objects.
  1958. # The increment interval of 1800 seconds expires.
  1959. S -soa rwhois.net
  1960. M ...
  1961. M %soa serial:19970103103258000
  1962. M %soa increment:1800
  1963. M ...
  1964. # The new serial number 19970103103258000 is greater than the old
  1965. # serial number 19970103102258000. It indicates a data change at
  1966. # the master server.
  1967. S -class rwhois.net
  1968. # The master server returns the versions of all the classes in the
  1969. # rwhois.net authority area. If the version of any of the classes has
  1970. # changed, the slave server logs an error and closes the connection.
  1971. S -xfer rwhois.net 19970103102258000
  1972. Williamson, et. al. Informational [Page 50]
  1973. RFC 2167 RWhois Protocol June 1997
  1974. # The master server returns all the data objects in the rwhois.net
  1975. # authority area that have been inserted, updated, or deleted since
  1976. # 19970103102258000. The slave server indexes all the data again
  1977. # after purging stale data objects and seamlessly replaces the old
  1978. # index. The increment interval of 1800 seconds expires.
  1979. S ...
  1980. 3.6.3 Server Registration
  1981. This section discusses how an RWhois server can register itself or
  1982. cancel its registration as a slave server for an authority area with
  1983. a master server.
  1984. The initial list of slave servers for an authority area should be
  1985. manually configured at the master server. To register itself as a
  1986. slave server, the server should send the "-notify inssec <host-
  1987. name>:<port-number>:<authority-area>" directive to the master server.
  1988. The master server may reject the request on the basis of its
  1989. registration policy. To cancel its registration as a slave server,
  1990. the server should send the "-notify delsec <host-name>:<port-
  1991. number>:<authority-area>" directive to the master server. Note that
  1992. the "host-name" and "port-number" in the above directives correspond
  1993. to the requesting server.
  1994. 3.6.4 Server Location
  1995. To resolve a query in a particular authority area, an RWhois client
  1996. may need to first locate the master and slave servers for that
  1997. authority area. The different server location mechanisms are as
  1998. follows.
  1999. Referrals
  2000. An RWhois client should know about at least one RWhois server. It
  2001. should send the "referral <authority-area>" query to that server. The
  2002. query may be routed up or down the RWhois tree before getting
  2003. resolved. If the query does get resolved, the result should be a
  2004. referral object for that authority area. The client should parse the
  2005. "Referral" attributes from the result to obtain a list of servers
  2006. serving that authority area.
  2007. The client should then send the "-soa <authority-area>" directive to
  2008. one of the above servers and parse the "Primary-Server" variable from
  2009. the response. The value of this variable is the master server. Then,
  2010. the remaining servers in the list are the slave servers.
  2011. Williamson, et. al. Informational [Page 51]
  2012. RFC 2167 RWhois Protocol June 1997
  2013. SRV RRs
  2014. The Server Resource Record (SRV RR), defined for DNS, can be used to
  2015. locate the master and slave servers for an authority area. An SRV RR
  2016. specifies the location of a network service in an organization's DNS.
  2017. It is defined in [RFC 2052] as follows.
  2018. Service.Proto.Name TTL Class SRV Priority Weight Port Target
  2019. Since an authority area identifier is generally a domain name or an
  2020. IP address, the RWhois SRV RRs can be added to the DNS file for that
  2021. domain or IP address. For example, the RWhois SRV RRs for the
  2022. "rwhois.net" authority area could be:
  2023. rwhois.tcp.rwhois.net. 86400 IN SRV 10 0 4321 master.rwhois.net.
  2024. SRV 20 0 4322 slave.rwhois.net.
  2025. where the "master.rwhois.net" server has a higher priority than the
  2026. "slave.rwhois.net" server. The client must try to connect to the
  2027. server with a higher (lower-numbered) priority.
  2028. 4. Security Considerations
  2029. RWhois provides security using the guardian class (see Section
  2030. 2.3.6). Any information (meta or data) in an authority area can be
  2031. guarded by containing pointers to one or more guardian objects; that
  2032. is, it can be securely updated and accessed. Currently, there are two
  2033. standard security methods: password and PGP (see Section 3.3.11).
  2034. Password provides authentication only, and PGP provides both
  2035. authentication and encryption. PGP is the recommended security
  2036. method in RWhois.
  2037. The following sections discuss how to securely update and access the
  2038. data in an authority area.
  2039. 4.1 Data Update
  2040. This involves the ability to securely add, modify, or delete some
  2041. information (meta or data) in an authority area. An authority area,
  2042. on the whole, can be guarded by linking guardians to its SOA and
  2043. schema information. Only these guardians should be allowed to add
  2044. objects to the authority area and modify its SOA and schema
  2045. information. In addition, they can also modify or delete existing
  2046. objects in the authority area. However, the function of modifying or
  2047. deleting existing objects can be delegated to other guardians by
  2048. linking them to objects on a per-object basis.
  2049. Williamson, et. al. Informational [Page 52]
  2050. RFC 2167 RWhois Protocol June 1997
  2051. 4.2 Access Control
  2052. There are two access control issues; the first is the ability to
  2053. securely transfer data between the slave and master servers. To
  2054. transfer data for an authority area, a slave server can authenticate
  2055. itself by satisfying one of the guardians linked to the SOA
  2056. information of the authority area at the master server. In addition,
  2057. the master server may encrypt the transferred data.
  2058. The second issue is the ability to make public only a subset of the
  2059. data in an authority area. If all the objects of a particular class
  2060. need to be private, the Private attribute of the class should be set
  2061. to true. If only some attributes of all the objects of a particular
  2062. class need to be private, the Private attribute property of each of
  2063. those attributes should be set to true. The guardians of such objects
  2064. must be able to view them completely.
  2065. 5. Acknowledgments
  2066. The authors would like to acknowledge the following individuals.
  2067. Stan Borinski
  2068. C. Ming Lu
  2069. Leslie Meador
  2070. Michael Mealling
  2071. Greg Pierce
  2072. Amar Rao
  2073. 6. References
  2074. [CIP] Allen, J., "The Common Indexing Protocol (CIP)", Bunyip
  2075. Information Systems, November 1996, Work in Progress.
  2076. [Guardian] Singh, J., M. Kosters, "The InterNIC Guardian Object",
  2077. ftp://rs.internic.net/policy/internic/internic-gen-1.txt, Network
  2078. Solutions, February 1996.
  2079. [RFC 821] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC
  2080. 821, ISI, August 1982.
  2081. [RFC 822] Crocker, D, "Standards for the Format of ARPA Internet Text
  2082. Messages", STD 11, RFC 822, University of Delaware, August 1982.
  2083. [RFC 954] Harrenstien, K., Stahl, M., Feinler, E., "NICNAME/WHOIS",
  2084. RFC 954, SRI, October 1985.
  2085. [RFC 1034] Mockapetris, P. V., "Domain names - concepts and
  2086. facilities", STD 13, RFC 1034, November 1987.
  2087. Williamson, et. al. Informational [Page 53]
  2088. RFC 2167 RWhois Protocol June 1997
  2089. [RFC 1714] Williamson, S., Kosters, M., "Referral Whois Protocol",
  2090. RFC 1714, Network Solutions, November 1994.
  2091. [RFC 1738] T. Berners-Lee, L. Masinter, M. McCahill, "Uniform
  2092. Resource Locators (URL)", RFC 1738, CERN, Xerox Corporation,
  2093. University of Minnesota, December 1994.
  2094. [RFC 1991] Atkins, D., W. Stallings, P. Zimmermann, "PGP Message
  2095. Exchange Formats", RFC 1991, MIT, Comp-Comm Consulting, Boulder
  2096. Software Engineering, August 1996.
  2097. [RFC 2052] Gulbrandsen, A., P. Vixie, "A DNS RR for specifying the
  2098. location of services (DNS SRV)", RFC 2052, Troll Technologies, Vixie
  2099. Enterprises, October 1996.
  2100. [X.500] "The Directory: Overview of Concepts, Models and Service",
  2101. CCITT Recommendation X.500, 1988.
  2102. Authors' Addresses
  2103. Scott Williamson (scottw@rwhois.net)
  2104. Mark Kosters (markk@internic.net)
  2105. David Blacka (davidb@rwhois.net)
  2106. Jasdip Singh (jasdips@rwhois.net)
  2107. Koert Zeilstra (kzeil@rwhois.net)
  2108. Postal Address:
  2109. 505 Huntmar Park Drive
  2110. Herndon, VA 22070-5100
  2111. Telephone: 703-742-0400
  2112. Williamson, et. al. Informational [Page 54]
  2113. RFC 2167 RWhois Protocol June 1997
  2114. Appendix A: Glossary Of Terms
  2115. ABNF: Augmented Backus-Naur Form. Refined version of BNF, defined in
  2116. [RFC 822]. See BNF.
  2117. Attribute: A named field and the smallest typed unit in a database
  2118. schema. See Database Schema.
  2119. Authority Area: An autonomous part of an RWhois tree. It is
  2120. associated and named after a particular piece of a hierarchy and is
  2121. able to state authoritatively whether or not an instance of
  2122. hierarchical data is present within the RWhois tree. See RWhois Tree.
  2123. Banner: A line sent by a server indicating which protocol versions it
  2124. supports and which directives are implemented. This line is issued by
  2125. the server after a connection is opened and as a response to the "-
  2126. rwhois" directive. See Directive and Response.
  2127. Base Class: A class from which all defined classes in a database
  2128. schema inherit attributes. See Attribute, Class, and Database Schema.
  2129. BNF: Backus-Naur Form. Language to precisely define the syntax of
  2130. protocols and computer languages.
  2131. Class: A collection of attributes. See Attribute.
  2132. Complete Replication: The process of replicating all of the data for
  2133. an authority area. See Replication.
  2134. Database Schema: A collection of all the classes forming an RWhois
  2135. database. See Class.
  2136. Directive: A command that a client sends to a server to set a control
  2137. parameter for the session, get the meta-information (class
  2138. definitions and SOA information) about an authority area, or get the
  2139. data in an authority area. See Class and SOA.
  2140. Guardian Class: A standard class that contains security information.
  2141. An object is guarded by containing a pointer to a guardian object.
  2142. See Class and Object.
  2143. Incremental Replication: The process of replicating the data that has
  2144. changed since the last replication for an authority area. See
  2145. Replication.
  2146. Info: The miscellaneous information that a server sends to a client.
  2147. Williamson, et. al. Informational [Page 55]
  2148. RFC 2167 RWhois Protocol June 1997
  2149. Lexically Hierarchical Label: A text string whose position in a
  2150. hierarchy is encoded in the string itself.
  2151. Link Referral: A pointer to another server that is further down an
  2152. RWhois tree. It is used to route a query down the tree. See Referral
  2153. and RWhois Tree.
  2154. Master Server: A server where the data is registered for an authority
  2155. area. It answers authoritatively to queries in the authority area.
  2156. It is also called a primary server. See Authority Area.
  2157. Namespace: A particular naming system defined by a set of rules
  2158. describing the format of a name. Alternately, all of the names
  2159. satisfying the rules.
  2160. Object: An instance of a class. It is data with a type of <class>.
  2161. See Class.
  2162. PGP: Pretty Good Privacy. An authentication and encryption scheme.
  2163. Primary Server: See Master Server.
  2164. Punt Referral: A pointer to another server that is further up an
  2165. RWhois tree. It is used to route a query up the tree. See Referral
  2166. and RWhois Tree.
  2167. Query: A command that a client sends to a server to access the data
  2168. in an authority area.
  2169. Query Routing: Redirecting a query to another server for resolution.
  2170. See Query.
  2171. Referral: A pointer to another server that is presumed to be closer
  2172. to the desired data. It is used to route a query. See Query Routing.
  2173. Referral Class: A standard class that contains referral information
  2174. for an authority area. See Class and Referral.
  2175. Replication: A server duplicating data from another server on a per-
  2176. authority area basis. See Authority Area.
  2177. Response: The information that a server returns to a client for a
  2178. directive. See Directive.
  2179. Result: The information that a server returns to a client for a
  2180. query. It can be either the accessed data or referrals to other
  2181. servers. See Query and Referral.
  2182. Williamson, et. al. Informational [Page 56]
  2183. RFC 2167 RWhois Protocol June 1997
  2184. RWhois Tree: A data information tree of RWhois servers where the data
  2185. is arranged hierarchically in the authority areas. See Authority
  2186. Area.
  2187. Schema: See Class.
  2188. Secondary Server: See Slave Server.
  2189. Slave Server: A server where the data is replicated from the master
  2190. server for an authority area. It also answers authoritatively to
  2191. queries in the authority area. It is also called a secondary server.
  2192. See Master Server.
  2193. SOA: Start Of Authority. Administrative variables, defined at the
  2194. master server, to control replication for an authority area. See
  2195. Master Server and Replication.
  2196. Appendix B: RWhois ABNF
  2197. This specification uses the Augmented Backus-Naur Form (ABNF)
  2198. notation, as defined in Section 2 of [RFC 822].
  2199. General Definitions
  2200. Lexical Tokens
  2201. alpha = "a".."z" / "A".."Z"
  2202. digit = "0".."9"
  2203. hex-digit = digit / "a".."f" / "A".. "F"
  2204. id-char = alpha / digit / "_" / "-"
  2205. any-char = <ASCII 1..255,
  2206. except LF (linefeed) and CR (carriage return)>
  2207. dns-char = alpha / digit / "-"
  2208. email-char = <see [RFC 822]>
  2209. space = " "
  2210. tab = <ASCII TAB (tab)>
  2211. lf = <ASCII LF (linefeed)>
  2212. cr = <ASCII CR (carriage return)>
  2213. crlf = cr lf
  2214. Grammar
  2215. year = 4digit
  2216. month = 2digit
  2217. day = 2digit
  2218. hour = 2digit
  2219. minute = 2digit
  2220. second = 2digit
  2221. Williamson, et. al. Informational [Page 57]
  2222. RFC 2167 RWhois Protocol June 1997
  2223. milli-second = 3digit
  2224. host-name = dns-char *(dns-char / ".")
  2225. email = 1*email-char "@" host-name
  2226. authority-area = (dns-char / ".") *(dns-char / "." / "/")
  2227. object-id = 1*id-char "." authority-area
  2228. host-port = (host-name / ip-address) ":" 1*5digit
  2229. ip-address = 1*3digit "." 1*3digit "." 1*3digit "." 1*3digit
  2230. class-name = 1*id-char
  2231. attribute-name = 1*id-char
  2232. attribute-value = 1*any-char
  2233. time-stamp = year month day hour minute second milli-second
  2234. on-off = "on" / "off"
  2235. Note that the time-stamp must be in the Greenwich Mean Time (GMT)
  2236. time zone.
  2237. response = ok-response crlf / error-response crlf / info-response
  2238. ok-response = "%ok"
  2239. error-response = "%error" space error-code space error-text
  2240. error-code = 3digit
  2241. error-text = 1*any-char
  2242. info-response = "%info" space "on" crlf *(*any-char crlf) "%info"
  2243. space "off" crlf
  2244. rwhois-banner = "%rwhois" space version-list space host-name
  2245. [space implementation] crlf
  2246. version-list = version *("," version)
  2247. version = version-number [":" capability-id]
  2248. / "V-1.5" ":" capability-id
  2249. version-number = "V-" 1*digit "." 1*digit
  2250. capability-id = response-id ":" extra-id
  2251. response-id = 6hex-digit
  2252. extra-id = 2hex-digit
  2253. implementation = 1*any-char
  2254. rwhois-protocol = client-sends / server-returns
  2255. client-sends = *(directives / rwhois-query)
  2256. server-returns = *(responses / rwhois-query-result)
  2257. directives = rwhois-dir / class-dir / directive-dir / display-dir /
  2258. holdconnect-dir / limit-dir / notify-dir / quit-dir /
  2259. register-dir / schema-dir / security-dir / soa-dir /
  2260. status-dir / xfer-dir / x-dir
  2261. Williamson, et. al. Informational [Page 58]
  2262. RFC 2167 RWhois Protocol June 1997
  2263. responses = rwhois-response / class-response/ directive-response/
  2264. display-response/ holdconnect-response/ limit-response/
  2265. notify-response/ quit-response/ register-response/
  2266. schema-response / security-response/ soa-response/
  2267. status-response/ xfer-response/ x-response
  2268. Required Directives
  2269. rwhois
  2270. rwhois-dir = "-rwhois" space version-number [space implementation]
  2271. crlf
  2272. rwhois-response = "%rwhois" space version space host-name
  2273. [space implementation] crlf
  2274. Optional Directives
  2275. class
  2276. class-dir = "-class" space authority-area *(space class-name) crlf
  2277. class-response = *class-record response
  2278. class-record = *class-line "%class" crlf
  2279. class-line = "%class" space class-name ":" "description" ":"
  2280. 1*any-char crlf
  2281. / "%class" space class-name ":" "version" ":" time-stamp crlf
  2282. / "%class" space class-name ":" meta-field ":" meta-value crlf
  2283. meta-field = 1*id-char
  2284. meta-value = 1*any-char
  2285. directive
  2286. directive-dir = "-directive" *(space directive-name)crlf
  2287. directive-name = 1*id-char
  2288. directive-response = *directive-record response
  2289. directive-record = "%directive" space "directive" ":"
  2290. directive-name crlf *directive-line "%directive" crlf
  2291. directive-line = "%directive" space "description" ":" 1*any-char crlf
  2292. / "%directive" space attribute-name ":" attribute-value crlf
  2293. Williamson, et. al. Informational [Page 59]
  2294. RFC 2167 RWhois Protocol June 1997
  2295. display
  2296. display-dir = "-display" crlf
  2297. / "-display" space display-name crlf
  2298. display-name = 1*id-char
  2299. display-response = *display-record response
  2300. display-record = "%display" space "name" ":" display-name crlf
  2301. *display-line "%display" crlf
  2302. display-line = "%display" space attribute-name ":" attribute-value
  2303. crlf
  2304. holdconnect
  2305. holdconnect-dir = "-holdconnect" space on-off crlf
  2306. holdconnect-response = response
  2307. limit
  2308. limit-dir = "-limit" space 1*digit crlf
  2309. limit-response = response
  2310. notify
  2311. notify-dir = "-notify" space "badref" space referral-query crlf
  2312. / "-notify" space "recurref" space referral-query crlf
  2313. / "-notify" space "update" space host-port ":" authority-area
  2314. crlf
  2315. / "-notify" space "inssec" space host-port ":" authority-area
  2316. crlf
  2317. / "-notify" space "delsec" space host-port ":" authority-area
  2318. crlf
  2319. referral-query = referral-url space [class-name space] query
  2320. notify-response = response
  2321. See the query section for the definitions of referral-url and query.
  2322. quit
  2323. quit-dir = "-quit" crlf
  2324. quit-response = response
  2325. Williamson, et. al. Informational [Page 60]
  2326. RFC 2167 RWhois Protocol June 1997
  2327. register
  2328. register-dir = register-on space "add" space maintainer-id crlf
  2329. register-add register-off
  2330. / register-on space "mod" space maintainer-id crlf
  2331. register-mod register-off
  2332. / register-on space "del" space maintainer-id crlf
  2333. register-del register-off
  2334. register-on = "-register" space "on"
  2335. register-off = "-register" space "off" crlf
  2336. register-add = 1*(register-line crlf)
  2337. register-mod = 1*(register-line crlf) "_NEW_" crlf
  2338. 1*(register-line crlf)
  2339. register-del = 1*(register-line crlf)
  2340. maintainer-id = email
  2341. register-line = attribute-name ":" attribute-value
  2342. register-on-response = response
  2343. register-off-response = "%register" space "ID" ":" object-id crlf
  2344. response
  2345. / "%register" space "Updated" ":" time-stamp crlf response
  2346. / response
  2347. schema
  2348. schema-dir = "-schema" space authority-area *(space class-name) crlf
  2349. schema-response = *schema-record response
  2350. schema-record = *schema-line "%schema" crlf
  2351. schema-line = "%schema" space class-name ":" attribute-name ":"
  2352. attribute-value crlf
  2353. security
  2354. security-dir = "-security" space "on" space direction space
  2355. security-method [space security-data] crlf security-payload
  2356. ["-security" space "off" crlf]
  2357. direction = "request" / "response"
  2358. security-method = "password" / "pgp" / 1*id-char
  2359. security-data = password-data / pgp-data / 1*any-char
  2360. password-data = 1*any-char
  2361. pgp-data = "signed" / "encrypt" [space key-id] / "signed-encrypt"
  2362. [space key-id]
  2363. security-payload = *(*any-char crlf)
  2364. security-response = response
  2365. Williamson, et. al. Informational [Page 61]
  2366. RFC 2167 RWhois Protocol June 1997
  2367. soa
  2368. soa-dir = "-soa" *(space authority-area) crlf
  2369. soa-response = *soa-record response
  2370. soa-record = *soa-line "%soa" crlf
  2371. soa-line = "%soa" space "authority" ":" authority-area crlf
  2372. / "%soa" space "ttl" ":" 1*digit crlf
  2373. / "%soa" space "serial" ":" time-stamp crlf
  2374. / "%soa" space "refresh" ":" 1*digit crlf
  2375. / "%soa" space "increment" ":" 1*digit crlf
  2376. / "%soa" space "retry" ":" 1*digit crlf
  2377. / "%soa" space "tech-contact" ":" email crlf
  2378. / "%soa" space "admin-contact" ":" email crlf
  2379. / "%soa" space "hostmaster" ":" email crlf
  2380. / "%soa" space "primary" ":" host-port crlf
  2381. / "%soa" space attribute-name ":" attribute-value crlf
  2382. status
  2383. status-dir = "-status" crlf
  2384. status-response = *status-line response
  2385. status-line = "%status" space "limit" ":" 1*digit crlf
  2386. / "%status" space "holdconnect" ":" on-off crlf
  2387. / "%status" space "forward" ":" on-off crlf
  2388. / "%status" space "authority" ":" 1*digit crlf
  2389. / "%status" space "display" ":" 1*any-char crlf
  2390. / "%status" space "contact" ":" email crlf
  2391. / "%status" space attribute-name ":" attribute-value crlf
  2392. xfer
  2393. xfer-dir = "-xfer" space authority-area *attribute-def
  2394. [space serial-number] crlf
  2395. attribute-def = [space "class=" class-name]
  2396. *(space "attribute=" attribute-name)
  2397. serial-number = time-stamp
  2398. xfer-response = *xfer-record response
  2399. xfer-record = *xfer-line "%xfer" crlf
  2400. xfer-line = "%xfer" space class-name ":" attribute-name ":"
  2401. attribute-value crlf
  2402. X
  2403. x-dir = "-X-" x-directive [space *[x-arguments]] crlf
  2404. x-directive = 1*id-char
  2405. x-arguments = *any-char
  2406. x-response = *(*any-char crlf) response
  2407. Williamson, et. al. Informational [Page 62]
  2408. RFC 2167 RWhois Protocol June 1997
  2409. Query
  2410. rwhois-query = [class-name space] query crlf
  2411. query = query-string / attribute-query / query bin-boolean query
  2412. query-char = <any-char, except """, space, tab>
  2413. quoted-query-char = query-char / space / tab / "
  2414. query-string = 1*query-char ["*"] / """ 1*quoted-query-char ["*"] """
  2415. attribute-query = attribute-name "=" query-string
  2416. bin-boolean = "and" / "or"
  2417. rwhois-query-result = *(query-record / referral-record) response
  2418. query-record = 1*query-line crlf
  2419. query-line = class-name ":" attribute-name [";" type-char] ":"
  2420. attribute-value crlf
  2421. type-char = "T" / "I" / "S"
  2422. referral-record = 1*(referral-line crlf)
  2423. referral-line = "%referral" space referral-url
  2424. referral-url = "rwhois" ":" "//" host-port "/" "auth-area="
  2425. authority-area
  2426. Appendix C: Error Codes
  2427. When a server fails to run a command (directive or query), it returns
  2428. an error response. The ABNF for an error response is as follows.
  2429. error-response = "%error" space error-code space error-text
  2430. error-code = 3digit
  2431. error-text = 1*any-char
  2432. An error text may be modified, but its meaning must remain the same.
  2433. The server may append additional information to it, for example
  2434. "%error 333 Not master for authority area: foobar.com".
  2435. Williamson, et. al. Informational [Page 63]
  2436. RFC 2167 RWhois Protocol June 1997
  2437. The following table describes the possible digits in the first,
  2438. second, and third positions of an error code.
  2439. XXX Description
  2440. 1XX Information only, no action required
  2441. 2XX Information, action required
  2442. 3XX Specific command error, retry that command or try another one
  2443. 4XX Serious for current command, may correct with another command
  2444. 5XX Fatal, must disconnect
  2445. X0X System wide, no specific command
  2446. X1X System wide, no specific command
  2447. X2X Registration error
  2448. X3X Specific command
  2449. X4X Specific command
  2450. X5X Specific command
  2451. X6X Extended message (version specific)
  2452. XXX Sequential order
  2453. The following table gives an ordered list of RWhois error codes.
  2454. These codes may be extended with implementation- specific codes. An
  2455. implementation- specific code must have a "6" in the second position.
  2456. Code Text
  2457. 120 Registration deferred
  2458. 130 Object not authoritative
  2459. 230 No objects found
  2460. 300 Not compatible with version
  2461. 320 Invalid attribute
  2462. 321 Invalid attribute syntax
  2463. 322 Required attribute missing
  2464. 323 Object reference not found
  2465. 324 Primary key not unique
  2466. 325 Failed to update outdated object
  2467. 330 Exceeded maximum objects limit
  2468. 331 Invalid limit
  2469. 332 Nothing to transfer
  2470. 333 Not master for authority area
  2471. 336 Object not found
  2472. 338 Invalid directive syntax
  2473. 340 Invalid authority area
  2474. 341 Invalid class
  2475. 342 Invalid host/port
  2476. 350 Invalid query syntax
  2477. 351 Query too complex
  2478. 352 Invalid security method
  2479. 353 Authentication failed
  2480. 354 Encryption failed
  2481. 400 Directive not available
  2482. 401 Not authorized for directive
  2483. Williamson, et. al. Informational [Page 64]
  2484. RFC 2167 RWhois Protocol June 1997
  2485. 402 Unidentified error
  2486. 420 Registration not authorized
  2487. 436 Invalid display format
  2488. 500 Memory allocation problem
  2489. 501 Service not available
  2490. 502 Unrecoverable error
  2491. 503 Idle time exceeded
  2492. The following error codes, defined in [RFC 1714], have been made
  2493. obsolete: 100, 200, 231, 334, 335, 337, 421, 431, 432, 433, 434,
  2494. 460, 461, and 530.
  2495. Appendix D: Capability ID
  2496. The capability ID encodes which directives are implemented in the
  2497. server. To create a capability ID, perform a logical OR on all the
  2498. hexadecimal numbers corresponding to the implemented directives. The
  2499. resulting number is used in the banner, which is sent by the server
  2500. after opening a connection and as a response to the "-rwhois"
  2501. directive. The eight most significant bits of the capability ID are
  2502. reserved for future use:
  2503. class 000001h
  2504. directive 000002h
  2505. display 000004h
  2506. forward 000008h
  2507. holdconnect 000010h
  2508. limit 000020h
  2509. notify 000040h
  2510. quit 000080h
  2511. register 000100h
  2512. schema 000200h
  2513. security 000400h
  2514. soa 000800h
  2515. status 001000h
  2516. xfer 002000h
  2517. X 004000h
  2518. Williamson, et. al. Informational [Page 65]
  2519. RFC 2167 RWhois Protocol June 1997
  2520. Appendix E: Schema Definitions
  2521. Attribute Definition Model
  2522. Name Type Description
  2523. Attribute N This is the name of the attribute.
  2524. Description S This is a free-form description of the attribute.
  2525. Type T This is a parameter that broadly indicates the use
  2526. of the attribute to the protocol. There are three
  2527. standard types: TEXT, ID, and SEE-ALSO. The default
  2528. is TEXT, which indicates that the value is a text
  2529. string. ID indicates that the attribute contains
  2530. the ID of another RWhois object. This type of
  2531. attribute is used for database normalization. SEE-
  2532. ALSO indicates that the attribute contains a pointer
  2533. (a Uniform Resource Identifier (URI)) to some other
  2534. kind of external data; for example, a World Wide Web
  2535. page or FTP site.
  2536. Format S This is an interpretable string that describes the
  2537. acceptance format of the value. The server (and
  2538. optionally the client) should match the value to the
  2539. format string to determine if the value is
  2540. acceptable. The format of this property is a
  2541. keyword indicating the syntax of the format string,
  2542. followed by a colon, followed by the format string
  2543. itself. Currently, the only keyword recognized is
  2544. "re" for POSIX.2 extended regular expressions.
  2545. Indexed B This is a true or false flag that indicates that
  2546. this attribute should be indexed (and therefore able
  2547. to be searched).
  2548. Required B This is a true or false flag that indicates that
  2549. this attribute must have a value.
  2550. Multi-Line B This is a true or false flag that indicates that
  2551. this attribute may have multiple instances in an
  2552. object; all the instances are to be considered as
  2553. multiple lines of the same attribute instance.
  2554. Williamson, et. al. Informational [Page 66]
  2555. RFC 2167 RWhois Protocol June 1997
  2556. Repeatable B This is a true or false flag that indicates that
  2557. there may be multiple instances of this attribute in
  2558. a class and each instance is to be interpreted as a
  2559. separate instance (in contrast to Multi-Line). This
  2560. flag is mutually exclusive with Multi-Line: if
  2561. Multi-Line is true, then Repeatable must be false
  2562. and vice versa.
  2563. Primary B This is a true or false flag that indicates that
  2564. this attribute is a primary key. If more than one
  2565. attribute in a class is marked as primary, then
  2566. these attributes together form a single primary key.
  2567. The primary key is intended to be used to force
  2568. uniqueness among class instances. Therefore, there
  2569. can be only one instance of a primary key in a
  2570. database. The Primary flag implies that the
  2571. attribute is also required.
  2572. Hierarchical B This is a true or false flag that indicates that
  2573. this attribute is lexically hierarchical.
  2574. Private B This is a true or false flag that indicates whether
  2575. or not this attribute is private (that is, publicly
  2576. not viewable). It defaults to false. If it is true,
  2577. then only the clients that satisfy the
  2578. authentication/encryption requirements of a guardian
  2579. are able to view the attribute-value pair.
  2580. Williamson, et. al. Informational [Page 67]
  2581. RFC 2167 RWhois Protocol June 1997
  2582. Type is defined as follows:
  2583. Type ABNF Definition
  2584. B "ON" / "OFF"
  2585. N 1*id-char
  2586. S 1*any-char
  2587. T "ID" / "SEE-ALSO" / "TEXT"
  2588. Base Class
  2589. Name Type Required RepeatableDescription
  2590. Class-Name TEXT Y N This attribute is the name of the
  2591. class to which the object
  2592. belongs.
  2593. Auth-Area TEXT Y N This attribute is the name of the
  2594. authority area to which the
  2595. object belongs.
  2596. ID TEXT Y N This attribute is the universal
  2597. identifier of the object.
  2598. Updated TEXT Y N This attribute is a time/date
  2599. stamp that indicates the time of
  2600. last modification of the object.
  2601. Guardian ID N Y This attribute is a link to a
  2602. guardian object. Its value is the
  2603. ID of a guardian object.
  2604. Private TEXT N N This attribute is a true or false
  2605. flag that indicates whether or
  2606. not an object is private (that
  2607. is, publicly not viewable). It
  2608. defaults to false. If it is
  2609. true, then only the clients
  2610. that satisfy the
  2611. authentication/encryption
  2612. requirements of one of the
  2613. object's guardians are able to
  2614. view the object. If the object
  2615. is publicly viewable, then the
  2616. Private attribute property of
  2617. each of its attributes still
  2618. applies.
  2619. Williamson, et. al. Informational [Page 68]
  2620. RFC 2167 RWhois Protocol June 1997
  2621. TTL TEXT N N This attribute is the
  2622. "time-to-live" of a given object.
  2623. It is included only if an object
  2624. has a different time-to-live than
  2625. the default given in the Start of
  2626. Authority information. Its value
  2627. is specified in seconds.
  2628. Appendix F: Changes RWhois V1.0 - V1.5
  2629. General
  2630. * Multiple authority areas per server.
  2631. * Data replication.
  2632. * Revised schema model.
  2633. * Revised query routing rules.
  2634. * Revised error codes.
  2635. * Removed unnecessary spaces in responses and results.
  2636. Directives
  2637. * Class: New. Returns meta-information for a class.
  2638. * Display: Can return supported display formats.
  2639. * Load: Obsolete.
  2640. * Notify: Syntax change.
  2641. * Private: Obsolete.
  2642. * Register: Syntax change.
  2643. * Schema: Syntax change.
  2644. * Security: Obsoletes Private.
  2645. * Xfer: Syntax change.
  2646. Query
  2647. * Display option removed.
  2648. * Output format: Only the dump format is standard; optional type
  2649. character added.
  2650. * Attribute-restricted query.
  2651. * Revised referral syntax.
  2652. Williamson, et. al. Informational [Page 69]