<abstract>This document defines a DNS TXT Resource Record format for use in discovering alternative methods of connecting to an XMPP server.</abstract>
<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>
<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>
<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>
<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) and &xmppoverwebsocket;. For some of these methods, it is necessary to discover further parameters before connecting, such as the HTTP URL of an alternative connection manager. Without ways to auto-discovering alternative connection methods, the relevant information would need to be provided manually by a human user, which is cumbersome and error-prone.</p>
<p>This document defines two ways to encapsulate information about alternative connection methods for auto-discovery:</p>
<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 <linkurl='#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>
<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>
</section2>
<section2topic='Examples'anchor='dnsexamples'>
<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>
<p>The HTTP lookup method uses Web Host Metadata &rfc6415; to categorize and list the URIs of alternative connection methods. It is primarily intended for use by clients in environments where the ability to perform DNS queries is restricted, such as in web browsers.</p>
<p>Each alternative connection method is specified in the host-meta (XRD) file using a distinctive link relation &rfc5988;. This specification defines several extension relation types:</p>
<li>HTTP queries for host-meta information MUST be used only as a fallback after the methods specified in <cite>RFC 6120</cite> have been exhausted.</li>
<li>A domain SHOULD NOT present information in host-meta link records that is available via the DNS SRV records defined in <cite>RFC 6120</cite>.</li>
<li>The order of XMPP related link entries in the host-meta file records SHOULD NOT be interpreted as significant by the presenting domain or the receiving entity.</li>
</ol>
</section2>
<section2topic='Examples'anchor='httpexamples'>
<p>The following examples show two host-meta link 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 the &xmppoverwebsocket; connection method.</p>
<examplecaption='Result for /.well-known/host-meta'><![CDATA[<?xml version='1.0' encoding=utf-9'?>
<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>
<p>Because the link relations specified here are extension relation types rather than registered relation types (see Section 4 of RFC 5988), this document requires no interaction with &IANA;.</p>
<p>The ®ISTRAR; maintains a registry of attributes for use in DNS TXT resource records that advertise alternative XMPP connection methods (see &ALTCONN;).</p>