1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-22 07:38:52 -05:00
xeps/xep-0309.xml

388 lines
18 KiB
XML
Raw Normal View History

2011-12-12 18:15:52 -05:00
<?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>
2012-01-09 16:17:06 -05:00
<title>Service Directories</title>
2011-12-12 18:15:52 -05:00
<abstract>This specification shows how to combine and extend a number of existing XMPP protocols for improved sharing of information about XMPP servers.</abstract>
&LEGALNOTICE;
2012-01-10 14:27:16 -05:00
<number>0309</number>
2013-10-23 18:52:25 -04:00
<status>Deferred</status>
2011-12-12 18:15:52 -05:00
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
&stpeter;
2012-05-29 21:08:17 -04:00
<revision>
<version>0.3</version>
<date>2012-05-29</date>
<initials>psa</initials>
<remark><p>Corrected a number of details in the text, examples, and XMPP Registrar considerations; removed an extraneous section that is better contained in XEP-0267.</p></remark>
</revision>
2012-01-25 11:55:03 -05:00
<revision>
<version>0.2</version>
<date>2012-01-25</date>
<initials>psa</initials>
<remark><p>Added vCard extension for certification authority information; showed how to include software name in a vCard; recommended that the CA information and software name be added by the service directory, not included by the server itself.</p></remark>
</revision>
2012-01-10 14:27:16 -05:00
<revision>
<version>0.1</version>
<date>2012-01-10</date>
<initials>psa</initials>
<remark><p>Initial published version.</p></remark>
</revision>
2012-01-09 22:33:02 -05:00
<revision>
<version>0.0.3</version>
<date>2012-01-09</date>
<initials>psa</initials>
<remark><p>Defined ad-hoc command for triggering outbound presence subscription.</p></remark>
</revision>
2012-01-09 16:17:06 -05:00
<revision>
<version>0.0.2</version>
<date>2012-01-09</date>
<initials>psa</initials>
2012-01-09 22:33:02 -05:00
<remark><p>Defined data sharing via PEP.</p></remark>
2012-01-09 16:17:06 -05:00
</revision>
2011-12-12 18:15:52 -05:00
<revision>
<version>0.0.1</version>
<date>2011-12-12</date>
<initials>psa</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='introduction'>
2012-05-29 21:08:17 -04:00
<p>Several directories (e.g., at xmpp.net 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 &xep0045;, 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.</p>
2012-01-09 16:17:06 -05:00
<p>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.</p>
2011-12-12 18:15:52 -05:00
</section1>
2012-01-09 16:17:06 -05:00
<section1 topic='Gathering Information' anchor='gather'>
2011-12-12 18:15:52 -05:00
<p>The following scenario involves two entities:</p>
<ul>
2012-01-09 16:17:06 -05:00
<li>A server directory: xmpp.net</li>
<li>A public XMPP service: jabber.org</li>
2011-12-12 18:15:52 -05:00
</ul>
2012-01-10 14:27:16 -05:00
<p>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").</p>
2011-12-12 18:15:52 -05:00
<p>These two entities use &xep0267;, &xep0030;, and &xep0292; in the following ways.</p>
<code><![CDATA[
2012-05-29 21:08:17 -04:00
Directory Service
2012-01-09 16:17:06 -05:00
(xmpp.net) (jabber.org)
2011-12-12 18:15:52 -05:00
| |
| [first, server learns |
2012-01-09 16:17:06 -05:00
| identity of directory] |
2011-12-12 18:15:52 -05:00
| |
|<---disco info request-------|
|----disco info response----->|
| |
| [second, entities become |
| "buddies" per XEP-0267] |
| |
|<---presence subscribe-------|
|----presence subscribed----->|
|----presence subscribe------>|
|<---presence subscribed------|
| |
2012-01-09 16:17:06 -05:00
| [third, directory |
2011-12-12 18:15:52 -05:00
| gathers server data] |
| |
|----disco info request------>|
|<---disco info response------|
| |
|----vcard request----------->|
|<---vcard response-----------|
| |
]]></code>
2012-01-09 16:17:06 -05:00
<section2 topic='Server Discovers Directory' anchor='gather-disco'>
2012-01-10 14:27:16 -05:00
<p>In order to determine the exact identity of the directory, the server sends a service discovery information request to the directory.</p>
2012-01-09 16:17:06 -05:00
<example caption='Server Queries Directory'><![CDATA[
2011-12-12 18:15:52 -05:00
<iq type='get'
from='jabber.org'
to='xmpp.net'
id='xh1f37n5'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
2012-01-09 16:17:06 -05:00
]]></example>
<example caption='Directory Returns Disco Info'><![CDATA[
2011-12-12 18:15:52 -05:00
<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>
2012-01-09 16:17:06 -05:00
]]></example>
2012-05-29 21:08:17 -04:00
<p>Note: Inclusion of the "directory/server" identity indicates that xmpp.net is a service directory.</p>
2012-01-09 16:17:06 -05:00
</section2>
2011-12-12 18:15:52 -05:00
2012-05-29 21:08:17 -04:00
<section2 topic='Service Subscribes to Directory' anchor='gather-buddy'>
<p>If the service wishes to have its information aggregated, it sends a presence subscription request to the directory as described in XEP-0267.</p>
<example caption="Service Sends Subscription Request to Directory"><![CDATA[
2011-12-12 18:15:52 -05:00
<presence from='jabber.org'
to='xmpp.net'
type='subscribe'/>
2012-01-09 16:17:06 -05:00
]]></example>
2012-05-29 21:08:17 -04:00
<p>Upon receiving the presence subscription request, the directory approves it.</p>
2012-01-09 16:17:06 -05:00
<example caption="Directory Sends Approval to Server"><![CDATA[
2011-12-12 18:15:52 -05:00
<presence from='xmpp.net'
to='jabber.org'
type='subscribed'/>
2012-01-09 16:17:06 -05:00
]]></example>
2012-01-10 14:27:16 -05:00
<p>The directory also sends a subscription request to the server.</p>
2012-01-09 16:17:06 -05:00
<example caption="Directory Sends Subscription Request to Server"><![CDATA[
2011-12-12 18:15:52 -05:00
<presence from='xmpp.net'
to='jabber.org'
type='subscribe'/>
2012-01-09 16:17:06 -05:00
]]></example>
2012-05-29 21:08:17 -04:00
<p>The service then approves that subscription request, as well.</p>
<example caption="Service Sends Approval to Directory"><![CDATA[
2011-12-12 18:15:52 -05:00
<presence from='jabber.org'
to='xmpp.net'
type='subscribed'/>
2012-01-09 16:17:06 -05:00
]]></example>
</section2>
2011-12-12 18:15:52 -05:00
2012-01-09 16:17:06 -05:00
<section2 topic='Directory Queries Server' anchor='gather-query'>
2012-05-29 21:08:17 -04:00
<p>After the subscription handshake has been completed, the directory queries the server for information. There are two aspects: service discovery ("disco") information and vCard information.</p>
2012-01-09 16:17:06 -05:00
<section3 topic='Disco Query' anchor='gather-query-disco'>
2012-01-10 14:27:16 -05:00
<p>In order to determine the exact identity of the server, the directory sends a service discovery information request to the server.</p>
2012-01-09 16:17:06 -05:00
<example caption='Directory Queries Server'><![CDATA[
2011-12-12 18:15:52 -05:00
<iq type='get'
from='xmpp.net'
to='jabber.org'
id='i3vs51b9'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
2012-01-09 16:17:06 -05:00
]]></example>
<example caption='Server Returns Disco Info'><![CDATA[
2011-12-12 18:15:52 -05:00
<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>
2012-01-09 16:17:06 -05:00
]]></example>
<p>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.</p>
<p>Note: If the server allows &xep0077;, 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.</p>
2012-05-29 21:08:17 -04:00
<p>The foregoing examples show the gathering of disco#info data (identity and supported features). A directory MAY also gather disco#items data about components and other services associated with the base XMPP service at a domain.</p>
2012-01-09 16:17:06 -05:00
</section3>
<section3 topic='vCard Query' anchor='gather-query-vcard'>
2012-01-10 14:27:16 -05:00
<p>In order to gather additional information about the server, the directory sends a vCard information request to the server.</p>
2012-01-09 16:17:06 -05:00
<p>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 &xep0292; in addition to, or instead of, &xep0054;.</p>
<example caption="Directory Requests vCard Data from Server"><![CDATA[
2011-12-12 18:15:52 -05:00
<iq from='xmpp.net'
id='lw71bs73'
to='jabber.org'
type='get'>
<vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/>
</iq>
2012-01-09 16:17:06 -05:00
]]></example>
<example caption="Server Returns vCard Data"><![CDATA[
2011-12-12 18:15:52 -05:00
<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>
2012-01-25 11:55:03 -05:00
<registration xmlns='urn:xmpp:vcard:registration:1'>
<uri>https://register.jabber.org/</uri>
2011-12-12 18:15:52 -05:00
</registration>
</vcard>
</iq>
2012-01-09 16:17:06 -05:00
]]></example>
<p>It is RECOMMENDED for public server vCards to include the following information:</p>
<ul>
<li>A friendly name for the service (&lt;fn/&gt;)</li>
<li>A URL for general information about the service (&lt;url/&gt;)</li>
<li>The country where the service is located (&lt;adr&gt;&lt;country/&gt;&lt;/adr&gt;)</li>
<li>An email address or alias for contacting the administrators (&lt;email/&gt;)</li>
<li>The XMPP address for the service (&lt;impp/&gt;)</li>
2012-05-29 21:08:17 -04:00
<li>A vCard KIND of "application" (&lt;kind&gt;&lt;text&gt;application&lt;/text&gt;&lt;/kind&gt;) as defined in &rfc6473;</li>
2012-01-09 16:17:06 -05:00
</ul>
<p>It is OPTIONAL for public server vCards to include the following information:</p>
<ul>
<li>Preferred language of communication with the administrators (&lt;lang/&gt;)</li>
<li>Region where the service is located (&lt;adr&gt;&lt;region/&gt;&lt;/adr&gt;)</li>
<li>Logo for the service (&lt;logo/&gt;)</li>
<li>Geographical coordinates for the service (&lt;geo/&gt;)</li>
2012-01-25 11:55:03 -05:00
<li>Registration URI (&lt;registration xmlns='urn:xmpp:vcard:registration:1'/&gt; and its &lt;uri/&gt; child)</li>
<li>Certification authority name and URI (&lt;ca xmlns='urn:xmpp:vcard:ca:0'/&gt; and its &lt;name/&gt; and &lt;uri/&gt; children)</li>
2012-05-29 21:08:17 -04:00
<li>Software name (&lt;name/&gt; element qualified by the 'jabber:iq:version' namespace defined in &xep0092;)</li>
2012-01-09 16:17:06 -05:00
</ul>
2012-05-29 21:08:17 -04:00
<p>It is best for the server directory to discover the last two elements in-band (by means of TLS negotiation and software version, respectively), then add them to the contact vCard as described in the next section.</p>
2012-01-09 16:17:06 -05:00
</section3>
2011-12-12 18:15:52 -05:00
</section2>
</section1>
2012-01-09 16:17:06 -05:00
<section1 topic='Publishing Information' anchor='publish'>
2012-05-29 21:08:17 -04:00
<p>Currently, service directories such as xmpp.net and jabberes.org publish their information on the World Wide Web, typically at a human-friendly website and sometimes also by means of 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.net service publishes a file listing registered public servers using the &xep0030; format.)</p>
<p>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 &xep0060; node at the directory's bare domain (e.g., xmpp.net) that pushes data in the vCard4 format, 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.</p>
2012-01-09 16:17:06 -05:00
<p>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.</p>
<example caption='Directory Pushes Server Data to Subscriber'><![CDATA[
<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>
2012-01-25 11:55:03 -05:00
<registration xmlns='urn:xmpp:vcard:registration:1'>
<uri>https://register.jabber.org/</uri>
2012-01-09 16:17:06 -05:00
</registration>
2012-01-25 11:55:03 -05:00
<ca xmlns='urn:xmpp:vcard:ca:0'>
<name>StartSSL</uri>
<uri>http://www.startssl.com/</uri>
</ca>
<name xmlns='jabber:iq:version'>Isode M-Link</name>
2012-01-09 16:17:06 -05:00
</vcard>
</item>
</items>
</event>
</message>
]]></example>
</section1>
2011-12-12 18:15:52 -05:00
<section1 topic='Security Considerations' anchor='security'>
2012-05-29 21:08:17 -04:00
<p>Because a service directory does not know about an XMPP service unless the administrator of the service initiates a presence subscription to the directory, information leakage is minimized.</p>
2011-12-12 18:15:52 -05:00
<p>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.</p>
2012-01-10 14:27:16 -05:00
<p>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.</p>
2011-12-12 18:15:52 -05:00
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-namespaces'>
2012-05-29 21:08:17 -04:00
<p>This document registers the following XML namespaces:</p>
<ul>
<li>'urn:xmpp:vcard:registration:1' (used to qualify the XMPP-specific vCard4 extension for account registration URLs)</li>
<li>'urn:xmpp:vcard:ca:0' (used to qualify the XMPP-specific vCard4 extension for information about certification authorities)</li>
</ul>
<p>The XMPP Registrar shall add these namespaces to its registry at &NAMESPACES;.</p>
2011-12-12 18:15:52 -05:00
</section2>
<section2 topic='Service Discovery Category/Type' anchor='registrar-discocat'>
2012-01-10 14:27:16 -05:00
<p>This document specifies that a service directory is identified by the "directory" category and the "server" type within XMPP Service Discovery.</p>
2011-12-12 18:15:52 -05:00
<p>The XMPP Registrar shall add the "server" type to the "directory" category already listed in the registry at &DISCOCATEGORIES;. The registration is as follows.</p>
<code caption='Registry Submission'><![CDATA[
<category>
<name>directory</name>
<type>
<name>server</name>
<desc>A directory of XMPP servers</desc>
2012-05-29 21:08:17 -04:00
<doc>XEP-0309</doc>
2011-12-12 18:15:52 -05:00
</type>
</category>
]]></code>
</section2>
<section2 topic='Service Discovery Features' anchor='registrar-features'>
<p>This document specifies that a public server on the XMPP network is identified by the "urn:xmpp:public-server" Service Discovery feature.</p>
<p>The XMPP Registrar shall add this feature to its registry at &DISCOFEATURES;. The registration is as follows.</p>
<code caption='Registry Submission'><![CDATA[
<var>
<name>urn:xmpp:public-server</name>
<desc>The server is a public node on the XMPP network</desc>
2012-05-29 21:08:17 -04:00
<doc>XEP-0309</doc>
2011-12-12 18:15:52 -05:00
</var>
]]></code>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
2012-01-25 11:55:03 -05:00
<section2 topic='Registration URI' anchor='schema-reg'>
<code><![CDATA[
2011-12-12 18:15:52 -05:00
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
2012-01-25 11:55:03 -05:00
targetNamespace='urn:xmpp:vcard:registration:1'
xmlns='urn:xmpp:vcard:registration:1'
2011-12-12 18:15:52 -05:00
elementFormDefault='qualified'>
<xs:element name='registration'>
<xs:complexType>
<xs:sequence>
2012-01-25 11:55:03 -05:00
<xs:element name='uri' type='xs:anyURI'/>
2011-12-12 18:15:52 -05:00
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
2012-01-25 11:55:03 -05:00
]]></code>
</section2>
<section2 topic='Certification Authority Information' anchor='schema-ca'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:vcard:ca:0'
xmlns='urn:xmpp:vcard:ca:0'
elementFormDefault='qualified'>
<xs:element name='ca'>
<xs:complexType>
<xs:sequence>
<xs:element name='name' type='xs:string'/>
<xs:element name='uri' type='xs:anyURI'/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
]]></code>
</section2>
2011-12-12 18:15:52 -05:00
</section1>
</xep>