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-0267.xml 11KB

  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>Server Buddies</title>
  10. <abstract>This specification defines a convention for presence subscriptions between XMPP servers.</abstract>
  12. <number>0267</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. <author>
  24. <firstname>Artur</firstname>
  25. <surname>Hefczyc</surname>
  26. <email></email>
  27. <jid></jid>
  28. </author>
  29. <author>
  30. <firstname>Florian</firstname>
  31. <surname>Jensen</surname>
  32. <email></email>
  33. <jid></jid>
  34. </author>
  35. <author>
  36. <firstname>Mickaël</firstname>
  37. <surname>Rémond</surname>
  38. <email></email>
  39. <jid></jid>
  40. </author>
  41. &stpeter;
  42. <author>
  43. <firstname>Matthew</firstname>
  44. <surname>Wild</surname>
  45. <email></email>
  46. <jid></jid>
  47. </author>
  48. <revision>
  49. <version>0.5</version>
  50. <date>2012-05-29</date>
  51. <initials>psa</initials>
  52. <remark><p>Corrected several examples and points in the text.</p></remark>
  53. </revision>
  54. <revision>
  55. <version>0.4</version>
  56. <date>2011-12-12</date>
  57. <initials>psa</initials>
  58. <remark><p>Noted that sending server can be derived from 'to' address on IQ stanza, so removed serverjid field from FORM_TYPE; defined method for determining support; added further XMPP Registrar Considerations.</p></remark>
  59. </revision>
  60. <revision>
  61. <version>0.3</version>
  62. <date>2011-12-12</date>
  63. <initials>psa</initials>
  64. <remark><p>Updated ad-hoc command with field for the sending server; added XMPP Registrar Considerations.</p></remark>
  65. </revision>
  66. <revision>
  67. <version>0.2</version>
  68. <date>2011-12-09</date>
  69. <initials>psa</initials>
  70. <remark><p>Defined ad-hoc command for admin generation of outbound presence subscription; added security considerations.</p></remark>
  71. </revision>
  72. <revision>
  73. <version>0.1</version>
  74. <date>2009-04-30</date>
  75. <initials>psa</initials>
  76. <remark><p>Initial published version.</p></remark>
  77. </revision>
  78. <revision>
  79. <version>0.0.1</version>
  80. <date>2009-04-30</date>
  81. <initials>ah/fj/psa/mr/mw</initials>
  82. <remark><p>First draft, split from the incident reporting proposal.</p></remark>
  83. </revision>
  84. </header>
  85. <section1 topic='Description' anchor='description'>
  86. <p>In XMPP, rosters and presence subscriptions have been used to date only among IM users (see &xmppim;). However, nothing prevents the application of these concepts to other XMPP entities, such as components and servers. Given that a presence subscription typically indicates some level of trust in a peer, server deployments can use the sharing of XMPP presence information as a way to indicate that a given server has a trust relationship with a peer server (informally, we can say that the two servers consider each other "buddies"). The server might then share certain kinds of additional information only with its trusted peers, for example &xep0268; and &xep0275;. The server buddy relationship can also be leveraged for additional functionality, such as &xep0309;</p>
  87. <p>To establish such a trust relationship with a peer, a server sends a presence subscription request to the peer, just as is done between XMPP users.</p>
  88. <example caption="Service sends subscription request to peer"><![CDATA[
  89. <presence from='montague.lit'
  90. to='capulet.lit'
  91. type='subscribe'/>
  92. ]]></example>
  93. <p>A server MUST NOT send such a presence subscription request unless explicitly requested to do so by a server administrator (see below).</p>
  94. <p>Upon receiving such a presence subscription request, the XMPP server software running at the peer shall either prompt the server administrator to approve the request or (if explicitly configured to accept subscriptions requests) automatically approve it. (A future version of this specification might define an approval method based on &xep0004;.)</p>
  95. <p>If the request is approved, the peer server then informs the originating server that the request has been approved.</p>
  96. <example caption="Peer sends approval to server"><![CDATA[
  97. <presence from='capulet.lit'
  98. to='montague.lit'
  99. type='subscribed'/>
  100. ]]></example>
  101. <p>The peer SHOULD also send a subscription request to the originating server.</p>
  102. <example caption="Peer sends subscription request to server"><![CDATA[
  103. <presence from='capulet.lit'
  104. to='montague.lit'
  105. type='subscribe'/>
  106. ]]></example>
  107. <p>The originating server would then approve that subscription request.</p>
  108. <example caption="Service sends approval to peer"><![CDATA[
  109. <presence from='montague.lit'
  110. to='capulet.lit'
  111. type='subscribed'/>
  112. ]]></example>
  113. <p>If an XMPP server implementation supports this usage of presence subscriptions, it MUST keep a list of approved entities, which we denote a "server roster". The implementation MAY use that roster for access control purposes defined in other specifications.</p>
  114. </section1>
  115. <section1 topic='Ad-Hoc Command' anchor='command'>
  116. <p>This section defines an &xep0050; node scoped by the &xep0068; FORM_TYPE specified in &xep0133;. Upon advancement of this specification to Draft, this section ought to be moved to XEP-0133.</p>
  117. <p>The command node for this use case SHOULD be "".</p>
  118. <p>A sample protocol flow for this use case is shown below.</p>
  119. <example caption='Admin Subscribes Service to Peer Server'><![CDATA[
  120. <iq from='bard@shakespeare.lit/globe'
  121. id='nrw51vs8'
  122. to='shakespeare.lit'
  123. type='set'
  124. xml:lang='en'>
  125. <command xmlns=''
  126. action='execute'
  127. node=''/>
  128. </iq>
  129. ]]></example>
  130. <p>Unless an error occurs (see the "Error Handling" section of XEP-0133), the service SHOULD return the appropriate form.</p>
  131. <example caption='Service Returns Server Buddy Form to Admin'><![CDATA[
  132. <iq from='shakespeare.lit'
  133. id='nrw51vs8'
  134. to='bard@shakespeare.lit/globe'
  135. type='result'
  136. xml:lang='en'>
  137. <command xmlns=''
  138. node=''
  139. sessionid='server-buddy:20040408T0337Z'
  140. status='executing'>
  141. <x xmlns='jabber:x:data' type='form'>
  142. <title>Subscribing to a Peer Server</title>
  143. <instructions>Fill out this form to subscribe your server to a peer server.</instructions>
  144. <field type='hidden' var='FORM_TYPE'>
  145. <value></value>
  146. </field>
  147. <field label='The domain name of the peer server'
  148. type='jid-single'
  149. var='peerjid'>
  150. <required/>
  151. </field>
  152. </x>
  153. </command>
  154. </iq>
  155. ]]></example>
  156. <p>Note: In virtual hosting environments, the server can determine the domain name from which to send the presence subscription based on the 'to' address of the &IQ; stanza.</p>
  157. <example caption='Admin Submits Server Buddy Form to Service'><![CDATA[
  158. <iq from='bard@shakespeare.lit/globe'
  159. id='lk2vs82g'
  160. to='shakespeare.lit'
  161. type='set'
  162. xml:lang='en'>
  163. <command xmlns=''
  164. node=''
  165. sessionid='server-buddy:20040408T0337Z'>
  166. <x xmlns='jabber:x:data' type='submit'>
  167. <field type='hidden' var='FORM_TYPE'>
  168. <value></value>
  169. </field>
  170. <field var='peerjid'>
  171. <value>marlowe.lit</value>
  172. </field>
  173. </x>
  174. </command>
  175. </iq>
  176. ]]></example>
  177. <example caption='Service Informs Admin of Completion'><![CDATA[
  178. <iq from='shakespeare.lit'
  179. id='lk2vs82g'
  180. to='bard@shakespeare.lit/globe'
  181. type='result'
  182. xml:lang='en'>
  183. <command xmlns=''
  184. node=''
  185. sessionid='server-buddy:20040408T0337Z'
  186. status='completed'/>
  187. </iq>
  188. ]]></example>
  189. <p>Notification of completion MAY include the processed data in a data form of type "result".</p>
  190. </section1>
  191. <section1 topic='Determining Support' anchor='support'>
  192. <p>To advertise its support for the server buddy feature, when replying to service discovery information ("disco#info") requests a server MUST return a URN of "urn:xmpp:server-presence".</p>
  193. <example caption="Service discovery information request"><![CDATA[
  194. <iq from=''
  195. id='uw72g176'
  196. to=''
  197. type='get'>
  198. <query xmlns=''/>
  199. </iq>
  200. ]]></example>
  201. <example caption="Service discovery information response"><![CDATA[
  202. <iq from=''
  203. id='uw72g176'
  204. to=''
  205. type='result'>
  206. <query xmlns=''>
  207. <feature var='urn:xmpp:server-presence'/>
  208. </query>
  209. </iq>
  210. ]]></example>
  211. </section1>
  212. <section1 topic='Security Considerations' anchor='security'>
  213. <p>Because server "buddies" might be granted greater privileges than unknown peers, care should be taken in sending or approving presence subscription requests. In particular, a server MUST NOT send a presence subscription request unless explicitly requested to do so by a server administrator.</p>
  214. </section1>
  215. <section1 topic='IANA Considerations' anchor='iana'>
  216. <p>This document requires no interaction with &IANA;.</p>
  217. </section1>
  218. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  219. <section2 topic='Service Discovery Features' anchor='registrar-features'>
  220. <code caption='Registry Submission'><![CDATA[
  221. <var>
  222. <name>urn:xmpp:server-presence</name>
  223. <desc>Support for subscriptions to server presence</desc>
  224. <doc>XEP-0267</doc>
  225. </var>
  226. ]]></code>
  227. </section2>
  228. <section2 topic='Field Standardization' anchor='registrar-formtype'>
  229. <p>&xep0068; defines a process for standardizing the fields used within Data Forms scoped by a particular namespace. This registration adds two more reserved fields to the '' namespace defined in XEP-0133.</p>
  230. <code caption='Registry Submission'><![CDATA[
  231. <form_type>
  232. <name></name>
  233. <field var='peerjid'
  234. type='jid-single'
  235. label='The Jabber ID of a peer server'/>
  236. </form_type>
  237. ]]></code>
  238. </section2>
  239. </section1>
  240. <section1 topic='Acknowledgements' anchor='ack'>
  241. <p>Thanks to Kim Alvefur, Waqas Hussain, and Tobias Markmann for their feedback.</p>
  242. </section1>
  243. </xep>