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-0253.xml 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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>PubSub Chaining</title>
  10. <abstract>This specification defines a method for chaining pubsub nodes together, resulting in lightweight repeaters for pubsub notifications.</abstract>
  11. &LEGALNOTICE;
  12. <number>0253</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. <spec>XEP-0050</spec>
  20. <spec>XEP-0060</spec>
  21. </dependencies>
  22. <supersedes/>
  23. <supersededby/>
  24. <shortname>NOT_YET_ASSIGNED</shortname>
  25. &ralphm;
  26. &stpeter;
  27. <revision>
  28. <version>0.2</version>
  29. <date>2009-11-18</date>
  30. <initials>psa</initials>
  31. <remark><p>Specifed protocol flow for the chained subscription.</p></remark>
  32. </revision>
  33. <revision>
  34. <version>0.1</version>
  35. <date>2008-11-13</date>
  36. <initials>psa</initials>
  37. <remark><p>Initial published version.</p></remark>
  38. </revision>
  39. <revision>
  40. <version>0.0.2</version>
  41. <date>2008-10-07</date>
  42. <initials>psa</initials>
  43. <remark><p>Added ofrom header to notifications.</p></remark>
  44. </revision>
  45. <revision>
  46. <version>0.0.1</version>
  47. <date>2008-08-12</date>
  48. <initials>rm/psa</initials>
  49. <remark><p>First draft.</p></remark>
  50. </revision>
  51. </header>
  52. <section1 topic='Introduction' anchor='intro'>
  53. <p>To enable lightweight repeaters for &xep0060; notifications, we need the ability to subscribe one pubsub node to another pubsub node. This specification defines a method for doing so, using &xep0050;.</p>
  54. </section1>
  55. <section1 topic='How It Works' anchor='howitworks'>
  56. <p>The owner of a pubsub node can subscribe that "local" node to a "remote" node using the flow described below. In these examples, the node owner is admin@consumer.tld, the local node is weatherbot@consumer.tld/Chicagoland, and the remote node has a NodeID of "OHR" at the pubsub service notify.weather.tld.</p>
  57. <example caption='Owner requests chaining'><![CDATA[
  58. <iq from='admin@consumer.tld/client'
  59. id='chaining-1'
  60. to='weatherbot@consumer.tld'
  61. type='set'
  62. xml:lang='en'>
  63. <command xmlns='http://jabber.org/protocol/commands'
  64. action='execute'
  65. node='http://jabber.org/protocol/pubsub#chaining'/>
  66. </iq>
  67. ]]></example>
  68. <p>Unless an error occurs, the service SHOULD return the appropriate form.</p>
  69. <example caption='Service returns chaining form to node owner'><![CDATA[
  70. <iq from='weatherbot@consumer.tld'
  71. id='chaining-1'
  72. to='admin@consumer.tld/client'
  73. type='result'
  74. xml:lang='en'>
  75. <command xmlns='http://jabber.org/protocol/commands'
  76. node='http://jabber.org/protocol/pubsub#chaining'
  77. sessionid='a73sjjvkla37jfea'
  78. status='executing'>
  79. <x xmlns='jabber:x:data' type='form'>
  80. <title>Chaining Request</title>
  81. <instructions>Fill out this form to complete your request.</instructions>
  82. <field type='hidden' var='FORM_TYPE'>
  83. <value>http://jabber.org/protocol/pubsub#chaining</value>
  84. </field>
  85. <field label='The Node ID of the local pubsub node'
  86. type='text-single'
  87. var='local-node'>
  88. <required/>
  89. </field>
  90. <field label='The Jabber ID of the remote pubsub service'
  91. type='jid-single'
  92. var='remote-service'>
  93. <required/>
  94. </field>
  95. <field label='The NodeID of the remote pubsub node'
  96. type='text-single'
  97. var='remote-node'>
  98. <required/>
  99. </field>
  100. </x>
  101. </command>
  102. </iq>
  103. ]]></example>
  104. <example caption='Admin submits chaining form to service'><![CDATA[
  105. <iq from='admin@consumer.tld/client'
  106. id='chaining-2'
  107. to='weatherbot@consumer.tld'
  108. type='submit'
  109. xml:lang='en'>
  110. <command xmlns='http://jabber.org/protocol/commands'
  111. node='http://jabber.org/protocol/pubsub#chaining'
  112. sessionid='a73sjjvkla37jfea'
  113. status='executing'>
  114. <x xmlns='jabber:x:data' type='submit'>
  115. <field type='hidden' var='FORM_TYPE'>
  116. <value>http://jabber.org/protocol/pubsub#chaining</value>
  117. </field>
  118. <field var='local-node'>
  119. <value>Chicagoland</value>
  120. </field>
  121. <field var='remote-service'>
  122. <value>notify.weather.tld</value>
  123. </field>
  124. <field var='remote-node'>
  125. <value>OHR</value>
  126. </field>
  127. </x>
  128. </command>
  129. </iq>
  130. ]]></example>
  131. <example caption='Service informs admin of completion'><![CDATA[
  132. <iq from='weatherbot@consumer.tld'
  133. id='chaining-2'
  134. to='admin@consumer.tld/client'
  135. type='result'
  136. xml:lang='en'>
  137. <command xmlns='http://jabber.org/protocol/commands'
  138. node='http://jabber.org/protocol/pubsub#chaining'
  139. sessionid='a73sjjvkla37jfea'
  140. status='completed'/>
  141. </iq>
  142. ]]></example>
  143. <p>At this point, the service itself will subscribe to the remote node.</p>
  144. <example caption='Service subscribes to remote node for chaining'><![CDATA[
  145. <iq type='set'
  146. from='weatherbot@consumer.tld/Chicagoland'
  147. to='notify.weather.tld'
  148. id='sub1'>
  149. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  150. <subscribe
  151. node='OHR'
  152. jid='weatherbot@consumer.tld/Chicagoland'/>
  153. </pubsub>
  154. </iq>
  155. ]]></example>
  156. <p>Now subscribers who are local to the consumer.tld XMPP service can subscribe directly to weatherbot@consumer.tld/Chicagoland instead of the remote pubsub node at notify.weather.tld. We therefore refer to weatherbot@consumer.tld/Chicagoland as a "chaining node" and the remote node as a "chained node".</p>
  157. </section1>
  158. <section1 topic='Notifications' anchor='notifications'>
  159. <p>When a chaining node delivers a notification to its subscribers, it SHOULD include an &xep0033; header of "ofrom" to specify the chained node or service that generated the notification (note: this header is not yet defined in <cite>XEP-0033</cite>).</p>
  160. <example caption='Chaining node notifies subscribers'><![CDATA[
  161. <message from='weatherbot@consumer.tld/bot'
  162. to='subscriber@consumer.tld'
  163. id='foo'>
  164. <event xmlns='http://jabber.org/protocol/pubsub#event'>
  165. <items node='Chicagoland'>
  166. <item id='ae890ac52d0df67ed7cfdf51b644e901'>
  167. <example xmlns='urn:xmpp:example'>message</example>
  168. </item>
  169. </items>
  170. </event>
  171. <addresses xmlns='http://jabber.org/protocol/address'>
  172. <address type='ofrom' jid='notify.weather.tld'/>
  173. </addresses>
  174. </message>
  175. ]]></example>
  176. </section1>
  177. <section1 topic='Determining Support' anchor='support'>
  178. <p>If a pubsub service supports Ad-Hoc Commands, it MUST advertise the commands it supports via &xep0030; (as described in <cite>XEP-0050: Ad-Hoc Commands</cite>); such commands exist as well-defined discovery nodes associated with the service. In particular, if a pubsub service supports chaining it MUST advertise a command of "http://jabber.org/protocol/pubsub#chaining".</p>
  179. </section1>
  180. <section1 topic='Security Considerations' anchor='security'>
  181. <p>The ability to subscribe one node to another node introduces the possibility of exposing non-public information in a public way, since the access controls for the node that originates a notification might not be known or enforced by the downstream node. Therefore, the upstream node (or its owner) is advised to make a careful access decision before allowing a downstream node (or any other entity) to subscribe.</p>
  182. <p>Note: The upstream node can discover the identity of the downstream node by sending a service discovery information ("disco#info") request to the downstream node, and MAY cancel or decline the downstream node's subscription if it determines that the node has an identity of "pubsub/leaf" or "pubsub/collection".</p>
  183. </section1>
  184. <section1 topic='IANA Considerations' anchor='iana'>
  185. <p>This document requires no interaction with &IANA;.</p>
  186. </section1>
  187. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  188. <p>The &REGISTRAR; shall include the following information in its registries.</p>
  189. <section2 topic='Protocol Namespaces' anchor='ns'>
  190. <p>The XMPP Registrar shall include 'http://jabber.org/protocol/pubsub#chaining' in its registry of protocol namespaces (see &NAMESPACES;).</p>
  191. </section2>
  192. <section2 topic='Field Standardization' anchor='registrar-formtype'>
  193. <p>&xep0068; defines a process for standardizing the fields used within &xep0004; scoped by a particular namespace (see &FORMTYPES;). The reserved fields for the 'http://jabber.org/protocol/pubsub#chaining' namespace are specified below.</p>
  194. <code caption='Registry Submission'><![CDATA[
  195. <form_type>
  196. <name>http://jabber.org/protocol/pubsub#chaining</name>
  197. <doc>XEP-0253</doc>
  198. <desc>Forms used for chaining of pubsub nodes.</desc>
  199. <field var='local-node'
  200. type='text-single'
  201. label='The Node ID of the local node'/>
  202. <field var='remote-node'
  203. type='text-single'
  204. label='The NodeID of the remote node'/>
  205. <field var='remote-service'
  206. type='jid-single'
  207. label='The Jabber ID of the remote pubsub service'/>
  208. </form_type>
  209. ]]></code>
  210. </section2>
  211. </section1>
  212. <section1 topic='Acknowledgements' anchor='ack'>
  213. <p>Thanks to Joe Hildebrand for his feedback.</p>
  214. </section1>
  215. </xep>