Network Working Group | P. Saint-Andre |
Internet-Draft | &yet |
Intended status: Standards Track | M. Miller |
Expires: March 4, 2016 | Cisco Systems, Inc. |
P. Hancke | |
&yet | |
September 1, 2015 |
Domain Name Associations (DNA) in the Extensible Messaging and Presence Protocol (XMPP)
draft-ietf-xmpp-dna-11
This document improves the security of the Extensible Messaging and Presence Protocol (XMPP) in two ways. First, it specifies how to establish a strong association between a domain name and an XML stream, using the concept of "prooftypes". Second, it describes how to securely delegate a service domain name (e.g., example.com) to a target server host name (e.g., hosting.example.net), which is especially important in multi-tenanted environments where the same target server hosts a large number of domains.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 4, 2016.
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
In systems that use the Extensible Messaging and Presence Protocol (XMPP) [RFC6120], it is important to establish a strong association between the DNS domain name of an XMPP service (e.g., example.com) and the XML stream that a client or peer server initiates with that service. In other words, the client or peer server needs to verify the identity of the server to which it connects. Additionally, servers need to verify incoming connections from other servers.
To date, such verification has been established based on information obtained from the Domain Name System (DNS), the Public Key Infrastructure (PKI), or similar sources. In particular, XMPP as defined in [RFC6120] assumed that domain name associations are to be proved using the "PKIX prooftype"; that is, the server's proof consists of a PKIX certificate that is checked according to the XMPP profile of the matching rules from [RFC6125] (and the overall validation rules from [RFC5280]), the client's verification material is obtained out of band in the form of a trusted root, and secure DNS is not necessary.
By extending the concept of a domain name association within XMPP, this document does the following:
This document also provides guidelines for secure delegation of a service domain name (e.g., example.com) to a target server host name (e.g., hosting.example.net). The need for secure delegation arises because the process for resolving the domain name of an XMPP service into the IP address at which an XML stream will be negotiated (see [RFC6120]) can involve delegation of a service domain name to a target server host name using technologies such as DNS SRV records [RFC2782]. A more detailed description of the delegation problem can be found in [I-D.ietf-xmpp-posh]. The domain name association can be verified only if the delegation is done in a secure manner.
This document inherits XMPP terminology from [RFC6120] and [XEP-0220], DNS terminology from [RFC1034], [RFC1035], [RFC2782] and [RFC4033], and security terminology from [RFC4949] and [RFC5280]. The terms "reference identity", and "presented identity" are used as defined in the "CertID" specification [RFC6125]. For the sake of consistency with [I-D.ietf-dane-srv], this document uses the terms "service domain name" and "target server host name" to refer to the same entities identified by the terms "source domain" and "derived domain" from [RFC6125].
The client-to-server case is much simpler than the server-to-server case because the client does not assert a domain name, which means verification happens in only one direction. Therefore we describe this case first to help the reader understand domain name associations in XMPP.
The following flow chart illustrates the protocol flow for establishing a domain name association for an XML stream from a client (C) to a server (S) using the standard PKIX prooftype specified in [RFC6120].
| DNS RESOLUTION ETC. | +-----------------STREAM HEADERS---------------------+ | | | C: <stream to='a.example'> | | | | S: <stream from='a.example'> | | | +----------------------------------------------------+ | +-----------------TLS NEGOTIATION--------------------+ | | | S: Server Certificate | | | +----------------------------------------------------+ | (client checks certificate and establishes DNA for a.example)
The simplified order of events (see [RFC6120] for details) in establishing an XML stream from a client (user@a.exmaple) to a server (a.example) is as follows:
The certificate that the server presents might not be acceptable to the client. As one example, the server might be hosting multiple domains and secure delegation as described in Section 6 is necessary. As another example, the server might present a self-signed certificate, which requires the client to apply either the fallback process described in section 6.6.4 of [RFC6125] or prompt the user to accept an unauthenticated connection as described in Section 3.4 of [RFC7590].
The server-to-server case is significantly more complex than the client-to-server case, and involves checking of domain name associations in both directions along with other "wrinkles" described in the following sections. In some parts of the flow, server-to-server communications use the Server Dialback protocol first specified in (the now obsolete) [RFC3920] and since moved to [XEP-0220]. See "Impact of TLS and DNSSEC on Dialback" [XEP-0344] for considerations when using it together with TLS and DNSSEC. Also, "Bidirectional Server-to-Server Connections" [XEP-0288] provides a way to use the server-to-server connections for bidirectional exchange of XML stanzas, which reduces the complexity of some of the processes involved.
The following flow charts illustrate the protocol flow for establishing domain name associations between Server 1 (the initiating entity) and Server 2 (the receiving entity), as described in the remaining sections of this document.
A simple S2S scenario would be as follows.
| DNS RESOLUTION ETC. | +-------------STREAM HEADERS--------------------+ | | | A: <stream from='a.example' to='b.example'> | | | | B: <stream from='b.example' to='a.example'> | | | +-----------------------------------------------+ | +-------------TLS NEGOTIATION-------------------+ | | | B: Server Certificate | | B: Certificate Request | | A: Client Certificate | | | +-----------------------------------------------+ | (A establishes DNA for b.example) |
After the domain name association has been established in one direction, it is possible to perform mutual authentication using Simple Authentication and Security Layer (SASL) [RFC4422] and thus establish domain name associations in both directions.
| +-------------AUTHENTICATION--------------------+ | | | | {valid client certificate?} --+ | | | | | | | yes no | | | v | | | SASL EXTERNAL | | | (mutual auth) | | | (B establishes DNA for a.example) | | +-------------------------------------|---------+ |
However, if mutual authentication cannot be completed using SASL, the receiving server needs to establish a domain name association in another way. This scenario is described in Section 4.3.
| +-----------------+ | (Section 4.3: No Mutual PKIX authentication) | | B needs to establish DNA | for this stream from a.example, | so A asserts its identity | +----------DIALBACK IDENTITY ASSERTION----------+ | | | A: <db:result from='a.example' | | to='b.example'> | | some-dialback-key | | </db:result> | | | +-----------------------------------------------+ | DNS RESOLUTION ETC. | +-------------STREAM HEADERS--------------------+ | | | B: <stream from='b.example' to='a.example'> | | | | A: <stream from='a.example' to='b.example'> | | | +-----------------------------------------------+ | +-------------TLS NEGOTIATION-------------------+ | | | A: Server Certificate | | | +-----------------------------------------------+ | +----------DIALBACK IDENTITY VERIFICATION-------+ | | | B: <db:verify from='b.example' | | to='a.example' | | id='...'> | | some-dialback-key | | </db:verify> | | | | A: <db:verify from='a.example' | | to='b.example' | | type='valid' | | id='...'> | | | +-----------------------------------------------+ | (B establishes DNA for a.example) |
If one of the servers hosts additional service names (e.g., Server 2 might host c.example in addition to b.example and Server 1 might host rooms.a.example in addition to a.example), then the servers can use Server Dialback "piggybacking" to establish additional domain name associations for the stream, as described in Section 4.4.
There are two varieties of piggybacking. The first is here called "assertion".
| (Section 4.4.1: Piggybacking Assertion) | +----------DIALBACK IDENTITY ASSERTION----------+ | | | B: <db:result from='c.example' | | to='a.example'/> | | | +-----------------------------------------------+ | +-----------DNA DANCE AS ABOVE------------------+ | | | DNS RESOLUTION, STREAM HEADERS, | | TLS NEGOTIATION, AUTHENTICATION | | | +-----------------------------------------------+ | +----------DIALBACK IDENTITY VERIFICATION-------+ | | | A: <db:result from='a.example' | | to='c.example' | | type='valid'/> | | | +-----------------------------------------------+ |
The second variety of piggybacking is here called "supposition".
| (Section 4.4.2: Piggybacking Supposition) | +-----------SUBSEQUENT CONNECTION---------------+ | | | B: <stream from='c.example' | | to='rooms.a.example'> | | | | A: <stream from='rooms.a.example' | | to='c.example'> | | | +-----------------------------------------------+ | +-----------DNA DANCE AS ABOVE------------------+ | | | DNS RESOLUTION, STREAM HEADERS, | | TLS NEGOTIATION, AUTHENTICATION | | | +-----------------------------------------------+ | +-----------DIALBACK OPTIMIZATION---------------+ | | | B: <db:result from='c.example' | | to='rooms.a.example'/> | | | | B: <db:result from='rooms.a.example' | | to='c.example' | | type='valid'/> | | | +-----------------------------------------------+
To illustrate the problem, consider the simplified order of events (see [RFC6120] for details) in establishing an XML stream between Server 1 (a.example) and Server 2 (b.example):
Several simplifying assumptions underlie the happy scenario just outlined:
Let's consider each of these "wrinkles" in turn.
If the PKIX certificate presented by Server 1 during TLS negotiation is not acceptable to Server 2, Server 2 is unable to mutually authenticate Server 1. Therefore, Server 2 needs to verify the asserted identity of Server 1 by other means.
In some situations (e.g., if the Authoritative Server in Server Dialback presents the same certificate as the Originating Server), it is the practice of some XMPP server implementations to skip steps 8 and 9. These situations are discussed in "Impact of TLS and DNSSEC on Dialback" [XEP-0344].
Consider the common scenario in which Server 2 hosts not only b.example but also a second domain c.example (often called a "multi-tenanted" environment). If a user of Server 2 associated with c.example wishes to communicate with a friend at a.example, Server 2 needs to send XMPP stanzas from the domain c.example rather than b.example. Although Server 2 could open a new TCP connection and negotiate new XML streams for the domain pair of c.example and a.example, that is wasteful (especially if Server 2 hosts a large number of domains). Server 2 already has a connection to a.example, so how can it assert that it would like to add a new domain pair to the existing connection?
The traditional method for doing so is the Server Dialback protocol [XEP-0220]. Here, Server 2 can send a <db:result/> element for the new domain pair over the existing stream.
<db:result from='c.example' to='a.example'> some-dialback-key </db:result>
This element functions as Server 2's assertion that it is (also) c.example, and thus is functionally equivalent to the 'from' address of an initial stream header as previously described.
In response to this assertion, Server 1 needs to obtain some kind of proof that Server 2 really is also c.example. If the certificate presented by Server 2 is also valid for c.example then no further action is necessary. However, if not then Server 1 needs to do a bit more work. Specifically, Server 1 can pursue the same strategy it used before:
Now that Server 1 accepts the domain name association, it informs Server 2 of that fact:
<db:result from='a.example' to='c.example' type='valid'/>
The parties can then terminate the second connection, since it was used only for Server 1 to associate a stream with the domain name c.example (the dialback key links the original stream to the new association).
Piggybacking can also occur in the other direction. Consider the common scenario in which Server 1 provides XMPP services not only for a.example but also for a subdomain such as a Multi-User Chat [XEP-0045] service at rooms.a.example. If a user from c.example at Server 2 wishes to join a room on the groupchat sevice, Server 2 needs to send XMPP stanzas from the domain c.example to the domain rooms.a.example rather than a.example.
First, Server 2 needs to determine whether it can piggyback the domain rooms.a.example on the connection to a.example:
Server 2 sends a dialback key to Server 1 over the existing connection.
<db:result from='c.example' to='rooms.a.example'> some-dialback-key </db:result>
Server 1 then informs Server 2 that it accepts the domain name association:
<db:result from='rooms.a.example' to='c.example' type='valid'/>
The foregoing protocol flows assumed that domain name associations were proved using the PKIX prooftype. However, sometimes XMPP server administrators are unable or unwilling to obtain valid PKIX certificates for all of the domains they host at their servers. For example:
(Additional discussion can be found in [I-D.ietf-xmpp-posh].)
In these circumstances, prooftypes other than PKIX are desirable or necessary. As described below, two alternatives have been defined so far: DNS-Based Authentication of Named Entities (DANE) and PKIX Over Secure HTTP (POSH).
The DANE prooftype is defined as follows:
The DANE prooftype makes use of DNS-Based Authentication of Named Entities [RFC6698], specifically the use of DANE with DNS SRV records [I-D.ietf-dane-srv]. For XMPP purposes, the following rules apply:
The POSH prooftype is defined as follows:
POSH is defined in [I-D.ietf-xmpp-posh]. For XMPP purposes, the following rules apply:
The well-known URIs [RFC5785] to be used for POSH are:
One common method for deploying XMPP services is multi-tenancy: e.g., XMPP services for the service domain example.com are actually hosted at the target server hosting.example.net. Such an arrangement is relatively convenient in XMPP given the use of DNS SRV records [RFC2782], such as the following delegation from example.com to hosting.example.net:
_xmpp-server._tcp.example.com. 0 IN SRV 0 0 5269 hosting.example.net
Secure connections with multi-tenancy can work using the PKIX prooftype on a small scale if the provider itself wishes to host several domains (e.g., related domains such as jabber-de.example and jabber-ch.example). However, in practice the security of multi-tenancy has been found to be unwieldy when the provider hosts large numbers of XMPP services on behalf of multiple tenants (see [I-D.ietf-xmpp-posh] for a detailed description). As a result, server-to-server communications to example.com go unencrypted or the communications are TLS-encrypted but the certificates are not checked (which is functionally equivalent to a connection using an anonymous key exchange). This is also true of client-to-server communications, forcing end users to override certificate warnings or configure their clients to accept or "pin" certificates for hosting.example.net instead of example.com. The fundamental problem here is that if DNSSEC is not used then the act of delegation via DNS SRV records is inherently insecure.
The specification for use of SRV records with DANE [I-D.ietf-dane-srv] explains how to use DNSSEC for secure delegation with the DANE prooftype, and the POSH specification [I-D.ietf-xmpp-posh] explains how to use HTTPS redirects for secure delegation with the POSH prooftype.
In general, a domain name association (DNA) prooftype conforms to the following definition:
The PKIX, DANE, and POSH prooftypes adhere to this model. (Some prooftypes depend on, or are enhanced by, secure DNS [RFC4033] and thus also need to describe how they ensure secure delegation.)
Other prooftypes are possible; examples might include TLS with PGP keys [RFC6091], a token mechanism such as Kerberos [RFC4120] or OAuth [RFC6749], and Server Dialback keys [XEP-0220].
Although the PKIX prooftype reuses the syntax of the XMPP Server Dialback protocol [XEP-0220] for signaling between servers, this framework document does not define how the generation and validation of Server Dialback keys (also specified in [XEP-0220]) is a DNA prooftype. However, nothing in this document prevents the continued use of Server Dialback for signaling, and a future specification (or an updated version of [XEP-0220]) might define a DNA prooftype for Server Dialback keys in a way that is consistent with this framework.
This document introduces the concept of a prooftype in order to explain and generalize the approach to establishing a strong association between the DNS domain name of an XMPP service and the XML stream that a client or peer server initiates with that service.
The operations and management implications of DNA prooftypes will depend on the particular prooftypes that an operator supports. For example:
Considerations for use of the foregoing prooftypes are explained in the relevant specifications. See in particular Section 13.7 of [RFC6120], Section 6 of [I-D.ietf-dane-srv], and Section 8 of [I-D.ietf-xmpp-posh].
Naturally, these operations and management considerations are additive: if an operator wishes to use multiple prooftypes, the complexity of deployment increases (e.g., the operator might want to obtain a PKIX certificate from a certification authority for use in the PKIX prooftype and generate its own certificate for use in the DANE prooftype). This is an unavoidable aspect of supporting as many prooftypes as needed in order to ensure that domain name associations can be established in the largest possible percentage of cases.
The POSH specification [I-D.ietf-xmpp-posh] establishes a registry for POSH service names to be used in well-known URIs [RFC5785]. This specification registers two such URIs for use in XMPP: "xmpp-client" and "xmpp-server". The completed registration templates follow.
Service name: xmpp-client
Change controller: IETF
Definition and usage: Specifies the location of a POSH file containing verification material or a reference thereto that enables a client to verify the identity of a server for a client-to-server stream in XMPP
Specification: [[ this document ]]
Service name: xmpp-server
Change controller: IETF
Definition and usage: Specifies the location of a POSH file containing verification material or a reference thereto that enables a server to verify the identity of a peer server for a server-to-server stream in XMPP
Specification: [[ this document ]]
With regard to the PKIX prooftype, this document supplements but does not supersede the security considerations of [RFC6120] and [RFC6125].
With regard to the DANE and PKIX prooftypes, the reader is referred to [I-D.ietf-dane-srv] and [I-D.ietf-xmpp-posh], respectively.
Any future prooftypes need to thoroughly describe how they conform to the prooftype model specified in Section 7 of this document.
Richard Barnes, Stephen Farrell, and Jonas Lindberg contributed as co-authors to earlier draft versions of this document.
Derek Atkins, Mahesh Jethanandani, and Dan Romascanu reviewed the document on behalf of the Security Directorate, the Operations and Management Directorate, and the General Area Review Team, respectively.
During IESG review, Stephen Farrell and Barry Leiba provided helpful input that led to improvements in the specification.
Thanks to Dave Cridland as document shepherd, Joe Hildebrand as working group chair, and Ben Campbell as area director.
Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for employing him during his work on earlier draft versions of this document.