mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-11 11:55:06 -05:00
182 lines
7.7 KiB
XML
182 lines
7.7 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
|
<!DOCTYPE xep SYSTEM 'xep.dtd' [
|
|
<!ENTITY % ents SYSTEM 'xep.ent'>
|
|
%ents;
|
|
]>
|
|
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
|
<xep>
|
|
<header>
|
|
<title>Server Buddies</title>
|
|
<abstract>This specification defines a convention for presence subscriptions between XMPP servers.</abstract>
|
|
&LEGALNOTICE;
|
|
<number>0267</number>
|
|
<status>Experimental</status>
|
|
<type>Standards Track</type>
|
|
<sig>Standards</sig>
|
|
<approver>Council</approver>
|
|
<dependencies>
|
|
<spec>XMPP Core</spec>
|
|
</dependencies>
|
|
<supersedes/>
|
|
<supersededby/>
|
|
<shortname>NOT_YET_ASSIGNED</shortname>
|
|
<author>
|
|
<firstname>Artur</firstname>
|
|
<surname>Hefczyc</surname>
|
|
<email>artur.hefczyc@gmail.com</email>
|
|
<jid>artur.hefczyc@tigase.org</jid>
|
|
</author>
|
|
<author>
|
|
<firstname>Florian</firstname>
|
|
<surname>Jensen</surname>
|
|
<email>admin@flosoft.biz</email>
|
|
<jid>admin@im.flosoft.biz</jid>
|
|
</author>
|
|
<author>
|
|
<firstname>Mickaël</firstname>
|
|
<surname>Rémond</surname>
|
|
<email>mickael.remond@process-one.net</email>
|
|
<jid>mremond@process-one.net</jid>
|
|
</author>
|
|
&stpeter;
|
|
<author>
|
|
<firstname>Matthew</firstname>
|
|
<surname>Wild</surname>
|
|
<email>mwild1@gmail.com</email>
|
|
<jid>mwild1@jaim.at</jid>
|
|
</author>
|
|
<revision>
|
|
<version>0.2</version>
|
|
<date>2011-12-09</date>
|
|
<initials>psa</initials>
|
|
<remark><p>Defined ad-hoc command for admin generation of outbound presence subscription; added security considerations.</p></remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.1</version>
|
|
<date>2009-04-30</date>
|
|
<initials>psa</initials>
|
|
<remark><p>Initial published version.</p></remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.0.1</version>
|
|
<date>2009-04-30</date>
|
|
<initials>ah/fj/psa/mr/mw</initials>
|
|
<remark><p>First draft, split from the incident reporting proposal.</p></remark>
|
|
</revision>
|
|
</header>
|
|
|
|
<section1 topic='Description' anchor='description'>
|
|
<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;.</p>
|
|
<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>
|
|
<example caption="Service sends subscription request to peer"><![CDATA[
|
|
<presence from='montague.lit'
|
|
to='capulet.lit'
|
|
type='subscribe'/>
|
|
]]></example>
|
|
<p>A server MUST NOT send such a presence subscription request unless explicitly requested to do so by a server administrator (see below).</p>
|
|
<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>
|
|
<p>If the request is approved, the peer server then informs the originating server that the request has been approved.</p>
|
|
<example caption="Peer sends approval to server"><![CDATA[
|
|
<presence from='capulet.lit'
|
|
to='montague.lit'
|
|
type='subscribed'/>
|
|
]]></example>
|
|
<p>The peer SHOULD also send a subscription request to the originating server.</p>
|
|
<example caption="Peer sends subscription request to server"><![CDATA[
|
|
<presence from='capulet.lit'
|
|
to='montague.lit'
|
|
type='subscribe'/>
|
|
]]></example>
|
|
<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>
|
|
</section1>
|
|
|
|
<section1 topic='Ad-Hoc Command' anchor='command'>
|
|
<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>
|
|
<p>The command node for this use case SHOULD be "http://jabber.org/protocol/admin#server-buddy".</p>
|
|
<p>A sample protocol flow for this use case is shown below.</p>
|
|
<example caption='Admin Subscribes Server to Peer Server'><![CDATA[
|
|
<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>
|
|
]]></example>
|
|
<p>Unless an error occurs (see the "Error Handling" section of XEP-0133), the service SHOULD return the appropriate form.</p>
|
|
<example caption='Service Returns Server Buddy Form to Admin'><![CDATA[
|
|
<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 Jabber ID for the peer server'
|
|
type='jid-single'
|
|
var='accountjid'>
|
|
<required/>
|
|
</field>
|
|
</x>
|
|
</command>
|
|
</iq>
|
|
]]></example>
|
|
<example caption='Admin Submits Server Buddy Form to Service'><![CDATA[
|
|
<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='accountjid'>
|
|
<value>marlowe.lit</value>
|
|
</field>
|
|
</x>
|
|
</command>
|
|
</iq>
|
|
]]></example>
|
|
<example caption='Service Informs Admin of Completion'><![CDATA[
|
|
<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>
|
|
]]></example>
|
|
<p>Notification of completion MAY include the processed data in a data form of type "result".</p>
|
|
</section1>
|
|
|
|
<section1 topic='Security Considerations' anchor='security'>
|
|
<p>Because server "buddies" might be granted greater privileges than unknown peers, care should be taken in sending or approving presence subscription requests.</p>
|
|
</section1>
|
|
|
|
<section1 topic='IANA Considerations' anchor='iana'>
|
|
<p>This document requires no interaction with &IANA;.</p>
|
|
</section1>
|
|
|
|
<section1 topic='XMPP Registrar Considerations' anchor='reg'>
|
|
<p>This document requires no interaction with the ®ISTRAR;.</p>
|
|
</section1>
|
|
|
|
</xep>
|