DNS-Based Authentication of Named Entities (DANE) | T. Finch |
Internet-Draft | University of Cambridge |
Intended status: Standards Track | February 2013 |
Expires: August 5, 2013 |
Using DNS-Based Authentication of Named Entities (DANE) TLSA records with SRV and MX records.
draft-ietf-dane-srv-01
The DANE specification [RFC6698] describes how to use TLSA resource records in the DNS to associate a server's host name with its TLS certificate. The association is secured with DNSSEC. Some application protocols can use SRV records [RFC2782] to indirectly name the server hosts for a service domain. (SMTP uses MX records for the same purpose.) This specification gives generic instructions for how these application protocols locate and use TLSA records. Separate documents give the details that are specific to particular application protocols.
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 August 5, 2013.
Copyright (c) 2013 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. 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, but instead use a service domain. The domain's servers are located indirectly via SRV records [RFC2782] (or MX records in the case of SMTP [RFC5321]). When they do not use host names [RFC6698] does not direcly apply to these protocols.
This document describes how to use DANE TLSA records with SRV and MX records. To summarize:
Separate documents give the details that are specific to particular application protocols. For examples, see [I-D.ietf-dane-smtp] and [I-D.ietf-dane-mua].
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this memo are to be interpreted as described in [RFC2119].
For the purpose of this specification (to avoid cluttering the description with special cases) each MX record ([RFC5321] section 5) is treated as being equivalent to a SRV record [RFC2782] with corresponding fields copied from the MX record and the remaining fields having fixed values as follows:
example.com. 86400 IN MX 10 mx.example.net. _smtp._tcp.example.com. 86400 IN SRV 10 0 25 mx.example.net.
For example this MX record is treated as if it were the following SRV record:
Other details that are specific to SMTP are described in [I-D.ietf-dane-smtp].
When the client makes a SRV query, a successful result will be (a possible chain of CNAME / DNAME aliases referring to) a list of one or more SRV records.
For this specification to take effect, all of these DNS RRsets MUST be "secure" according to DNSSSEC validation ([RFC4033] section 5). In the case of aliases, the whole chain MUST be secure as well as the ultimate target. (This corresponds to the AD bit being set in the response(s) - see [RFC4035] section 3.2.3.)
If they are not all secure, this protocol has not been fully deployed. The client SHOULD fall back to its non-DNSSEC non-DANE behaviour. (This corresponds to the AD bit being unset.)
If any of the responses is "bogus" according to DNSSEC validation the client MUST abort. (This usually corresponds to a "server failure" response.)
In the successful case, the client now has an authentic list of 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 takes note of the DNSSEC validation status of the SRV response for use when checking certificate names (see section Section 3).
This sub-section applies to each server host name individually, provided the SRV response was secure according to DNSSEC validation.
The client SHALL construct the TLSA query name as described in [RFC6698] section 3, based on fields from the SRV record: port from the SRV RDATA, protocol from the SRV query name, and the TLSA base domain is the SRV target host name.
_imap._tcp.example.com. 86400 IN SRV 10 0 143 imap.example.net. _143._tcp.imap.example.net. IN TLSA ?
For example this SRV record leads to the following TLSA query:
The client SHALL determine if the TLSA record(s) are usable according to section 4.1 of [RFC6698]. This affects SRV handling as follows:
If the TLSA response is "secure" the client MUST use TLS when connecting to the server. If the client receives zero usable certificate associations, it processes TLS in the normal fashion without any input from the TLSA records. If the client receives one or more usable certificate associations, it processes them as described in [RFC6698].
If the TLSA response is "insecure" or "indeterminate" the client SHALL proceed as if this server has no TLSA records. It MAY connect to the server with or without TLS.
If the TLSA response is "bogus" then the client MUST NOT connect to the corresponding server. (The client can still use other SRV targets.)
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 client SHALL ensure the server's certificate passes the [RFC6698] checks if there are usable TLSA records.
The client uses the DNSSEC validation status of the SRV query in its server certificate identity checks. (The TLSA validation status does not affect the server certificate identity checks.) It MUST use the Server Name Indication extension (TLS SNI) [RFC6066] with the preferred name chosen as follows. It SHALL verify the identity asserted by the server's certificate according to [RFC6125] section 6, using a list of reference identifiers constructed as follows.
(In the latter case, the client will accept either identity so it is compatible with servers that do and do not support this specification.)
Separate documents describe how to apply this specification to particular application protocols. If you are writing such as document the following points ought to be covered: (This section is currently sketchy.)
In order to support this specification, server software MUST implement the TLS Server Name Indication extension (TLS SNI) [RFC6066] for selecting the appropriate certificate.
A server that supports TLS and is the target of a SRV record MUST have a TLS certificate that authenticates the SRV query domain (i.e. the service domain, or "source domain" in [RFC6125] terms). This is necessary for clients that cannot perform DNSSEC validation. This certificate MUST be the default that is presented if the client does not use TLS SNI.
In order to support this specification, the server SHOULD also have a certificate that authenticates the SRV target domain (the mail server hostname). This can be done using a multi-name certificate or by using the client's TLS SNI to select the appropriate certificate. The server's TLSA record SHOULD correspond to this certificate.
Note: In some application protocols, there are old non-SRV clients that expect a server's TLS certificate to authenticate its host name; they are also unlikely to support SNI. This means that servers for old clients need a different default certificate from servers that are the targets of SRV records. If the server does not have a certificate that authenticates all relevant names, it is necessary to segregate old and new clients. This can be done by using different target hosts or non-standard ports in the SRV targets. (The latter avoids the need for additional certificates.)
We do not specify that clients check that all of a service domain's 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 fall-back server, for example.
The SRV and MX 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, and publishing a TLSA record under that name. 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 checking might appear to be unnecessary, since DNSSEC provides a secure binding between the server name and the TLSA record, which in turn authenticates the certificate. However this latter step can be indirect, via a chain of certificates. A usage=0 TLSA record only authenticates the CA that issued the certificate, and third parties can obtain certificates from the same CA.
So this specification says that clients check that the server's certificate matches the server host name, to ensure that the certificate was issued by the CA to the server that the client is connecting to. The client always performs this check regardless of the TLSA usage, to simplify implementation and so that this specification is less likely to need updating when new TLSA usages are added.
We do not specify that clients check the DNSSEC state of the server address records. This is not necessary since the certificate checks ensure that the client has connected to the correct server. (The address records will normally have the same security state as the TLSA records, but they can differ if there are CNAME or DNAME indirections.)
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.
Thanks to Mark Andrews for arguing that authenticating the server host name is the right thing, and that we ought to rely on DNSSEC to secure the SRV / MX lookup. Thanks to James Cloos, Ned Freed, Olafur Gudmundsson, Paul Hoffman, Phil Pennock, Hector Santos, Jonas Schneider, and Alessandro Vesely for helpful suggestions.
[I-D.ietf-dane-smtp] | Finch, T., "DNS-Based Authentication of Named Entities (DANE) for secure SMTP", Internet-Draft draft-ietf-dane-smtp, March 2013. |
[I-D.ietf-dane-mua] | Finch, T., "DNS-Based Authentication of Named Entities (DANE) for POP, IMAP, and message submission", Internet-Draft draft-ietf-dane-mua, March 2013. |
In the following, most of the DNS resource data is elided for simplicity.
; mail domain example.com. MX 1 mx.example.net. example.com. RRSIG MX ... ; SMTP server host name mx.example.net. A 192.0.2.1 mx.example.net. AAAA 2001:db8:212:8::e:1 ; TLSA resource record _25._tcp.mx.example.net. TLSA ... _25._tcp.mx.example.net. RRSIG TLSA ...
Mail for addresses at example.com is delivered by SMTP to mx.example.net. Connections to mx.example.net port 25 that use STARTTLS will get a server certificate that authenticates the name mx.example.net.
The long-term goal of this specification is to settle on TLS certificates that verify the server host name rather than the service domain, since this is more convenient for servers hosting multiple domains 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 server host name.
The disadvantage is that clients which do not do 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 Server Name Indication support is necessary for backwards compatibility.