1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-25 18:52:23 -05:00
This commit is contained in:
stpeter 2012-01-09 14:17:06 -07:00
parent 90fff6b71f
commit 04d16b2a81

View File

@ -6,7 +6,7 @@
<?xml-stylesheet type='text/xsl' href='xep.xsl'?> <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep> <xep>
<header> <header>
<title>XMPP Network Information Sharing</title> <title>Service Directories</title>
<abstract>This specification shows how to combine and extend a number of existing XMPP protocols for improved sharing of information about XMPP servers.</abstract> <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; &LEGALNOTICE;
<number>xxxx</number> <number>xxxx</number>
@ -21,6 +21,12 @@
<supersededby/> <supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname> <shortname>NOT_YET_ASSIGNED</shortname>
&stpeter; &stpeter;
<revision>
<version>0.0.2</version>
<date>2012-01-09</date>
<initials>psa</initials>
<remark><p>Second draft; added ad-hoc command and defined data sharing via PEP.</p></remark>
</revision>
<revision> <revision>
<version>0.0.1</version> <version>0.0.1</version>
<date>2011-12-12</date> <date>2011-12-12</date>
@ -30,22 +36,23 @@
</header> </header>
<section1 topic='Introduction' anchor='introduction'> <section1 topic='Introduction' anchor='introduction'>
<p>Several services (e.g., at xmpp.org and jabberes.org) have long provided information about public XMPP servers so that end users can more easily find a server to register with, gateways to use, etc. These services tend to rely on humans to gather and in some cases verify the information before providing it via the World Wide Web for use by end users and IM client software. However, relying on humans to gather and verify such information results in significant delays, errors, and out-of-date information.</p> <p>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 &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>
<p>This document shows how to combine and extend a number of existing XMPP protocols for (mostly) automated sharing of information about XMPP servers. Widespread deployment of this specification will result in more timely, accurate information about the XMPP network.</p> <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>
</section1> </section1>
<section1 topic='Scenario' anchor='scenario'> <section1 topic='Gathering Information' anchor='gather'>
<p>The following scenario involves two entities:</p> <p>The following scenario involves two entities:</p>
<ul> <ul>
<li>A network information aggregator, xmpp.net (which can be thought of as an information sink)</li> <li>A server directory: xmpp.net</li>
<li>A public XMPP server, jabber.org (which can be thought of as an information source).</li> <li>A public XMPP service: jabber.org</li>
</ul> </ul>
<p>These two entities use &xep0267;, &xep0030;, and &xep0292; in the following ways.</p> <p>These two entities use &xep0267;, &xep0030;, and &xep0292; in the following ways.</p>
<code><![CDATA[ <code><![CDATA[
Aggregator Server Directory Server
(xmpp.net) (jabber.org)
| | | |
| [first, server learns | | [first, server learns |
| aggregator identity] | | identity of directory] |
| | | |
|<---disco info request-------| |<---disco info request-------|
|----disco info response----->| |----disco info response----->|
@ -58,7 +65,7 @@ Aggregator Server
|----presence subscribe------>| |----presence subscribe------>|
|<---presence subscribed------| |<---presence subscribed------|
| | | |
| [third, aggregator | | [third, directory |
| gathers server data] | | gathers server data] |
| | | |
|----disco info request------>| |----disco info request------>|
@ -68,11 +75,9 @@ Aggregator Server
|<---vcard response-----------| |<---vcard response-----------|
| | | |
]]></code> ]]></code>
</section1> <section2 topic='Server Discovers Directory' anchor='gather-disco'>
<section1 topic='Server Discovers Aggregator' anchor='disco'>
<p>In order to determine the exact identity of the aggregator, the server sends a service discovery information request to the aggregator.</p> <p>In order to determine the exact identity of the aggregator, the server sends a service discovery information request to the aggregator.</p>
<example caption='Server Queries Aggregator'><![CDATA[ <example caption='Server Queries Directory'><![CDATA[
<iq type='get' <iq type='get'
from='jabber.org' from='jabber.org'
to='xmpp.net' to='xmpp.net'
@ -80,7 +85,7 @@ Aggregator Server
<query xmlns='http://jabber.org/protocol/disco#info'/> <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq> </iq>
]]></example> ]]></example>
<example caption='Aggregator Returns Disco Info'><![CDATA[ <example caption='Directory Returns Disco Info'><![CDATA[
<iq type='result' <iq type='result'
from='xmpp.net' from='xmpp.net'
to='jabber.org' to='jabber.org'
@ -93,40 +98,40 @@ Aggregator Server
</query> </query>
</iq> </iq>
]]></example> ]]></example>
</section1> </section2>
<section1 topic='Server Subscribes to Aggregator' anchor='buddy'> <section2 topic='Server Subscribes to Directory' anchor='gather-buddy'>
<p>If the server wishes to have its information aggregated, it sends a presence subscription request to the aggregator as described in XEP-0267.</p> <p>If the server wishes to have its information aggregated, it sends a presence subscription request to the aggregator as described in XEP-0267.</p>
<example caption="Server sends subscription request to aggregator"><![CDATA[ <example caption="Server Sends Subscription Request to Directory"><![CDATA[
<presence from='jabber.org' <presence from='jabber.org'
to='xmpp.net' to='xmpp.net'
type='subscribe'/> type='subscribe'/>
]]></example> ]]></example>
<p>Upon receiving such the presence subscription request, the aggregator approves it.</p> <p>Upon receiving such the presence subscription request, the aggregator approves it.</p>
<example caption="Aggregator sends approval to server"><![CDATA[ <example caption="Directory Sends Approval to Server"><![CDATA[
<presence from='xmpp.net' <presence from='xmpp.net'
to='jabber.org' to='jabber.org'
type='subscribed'/> type='subscribed'/>
]]></example> ]]></example>
<p>The aggregator also sends a subscription request to the server.</p> <p>The aggregator also sends a subscription request to the server.</p>
<example caption="Aggregator sends subscription request to server"><![CDATA[ <example caption="Directory Sends Subscription Request to Server"><![CDATA[
<presence from='xmpp.net' <presence from='xmpp.net'
to='jabber.org' to='jabber.org'
type='subscribe'/> type='subscribe'/>
]]></example> ]]></example>
<p>The server then approves that subscription request, as well.</p> <p>The server then approves that subscription request, as well.</p>
<example caption="Services sends approval to aggregator"><![CDATA[ <example caption="Services Sends Approval to Directory"><![CDATA[
<presence from='jabber.org' <presence from='jabber.org'
to='xmpp.net' to='xmpp.net'
type='subscribed'/> type='subscribed'/>
]]></example> ]]></example>
</section1> </section2>
<section1 topic='Aggregator Queries Server' anchor='query'> <section2 topic='Directory Queries Server' anchor='gather-query'>
<p>After the subscription handshake has been completed, the aggregator queries the server for information. There are two aspects: service discovery information and vCard information.</p> <p>After the subscription handshake has been completed, the aggregator queries the server for information. There are two aspects: service discovery information and vCard information.</p>
<section2 topic='Disco Query' anchor='query-disco'> <section3 topic='Disco Query' anchor='gather-query-disco'>
<p>In order to determine the exact identity of the server, the aggregator sends a service discovery information request to the server.</p> <p>In order to determine the exact identity of the server, the aggregator sends a service discovery information request to the server.</p>
<example caption='Aggregator Queries Server'><![CDATA[ <example caption='Directory Queries Server'><![CDATA[
<iq type='get' <iq type='get'
from='xmpp.net' from='xmpp.net'
to='jabber.org' to='jabber.org'
@ -152,11 +157,11 @@ Aggregator Server
<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 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> <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>
<p>The foregoing examples show the gathering of disco#info data (identity and supported features). An aggregator MAY also gather disco#items data about components and other services associated with the base XMPP server at a domain.</p> <p>The foregoing examples show the gathering of disco#info data (identity and supported features). An aggregator MAY also gather disco#items data about components and other services associated with the base XMPP server at a domain.</p>
</section2> </section3>
<section2 topic='vCard Query' anchor='query-vcard'> <section3 topic='vCard Query' anchor='gather-query-vcard'>
<p>In order to gather additional information about the server, the aggregator sends a vCard information request to the server.</p> <p>In order to gather additional information about the server, the aggregator sends a vCard information request to the server.</p>
<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> <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="Aggregator Requests vCard Data from Server"><![CDATA[ <example caption="Directory Requests vCard Data from Server"><![CDATA[
<iq from='xmpp.net' <iq from='xmpp.net'
id='lw71bs73' id='lw71bs73'
to='jabber.org' to='jabber.org'
@ -209,9 +214,50 @@ Aggregator Server
<li>Geographical coordinates for the service (&lt;geo/&gt;)</li> <li>Geographical coordinates for the service (&lt;geo/&gt;)</li>
<li>Registration URL (&lt;registration xmlns='urn:xmpp:vcard:registration'/&gt;)</li> <li>Registration URL (&lt;registration xmlns='urn:xmpp:vcard:registration'/&gt;)</li>
</ul> </ul>
</section3>
</section2> </section2>
</section1> </section1>
<section1 topic='Publishing Information' anchor='publish'>
<p>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 &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 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.</p>
<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>
<registration xmlns='urn:xmpp:vcard:registration'>
<url>https://register.jabber.org/</url>
</registration>
</vcard>
</item>
</items>
</event>
</message>
]]></example>
</section1>
<section1 topic='Security Considerations' anchor='security'> <section1 topic='Security Considerations' anchor='security'>
<p>Because a network information aggregator does not know about an XMPP server unless the administrator of the server initiates a presence subscription to the aggregator, information leakage is minimized.</p> <p>Because a network information aggregator does not know about an XMPP server unless the administrator of the server initiates a presence subscription to the aggregator, information leakage is minimized.</p>
<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> <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>