DNS-Based Authentication of Named Entities (DANE) | T. Finch |
Internet-Draft | University of Cambridge |
Intended status: Standards Track | M. Miller |
Expires: April 24, 2015 | Cisco Systems, Inc. |
P. Saint-Andre | |
&yet | |
October 21, 2014 |
Using DNS-Based Authentication of Named Entities (DANE) TLSA Records with SRV Records
draft-ietf-dane-srv-08
The DANE specification (RFC 6698) describes how to use TLSA resource records in the DNS to associate a server's host name with its TLS certificate, where the association is secured with DNSSEC. However, application protocols that use SRV records (RFC 2782) to indirectly name the target server host names for a service domain cannot apply the rules from RFC 6698. Therefore this document provides guidelines that enable such protocols to locate and use TLSA records.
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 April 24, 2015.
Copyright (c) 2014 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.
The base DANE specification [RFC6698] describes how to use TLSA resource records in the DNS to associate a server's host name with its TLS certificate, where the association is secured using DNSSEC. That document "only relates to securely associating certificates for TLS and DTLS with host names" (see the last paragraph of section 1.2 of [RFC6698]).
Some application protocols do not use host names directly; instead, they use a service domain, and the relevant target server host names are located indirectly via SRV records [RFC2782]. Because of this intermediate resolution step, the normal DANE rules specified in [RFC6698] cannot be applied to protocols that use SRV records. (Rules for SMTP [RFC5321], which uses MX records instead of SRV records, are described in [I-D.ietf-dane-smtp-with-dane].)
This document describes how to use DANE TLSA records with SRV records. To summarize:
Note: The "CertID" specification [RFC6125] does not use the terms "service domain" and "target server host name", but refers to the same entities with the terms "source domain" and "derived domain".
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this memo are to be interpreted as described in [RFC2119].
This draft uses the definitions for "secure", "insecure", "bogus", and "indeterminate" from [RFC4035]. This draft uses the acronyms from [RFC7218] for the values of TLSA fields where appropriate.
When the client makes an SRV query, a successful result will typically be a list of one or more SRV records (or possibly a chain of CNAME / DNAME aliases leading to such a list). Implementers need to be aware that unsuccessful results can occur because of various DNS-related errors; a helpful summary can be found in section 2.1 of [I-D.ietf-dane-smtp-with-dane].
For this specification to apply, the entire DNS RRset that is returned MUST be "secure" according to DNSSSEC validation ([RFC4033] section 5). In the case of aliases, the whole chain of CNAME and DNAME RRsets MUST be secure as well. This corresponds to the AD bit being set in the response(s); see [RFC4035] section 3.2.3.
If the the entire RRset is "insecure", this protocol has not been correctly deployed. The client SHOULD fall back to its non-DNSSEC, non-DANE behavior (this corresponds to the AD bit being unset). If the entire RRset is "bogus", the client MUST abort the attempt.
In the successful case, the client now has an authentic list of target server host names with weight and priority values. It performs server ordering and selection using the weight and priority values without regard to the presence or absence of DNSSEC or TLSA records. It also takes note of the DNSSEC validation status of the SRV response for use when checking certificate names (see Section 4). The client can now proceed to making address queries on the target server host names as described in the next section.
For each SRV target server host name, the client makes A and AAAA queries, performs DNSSEC validation on the address (A or AAAA) response, and continues as follows based on the results:
The client SHALL construct the TLSA query name as described in [RFC6698] section 3, based on fields from the SRV record: the port from the SRV RDATA, the protocol from the SRV query name, and the TLSA base domain set to the SRV target server host name.
For example, the following SRV record for IMAP (see [RFC6186]) leads to the TLSA query shown below:
_imap._tcp.example.com. 86400 IN SRV 10 0 9143 imap.example.net. _9143._tcp.imap.example.net. IN TLSA ?
The client SHALL determine if the TLSA record(s) returned in the previous step are usable according to section 4.1 of [RFC6698]. This affects the use TLS as follows:
When connecting to a server, the client MUST use TLS if the responses to the SRV and TLSA queries were "secure" as described above. The rules described in the next two sections apply.
If the client received zero usable TLSA certificate associations, it SHALL validate the server's TLS certificate using the normal PKIX rules [RFC5280] or protocol-specific rules (e.g., following [RFC6125]) without further input from the TLSA records.
In this case, the client uses the information in the server certificate and the DNSSEC validation status of the SRV query in its authentication checks. It SHOULD use the Server Name Indication extension (TLS SNI) [RFC6066] or its functional equivalent in the relevant application protocol (e.g., in XMPP [RFC6120] this is the 'to' address of the initial stream header). The preferred name SHALL be chosen as follows, and the client SHALL verify the identity asserted by the server's certificate according to section 6 of [RFC6125], using a list of reference identifiers constructed as follows (note again that in RFC 6125 the terms "source domain" and "derived domain" refer to the same things as "service domain" and "target server host name" in this document). The examples below assume a service domain of "im.example.com" and a target server host name of "xmpp23.hosting.example.net".
In the latter case, the client will accept either identity to ensure compatibility with servers that support this specification as well as servers that do not support this specification.
If the client received one or more usable TLSA certificate associations, it SHALL process them as described in section 2.1 of [RFC6698].
If the TLS server's certificate -- or the public key of the server's certificate -- matches a usable TLSA record with Certificate Usage "DANE-EE", the client MUST consider the server to be authenticated. Because the information in such a TLSA record supersedes the non-key information in the certificate, all other [RFC5280] and [RFC6125] authentication checks (e.g., reference identifier, key usage, expiration, issuance) MUST be ignored or omitted.
This document describes how to use DANE with application protocols in which target servers are discovered via SRV records. Although this document attempts to provide generic guidance applying to all such protocols, additional documents for particular application protocols could cover related topics, such as:
For example, [I-D.ietf-xmpp-dna] covers such topics for the Extensible Messaging and Presence Protocol (XMPP).
To conform to this specification, the published SRV records and subsequent address (A and AAAA) records MUST be secured with DNSSEC. There SHOULD also be at least one TLSA record published that authenticates the server's certificate.
When using TLSA records with Certificate Usage "DANE-EE", it is not necessary for the deployed certificate to contain an identifier for either the source domain or target server host name. However, operators need to be aware that servers relying solely on validation using Certificate Usage "DANE-EE" TLSA records might prevent clients that do not support this specification from successfully connecting with TLS.
For TLSA records with Certificate Usage types other than "DANE-EE", the certificate(s) MUST contain an identifier that matches:
Servers that support multiple service domains (i.e., so-called "multi-tenanted environments") can implement the Transport Layer Security Server Name Indication (TLS SNI) [RFC6066] or its functional equivalent to determine which certificate to offer. Clients that do not support this specification will indicate a preference for the service domain name, while clients that support this specification will indicate the target server host name. However, the server determines what certificate to present in the TLS handshake; e.g., the presented certificate might only authenticate the target server host name.
Developers of application clients that depend on DANE-SRV often would like to prepare as quickly as possible for making a connection to the intended service, thus reducing the wait time for end users. To make this optimization possible, a DNS library might perform the SRV queries, address queries, and TLSA queries in parallel (because a TLSA record can be ignored if it turns out that the address record on which it depends is not secure, performing the TLSA queries in parallel with the SRV queries and address queries is not harmful from a security perspective and can yield some operational benefits).
If any of the DNS queries are for an internationalized domain name, then they need to use the A-label form [RFC5890].
No IANA action is required.
We do not specify that clients checking all of a service domain's target server host names are consistent in whether they have or do not have TLSA records. This is so that partial or incremental deployment does not break the service. Different levels of deployment are likely if a service domain has a third-party fallback server, for example.
The SRV sorting rules are unchanged; in particular they have not been altered in order to prioritize secure servers over insecure servers. If a site wants to be secure it needs to deploy this protocol completely; a partial deployment is not secure and we make no special effort to support it.
By signing their zone with DNSSEC, service domain operators implicitly instruct their clients to check their server TLSA records. This implies another point in the trust relationship between service domain holders and their server operators. Most of the setup requirements for this protocol fall on the server operator: installing a TLS certificate with the correct name (where necessary), and publishing a TLSA record for that certificate. If these are not correct then connections from TLSA-aware clients might fail.
Section 4 of the TLSA specification [RFC6698] leaves the details of checking names in certificates to higher level application protocols, though it suggests the use of [RFC6125].
Name checks are not necessary if the matching TLSA record is of Certificate Usage "DANE-EE". Because such a record identifies the specific certificate (or public key of the certificate), additional checks are superfluous and potentially conflicting.
Otherwise, while DNSSEC provides a secure binding between the server name and the TLSA record, and the TLSA record provides a binding to a certificate, this latter step can be indirect via a chain of certificates. For example, a Certificate Usage "PKIX-TA" TLSA record only authenticates the CA that issued the certificate, and third parties can obtain certificates from the same CA. Therefore, clients need to check whether the server's certificate matches one of the expected reference identifiers to ensure that the certificate was issued by the CA to the server the client expects.
Thanks to Mark Andrews for arguing that authenticating the target server host name is the right thing, and that we ought to rely on DNSSEC to secure the SRV lookup. Thanks to James Cloos, Viktor Dukhovni, Ned Freed, Olafur Gudmundsson, Paul Hoffman, Phil Pennock, Hector Santos, Jonas Schneider, and Alessandro Vesely for helpful suggestions.
[I-D.ietf-dane-smtp-with-dane] | Dukhovni, V. and W. Hardaker, "SMTP security via opportunistic DANE TLS", Internet-Draft draft-ietf-dane-smtp-with-dane-04, November 2013. |
[I-D.ietf-xmpp-dna] | Saint-Andre, P. and M. Miller, "Domain Name Associations (DNA) in the Extensible Messaging and Presence Protocol (XMPP)", Internet-Draft draft-ietf-xmpp-dna-05, February 2014. |
[RFC3403] | Mealling, M., "Dynamic Delegation Discovery System (DDDS) Part Three: The Domain Name System (DNS) Database", RFC 3403, October 2002. |
In the following, most of the DNS resource data is elided for simplicity.
; mail domain _imap._tcp.example.com. SRV 10 0 9143 imap.example.net. example.com. RRSIG SRV ... ; target server host name imap.example.net. A 192.0.2.1 imap.example.net. RRSIG A ... imap.example.net. AAAA 2001:db8:212:8::e:1 imap.example.net. RRSIG ... ; TLSA resource record _9143._tcp.imap.example.net. TLSA ... _9143._tcp.imap.example.net. RRSIG TLSA ...
Mail messages submitted for addresses at example.com are sent via IMAP to imap.example.net. Connections to imap.example.net port 9143 that use STARTTLS will get a server certificate that authenticates the name imap.example.net.
; XMPP domain _xmpp-client.example.com. SRV 1 0 5222 im.example.net. _xmpp-client.example.com. RRSIG SRV ... ; target server host name im.example.net. A 192.0.2.3 im.example.net. RRSIG A ... im.example.net. AAAA 2001:db8:212:8::e:4 im.example.net. RRSIG AAAA ... ; TLSA resource record _5222._tcp.im.example.net. TLSA ... _5222._tcp.im.example.net. RRSIG TLSA ...
XMPP sessions for addresses at example.com are established at im.example.net. Connections to im.example.net port 5222 that use STARTTLS will get a server certificate that authenticates the name im.example.net.
The long-term goal of this specification is to settle on TLS certificates that verify the target server host name rather than the service domain, since this is more convenient for servers hosting multiple domains (so-called "multi-tenanted environments") and scales up more easily to larger numbers of service domains.
There are a number of other reasons for doing it this way:
This specification does not provide an option to put TLSA records under the service domain because that would add complexity without providing any benefit, and security protocols are best kept simple. As described above, there are real-world cases where authenticating the service domain cannot be made to work, so there would be complicated criteria for when service domain TLSA records might be used and when they cannot. This is all avoided by putting the TLSA records under the target server host name.
The disadvantage is that clients which do not complete DNSSEC validation must, according to [RFC6125] rules, check the server certificate against the service domain, since they have no other way to authenticate the server. This means that SNI support or its functional equivalent is necessary for backward compatibility.