1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 02:02:16 -05:00
This commit is contained in:
Peter Saint-Andre 2012-05-29 19:08:17 -06:00
parent a46bf68d67
commit f9a050d7c5

124
xep-0309.xml Normal file → Executable file
View File

@ -21,6 +21,12 @@
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
&stpeter;
<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>
<revision>
<version>0.2</version>
<date>2012-01-25</date>
@ -54,7 +60,7 @@
</header>
<section1 topic='Introduction' anchor='introduction'>
<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>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>
<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>
@ -67,7 +73,7 @@
<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>
<p>These two entities use &xep0267;, &xep0030;, and &xep0292; in the following ways.</p>
<code><![CDATA[
Directory Server
Directory Service
(xmpp.net) (jabber.org)
| |
| [first, server learns |
@ -117,16 +123,17 @@ Directory Server
</query>
</iq>
]]></example>
<p>Note: Inclusion of the "directory/server" identity indicates that xmpp.net is a service directory.</p>
</section2>
<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 directory as described in XEP-0267.</p>
<example caption="Server Sends Subscription Request to Directory"><![CDATA[
<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[
<presence from='jabber.org'
to='xmpp.net'
type='subscribe'/>
]]></example>
<p>Upon receiving such the presence subscription request, the directory approves it.</p>
<p>Upon receiving the presence subscription request, the directory approves it.</p>
<example caption="Directory Sends Approval to Server"><![CDATA[
<presence from='xmpp.net'
to='jabber.org'
@ -138,89 +145,16 @@ Directory Server
to='jabber.org'
type='subscribe'/>
]]></example>
<p>The server then approves that subscription request, as well.</p>
<example caption="Services Sends Approval to Directory"><![CDATA[
<p>The service then approves that subscription request, as well.</p>
<example caption="Service Sends Approval to Directory"><![CDATA[
<presence from='jabber.org'
to='xmpp.net'
type='subscribed'/>
]]></example>
<section3 topic='Administrator Triggers Presence Subscription' anchor='gather-buddy-trigger'>
<p>The server administator needs a way to trigger the server to send a presence subscription to the directory. This can be done by using &xep0050; as in &xep0133;. 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".</p>
<p>A sample protocol flow for this use case is shown below.</p>
<example caption='Admin Requests to Add Server Buddy'><![CDATA[
<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>
]]></example>
<p>Unless an error occurs, the service SHOULD return the appropriate form.</p>
<example caption='Service Returns Server Buddy Form to Admin'><![CDATA[
<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>
]]></example>
<example caption='Admin Submits Server Buddy Form to Service'><![CDATA[
<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>
]]></example>
<example caption='Service Informs Admin of Completion'><![CDATA[
<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>
]]></example>
</section3>
</section2>
<section2 topic='Directory Queries Server' anchor='gather-query'>
<p>After the subscription handshake has been completed, the directory 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 directory queries the server for information. There are two aspects: service discovery ("disco") information and vCard information.</p>
<section3 topic='Disco Query' anchor='gather-query-disco'>
<p>In order to determine the exact identity of the server, the directory sends a service discovery information request to the server.</p>
<example caption='Directory Queries Server'><![CDATA[
@ -248,7 +182,7 @@ Directory Server
]]></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 directory 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). A directory MAY also gather disco#items data about components and other services associated with the base XMPP service at a domain.</p>
</section3>
<section3 topic='vCard Query' anchor='gather-query-vcard'>
<p>In order to gather additional information about the server, the directory sends a vCard information request to the server.</p>
@ -296,7 +230,7 @@ Directory Server
<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>
<li>A vCard KIND of "application" (&lt;kind&gt;&lt;text&gt;application&lt;/text&gt;&lt;/kind&gt;) as defined in &rfc6473;</li>
</ul>
<p>It is OPTIONAL for public server vCards to include the following information:</p>
<ul>
@ -306,16 +240,16 @@ Directory Server
<li>Geographical coordinates for the service (&lt;geo/&gt;)</li>
<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>
<li>Software name (&lt;name/&gt; element qualified by the 'jabber:iq:version' namespace defined)</li>
<li>Software name (&lt;name/&gt; element qualified by the 'jabber:iq:version' namespace defined in &xep0092;)</li>
</ul>
<p>It is best for the server directory to discover the last two elements in-band (by means of TLS negotiation and &xep0092;, respectively), then add them to the contact vCard as described in the next section.</p>
<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>
</section3>
</section2>
</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>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>
<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'
@ -359,7 +293,7 @@ Directory Server
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>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.</p>
<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>
<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 service directory to explicitly indicate that it gathers service information obtained from XMPP servers that contact it.</p>
</section1>
@ -370,8 +304,12 @@ Directory Server
<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>
<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>
</section2>
<section2 topic='Service Discovery Category/Type' anchor='registrar-discocat'>
<p>This document specifies that a service directory is identified by the "directory" category and the "server" type within XMPP Service Discovery.</p>
@ -382,7 +320,7 @@ Directory Server
<type>
<name>server</name>
<desc>A directory of XMPP servers</desc>
<doc>[TBD]</doc>
<doc>XEP-0309</doc>
</type>
</category>
]]></code>
@ -394,7 +332,7 @@ Directory Server
<var>
<name>urn:xmpp:public-server</name>
<desc>The server is a public node on the XMPP network</desc>
<doc>[TBD]</doc>
<doc>XEP-0309</doc>
</var>
]]></code>
</section2>