Abstract: | This specification defines a convention for presence subscriptions between XMPP servers. |
Authors: | Artur Hefczyc, Florian Jensen, Mickaël Rémond, Peter Saint-Andre, Matthew Wild |
Copyright: | © 1999 - 2011 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Experimental |
Type: | Standards Track |
Version: | 0.3 |
Last Updated: | 2011-12-12 |
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. Description
2. Ad-Hoc Command
3. Security Considerations
4. IANA Considerations
5. XMPP Registrar Considerations
5.1. Field Standardization
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
In XMPP, rosters and presence subscriptions have been used to date only among IM users (see XMPP IM [1]). 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 Incident Reporting [2].
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.
<presence from='montague.lit' to='capulet.lit' type='subscribe'/>
A server MUST NOT send such a presence subscription request unless explicitly requested to do so by a server administrator (see below).
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 Data Forms [3].)
If the request is approved, the peer server then informs the originating server that the request has been approved.
<presence from='capulet.lit' to='montague.lit' type='subscribed'/>
The peer SHOULD also send a subscription request to the originating server.
<presence from='capulet.lit' to='montague.lit' type='subscribe'/>
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.
This section defines an Ad-Hoc Commands [4] node scoped by the Field Standardization for Data Forms [5] FORM_TYPE specified in Service Administration [6]. Upon advancement of this specification to Draft, this section ought to be moved to XEP-0133.
The command node for this use case SHOULD be "http://jabber.org/protocol/admin#server-buddy".
A sample protocol flow for this use case is shown below.
<iq from='bard@shakespeare.lit/globe' id='server-buddy-1' to='shakespeare.lit' type='set' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' action='execute' node='http://jabber.org/protocol/admin#server-buddy'/> </iq>
Unless an error occurs (see the "Error Handling" section of XEP-0133), the service SHOULD return the appropriate form.
<iq from='shakespeare.lit' id='server-buddy-1' to='bard@shakespeare.lit/globe' type='result' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/admin#server-buddy' sessionid='server-buddy:20040408T0337Z' status='executing'> <x xmlns='jabber:x:data' type='form'> <title>Subscribing to a Peer Server</title> <instructions>Fill out this form to subscribe your server to a peer server.</instructions> <field type='hidden' var='FORM_TYPE'> <value>http://jabber.org/protocol/admin</value> </field> <field label='The domain name of your server' type='jid-single' var='serverjid'> </field> <field label='The domain name of the peer server' type='jid-single' var='peerjid'> <required/> </field> </x> </command> </iq>
Note: the form includes a field for the domain name of the sending server to support virtual hosting environments.
<iq from='bard@shakespeare.lit/globe' id='server-buddy-2' to='shakespeare.lit' type='set' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/admin#server-buddy' sessionid='server-buddy:20040408T0337Z'> <x xmlns='jabber:x:data' type='submit'> <field type='hidden' var='FORM_TYPE'> <value>http://jabber.org/protocol/admin</value> </field> <field var='serverjid'> <value>shakespeare.lit</value> </field> <field var='peerjid'> <value>marlowe.lit</value> </field> </x> </command> </iq>
<iq from='shakespeare.lit' id='server-buddy-2' to='bard@shakespeare.lit/globe' type='result' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/admin#server-buddy' sessionid='server-buddy:20040408T0337Z' status='completed'/> </iq>
Notification of completion MAY include the processed data in a data form of type "result".
Because server "buddies" might be granted greater privileges than unknown peers, care should be taken in sending or approving presence subscription requests.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [7].
Field Standardization for Data Forms [8] 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 'http://jabber.org/protocol/admin' namespace defined in XEP-0133.
<form_type> <name>http://jabber.org/protocol/admin</name> <field var='peerjid' type='jid-single' label='The Jabber ID of a peer server'/> <field var='serverjid' type='jid-single' label='The Jabber ID of the server being administered'/> </form_type>
Series: XEP
Number: 0267
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.3
Last Updated: 2011-12-12
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: NOT_YET_ASSIGNED
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
artur.hefczyc@gmail.com
JabberID:
artur.hefczyc@tigase.org
Email:
admin@flosoft.biz
JabberID:
admin@im.flosoft.biz
Email:
mickael.remond@process-one.net
JabberID:
mremond@process-one.net
Email:
stpeter@jabber.org
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
Email:
mwild1@gmail.com
JabberID:
mwild1@jaim.at
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. RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc6121>.
2. XEP-0268: Incident Reporting <http://xmpp.org/extensions/xep-0268.html>.
3. XEP-0004: Data Forms <http://xmpp.org/extensions/xep-0004.html>.
4. XEP-0050: Ad-Hoc Commands <http://xmpp.org/extensions/xep-0050.html>.
5. XEP-0068: Field Data Standardization for Data Forms <http://xmpp.org/extensions/xep-0068.html>.
6. XEP-0133: Service Administration <http://xmpp.org/extensions/xep-0133.html>.
7. 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/>.
8. XEP-0068: Field Data Standardization for Data Forms <http://xmpp.org/extensions/xep-0068.html>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Updated ad-hoc command with field for the sending server; added XMPP Registrar Considerations.
(psa)Defined ad-hoc command for admin generation of outbound presence subscription; added security considerations.
(psa)Initial published version.
(psa)First draft, split from the incident reporting proposal.
(ah/fj/psa/mr/mw)END