This document defines a DNS TXT Resource Record format for use in specifying methods of connecting to an XMPP server.
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.
Publisher: XMPP Standards Foundation
Type: Standards Track
Last Updated: 2007-01-29
Approving Body: XMPP Council
Dependencies: XMPP Core, RFC 1464
Superseded By: None
Short Name: N/A
Wiki Page: <http://wiki.jabber.org/index.php/A DNS TXT Resource Record Format for XMPP Connection Methods (XEP-0156)>
This XMPP Extension Protocol is copyright 1999 - 2007 by the XMPP Standards Foundation (XSF) and is in full conformance with the XSF's Intellectual Property Rights Policy <http://www.xmpp.org/extensions/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).
The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.
Given that this XMPP Extension Protocol normatively references IETF technologies, discussion on the XSF-IETF list may also be appropriate (see <http://mail.jabber.org/mailman/listinfo/jsf-ietf> for details).
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The following keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
Although RFC 3920  specifies the use of TCP as the method of connecting to an XMPP server, other connection methods are possible. These include the HTTP Binding  method, the Jabber HTTP Polling  method (now deprecated), and less common methods such as Wireless Access Protocol (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 connection methods before connecting to an XMPP service, the relevant information must 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:
Specify a WSDL  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 may 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 RFC 3920.
Specify a way to define the required service discovery information as part of the existing DNS SRV records (see RFC 2782 ) 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).
Specify a way to define the required service discovery using the "straightforward NAPTR" (S-NAPTR) profile of the Dynamic Delegation Discovery System (see RFC 3958  and RFC 3401 ). Unfortunately, S-NAPTR also does not allow inclusion of full URIs, and thus does not meet the requirements for discovery of XMPP connection methods.
Specify a way to define the required service discovery using the "URI-enabled NAPTR" (U-NAPTR) profile of the Dynamic Delegation Discovery System (see U-NAPTR ). 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).
Specify a way to define the required service discovery information via properly-formatted DNS TXT records (see RFC 1464 ). 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 Sender Policy Framework and SenderID email server verification technologies).
Therefore this document defines a way to encapsulate information about XMPP connection methods in DNS TXT resource records. However, the authors will monitor the availability of DDDS-based systems and may request that the methods defined in this document be deprecated at some point in the future.
The discovery mechanism specified herein MAY also be used to define the ports at which standard XMPP TCP services are offered; this is especially useful when XMPP service administrators do not have access to SRV records (e.g., because many DNS services do not yet support SRV records). However, any values (e.g., port numbers) presented via SRV records MUST be taken as canonical and MUST supersede values provided via TXT records.
The following format for DNS TXT resource records is specified in RFC 1464:
<owner> <class> <ttl> <TXT> <"attribute name=attribute value">
This document specifies that the following additional rules apply for DNS TXT resource records used to specify XMPP connection methods:
The following business rules apply:
The following examples show three DNS TXT resource records: the first indicates support for the httpbind connection method defined in XEP-0124 including the appropriate URL, the second indicates support for the httppoll connection method defined in XEP-0025 including the appropriate URL, and the third indicates support for WAP connections including the appropriate URL, and the fourth indicates support for the older, SSL-only connection method for clients.
_xmppconnect IN TXT "_xmpp-client-httpbind=https://web.jabber.org:8080/bind.cgi" _xmppconnect IN TXT "_xmpp-client-wap=http://wap.jabber.org/connector.cgi" _xmppconnect IN TXT "_xmpp-client-tcpssl=5223"
It is possible that advertisement of connection methods other than the standard TCP connection method may 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 must be taken in determining which connection methods are appropriate to advertise.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) .
The XMPP Registrar shall maintain a registry of attributes for use in DNS TXT resource records that advertise XMPP connection methods.
In order to submit new values to this registry, the registrant must define an XML fragment of the following form and either include it in the relevant XMPP Extension Protocol or send it to the email address <email@example.com>:
<attribute> <name>the name of the attribute</name> <desc>a natural-language description of the connection method</desc> <value>the syntax or datatype of the attribute value</value> <doc>the document in which the connection method is specified</doc> </attribute>
The registrant may register more than one attribute at a time, each contained in a separate <attribute/> element.
<attribute> <name>_xmpp-client-httpbind</name> <desc>the HTTP Binding connection method</desc> <value>the http: or https: URL at which to contact the HTTP Binding connection manager or proxy</value> <doc>XEP-0124</doc> </attribute> <attribute> <name>_xmpp-client-httppoll</name> <desc>the HTTP Polling connection method</desc> <value>the http: or https: URL at which to contact the HTTP Polling connection manager or proxy</value> <doc>XEP-0025</doc> </attribute> <attribute> <name>_xmpp-client-tcp</name> <desc>standard client-to-server TCP connection method (usually on port 5222)</desc> <value>may contain the port number (however, this should be discovered via SRV)</value> <doc>RFC 3920</doc> </attribute> <attribute> <name>_xmpp-client-tcpssl</name> <desc>old-style SSL-encrypted client-to-server TCP connection method</desc> <value>should contain the port number (traditionally 5223)</value> <doc>N/A</doc> </attribute> <attribute> <name>_xmpp-server-tcp</name> <desc>standard server-to-server TCP connection method (usually on port 5269)</desc> <value>may contain the port number (however, this should be discovered via SRV)</value> <doc>RFC 3920</doc> </attribute>
9. Domain-based Application Service Location Using URIs and the Dynamic Delegation Discovery Service <http://www.ietf.org/internet-drafts/draft-daigle-unaptr-01.txt>. Work in progress.
11. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
Added _xmpp-client-tcpssl for old-style SSL connections; discussed potential for using U-NAPTR.(psa)
Clarified order of lookups; restored _xmpp-client-tcp and added _xmpp-server-tcp as optional records if SRV is not supported or accessible.(psa)
Removed _xmpp-client-tcp from TXT records (belongs in SRV records only).(psa)
More fully specified the rationale for using DNS TXT records.(psa)
Added security considerations and registrar considerations.(psa)