1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-23 17:52:15 -05:00
xeps/xep-0156.xml
2011-04-12 08:37:30 -06:00

180 lines
11 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>Discovering Alternative XMPP Connection Methods</title>
<abstract>This document defines a DNS TXT Resource Record format for use in discovering alternative methods of connecting to an XMPP server.</abstract>
&LEGALNOTICE;
<number>0156</number>
<status>Draft</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>RFC 1464</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>alt-connections</shortname>
<registry/>
&hildjj;
&stpeter;
<revision>
<version>1.0</version>
<date>2007-06-12</date>
<initials>psa</initials>
<remark><p>Per a vote of the XMPP Council, advanced status to Draft; XMPP Registrar assigned alt-connections shortname and created appropriate registry.</p></remark>
</revision>
<revision>
<version>0.7</version>
<date>2007-04-18</date>
<initials>psa</initials>
<remark><p>Updated to reflect renaming of HTTP Binding to XMPP Over BOSH.</p></remark>
</revision>
<revision>
<version>0.6</version>
<date>2007-01-30</date>
<initials>psa</initials>
<remark><p>Finally and definitively removed _xmpp-client-tcp and _xmpp-server-tcp attributes since clients and servers should use either SRV records or standard XMPP ports (5222 or 5269).</p></remark>
</revision>
<revision>
<version>0.5</version>
<date>2007-01-30</date>
<initials>psa</initials>
<remark><p>Removed _xmpp-client-tcpssl attribute since use of the old-style SSL-only port is discouraged.</p></remark>
</revision>
<revision>
<version>0.4</version>
<date>2007-01-29</date>
<initials>psa</initials>
<remark><p>Added _xmpp-client-tcpssl for old-style SSL connections; added discussion of IETF U-NAPTR technology.</p></remark>
</revision>
<revision>
<version>0.3</version>
<date>2006-05-16</date>
<initials>psa</initials>
<remark><p>Clarified order of lookups; restored _xmpp-client-tcp and added _xmpp-server-tcp as optional records if SRV is not supported or accessible.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2005-12-05</date>
<initials>psa</initials>
<remark><p>Removed _xmpp-client-tcp from TXT records (belongs in SRV records only).</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2005-09-08</date>
<initials>psa</initials>
<remark><p>Initial version.</p></remark>
</revision>
<revision>
<version>0.0.3</version>
<date>2005-09-07</date>
<initials>psa</initials>
<remark><p>More fully specified the rationale for using DNS TXT records.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2005-08-27</date>
<initials>psa</initials>
<remark><p>Added security considerations and registrar considerations.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2005-08-23</date>
<initials>psa/jh</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>Although &xmppcore; specifies the use of TCP as the method of connecting to an XMPP server, alternative connection methods exist, including the &xep0124; method for which &xep0206; is the XMPP profile, the &xep0025; method (now deprecated), and less common methods such as &wap;. For some of these methods, it is necessary to discover further parameters before connecting, such as the HTTP URL of an alternative connection manager. Currently, if a client application needs to discover alternative connection methods before connecting to an XMPP service, the relevant information needs to be provided manually by a human user, which is cumbersome and error-prone. Thankfully, there are several potential ways to complete this pre-connection service discovery in an automated fashion:</p>
<ol>
<li><p>Define a &w3wsdl; definition (or other XML file format) and a canonical URL for that definition at a domain that offers XMPP services. Unfortunately, this approach requires access to the HTTP server for the domain (and quite possibly to the root directory thereof), which can be difficult for XMPP server administrators to arrange. In addition, it requires a client to retrieve the relevant file via HTTP before performing DNS lookups and XMPP connection; it would be more efficient to use recognized DNS methods since DNS lookups are already required by <cite>RFC 6120</cite>.</p></li>
<li><p>Define a way to specify alternative connection methods as part of the existing DNS SRV records (see &rfc2782;) for a domain that offers XMPP services. While this approach sounds promising, it is not feasible since the DNS SRV Target field can be used only to specify domain names and cannot be used to specify full URIs (such as the URL for an HTTP connection manager).</p></li>
<li><p>Define a way to specify alternative connection methods using the "straightforward NAPTR" (S-NAPTR) profile of the Dynamic Delegation Discovery System (see &rfc3958; and &rfc3401;). Unfortunately, S-NAPTR also does not allow inclusion of full URIs, and thus does not meet the requirements for discovery of alternative connection methods.</p></li>
<li><p>Define a way to specify alternative connection methods using the "URI-enabled NAPTR" (U-NAPTR) profile of the Dynamic Delegation Discovery System (see &rfc4848;). While this is a valid approach that is worth pursuing, the authors are concerned about the deployability of such an approach given the rarity of support for DDDS and U-NAPTR, especially in client-side applications (the main focus of this specification).</p></li>
<li><p>Define a way to specify alternative connection methods via properly-formatted DNS TXT records (see &rfc1464;). While this approach requires an update to the DNS records for the server domain, that is usually necessary in order to establish XMPP services in the first place. Furthermore, although there are some perils to be avoided in the use of DNS TXT records (e.g., wildcards), the technology is well understood and widely deployed (e.g., it is used by the <link url='http://www.openspf.org/'>Sender Policy Framework</link> and <link url='http://www.microsoft.com/mscorp/safety/technologies/senderid/default.mspx'>SenderID</link> email server verification technologies).</p></li>
</ol>
<p>This document defines a way to encapsulate information about alternative connection methods in DNS TXT resource records. However, the authors will monitor the availability of DDDS-based systems supporting U-NAPTR, and might request deprecation of the DNS TXT methods defined in this document at some point in the future.</p>
</section1>
<section1 topic='Record Format' anchor='format'>
<p>The following format for DNS TXT resource records is specified in <cite>RFC 1464</cite>:</p>
<code><![CDATA[
<owner> <class> <ttl> <TXT> <"attribute name=attribute value">
]]></code>
<p>This document specifies that the following additional rules apply for DNS TXT resource records used to specify alternative connection methods:</p>
<ol>
<li>It is RECOMMENDED for the owner to be "_xmppconnect".</li>
<li>The class field SHOULD be IN.</li>
<li>The ttl field is OPTIONAL.</li>
<li>The attribute name SHOULD begin with the string "_xmpp-client-" or "_xmpp-server-" and SHOULD be registered as described in the <link url='#registrar'>XMPP Registrar Considerations</link> section of this document.</li>
<li>If the txt-data field contains only an attribute name (i.e., no unquoted "=" character followed by additional characters), the receiving application SHOULD interpret it as indicating the presence of the attribute or feature with no defined value.</li>
<li>If the txt-data field contains an unquoted "=" character, it MUST also contain an attribute value.</li>
</ol>
</section1>
<section1 topic='Business Rules' anchor='bizrules'>
<p>The following business rules apply:</p>
<ol start='1'>
<li>TXT lookups MUST be used only as a fallback after the methods specified in <cite>RFC 6120</cite> have been exhausted. <note>The point of this rule is to prevent someone from defining a new XEP-0156 connection method like "_xmpp-client-tcp" to override the SRV records defined in the core XMPP specification.</note></li>
<li>A domain SHOULD NOT present information in DNS TXT records that is available via the DNS SRV records defined in <cite>RFC 6120</cite>.</li>
<li>The order of DNS TXT records SHOULD NOT be interpreted as significant by the presenting domain or the receiving entity.</li>
</ol>
</section1>
<section1 topic='Examples' anchor='examples'>
<p>The following examples show two DNS TXT resource records: the first indicates support for the XMPP Over BOSH connection method defined in <cite>XEP-0124</cite> and <cite>XEP-0206</cite> and the second indicates support for WAP connections (the latter connection method is not yet defined).</p>
<example caption='TXT Resource Records'><![CDATA[
_xmppconnect IN TXT "_xmpp-client-xbosh=https://bosh.jabber.org:5280/bind"
_xmppconnect IN TXT "_xmpp-client-wap=http://wap.jabber.org/connector"
]]></example>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>It is possible that advertisement of alternative connection methods can introduce security vulnerabilities, since a connecting entity (usually a client) might deliberately seek to connect using the method with the weakest security mechanisms (e.g., no channel encryption or relatively weak authentication). Care needs to be taken in determining which alternative connection methods are appropriate to advertise.</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='Alternative Connection Methods Registry' anchor='registrar-altconn'>
<p>The &REGISTRAR; maintains a registry of attributes for use in DNS TXT resource records that advertise alternative XMPP connection methods (see &ALTCONN;).</p>
<section3 topic='Process' anchor='registrar-altconn-process'>
&REGPROCESS;
<code><![CDATA[
<method>
<name>the name of the attribute to be used in DNS TXT records</name>
<desc>a natural-language description of the alternative connection method</desc>
<syntax>the syntax of the DNS TXT record attribute value</syntax>
<doc>the document in which the alternative connection method is specified</doc>
</method>
]]></code>
<p>The registrant can register more than one attribute at a time, each contained in a separate &lt;method/&gt; element.</p>
</section3>
<section3 topic='Initial Registration' anchor='registrar-altconn-init'>
<code><![CDATA[
<method>
<name>_xmpp-client-httppoll</name>
<desc>HTTP Polling connection method</desc>
<syntax>
The http: or https: URL at which to contact the HTTP Polling connection manager or proxy
</syntax>
<doc>XEP-0025</doc>
</method>
<method>
<name>_xmpp-client-xbosh</name>
<desc>XMPP Over Bosh connection method</desc>
<syntax>
The http: or https: URL at which to contact the HTTP Binding connection manager or proxy
</syntax>
<doc>XEP-0206</doc>
</method>
]]></code>
</section3>
</section2>
</section1>
</xep>