Abstract: | This specification defines a method for chaining pubsub nodes together, resulting in lightweight repeaters for pubsub notifications. |
Authors: | Ralph Meijer, Peter Saint-Andre |
Copyright: | © 1999 - 2009 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Experimental |
Type: | Standards Track |
Version: | 0.1 |
Last Updated: | 2008-11-13 |
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.
1. Introduction
2. How It Works
3. Notifications
4. Determining Support
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
7.1. Protocol Namespaces
7.2. Field Standardization
8. Acknowledgements
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
To enable lightweight repeaters for Publish-Subscribe [1] notifications, we need the ability to subscribe one pubsub node to another pubsub node. This specification defines a method for doing so, using Ad-Hoc Commands [2].
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.
<iq from='admin@consumer.tld/client' id='chaining-1' to='weatherbot@consumer.tld' type='set' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' action='execute' node='http://jabber.org/protocol/pubsub#chaining'/> </iq>
Unless an error occurs, the service SHOULD return the appropriate form.
<iq from='weatherbot@consumer.tld' id='chaining-1' to='admin@consumer.tld/client' type='result' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/pubsub#chaining' sessionid='a73sjjvkla37jfea' status='executing'> <x xmlns='jabber:x:data' type='form'> <title>Chaining Request</title> <instructions>Fill out this form to complete your request.</instructions> <field type='hidden' var='FORM_TYPE'> <value>http://jabber.org/protocol/pubsub#chaining</value> </field> <field label='The Node ID of the local pubsub node' type='text-single' var='local-node'> <required/> </field> <field label='The Jabber ID of the remote pubsub service' type='jid-single' var='remote-service'> <required/> </field> <field label='The NodeID of the remote pubsub node' type='text-single' var='remote-node'> <required/> </field> </x> </command> </iq>
<iq from='admin@consumer.tld/client' id='chaining-2' to='weatherbot@consumer.tld' type='submit' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/pubsub#chaining' sessionid='a73sjjvkla37jfea' status='executing'> <x xmlns='jabber:x:data' type='submit'> <field type='hidden' var='FORM_TYPE'> <value>http://jabber.org/protocol/pubsub#chaining</value> </field> <field var='local-node'> <value>Chicagoland</value> </field> <field var='remote-service'> <value>notify.weather.tld</value> </field> <field var='remote-node'> <value>OHR</value> </field> </x> </command> </iq>
<iq from='weatherbot@consumer.tld' id='chaining-2' to='admin@consumer.tld/client' type='result' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/pubsub#chaining' sessionid='a73sjjvkla37jfea' status='completed'/> </iq>
When a chained pubsub node delivers notifications to its subscribers, it SHOULD include an Extended Stanza Addressing [3] header of "ofrom" (note: this header is not yet defined in XEP-0033).
<message from='weatherbot@consumer.tld/bot' to='subscriber@consumer.tld' id='foo'> <event xmlns='http://jabber.org/protocol/pubsub#event'> <items node='Chicagoland'> <item id='ae890ac52d0df67ed7cfdf51b644e901'> <example xmlns='urn:xmpp:example'>message</example> </item> </items> </event> <addresses xmlns='http://jabber.org/protocol/address'> <address type='ofrom' jid='notify.weather.tld'/> </addresses> </message>
If a pubsub service supports Ad-Hoc Commands, it MUST advertise the commands it supports via Service Discovery [4] (as described in XEP-0050: Ad-Hoc Commands); 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".
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.
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".
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [5].
The XMPP Registrar [6] shall include the following information in its registries.
The XMPP Registrar shall include 'http://jabber.org/protocol/pubsub#chaining' in its registry of protocol namespaces (see <http://xmpp.org/registrar/namespaces.html>).
Field Standardization for Data Forms [7] defines a process for standardizing the fields used within Data Forms [8] scoped by a particular namespace (see <http://xmpp.org/registrar/formtypes.html>). The reserved fields for the 'http://jabber.org/protocol/pubsub#chaining' namespace are specified below.
<form_type> <name>http://jabber.org/protocol/pubsub#chaining</name> <doc>XEP-xxxx</doc> <desc>Forms used for chaining of pubsub nodes.</desc> <field var='local-node' type='text-single' label='The Node ID of the local node'/> <field var='remote-node' type='text-single' label='The NodeID of the remote node'/> <field var='remote-service' type='jid-single' label='The Jabber ID of the remote pubsub service'/> </form_type>
Thanks to Joe Hildebrand for his feedback.
Series: XEP
Number: 0253
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.1
Last Updated: 2008-11-13
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0050, XEP-0060
Supersedes: None
Superseded By: None
Short Name: NOT_YET_ASSIGNED
Source Control:
HTML
RSS
Email:
ralphm@ik.nu
JabberID:
ralphm@ik.nu
Email:
stpeter@jabber.org
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0060: Publish-Subscribe <http://xmpp.org/extensions/xep-0060.html>.
2. XEP-0050: Ad-Hoc Commands <http://xmpp.org/extensions/xep-0050.html>.
3. XEP-0033: Extended Stanza Addressing <http://xmpp.org/extensions/xep-0033.html>.
4. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
5. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
6. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.
7. XEP-0068: Field Data Standardization for Data Forms <http://xmpp.org/extensions/xep-0068.html>.
8. XEP-0004: Data Forms <http://xmpp.org/extensions/xep-0004.html>.
Initial published version.
(psa)Added ofrom header to notifications.
(psa)First draft.
(rm/psa)END