1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-28 12:12:22 -05:00
xeps/inbox/network.xml
2011-12-12 16:15:52 -07:00

280 lines
12 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>XMPP Network Information Sharing</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>
&LEGALNOTICE;
<number>xxxx</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>
&stpeter;
<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'>
<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>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>
</section1>
<section1 topic='Scenario' anchor='scenario'>
<p>The following scenario involves two entities:</p>
<ul>
<li>A network information aggregator, xmpp.net (which can be thought of as an information sink)</li>
<li>A public XMPP server, jabber.org (which can be thought of as an information source).</li>
</ul>
<p>These two entities use &xep0267;, &xep0030;, and &xep0292; in the following ways.</p>
<code><![CDATA[
Aggregator Server
| |
| [first, server learns |
| aggregator identity] |
| |
|<---disco info request-------|
|----disco info response----->|
| |
| [second, entities become |
| "buddies" per XEP-0267] |
| |
|<---presence subscribe-------|
|----presence subscribed----->|
|----presence subscribe------>|
|<---presence subscribed------|
| |
| [third, aggregator |
| gathers server data] |
| |
|----disco info request------>|
|<---disco info response------|
| |
|----vcard request----------->|
|<---vcard response-----------|
| |
]]></code>
</section1>
<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>
<example caption='Server Queries Aggregator'><![CDATA[
<iq type='get'
from='jabber.org'
to='xmpp.net'
id='xh1f37n5'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption='Aggregator Returns Disco Info'><![CDATA[
<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>
]]></example>
</section1>
<section1 topic='Server Subscribes to Aggregator' anchor='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>
<example caption="Server sends subscription request to aggregator"><![CDATA[
<presence from='jabber.org'
to='xmpp.net'
type='subscribe'/>
]]></example>
<p>Upon receiving such the presence subscription request, the aggregator approves it.</p>
<example caption="Aggregator sends approval to server"><![CDATA[
<presence from='xmpp.net'
to='jabber.org'
type='subscribed'/>
]]></example>
<p>The aggregator also sends a subscription request to the server.</p>
<example caption="Aggregator sends subscription request to server"><![CDATA[
<presence from='xmpp.net'
to='jabber.org'
type='subscribe'/>
]]></example>
<p>The server then approves that subscription request, as well.</p>
<example caption="Services sends approval to aggregator"><![CDATA[
<presence from='jabber.org'
to='xmpp.net'
type='subscribed'/>
]]></example>
</section1>
<section1 topic='Aggregator Queries Server' anchor='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>
<section2 topic='Disco Query' anchor='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>
<example caption='Aggregator Queries Server'><![CDATA[
<iq type='get'
from='xmpp.net'
to='jabber.org'
id='i3vs51b9'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption='Server Returns Disco Info'><![CDATA[
<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>
]]></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>
<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>
<section2 topic='vCard Query' anchor='query-vcard'>
<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>
<example caption="Aggregator Requests vCard Data from Server"><![CDATA[
<iq from='xmpp.net'
id='lw71bs73'
to='jabber.org'
type='get'>
<vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/>
</iq>
]]></example>
<example caption="Server Returns vCard Data"><![CDATA[
<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>
]]></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>
<li>A vCard KIND of "application" (&lt;kind&gt;&lt;text&gt;application&lt;/text&gt;&lt;/kind&gt;)</li>
</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>
<li>Registration URL (&lt;registration xmlns='urn:xmpp:vcard:registration'/&gt;)</li>
</ul>
</section2>
</section1>
<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>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 "directory/server" service discovery identity provides a way for a network information aggregator to explicitly indicate that it aggregates information obtained from XMPP servers that contact it.</p>
</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'>
<p>This document specifies that the 'urn:xmpp:vcard:registration' namespace is used to qualify the XMPP-specific vCard4 extension for account registration URLs.</p>
<p>The XMPP Registrar shall add this namespace to its registry at &NAMESPACES;.</p>
</section2>
<section2 topic='Service Discovery Category/Type' anchor='registrar-discocat'>
<p>This document specifies that a network information aggregator is identified by the "directory" category and the "server" type within XMPP Service Discovery.</p>
<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>
<doc>[TBD]</doc>
</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>
<doc>[TBD}/doc>
</var>
]]></code>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?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>
]]></code>
</section1>
</xep>