draft-ietf-dane-protocol-00.txt   draft-ietf-dane-protocol-01.txt 
Network Working Group P. Hoffman Network Working Group P. Hoffman
Internet-Draft VPN Consortium Internet-Draft VPN Consortium
Intended status: Standards Track J. Schlyter Intended status: Standards Track J. Schlyter
Expires: June 16, 2011 Kirei AB Expires: July 12, 2011 Kirei AB
December 13, 2010 January 8, 2011
Using Secure DNS to Associate Certificates with Domain Names For TLS Using Secure DNS to Associate Certificates with Domain Names For TLS
draft-ietf-dane-protocol-00 draft-ietf-dane-protocol-01
Abstract Abstract
TLS and DTLS use certificates for authenticating the server. Users TLS and DTLS use certificates for authenticating the server. Users
want their applications to verify that the certificate provided by want their applications to verify that the certificate provided by
the TLS server is in fact associated with the domain name they the TLS server is in fact associated with the domain name they
expect. Instead of trusting a certification authority to have made expect. Instead of trusting a certification authority to have made
this association correctly, the user might instead trust the this association correctly, the user might instead trust the
authoritative DNS server for the domain name to make that authoritative DNS server for the domain name to make that
association. This document describes how to use secure DNS to association. This document describes how to use secure DNS to
skipping to change at page 1, line 39 skipping to change at page 1, line 39
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on June 16, 2011. This Internet-Draft will expire on July 12, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 43 skipping to change at page 2, line 43
relates to securely associating certificates for TLS and DTLS with relates to securely associating certificates for TLS and DTLS with
host names; other security protocols are handled in other documents. host names; other security protocols are handled in other documents.
For example, keys for IPsec are covered in [RFC4025] and keys for SSH For example, keys for IPsec are covered in [RFC4025] and keys for SSH
are covered in [RFC4255]. are covered in [RFC4255].
1.1. Certificate Associations 1.1. Certificate Associations
In this document, a certificate association is based on a In this document, a certificate association is based on a
cryptographic hash of a certificate (sometimes called a cryptographic hash of a certificate (sometimes called a
"fingerprint") or on the certificate itself. For a fingerprint, a "fingerprint") or on the certificate itself. For a fingerprint, a
hash is taken of the certificate, and that hash is the certificate hash is taken of the binary, DER-encoded certificate, and that hash
association; the type of hash function used can be chosen by the DNS is the certificate association; the type of hash function used can be
administrator. When using the certificate itself in the certificate chosen by the DNS administrator. When using the certificate itself
association, the entire certificate in the normal format is used. in the certificate association, the entire certificate in the normal
This document also only applies to PKIX [RFC5280] certificates. format is used. This document also only applies to PKIX [RFC5280]
certificates.
Certificate associations are made between a certificate or the hash Certificate associations are made between a certificate or the hash
of a certificate and a domain name. Server software that is running of a certificate and a domain name. Server software that is running
TLS that is found at that domain name would use a certificate that TLS that is found at that domain name would use a certificate that
has a certificate association given in the DNS, as described in this has a certificate association given in the DNS, as described in this
document. A DNS query can return multiple certificate associations, document. A DNS query can return multiple certificate associations,
such as in the case of different server software on a single host such as in the case of different server software on a single host
using different certificates (even if they are normally accessed with using different certificates (even if they are normally accessed with
different host names), or in the case that a server is changing from different host names), or in the case that a server is changing from
one certificate to another. one certificate to another.
skipping to change at page 3, line 48 skipping to change at page 3, line 49
A note on terminology: Some people have said that this protocol is a A note on terminology: Some people have said that this protocol is a
form of "certificate exclusion". This is true, but in a very unusual form of "certificate exclusion". This is true, but in a very unusual
sense. That is, a DNS reply that contains two of the certificate sense. That is, a DNS reply that contains two of the certificate
types defined here inherently excludes every other possible types defined here inherently excludes every other possible
certificate in the universe other than those found with a pre-image certificate in the universe other than those found with a pre-image
attack against one of those two. The certificate type defined here attack against one of those two. The certificate type defined here
is better thought of as "enumeration" of a small number of is better thought of as "enumeration" of a small number of
certificate associations, not "exclusion" of a near-infinite number certificate associations, not "exclusion" of a near-infinite number
of other certificates. of other certificates.
Some of the terminology in this -00 draft may not match with the Some of the terminology in this draft may not match with the
terminology used in RFC 5280. This will be fixed in future versions terminology used in RFC 5280. This will be fixed in future versions
of this draft, with help from the PKIX community. of this draft, with help from the PKIX community. In specific, we
need to say (in a PKIX-appropriate way) that when we say "valid up
to" and "chains to", full RFC 5280 path processing including
revocation status checking is intended.
2. Getting TLS Certificate Associations from the DNS 2. Getting TLS Certificate Associations from the DNS
This document defines a new DNS resource record type, "TLSA". A This document defines a new DNS resource record type, "TLSA". A
query on a domain name for the TLSA RR can return one or more records query on a domain name for the TLSA RR can return one or more records
of the type TLSA. The TLSA RRType is TBD. of the type TLSA. The TLSA RRType is TBD.
The format of the data in the resource record is a binary record with The format of the data in the resource record is a binary record with
three values, which MUST be in the order defined here: three values, which MUST be in the order defined here:
o A one-octet value, called "certificate type", specifying the o A one-octet value, called "certificate type", specifying the
provided association that will be used to match the target provided association that will be used to match the target
certificate. The types defined are: certificate. The types defined are:
1 -- Hash of an end-entity certificate 1 -- Hash of an end-entity certificate
2 -- Full end-entity certificate 2 -- Full end-entity certificate in DER encoding
3 -- Hash of an certification authority's certificate 3 -- Hash of an certification authority's certificate
4 -- Full certification authority's certificate 4 -- Full certification authority's certificate in DER encoding
o A one-octet value, called "hash type", specifying the type of hash o A one-octet value, called "hash type", specifying the type of hash
algorithm used for the certificate association. This value has algorithm used for the certificate association. This value has
the same values as those of the TLS hash, as defined in the IANA the same values as those of the TLS hash, as defined in the IANA
registry titled "TLS HashAlgorithm Registry" registry titled "TLS HashAlgorithm Registry"
(<http://www.iana.org/assignments/tls-parameters>). For example, (<http://www.iana.org/assignments/tls-parameters>). For example,
the value for the SHA-1 hash function is "2". When no hashing is the value for the SHA-1 hash function is "2". When no hashing is
used (that is, in the certificate types where the full certificate used (that is, in the certificate types where the full certificate
is given), the hash type is 0. Using the same hash algorithm as is given), the hash type is 0. Using the same hash algorithm as
is used in the signature in the certificate will make it more is used in the signature in the certificate will make it more
likely that the TLS client will understand this TLSA data. likely that the TLS client will understand this TLSA data. [[
Note: this is currently being discussed in the WG as issue #4, so
it could change. ]]
o A variable-length set of bytes containing the certificate or the o The bytes containing the certificate or the hash of the associated
hash of the associated certificate (that is, the certificate or certificate (that is, the certificate or the hash of the
the hash of the certificate itself, not of the TLS ASN.1Cert certificate itself, not of the TLS ASN.1Cert object).
object).
An example of a hash for a single certificate: Certificate types 1 through 4 explicitly only apply to PKIX-formatted
certificates. If TLS allows other formats later, or if extensions to
this protocol are made that accept other formats for certificates,
those certificates will need certificate types. [[ Later: maybe make
yet-another-probably-never-used IANA registry for certificate types.
www.example.com. IN TLSA 1 2 AgHne3GdTpxjwLCgMzvgpBiOSQthjg== ]]
2.1. Making Certificate Associations 2.1. Making Certificate Associations
The TLS client determines whether or not the certificate offered by The TLS client determines whether or not the certificate offered by
the TLS server matches the certificate association in the TLSA the TLS server matches the certificate association in the TLSA
resource record. If the certificate from the TLS server matches, the resource record. If the certificate from the TLS server matches, the
TLS client accepts the certificate association. Each certificate TLS client accepts the certificate association. Each certificate
type has a different method for determining matching. type has a different method for determining matching.
For types 1 and 3, the hash used in the comparison is the hash type For types 1 and 3, the hash used in the comparison is the hash type
skipping to change at page 5, line 22 skipping to change at page 5, line 32
value from the resource record. For type 2, the certificate value from the resource record. For type 2, the certificate
association is valid if the certificate in the TLSA data matches to association is valid if the certificate in the TLSA data matches to
the first certificate offered by TLS. the first certificate offered by TLS.
Type 3 (hash of certification authority's certificate) can be used in Type 3 (hash of certification authority's certificate) can be used in
one of two ways. If the hash of any certificate past the first in one of two ways. If the hash of any certificate past the first in
the certificate bundle from TLS matches the value from the TLSA data, the certificate bundle from TLS matches the value from the TLSA data,
and the chain in the certificate bundle is valid up to that and the chain in the certificate bundle is valid up to that
certificate, then the certificate association is valid. Alternately, certificate, then the certificate association is valid. Alternately,
if the first certificate offered chains to a trust anchor, and the if the first certificate offered chains to a trust anchor, and the
hash of that trust anchor matches the value from the TLSA data, then hash of that trust anchor matches the value from the TLSA data
(assuming that the trust anchor is kept in certificate format), then
the certificate association is valid. the certificate association is valid.
Type 4 (full certification authority's certificate) is used in Type 4 (full certification authority's certificate) is used in
chaining from the end-entity given in TLS. The certificate chaining from the end-entity given in TLS. The certificate
association is valid if the first certificate in the certificate association is valid if the first certificate in the certificate
bundle can be validly chained to the certificate from the TLSA data. bundle can be validly chained to the certificate from the TLSA data
(assuming that the trust anchor is kept in certificate format).
[[ Need discussion of self-signed certificates being CA certificates.
Need to be sure that this discussion uses correct PKIX terminology
and is carefully explained. ]]
2.2. Presentation Format
The RDATA of the presentation format of the TLSA resource record
consists of two numbers (certificate and hash type) followed by the
bytes containing the certificate or the hash of the associated
certificate itself, presented in hex. An example of a hash of an
end-entity certificate:
www.example.com. IN TLSA (
1 2 e77b719d4e9c63c0b0a0333be0a4188e490b618e )
The use of mnemonics instead of numbers is not allowed.
[[ We could consider using Base64 instead of hex. ]]
2.3. Wire Format
[[ Need to do this, clearly. ]]
3. Use of TLS Certificate Associations in TLS 3. Use of TLS Certificate Associations in TLS
In order to use one or more TLS certificate associations described in In order to use one or more TLS certificate associations described in
this document obtained from the DNS, an application MUST assure that this document obtained from the DNS, an application MUST assure that
the certificates were obtained using DNS protected by DNSSEC. the certificates were obtained using DNS protected by DNSSEC. TLSA
records must only be trusted if they were obtained from a trusted
source. This could be a localhost DNS resolver answer with the AD
bit set, an inline validating resolver library primed with the proper
trust anchors, or obtained from a remote nameserver to which one has
a secured channel of communication.
If a certificate association contains a hash type that is not If a certificate association contains a hash type that is not
understood by the TLS client, that certificate association MUST be understood by the TLS client, that certificate association MUST be
marked as unusable. marked as unusable.
An application that requests TLS certificate associations using the An application that requests TLS certificate associations using the
method described in this document obtains zero or more usable method described in this document obtains zero or more usable
certificate associations. If the application receives zero usable certificate associations. If the application receives zero usable
certificate associations, it processes TLS in the normal fashion. certificate associations, it processes TLS in the normal fashion.
skipping to change at page 6, line 13 skipping to change at page 6, line 51
"access_denied" error. "access_denied" error.
3.1. Certificate Validation by TLS Clients When Using Certificate 3.1. Certificate Validation by TLS Clients When Using Certificate
Associations Associations
TLS client policy is deliberately not prescribed by this TLS client policy is deliberately not prescribed by this
specification. A client MAY choose to trust a DNSSEC-secured specification. A client MAY choose to trust a DNSSEC-secured
certificate association, depending on its local policy. certificate association, depending on its local policy.
[[ The preceding paragraph is probably wrong in the sense that it [[ The preceding paragraph is probably wrong in the sense that it
means that we now hove no conformance requirements. There is means that we now have no conformance requirements. There is
probably no reason to even use this protocol unless you are going to probably no reason to even use this protocol unless you are going to
fully trust the results. The one exception that has been discussed fully trust the results. The one exception that has been discussed
is that you might want to use the TLSA data as a "second positive is that you might want to use the TLSA data as a "second positive
opinion", such as in a GUI or in logging. Both of those seem fairly opinion", such as in a GUI or in logging. Both of those seem fairly
useless in the case of DNS resolution. Thus, the above paragraph may useless in the case of DNS resolution. Thus, the above paragraph may
be changed by the WG in a future version of this draft. ]] be changed by the WG in a future version of this draft. ]]
3.1.1. Use of Self-Signed Certificates 3.1.1. Use of Self-Signed Certificates
One expected use case for this protocol is that some TLS servers will One expected use case for this protocol is that some TLS servers will
begin to use self-signed certificates in association with certificate begin to use self-signed certificates in association with certificate
associations. A TLS client that is using this protocol needs to associations. A TLS client that is using this protocol needs to
treat self-signed certificates as special, and thus SHOULD NOT treat self-signed certificates as special, and thus SHOULD NOT
attempt certificate validation on them. (An exception to this rule attempt certificate validation on them. (An exception to this rule
would be clients that keep self-signed end entity certificates in its would be clients that keep self-signed end entity certificates in its
trust anchor store.) trust anchor store.)
3.1.2. Ignorning Host Names in Certificates 3.1.2. Ignorning Host Names in Self-Signed Certificates
All data in a self-signed certificate other than the key itself can All data in a self-signed certificate other than the key itself can
be ignored as untrusted unless a client validates the self-signed be ignored as untrusted unless a client validates the self-signed
certificate to a trust anchor that is identical to the certificate. certificate to a trust anchor that is identical to the certificate.
That means that the host name given in the self-signed certificate is That means that the host name given in the self-signed certificate is
meaningless, and that the only way to associate the public key in the meaningless, and that the only way to associate the public key in the
certificate with the domain name is through the certificate certificate with the domain name is through the certificate
association made in the DNS. association made in the DNS.
If a TLS client fully trusts the association between a domain name If a TLS client fully trusts the association between a domain name
and the certificate that was provided by the DNS, then that client and the certificate that was provided by the DNS, then that client
MUST ignore the domain name that is given in the certificate. That MUST ignore the domain name that is given in the self-signed
is, the certificate might contain a domain name that is different certificate. That is, the certificate might contain a domain name
than the one that was used to get the TLSA data, but if the client is that is different than the one that was used to get the TLSA data,
trusting the TLSA data, it doesn't matter what domain name is used in but if the client is trusting the TLSA data, it doesn't matter what
the certificate. An expected use case for this protocol is to allow domain name is used in the certificate. An expected use case for
someone who controls the private key on a certificate to use that this protocol is to allow someone who controls the private key on a
certificate for multiple TLS servers. These servers might be on a certificate to use that certificate for multiple TLS servers. These
single computer that has many domain names (such as a computer that servers might be on a single computer that has many domain names
is both a web host and a mail host, and is known by both (such as a computer that is both a web host and a mail host, and is
"www.example.com" and "smtp.example.com"), or they might be on known by both "www.example.com" and "smtp.example.com"), or they
different computers (such as multiple computers that all respond IP might be on different computers (such as multiple computers that all
addresses reachable as "www.example.com"). respond IP addresses reachable as "www.example.com").
[[ Add more about virtual hosting and SNI TLS extension. ]]
3.1.3. Use of Local Trust Anchors 3.1.3. Use of Local Trust Anchors
Another expected use case for this protocol is that some TLS servers Another expected use case for this protocol is that some TLS servers
will use certificates that chain to a trust anchor that might not be will use certificates that chain to a trust anchor that might not be
one that is trusted by the TLS client, such as a local certification one that is trusted by the TLS client, such as a local certification
authority (CA) that is administered by the organization that runs the authority (CA) that is administered by the organization that runs the
TLS server; this is a likely use for certificate types 3 and 4. TLS server; this is a likely use for certificate types 3 and 4.
Because of this, a TLS client that is using this protocol that Because of this, a TLS client that is using this protocol that
performs certificate validation on server certificates MAY have a performs certificate validation on server certificates MAY have a
skipping to change at page 7, line 48 skipping to change at page 8, line 41
5. Security Considerations 5. Security Considerations
The security of the protocols described in this document relies on The security of the protocols described in this document relies on
the security of DNSSEC as used by the client requesting A and TLSA the security of DNSSEC as used by the client requesting A and TLSA
records. records.
A DNS administrator who goes rogue and changes both the A and TLSA A DNS administrator who goes rogue and changes both the A and TLSA
records for a domain name can cause the user to go to an unauthorized records for a domain name can cause the user to go to an unauthorized
server that will appear authorized, unless the client performs server that will appear authorized, unless the client performs
certificate validation and rejects the certificate. certificate validation and rejects the certificate. That
administrator could probably get a certificate issued anyway, so this
is not an additional threat.
The values in the TLSA data will be normally entered in the DNS The values in the TLSA data will be normally entered in the DNS
through the same system used to enter A/AAAA records, and other DNS through the same system used to enter A/AAAA records, and other DNS
information for the host name. If the authentication for changes to information for the host name. If the authentication for changes to
the host information is weak, an attacker can easily change any of the host information is weak, an attacker can easily change any of
this information. Given that the TLSA data is not easily human- this information. Given that the TLSA data is not easily human-
readable, an attacker might change those records and A/AAAA records readable, an attacker might change those records and A/AAAA records
and not have the change be noticed if changes to a zone are only and not have the change be noticed if changes to a zone are only
monitored visually. monitored visually.
If the authentication mechanism for adding or changing TLSA data in a If the authentication mechanism for adding or changing TLSA data in a
zone is weaker than the authentication mechanism for changing the zone is weaker than the authentication mechanism for changing the
A/AAAA records, an man-in-the-middle who can redirect traffic to A/AAAA records, a man-in-the-middle who can redirect traffic to their
their site may be able to impersonate the attacked host in TLS if site may be able to impersonate the attacked host in TLS if they can
they can use the weaker authentication mechanism. A better design use the weaker authentication mechanism. A better design for
for authenticating DNS would be to have the same level of authenticating DNS would be to have the same level of authentication
authentication used for all DNS additions and changes for a used for all DNS additions and changes for a particular host.
particular host.
[[ Add discussion of the idea that TLSA makes things worse if an
intermediate CA is compromised. Need more from Stephen Farrell. ]]
[[ Add discussion of length check to avoid potential issues with
appended data. Need more from Carl Wallace. ]]
6. Acknowledgements 6. Acknowledgements
Many of the ideas in this document have been discussed over many Many of the ideas in this document have been discussed over many
years. More recently, the ideas have been discussed by the authors years. More recently, the ideas have been discussed by the authors
and others in a more focused fashion. In particular, some of the and others in a more focused fashion. In particular, some of the
ideas here originated with Paul Vixie, Dan Kaminsky, Jeff Hodges, ideas here originated with Paul Vixie, Dan Kaminsky, Jeff Hodges,
Phill Hallam-Baker, Simon Josefsson, Warren Kumari, Adam Langley, Phill Hallam-Baker, Simon Josefsson, Warren Kumari, Adam Langley,
Ilari Liusvaara, and Ondrej Sury. Ilari Liusvaara, and Ondrej Sury.
 End of changes. 21 change blocks. 
45 lines changed or deleted 93 lines changed or added

This html diff was produced by rfcdiff 1.40. The latest version is available from http://tools.ietf.org/tools/rfcdiff/