No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0309.xml 18KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Service Directories</title>
  10. <abstract>This specification shows how to combine and extend a number of existing XMPP protocols for improved sharing of information about XMPP servers.</abstract>
  12. <number>0309</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>NOT_YET_ASSIGNED</shortname>
  23. &stpeter;
  24. <revision>
  25. <version>0.3</version>
  26. <date>2012-05-29</date>
  27. <initials>psa</initials>
  28. <remark><p>Corrected a number of details in the text, examples, and XMPP Registrar considerations; removed an extraneous section that is better contained in XEP-0267.</p></remark>
  29. </revision>
  30. <revision>
  31. <version>0.2</version>
  32. <date>2012-01-25</date>
  33. <initials>psa</initials>
  34. <remark><p>Added vCard extension for certification authority information; showed how to include software name in a vCard; recommended that the CA information and software name be added by the service directory, not included by the server itself.</p></remark>
  35. </revision>
  36. <revision>
  37. <version>0.1</version>
  38. <date>2012-01-10</date>
  39. <initials>psa</initials>
  40. <remark><p>Initial published version.</p></remark>
  41. </revision>
  42. <revision>
  43. <version>0.0.3</version>
  44. <date>2012-01-09</date>
  45. <initials>psa</initials>
  46. <remark><p>Defined ad-hoc command for triggering outbound presence subscription.</p></remark>
  47. </revision>
  48. <revision>
  49. <version>0.0.2</version>
  50. <date>2012-01-09</date>
  51. <initials>psa</initials>
  52. <remark><p>Defined data sharing via PEP.</p></remark>
  53. </revision>
  54. <revision>
  55. <version>0.0.1</version>
  56. <date>2011-12-12</date>
  57. <initials>psa</initials>
  58. <remark><p>First draft.</p></remark>
  59. </revision>
  60. </header>
  61. <section1 topic='Introduction' anchor='introduction'>
  62. <p>Several directories (e.g., at and have long provided information about public XMPP services so that end users can more easily find servers to register with, add-on components to use for features such as &xep0045;, etc. These service directories tend to rely on humans to gather and in some cases verify the information they publish before providing it via the World Wide Web or the XMPP network for use by end users and IM client software. However, relying on humans to gather and verify such information can result in significant delays and errors. It would be better to automate the information-gathering functions as much as possible.</p>
  63. <p>This document shows how to combine and extend a number of existing XMPP protocols for (mostly) automated gathering of information about public XMPP services. Widespread deployment of this specification will result in more timely, accurate information about the services available on the XMPP network.</p>
  64. </section1>
  65. <section1 topic='Gathering Information' anchor='gather'>
  66. <p>The following scenario involves two entities:</p>
  67. <ul>
  68. <li>A server directory:</li>
  69. <li>A public XMPP service:</li>
  70. </ul>
  71. <p>Note: Although the entity that gathers information for a directory could be a client or a component, here we assume that it is a server ("").</p>
  72. <p>These two entities use &xep0267;, &xep0030;, and &xep0292; in the following ways.</p>
  73. <code><![CDATA[
  74. Directory Service
  75. ( (
  76. | |
  77. | [first, server learns |
  78. | identity of directory] |
  79. | |
  80. |<---disco info request-------|
  81. |----disco info response----->|
  82. | |
  83. | [second, entities become |
  84. | "buddies" per XEP-0267] |
  85. | |
  86. |<---presence subscribe-------|
  87. |----presence subscribed----->|
  88. |----presence subscribe------>|
  89. |<---presence subscribed------|
  90. | |
  91. | [third, directory |
  92. | gathers server data] |
  93. | |
  94. |----disco info request------>|
  95. |<---disco info response------|
  96. | |
  97. |----vcard request----------->|
  98. |<---vcard response-----------|
  99. | |
  100. ]]></code>
  101. <section2 topic='Server Discovers Directory' anchor='gather-disco'>
  102. <p>In order to determine the exact identity of the directory, the server sends a service discovery information request to the directory.</p>
  103. <example caption='Server Queries Directory'><![CDATA[
  104. <iq type='get'
  105. from=''
  106. to=''
  107. id='xh1f37n5'>
  108. <query xmlns=''/>
  109. </iq>
  110. ]]></example>
  111. <example caption='Directory Returns Disco Info'><![CDATA[
  112. <iq type='result'
  113. from=''
  114. to=''
  115. id='xh1f37n5'>
  116. <query xmlns=''>
  117. <identity category='directory' type='server'/>
  118. <feature var=''/>
  119. <feature var=''/>
  120. <feature var='urn:xmpp:server-presence'/>
  121. </query>
  122. </iq>
  123. ]]></example>
  124. <p>Note: Inclusion of the "directory/server" identity indicates that is a service directory.</p>
  125. </section2>
  126. <section2 topic='Service Subscribes to Directory' anchor='gather-buddy'>
  127. <p>If the service wishes to have its information aggregated, it sends a presence subscription request to the directory as described in XEP-0267.</p>
  128. <example caption="Service Sends Subscription Request to Directory"><![CDATA[
  129. <presence from=''
  130. to=''
  131. type='subscribe'/>
  132. ]]></example>
  133. <p>Upon receiving the presence subscription request, the directory approves it.</p>
  134. <example caption="Directory Sends Approval to Server"><![CDATA[
  135. <presence from=''
  136. to=''
  137. type='subscribed'/>
  138. ]]></example>
  139. <p>The directory also sends a subscription request to the server.</p>
  140. <example caption="Directory Sends Subscription Request to Server"><![CDATA[
  141. <presence from=''
  142. to=''
  143. type='subscribe'/>
  144. ]]></example>
  145. <p>The service then approves that subscription request, as well.</p>
  146. <example caption="Service Sends Approval to Directory"><![CDATA[
  147. <presence from=''
  148. to=''
  149. type='subscribed'/>
  150. ]]></example>
  151. </section2>
  152. <section2 topic='Directory Queries Server' anchor='gather-query'>
  153. <p>After the subscription handshake has been completed, the directory queries the server for information. There are two aspects: service discovery ("disco") information and vCard information.</p>
  154. <section3 topic='Disco Query' anchor='gather-query-disco'>
  155. <p>In order to determine the exact identity of the server, the directory sends a service discovery information request to the server.</p>
  156. <example caption='Directory Queries Server'><![CDATA[
  157. <iq type='get'
  158. from=''
  159. to=''
  160. id='i3vs51b9'>
  161. <query xmlns=''/>
  162. </iq>
  163. ]]></example>
  164. <example caption='Server Returns Disco Info'><![CDATA[
  165. <iq type='result'
  166. from=''
  167. to=''
  168. id='i3vs51b9'>
  169. <query xmlns=''>
  170. <identity category='server' type='im'/>
  171. <feature var=''/>
  172. <feature var=''/>
  173. <feature var='jabber:iq:register'/>
  174. <feature var='urn:xmpp:server-presence'/>
  175. <feature var='urn:xmpp:public-server'/>
  176. </query>
  177. </iq>
  178. ]]></example>
  179. <p>Note: If the server is a public node on the XMPP network, it includes a service discovery feature of "urn:xmpp:public-server". This feature is defined below.</p>
  180. <p>Note: If the server allows &xep0077;, it includes a service discovery feature of "jabber:iq:register". If the server does not allow in-band registration but allows account registration at a website, it includes the registration URL in its vCard as described below.</p>
  181. <p>The foregoing examples show the gathering of disco#info data (identity and supported features). A directory MAY also gather disco#items data about components and other services associated with the base XMPP service at a domain.</p>
  182. </section3>
  183. <section3 topic='vCard Query' anchor='gather-query-vcard'>
  184. <p>In order to gather additional information about the server, the directory sends a vCard information request to the server.</p>
  185. <p>Note: Because vCard4 enables the XMPP community to more easily define extensions to vCard (e.g., for registration URLs), it is RECOMMENDED for servers to support &xep0292; in addition to, or instead of, &xep0054;.</p>
  186. <example caption="Directory Requests vCard Data from Server"><![CDATA[
  187. <iq from=''
  188. id='lw71bs73'
  189. to=''
  190. type='get'>
  191. <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/>
  192. </iq>
  193. ]]></example>
  194. <example caption="Server Returns vCard Data"><![CDATA[
  195. <iq from=''
  196. id='lw71bs73'
  197. to=''
  198. type='result'>
  199. <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'>
  200. <fn><text> IM service</text></fn>
  201. <url><uri></uri></url>
  202. <lang>
  203. <parameters><pref>1</pref></parameters>
  204. <language-tag>en</language-tag>
  205. </lang>
  206. <adr>
  207. <region>IA</region>
  208. <country>US</country>
  209. </adr>
  210. <email><text></text></email>
  211. <impp><uri></uri></impp>
  212. <logo><uri></uri></logo>
  213. <geo><uri>geo:42.25,-91.05</uri></geo>
  214. <tz><text>America/Chicago</text></tz>
  215. <kind><text>application</text></kind>
  216. <registration xmlns='urn:xmpp:vcard:registration:1'>
  217. <uri></uri>
  218. </registration>
  219. </vcard>
  220. </iq>
  221. ]]></example>
  222. <p>It is RECOMMENDED for public server vCards to include the following information:</p>
  223. <ul>
  224. <li>A friendly name for the service (&lt;fn/&gt;)</li>
  225. <li>A URL for general information about the service (&lt;url/&gt;)</li>
  226. <li>The country where the service is located (&lt;adr&gt;&lt;country/&gt;&lt;/adr&gt;)</li>
  227. <li>An email address or alias for contacting the administrators (&lt;email/&gt;)</li>
  228. <li>The XMPP address for the service (&lt;impp/&gt;)</li>
  229. <li>A vCard KIND of "application" (&lt;kind&gt;&lt;text&gt;application&lt;/text&gt;&lt;/kind&gt;) as defined in &rfc6473;</li>
  230. </ul>
  231. <p>It is OPTIONAL for public server vCards to include the following information:</p>
  232. <ul>
  233. <li>Preferred language of communication with the administrators (&lt;lang/&gt;)</li>
  234. <li>Region where the service is located (&lt;adr&gt;&lt;region/&gt;&lt;/adr&gt;)</li>
  235. <li>Logo for the service (&lt;logo/&gt;)</li>
  236. <li>Geographical coordinates for the service (&lt;geo/&gt;)</li>
  237. <li>Registration URI (&lt;registration xmlns='urn:xmpp:vcard:registration:1'/&gt; and its &lt;uri/&gt; child)</li>
  238. <li>Certification authority name and URI (&lt;ca xmlns='urn:xmpp:vcard:ca:0'/&gt; and its &lt;name/&gt; and &lt;uri/&gt; children)</li>
  239. <li>Software name (&lt;name/&gt; element qualified by the 'jabber:iq:version' namespace defined in &xep0092;)</li>
  240. </ul>
  241. <p>It is best for the server directory to discover the last two elements in-band (by means of TLS negotiation and software version, respectively), then add them to the contact vCard as described in the next section.</p>
  242. </section3>
  243. </section2>
  244. </section1>
  245. <section1 topic='Publishing Information' anchor='publish'>
  246. <p>Currently, service directories such as and publish their information on the World Wide Web, typically at a human-friendly website and sometimes also by means of machine-readable files at a well-known URI for use by IM clients to pre-populate drop-down boxes showing XMPP servers that allow in-band registration. (For example, the service publishes a file listing registered public servers using the &xep0030; format.)</p>
  247. <p>In addition to publishing such information on the web, this document defines a second publishing path: the XMPP network itself. The directory can do this by creating a public &xep0060; node at the directory's bare domain (e.g., that pushes data in the vCard4 format, as described more fully in XEP-0292. Other entities can then subscribe to this node to receive updated information about services that are added to or removed from the directory.</p>
  248. <p>For example, the following stanza shows an information push from the directory about the service, sent to a subscriber at</p>
  249. <example caption='Directory Pushes Server Data to Subscriber'><![CDATA[
  250. <message from=''
  251. to=''
  252. type='headline'
  253. id='hx61cs8k'>
  254. <event xmlns=''>
  255. <items node='urn:xmpp:contacts'>
  256. <item id='3B55FBC7-8149-4693-A1A1-5367E2A49C83'>
  257. <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'>
  258. <fn><text> IM service</text></fn>
  259. <url><uri></uri></url>
  260. <lang>
  261. <parameters><pref>1</pref></parameters>
  262. <language-tag>en</language-tag>
  263. </lang>
  264. <adr>
  265. <region>IA</region>
  266. <country>US</country>
  267. </adr>
  268. <email><text></text></email>
  269. <impp><uri></uri></impp>
  270. <logo><uri></uri></logo>
  271. <geo><uri>geo:42.25,-91.05</uri></geo>
  272. <tz><text>America/Chicago</text></tz>
  273. <kind><text>application</text></kind>
  274. <registration xmlns='urn:xmpp:vcard:registration:1'>
  275. <uri></uri>
  276. </registration>
  277. <ca xmlns='urn:xmpp:vcard:ca:0'>
  278. <name>StartSSL</uri>
  279. <uri></uri>
  280. </ca>
  281. <name xmlns='jabber:iq:version'>Isode M-Link</name>
  282. </vcard>
  283. </item>
  284. </items>
  285. </event>
  286. </message>
  287. ]]></example>
  288. </section1>
  289. <section1 topic='Security Considerations' anchor='security'>
  290. <p>Because a service directory does not know about an XMPP service unless the administrator of the service initiates a presence subscription to the directory, information leakage is minimized.</p>
  291. <p>Use of the "urn:xmpp:public-server" service discovery feature provides a way for an XMPP server to explicitly indicate that its information is public.</p>
  292. <p>Use of the "directory/server" service discovery identity provides a way for a service directory to explicitly indicate that it gathers service information obtained from XMPP servers that contact it.</p>
  293. </section1>
  294. <section1 topic='IANA Considerations' anchor='iana'>
  295. <p>This document requires no interaction with &IANA;.</p>
  296. </section1>
  297. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  298. <section2 topic='Protocol Namespaces' anchor='registrar-namespaces'>
  299. <p>This document registers the following XML namespaces:</p>
  300. <ul>
  301. <li>'urn:xmpp:vcard:registration:1' (used to qualify the XMPP-specific vCard4 extension for account registration URLs)</li>
  302. <li>'urn:xmpp:vcard:ca:0' (used to qualify the XMPP-specific vCard4 extension for information about certification authorities)</li>
  303. </ul>
  304. <p>The XMPP Registrar shall add these namespaces to its registry at &NAMESPACES;.</p>
  305. </section2>
  306. <section2 topic='Service Discovery Category/Type' anchor='registrar-discocat'>
  307. <p>This document specifies that a service directory is identified by the "directory" category and the "server" type within XMPP Service Discovery.</p>
  308. <p>The XMPP Registrar shall add the "server" type to the "directory" category already listed in the registry at &DISCOCATEGORIES;. The registration is as follows.</p>
  309. <code caption='Registry Submission'><![CDATA[
  310. <category>
  311. <name>directory</name>
  312. <type>
  313. <name>server</name>
  314. <desc>A directory of XMPP servers</desc>
  315. <doc>XEP-0309</doc>
  316. </type>
  317. </category>
  318. ]]></code>
  319. </section2>
  320. <section2 topic='Service Discovery Features' anchor='registrar-features'>
  321. <p>This document specifies that a public server on the XMPP network is identified by the "urn:xmpp:public-server" Service Discovery feature.</p>
  322. <p>The XMPP Registrar shall add this feature to its registry at &DISCOFEATURES;. The registration is as follows.</p>
  323. <code caption='Registry Submission'><![CDATA[
  324. <var>
  325. <name>urn:xmpp:public-server</name>
  326. <desc>The server is a public node on the XMPP network</desc>
  327. <doc>XEP-0309</doc>
  328. </var>
  329. ]]></code>
  330. </section2>
  331. </section1>
  332. <section1 topic='XML Schema' anchor='schema'>
  333. <section2 topic='Registration URI' anchor='schema-reg'>
  334. <code><![CDATA[
  335. <?xml version='1.0' encoding='UTF-8'?>
  336. <xs:schema
  337. xmlns:xs=''
  338. targetNamespace='urn:xmpp:vcard:registration:1'
  339. xmlns='urn:xmpp:vcard:registration:1'
  340. elementFormDefault='qualified'>
  341. <xs:element name='registration'>
  342. <xs:complexType>
  343. <xs:sequence>
  344. <xs:element name='uri' type='xs:anyURI'/>
  345. </xs:choice>
  346. </xs:complexType>
  347. </xs:element>
  348. </xs:schema>
  349. ]]></code>
  350. </section2>
  351. <section2 topic='Certification Authority Information' anchor='schema-ca'>
  352. <code><![CDATA[
  353. <?xml version='1.0' encoding='UTF-8'?>
  354. <xs:schema
  355. xmlns:xs=''
  356. targetNamespace='urn:xmpp:vcard:ca:0'
  357. xmlns='urn:xmpp:vcard:ca:0'
  358. elementFormDefault='qualified'>
  359. <xs:element name='ca'>
  360. <xs:complexType>
  361. <xs:sequence>
  362. <xs:element name='name' type='xs:string'/>
  363. <xs:element name='uri' type='xs:anyURI'/>
  364. </xs:choice>
  365. </xs:complexType>
  366. </xs:element>
  367. </xs:schema>
  368. ]]></code>
  369. </section2>
  370. </section1>
  371. </xep>