XEP-0267: Server Buddies

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
© 2009 – 2012 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Deferred

WARNING: This document has been automatically Deferred after 12 months of inactivity in its previous Experimental state. Implementation of the protocol described herein is not recommended for production systems. However, exploratory implementations are encouraged to resume the standards process.
Type
Standards Track
Version
0.5 (2012-05-29)
Document Lifecycle
  1. Experimental
  2. Deferred
  3. Proposed
  4. Stable
  5. Final

1. Description

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 (XEP-0268) [2] and Entity Reputation (XEP-0275) [3]. The server buddy relationship can also be leveraged for additional functionality, such as Service Directories (XEP-0309) [4]

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.

Example 1. Service sends subscription request to peer
<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 (XEP-0004) [5].)

If the request is approved, the peer server then informs the originating server that the request has been approved.

Example 2. Peer sends approval to server
<presence from='capulet.lit'
          to='montague.lit'
          type='subscribed'/>

The peer SHOULD also send a subscription request to the originating server.

Example 3. Peer sends subscription request to server
<presence from='capulet.lit'
          to='montague.lit'
          type='subscribe'/>

The originating server would then approve that subscription request.

Example 4. Service sends approval to peer
<presence from='montague.lit'
          to='capulet.lit'
          type='subscribed'/>

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.

2. Ad-Hoc Command

This section defines an Ad-Hoc Commands (XEP-0050) [6] node scoped by the Field Standardization for Data Forms (XEP-0068) [7] FORM_TYPE specified in Service Administration (XEP-0133) [8]. 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.

Example 5. Admin Subscribes Service to Peer Server
<iq from='bard@shakespeare.lit/globe'
    id='nrw51vs8'
    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.

Example 6. Service Returns Server Buddy Form to Admin
<iq from='shakespeare.lit'
    id='nrw51vs8'
    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 the peer server'
             type='jid-single'
             var='peerjid'>
        <required/>
      </field>
    </x>
  </command>
</iq>

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.

Example 7. Admin Submits Server Buddy Form to Service
<iq from='bard@shakespeare.lit/globe'
    id='lk2vs82g'
    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='peerjid'>
        <value>marlowe.lit</value>
      </field>
    </x>
  </command>
</iq>
Example 8. Service Informs Admin of Completion
<iq from='shakespeare.lit'
    id='lk2vs82g'
    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".

3. Determining Support

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".

Example 9. Service discovery information request
<iq from='jabber.org'
    id='uw72g176'
    to='xmpp.net'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
Example 10. Service discovery information response
<iq from='xmpp.net'
    id='uw72g176'
    to='jabber.org'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <feature var='urn:xmpp:server-presence'/>
  </query>
</iq>

4. Security Considerations

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.

5. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [9].

6. XMPP Registrar Considerations

6.1 Service Discovery Features

Registry Submission
<var>
  <name>urn:xmpp:server-presence</name>
  <desc>Support for subscriptions to server presence</desc>
  <doc>XEP-0267</doc>
</var>

6.2 Field Standardization

Field Standardization for Data Forms (XEP-0068) [7] 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.

Registry Submission
<form_type>
  <name>http://jabber.org/protocol/admin</name>
  <field var='peerjid'
         type='jid-single'
         label='The Jabber ID of a peer server'/>
</form_type>

7. Acknowledgements

Thanks to Kim Alvefur, Waqas Hussain, and Tobias Markmann for their feedback.


Appendices

Appendix A: Document Information

Series
XEP
Number
0267
Publisher
XMPP Standards Foundation
Status
Deferred
Type
Standards Track
Version
0.5
Last Updated
2012-05-29
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

Appendix B: Author Information

Artur Hefczyc
Email
artur.hefczyc@gmail.com
JabberID
artur.hefczyc@tigase.org
Florian Jensen
Email
admin@flosoft.biz
JabberID
admin@im.flosoft.biz
Mickaël Rémond
Email
mickael.remond@process-one.net
JabberID
mremond@process-one.net
Peter Saint-Andre
Email
stpeter@stpeter.im
JabberID
stpeter@jabber.org
URI
https://stpeter.im/
Matthew Wild
Email
mwild1@gmail.com
JabberID
mwild1@jaim.at

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) 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.

Appendix E: Discussion Venue

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 <https://xmpp.org/community/> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

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".

Appendix G: Notes

1. RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc6121>.

2. XEP-0268: Incident Reporting <https://xmpp.org/extensions/xep-0268.html>.

3. XEP-0275: Entity Reputation <https://xmpp.org/extensions/xep-0275.html>.

4. XEP-0309: Service Directories <https://xmpp.org/extensions/xep-0309.html>.

5. XEP-0004: Data Forms <https://xmpp.org/extensions/xep-0004.html>.

6. XEP-0050: Ad-Hoc Commands <https://xmpp.org/extensions/xep-0050.html>.

7. XEP-0068: Field Data Standardization for Data Forms <https://xmpp.org/extensions/xep-0068.html>.

8. XEP-0133: Service Administration <https://xmpp.org/extensions/xep-0133.html>.

9. 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/>.

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 0.5 (2012-05-29)

    Corrected several examples and points in the text.

    psa
  2. Version 0.4 (2011-12-12)

    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.

    psa
  3. Version 0.3 (2011-12-12)

    Updated ad-hoc command with field for the sending server; added XMPP Registrar Considerations.

    psa
  4. Version 0.2 (2011-12-09)

    Defined ad-hoc command for admin generation of outbound presence subscription; added security considerations.

    psa
  5. Version 0.1 (2009-04-30)

    Initial published version.

    psa
  6. Version 0.0.1 (2009-04-30)

    First draft, split from the incident reporting proposal.

    ah/fj/psa/mr/mw

Appendix I: Bib(La)TeX Entry

@report{hefczyc2009xep0267,
  title = {Server Buddies},
  author = {Hefczyc, Artur and Jensen, Florian and Rémond, Mickaël and Saint-Andre, Peter and Wild, Matthew},
  type = {XEP},
  number = {0267},
  version = {0.5},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0267.html},
  date = {2009-04-30/2012-05-29},
}

END