Abstract: | This specification shows how to combine and extend a number of existing XMPP protocols for improved sharing of information about XMPP servers. |
Author: | Peter Saint-Andre |
Copyright: | © 1999 - 2012 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Experimental |
Type: | Standards Track |
Version: | 0.1 |
Last Updated: | 2012-01-10 |
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. Gathering Information
2.1. Server Discovers Directory
2.2. Server Subscribes to Directory
2.2.1. Administrator Triggers Presence Subscription
2.3. Directory Queries Server
2.3.1. Disco Query
2.3.2. vCard Query
3. Publishing Information
4. Security Considerations
5. IANA Considerations
6. XMPP Registrar Considerations
6.1. Protocol Namespaces
6.2. Service Discovery Category/Type
6.3. Service Discovery Features
7. XML Schema
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
Several directories (e.g., at xmpp.org and jabberes.org) have long provided information about public XMPP services so that end users can more easily find servers to register with, add-on components to use for features such as Multi-User Chat [1], etc. These service directories tend to rely on humans to gather and in some cases verify the information they publish before providing it via the World Wide Web or the XMPP network for use by end users and IM client software. However, relying on humans to gather and verify such information can result in significant delays and errors. It would be better to automate the information-gathering functions as much as possible.
This document shows how to combine and extend a number of existing XMPP protocols for (mostly) automated gathering of information about public XMPP services. Widespread deployment of this specification will result in more timely, accurate information about the services available on the XMPP network.
The following scenario involves two entities:
Note: Although the entity that gathers information for a directory could be a client or a component, here we assume that it is a server ("xmpp.net").
These two entities use Server Buddies [2], Service Discovery [3], and vCard4 over XMPP [4] in the following ways.
Directory Server (xmpp.net) (jabber.org) | | | [first, server learns | | identity of directory] | | | |<---disco info request-------| |----disco info response----->| | | | [second, entities become | | "buddies" per XEP-0267] | | | |<---presence subscribe-------| |----presence subscribed----->| |----presence subscribe------>| |<---presence subscribed------| | | | [third, directory | | gathers server data] | | | |----disco info request------>| |<---disco info response------| | | |----vcard request----------->| |<---vcard response-----------| | |
In order to determine the exact identity of the directory, the server sends a service discovery information request to the directory.
<iq type='get' from='jabber.org' to='xmpp.net' id='xh1f37n5'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq type='result' from='xmpp.net' to='jabber.org' id='xh1f37n5'> <query xmlns='http://jabber.org/protocol/disco#info'> <identity category='directory' type='server'/> <feature var='http://jabber.org/protocol/disco#info'/> <feature var='http://jabber.org/protocol/disco#items'/> <feature var='urn:xmpp:server-presence'/> </query> </iq>
If the server wishes to have its information aggregated, it sends a presence subscription request to the directory as described in XEP-0267.
<presence from='jabber.org' to='xmpp.net' type='subscribe'/>
Upon receiving such the presence subscription request, the directory approves it.
<presence from='xmpp.net' to='jabber.org' type='subscribed'/>
The directory also sends a subscription request to the server.
<presence from='xmpp.net' to='jabber.org' type='subscribe'/>
The server then approves that subscription request, as well.
<presence from='jabber.org' to='xmpp.net' type='subscribed'/>
The server administator needs a way to trigger the server to send a presence subscription to the directory. This can be done by using Ad-Hoc Commands [5] as in Service Administration [6]. Therefore we define a new server administration use case. 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='stpeter@jabber.org/squire' id='server-buddy-1' to='jabber.org' 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, the service SHOULD return the appropriate form.
<iq from='jabber.org' id='server-buddy-1' to='stpeter@jabber.org/squire' type='result' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/admin#server-buddy' sessionid='server-buddy:20120109T0310Z' status='executing'> <x xmlns='jabber:x:data' type='form'> <title>Adding a Server Buddy</title> <instructions>Fill out this form to add a "server buddy".</instructions> <field type='hidden' var='FORM_TYPE'> <value>http://jabber.org/protocol/admin</value> </field> <field label='The server to add' type='jid-single' var='peerjid'> <required/> </field> </x> </command> </iq>
<iq from='stpeter@jabber.org/squire' id='server-buddy-2' to='xmpp.net' type='set' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/admin#server-buddy' sessionid='server-buddy:20120109T0310Z'> <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>xmpp.net</value> </field> </x> </command> </iq>
<iq from='jabber.org' id='server-buddy-2' to='stpeter@jabber.org/squire' type='result' xml:lang='en'> <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/admin#server-buddy' sessionid='server-buddy:20120109T0310Z' status='completed'/> </iq>
After the subscription handshake has been completed, the directory queries the server for information. There are two aspects: service discovery information and vCard information.
In order to determine the exact identity of the server, the directory sends a service discovery information request to the server.
<iq type='get' from='xmpp.net' to='jabber.org' id='i3vs51b9'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq type='result' from='jabber.org' to='xmpp.net' id='i3vs51b9'> <query xmlns='http://jabber.org/protocol/disco#info'> <identity category='server' type='im'/> <feature var='http://jabber.org/protocol/disco#info'/> <feature var='http://jabber.org/protocol/disco#items'/> <feature var='jabber:iq:register'/> <feature var='urn:xmpp:server-presence'/> <feature var='urn:xmpp:public-server'/> </query> </iq>
Note: If the server is a public node on the XMPP network, it includes a service discovery feature of "urn:xmpp:public-server". This feature is defined below.
Note: If the server allows In-Band Registration [7], it includes a service discovery feature of "jabber:iq:register". If the server does not allow in-band registration but allows account registration at a website, it includes the registration URL in its vCard as described below.
The foregoing examples show the gathering of disco#info data (identity and supported features). An directory MAY also gather disco#items data about components and other services associated with the base XMPP server at a domain.
In order to gather additional information about the server, the directory sends a vCard information request to the server.
Note: Because vCard4 enables the XMPP community to more easily define extensions to vCard (e.g., for registration URLs), it is RECOMMENDED for servers to support vCard4 over XMPP [8] in addition to, or instead of, vcard-temp [9].
<iq from='xmpp.net' id='lw71bs73' to='jabber.org' type='get'> <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/> </iq>
<iq from='jabber.org' id='lw71bs73' to='xmpp.net' type='result'> <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'> <fn><text>jabber.org IM service</text></fn> <url><uri>http://www.jabber.org/</uri></url> <lang> <parameters><pref>1</pref></parameters> <language-tag>en</language-tag> </lang> <adr> <region>IA</region> <country>US</country> </adr> <email><text>xmpp@jabber.org</text></email> <impp><uri>xmpp:jabber.org</uri></impp> <logo><uri>http://www.jabber.org/images/logo.png</uri></logo> <geo><uri>geo:42.25,-91.05</uri></geo> <tz><text>America/Chicago</text></tz> <kind><text>application</text></kind> <registration xmlns='urn:xmpp:vcard:registration'> <url>https://register.jabber.org/</url> </registration> </vcard> </iq>
It is RECOMMENDED for public server vCards to include the following information:
It is OPTIONAL for public server vCards to include the following information:
Currently, service directories such as xmpp.org and jabberes.org publish their information on the World Wide Web, typically via a human-friendly website and sometimes also via machine-readable files at a well-known URI for use by IM clients to pre-populate drop-down boxes showing XMPP servers that allow in-band registration. (For example, the xmpp.org service publishes a file listing registered public servers using the Service Discovery [10] format.)
In addition to publishing such information on the web, this document defines a second publishing path: the XMPP network itself. The directory can do this by creating a public Publish-Subscribe [11] node at the directory's bare domain (e.g., xmpp.net) that pushes data in the vCard4 format shown above, as described more fully in XEP-0292. Other entities can then subscribe to this node to receive updated information about services that are added to or removed from the directory.
For example, the following stanza shows an information push from the xmpp.net directory about the jabber.org service, sent to a subscriber at example.com.
<message from='xmpp.net' to='example.com' type='headline' id='hx61cs8k'> <event xmlns='http://jabber.org/protocol/pubsub#event'> <items node='urn:xmpp:contacts'> <item id='3B55FBC7-8149-4693-A1A1-5367E2A49C83'> <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'> <fn><text>jabber.org IM service</text></fn> <url><uri>http://www.jabber.org/</uri></url> <lang> <parameters><pref>1</pref></parameters> <language-tag>en</language-tag> </lang> <adr> <region>IA</region> <country>US</country> </adr> <email><text>xmpp@jabber.org</text></email> <impp><uri>xmpp:jabber.org</uri></impp> <logo><uri>http://www.jabber.org/images/logo.png</uri></logo> <geo><uri>geo:42.25,-91.05</uri></geo> <tz><text>America/Chicago</text></tz> <kind><text>application</text></kind> <registration xmlns='urn:xmpp:vcard:registration'> <url>https://register.jabber.org/</url> </registration> </vcard> </item> </items> </event> </message>
Because a service directory does not know about an XMPP server unless the administrator of the server initiates a presence subscription to the directory, information leakage is minimized.
Use of the "urn:xmpp:public-server" service discovery feature provides a way for an XMPP server to explicitly indicate that its information is public.
Use of the "directory/server" service discovery identity provides a way for a service directory to explicitly indicate that it gathers service information obtained from XMPP servers that contact it.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [12].
This document specifies that the 'urn:xmpp:vcard:registration' namespace is used to qualify the XMPP-specific vCard4 extension for account registration URLs.
The XMPP Registrar shall add this namespace to its registry at <http://xmpp.org/registrar/namespaces.html>.
This document specifies that a service directory is identified by the "directory" category and the "server" type within XMPP Service Discovery.
The XMPP Registrar shall add the "server" type to the "directory" category already listed in the registry at <http://xmpp.org/registrar/disco-categories.html>. The registration is as follows.
<category> <name>directory</name> <type> <name>server</name> <desc>A directory of XMPP servers</desc> <doc>[TBD]</doc> </type> </category>
This document specifies that a public server on the XMPP network is identified by the "urn:xmpp:public-server" Service Discovery feature.
The XMPP Registrar shall add this feature to its registry at <http://xmpp.org/registrar/disco-features.html>. The registration is as follows.
<var> <name>urn:xmpp:public-server</name> <desc>The server is a public node on the XMPP network</desc> <doc>[TBD}/doc> </var>
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='urn:xmpp:vcard:registration' xmlns='urn:xmpp:vcard:registration' elementFormDefault='qualified'> <xs:element name='registration'> <xs:complexType> <xs:sequence> <xs:element name='url' type='xs:anyURI'/> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Series: XEP
Number: 0309
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.1
Last Updated: 2012-01-10
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:
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-0045: Multi-User Chat <http://xmpp.org/extensions/xep-0045.html>.
2. XEP-0267: Server Buddies <http://xmpp.org/extensions/xep-0267.html>.
3. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
4. XEP-0292: vCard4 over XMPP <http://xmpp.org/extensions/xep-0292.html>.
5. XEP-0050: Ad-Hoc Commands <http://xmpp.org/extensions/xep-0050.html>.
6. XEP-0133: Service Administration <http://xmpp.org/extensions/xep-0133.html>.
7. XEP-0077: In-Band Registration <http://xmpp.org/extensions/xep-0077.html>.
8. XEP-0292: vCard4 over XMPP <http://xmpp.org/extensions/xep-0292.html>.
9. XEP-0054: vcard-temp <http://xmpp.org/extensions/xep-0054.html>.
10. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
11. XEP-0060: Publish-Subscribe <http://xmpp.org/extensions/xep-0060.html>.
12. 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/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Initial published version.
(psa)Defined ad-hoc command for triggering outbound presence subscription.
(psa)Defined data sharing via PEP.
(psa)First draft.
(psa)END