idnits 2.17.1 draft-ietf-dane-srv-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (February 11, 2014) is 3727 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) == Outdated reference: A later version (-19) exists of draft-ietf-dane-smtp-with-dane-05 == Outdated reference: A later version (-11) exists of draft-ietf-xmpp-dna-05 Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DNS-Based Authentication of Named Entities (DANE) T. Finch 3 Internet-Draft University of Cambridge 4 Intended status: Standards Track M. Miller 5 Expires: August 15, 2014 Cisco Systems, Inc. 6 P. Saint-Andre 7 &yet 8 February 11, 2014 10 Using DNS-Based Authentication of Named Entities (DANE) TLSA records 11 with SRV and MX records. 12 draft-ietf-dane-srv-04 14 Abstract 16 The DANE specification (RFC 6698) describes how to use TLSA resource 17 records in the DNS to associate a server's host name with its TLS 18 certificate. The association is secured with DNSSEC. Some 19 application protocols use SRV records (RFC 2782) to indirectly name 20 the server hosts for a service domain (SMTP uses MX records for the 21 same purpose). This specification gives generic instructions for how 22 these application protocols locate and use TLSA records when 23 technologies such as SRV records are used. Separate documents give 24 the details that are specific to particular application protocols. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on August 15, 2014. 43 Copyright Notice 45 Copyright (c) 2014 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 62 3. Relation between SRV and MX records . . . . . . . . . . . . . 3 63 4. DNS Checks for TLSA and SRV Records . . . . . . . . . . . . . 4 64 4.1. SRV Query . . . . . . . . . . . . . . . . . . . . . . . . 4 65 4.2. TLSA Queries . . . . . . . . . . . . . . . . . . . . . . 5 66 5. TLS Checks for TLSA and SRV Records . . . . . . . . . . . . . 6 67 6. Guidance for Application Protocols . . . . . . . . . . . . . 6 68 7. Guidance for Server Operators . . . . . . . . . . . . . . . . 7 69 8. Internationalization Considerations . . . . . . . . . . . . . 7 70 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 71 10. Security Considerations . . . . . . . . . . . . . . . . . . . 8 72 10.1. Mixed Security Status . . . . . . . . . . . . . . . . . 8 73 10.2. A Service Domain Trusts its Servers . . . . . . . . . . 8 74 10.3. Certificate Subject Name Matching . . . . . . . . . . . 8 75 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 76 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 77 12.1. Normative References . . . . . . . . . . . . . . . . . . 9 78 12.2. Informative References . . . . . . . . . . . . . . . . . 10 79 Appendix A. Mail Example . . . . . . . . . . . . . . . . . . . . 10 80 Appendix B. XMPP Example . . . . . . . . . . . . . . . . . . . . 10 81 Appendix C. Rationale . . . . . . . . . . . . . . . . . . . . . 11 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 84 1. Introduction 86 The base DANE specification [RFC6698] describes how to use TLSA 87 resource records in the DNS to associate a server's host name with 88 its TLS certificate. The association is secured using DNSSEC. That 89 document "only relates to securely associating certificates for TLS 90 and DTLS with host names" (see the last paragraph of section 1.2 of 91 [RFC6698]). 93 Some application protocols do not use host names directly; instead, 94 they use a service domain and the relevant host names are located 95 indirectly via SRV records [RFC2782], or MX records in the case of 96 SMTP [RFC5321]. (Note: in the "CertID" specification [RFC6125], the 97 source domain and host name are referred to as the "source domain" 98 and the "derived domain".) Because of this intermediate resolution 99 step, the normal DANE rules specified in [RFC6698] do not directly 100 apply to protocols that use SRV or MX records. 102 This document describes how to use DANE TLSA records with SRV and MX 103 records. To summarize: 105 o We rely on DNSSEC to secure the association between the service 106 domain and the target server host names (i.e., the host names that 107 are discovered by the SRV or MX query). 109 o The TLSA records are located using the port, protocol, and target 110 host name fields (not the service domain). 112 o Clients always use TLS when connecting to servers with TLSA 113 records. 115 o Assuming that the association is secure, the server's certificate 116 is expected to authenticate the target server host name, rather 117 than the service domain. 119 Separate documents give the details that are specific to particular 120 application protocols, such as SMTP [I-D.ietf-dane-smtp-with-dane] 121 and XMPP [I-D.ietf-xmpp-dna]. 123 2. Terminology 125 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 126 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 127 "OPTIONAL" in this memo are to be interpreted as described in 128 [RFC2119]. 130 3. Relation between SRV and MX records 132 For the purpose of this specification (to avoid cluttering the 133 description with special cases) we treat each MX record ([RFC5321] 134 section 5) as being equivalent to an SRV record [RFC2782] with 135 corresponding fields copied from the MX record and the remaining 136 fields having fixed values as follows: 138 Table 1: SRV Fields and MX Equivalents 139 +---------------+-----------------------------+ 140 | DNS SRV Field | Equivalent MX Value | 141 +---------------+-----------------------------+ 142 | Service | smtp | 143 +---------------+-----------------------------+ 144 | Proto | tcp | 145 +---------------+-----------------------------+ 146 | Name | MX owner name (mail domain) | 147 +---------------+-----------------------------+ 148 | TTL | MX TTL | 149 +---------------+-----------------------------+ 150 | Class | MX Class | 151 +---------------+-----------------------------+ 152 | Priority | MX Priority | 153 +---------------+-----------------------------+ 154 | Weight | 0 | 155 +---------------+-----------------------------+ 156 | Port | 25 | 157 +---------------+-----------------------------+ 158 | Target | MX Target | 159 +---------------+-----------------------------+ 161 Thus we can treat the following MX record as if it were the SRV 162 record shown below: 164 example.com. 86400 IN MX 10 mx.example.net. 166 _smtp._tcp.example.com. 86400 IN SRV 10 0 25 mx.example.net. 168 Other details that are specific to SMTP are described in 169 [I-D.ietf-dane-smtp-with-dane]. 171 4. DNS Checks for TLSA and SRV Records 173 4.1. SRV Query 175 When the client makes an SRV query, a successful result will be a 176 list of one or more SRV records (or possibly a chain of CNAME / DNAME 177 aliases referring to such a list). 179 For this specification to apply, all of these DNS RRsets MUST be 180 "secure" according to DNSSSEC validation ([RFC4033] section 5). In 181 the case of aliases, the whole chain MUST be secure as well as the 182 ultimate target. (This corresponds to the AD bit being set in the 183 response(s) - see [RFC4035] section 3.2.3.) 184 If they are not all secure, this protocol has not been fully 185 deployed. The client SHOULD fall back to its non-DNSSEC non-DANE 186 behavior. (This corresponds to the AD bit being unset.) 188 If any of the responses is "bogus" according to DNSSEC validation, 189 the client MUST abort. (This usually corresponds to a "server 190 failure" response.) 192 In the successful case, the client now has an authentic list of 193 server host names with weight and priority values. It performs 194 server ordering and selection using the weight and priority values 195 without regard to the presence or absence of DNSSEC or TLSA records. 196 It takes note of the DNSSEC validation status of the SRV response for 197 use when checking certificate names (see Section 5). 199 4.2. TLSA Queries 201 If the SRV response was insecure or indeterminate, the client MUST 202 NOT perform any TLSA queries. If the SRV response is secure 203 according to DNSSEC validation, the client performs a TLSA query for 204 each SRV target as describes in this section. 206 For each SRV target host name, if the response to the address (A or 207 AAAA) query is insecure or indeterminate, the client MUST NOT perform 208 a TLSA query for that target; the TLSA a query will most likely fail. 210 The client SHALL construct the TLSA query name as described in 211 [RFC6698] section 3, based on fields from the SRV record: the port 212 from the SRV RDATA, the protocol from the SRV query name, and the 213 TLSA base domain set to the SRV target host name. 215 For example, the following SRV record leads to the TLSA query shown 216 below: 218 _imap._tcp.example.com. 86400 IN SRV 10 0 143 imap.example.net. 220 _143._tcp.imap.example.net. IN TLSA ? 222 The client SHALL determine if the TLSA record(s) are usable according 223 to section 4.1 of [RFC6698]. This affects SRV handling as follows: 225 If the TLSA response is "secure", the client MUST use TLS when 226 connecting to the server. The TLSA records are used when validating 227 the server's certificate as described under Section 5. 229 If the TLSA response is "insecure" or "indeterminate", the client 230 SHALL proceed as if this server has no TLSA records. It MAY connect 231 to the server with or without TLS. 233 If the TLSA response is "bogus", then the client MUST NOT connect to 234 the corresponding server. (The client can still use other SRV 235 targets.) 237 5. TLS Checks for TLSA and SRV Records 239 When connecting to a server, the client MUST use TLS if the responses 240 to the SRV and TLSA queries were "secure" as described above. If the 241 client received zero usable TLSA certificate associations, it SHALL 242 validate the server's TLS certificate using the normal PKIX rules 243 [RFC5280] or protocol-specific rules (e.g., following [RFC6125]) 244 without further input from the TLSA records. If the client received 245 one or more usable TLSA certificate associations, it SHALL process 246 them as described in [RFC6698] section 2.1. 248 If a usable TLSA record with Certificate Usage "3" matches the TLS 249 server's certificate, or public key for the certificate, all other 250 validation and verification checks MAY be ignored (e.g., reference 251 identifier, key usage, expiration, issuance, etc.). 253 Otherwise, the client uses the DNSSEC validation status of the SRV 254 query in its server certificate identity checks. It SHOULD use the 255 Server Name Indication extension (TLS SNI) [RFC6066] or its 256 functional equivalent in the relevant application protocol (e.g., in 257 XMPP [RFC6120] this is the the 'to' address of the initial stream 258 header). The preferred name SHALL be chosen as follows, and the 259 client SHALL verify the identity asserted by the server's certificate 260 according to [RFC6125] section 6, using a list of reference 261 identifiers constructed as follows. (Note again that in RFC 6125 the 262 terms "source domain" and "derived domain" refer to the same things 263 as "service domain" and "target host name" in this document.) 265 SRV is insecure or indeterminate: The reference identifiers SHALL 266 include the service domain and MUST NOT include the SRV target 267 host name. The service domain is the preferred name for TLS SNI 268 or its equivalent. 270 SRV is secure: The reference identifiers SHALL include both the 271 service domain and the SRV target host name. The target host name 272 is the preferred name for TLS SNI or its equivalent. 274 (In the latter case, the client will accept either identity so that 275 it is compatible with servers that do and do not support this 276 specification.) 278 6. Guidance for Application Protocols 279 Separate documents describe how to apply this specification to 280 particular application protocols. If you are writing such as 281 document the following points ought to be covered: 283 o Fallback logic in the event of bogus replies and the like. 285 o Compatibility with clients that do not support SRV lookups. 287 7. Guidance for Server Operators 289 To conform to this specification, the published SRV records and 290 subsequent address (A, AAAA) records MUST be secured with DNSSEC. 291 There SHOULD also be at least one TLSA record published that 292 authenticates the server's certificate. Except for Certificate Usage 293 "3", the certificate authenticated by the TLSA record(s) MUST contain 294 a reference identifier that matches: 296 o the service domain name (the "source domain" in [RFC6125] terms, 297 which is the SRV query domain); and/or 299 o the server host name (the "derived domain" in [RFC6125] terms, 300 which is the SRV target). 302 Servers that support multiple service domains (i.e., multi-tenant) 303 can implement Server Name Identifier (TLS SNI) [RFC6066] or its 304 functional equivalent to determine which certificate to offer. 305 Clients that do not support this specification will indicate a 306 preference for the service domain name, while clients that support 307 this specification will indicate the server host name. However, the 308 server determines what certificate to present in the TLS handshake; 309 e.g., the presented certificate might only authenticate the server 310 host name. 312 8. Internationalization Considerations 314 If any of the DNS queries are for an internationalized domain name, 315 then they need to use the A-label form [RFC5890]. 317 9. IANA Considerations 319 No IANA action is required. 321 10. Security Considerations 323 10.1. Mixed Security Status 325 We do not specify that clients checking all of a service domain's 326 server host names are consistent in whether they have or do not have 327 TLSA records. This is so that partial or incremental deployment does 328 not break the service. Different levels of deployment are likely if 329 a service domain has a third-party fallback server, for example. 331 The SRV and MX sorting rules are unchanged; in particular they have 332 not been altered in order to prioritize secure servers over insecure 333 servers. If a site wants to be secure it needs to deploy this 334 protocol completely; a partial deployment is not secure and we make 335 no special effort to support it. 337 10.2. A Service Domain Trusts its Servers 339 By signing their zone with DNSSEC, service domain operators 340 implicitly instruct their clients to check their server TLSA records. 341 This implies another point in the trust relationship between service 342 domain holders and their server operators. Most of the setup 343 requirements for this protocol fall on the server operator: 344 installing a TLS certificate with the correct name, and publishing a 345 TLSA record under that name. If these are not correct then 346 connections from TLSA-aware clients might fail. 348 10.3. Certificate Subject Name Matching 350 Section 4 of the TLSA specification [RFC6698] leaves the details of 351 checking names in certificates to higher level application protocols, 352 though it suggests the use of [RFC6125]. 354 Name checks are not necessary if the matching TLSA record is of 355 Certificate Usage "3". Because such a record identifies the specific 356 certificate (or public key of the certificate), additional checks are 357 superfluous and potentially conflicting. 359 Otherwise, while DNSSEC provides a secure binding between the server 360 name and the TLSA record, and the TLSA record provides a binding to a 361 certificate, this latter step can be indirect via a chain of 362 certificates. For example, a Certificate Usage "0" TLSA record only 363 authenticates the CA that issued the certificate, and third parties 364 can obtain certificates from the same CA. Therefore, clients need to 365 check whether the server's certificate matches one of the expected 366 reference identifiers to ensure the certificate was issued by the CA 367 to the server the client expects. 369 11. Acknowledgements 371 Thanks to Mark Andrews for arguing that authenticating the server 372 host name is the right thing, and that we ought to rely on DNSSEC to 373 secure the SRV / MX lookup. Thanks to James Cloos, Viktor Dukhovni, 374 Ned Freed, Olafur Gudmundsson, Paul Hoffman, Phil Pennock, Hector 375 Santos, Jonas Schneider, and Alessandro Vesely for helpful 376 suggestions. 378 12. References 380 12.1. Normative References 382 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 383 Requirement Levels", BCP 14, RFC 2119, March 1997. 385 [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 386 specifying the location of services (DNS SRV)", RFC 2782, 387 February 2000. 389 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 390 Rose, "DNS Security Introduction and Requirements", RFC 391 4033, March 2005. 393 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 394 Rose, "Protocol Modifications for the DNS Security 395 Extensions", RFC 4035, March 2005. 397 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 398 Housley, R., and W. Polk, "Internet X.509 Public Key 399 Infrastructure Certificate and Certificate Revocation List 400 (CRL) Profile", RFC 5280, May 2008. 402 [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 403 October 2008. 405 [RFC5890] Klensin, J., "Internationalized Domain Names for 406 Applications (IDNA): Definitions and Document Framework", 407 RFC 5890, August 2010. 409 [RFC6066] Eastlake, D., "Transport Layer Security (TLS) Extensions: 410 Extension Definitions", RFC 6066, January 2011. 412 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 413 Protocol (XMPP): Core", RFC 6120, March 2011. 415 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 416 Verification of Domain-Based Application Service Identity 417 within Internet Public Key Infrastructure Using X.509 418 (PKIX) Certificates in the Context of Transport Layer 419 Security (TLS)", RFC 6125, March 2011. 421 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 422 of Named Entities (DANE) Transport Layer Security (TLS) 423 Protocol: TLSA", RFC 6698, August 2012. 425 12.2. Informative References 427 [I-D.ietf-dane-smtp-with-dane] 428 Dukhovni, V. and W. Hardaker, "SMTP security via 429 opportunistic DANE TLS", draft-ietf-dane-smtp-with-dane-05 430 (work in progress), February 2014. 432 [I-D.ietf-xmpp-dna] 433 Saint-Andre, P. and M. Miller, "Domain Name Associations 434 (DNA) in the Extensible Messaging and Presence Protocol 435 (XMPP)", draft-ietf-xmpp-dna-05 (work in progress), 436 February 2014. 438 Appendix A. Mail Example 440 In the following, most of the DNS resource data is elided for 441 simplicity. 443 ; mail domain 444 example.com. MX 1 mx.example.net. 445 example.com. RRSIG MX ... 447 ; SMTP server host name 448 mx.example.net. A 192.0.2.1 449 mx.example.net. RRSIG A ... 451 mx.example.net. AAAA 2001:db8:212:8::e:1 452 mx.example.net. RRSIG ... 454 ; TLSA resource record 455 _25._tcp.mx.example.net. TLSA ... 456 _25._tcp.mx.example.net. RRSIG TLSA ... 458 Mail for addresses at example.com is delivered by SMTP to 459 mx.example.net. Connections to mx.example.net port 25 that use 460 STARTTLS will get a server certificate that authenticates the name 461 mx.example.net. 463 Appendix B. XMPP Example 464 In the following, most of the DNS resource data is elided for 465 simplicity. 467 ; XMPP domain 468 _xmpp-client.example.com. SRV 1 0 5222 im.example.net. 469 _xmpp-clientexample.com. RRSIG SRV ... 471 ; XMPP server host name 472 im.example.net. A 192.0.2.3 473 im.example.net. RRSIG A ... 475 im.example.net. AAAA 2001:db8:212:8::e:4 476 im.example.net. RRSIG AAAA ... 478 ; TLSA resource record 479 _5222._tcp.im.example.net. TLSA ... 480 _5222._tcp.im.example.net. RRSIG TLSA ... 482 Mail for addresses at example.com is delivered by SMTP to 483 mx.example.net. Connections to mx.example.net port 25 that use 484 STARTTLS will get a server certificate that authenticates the name 485 mx.example.net. 487 Appendix C. Rationale 489 The long-term goal of this specification is to settle on TLS 490 certificates that verify the server host name rather than the service 491 domain, since this is more convenient for servers hosting multiple 492 domains (so-called "multi-tenanted environments") and scales up more 493 easily to larger numbers of service domains. 495 There are a number of other reasons for doing it this way: 497 o The certificate is part of the server configuration, so it makes 498 sense to associate it with the server host name rather than the 499 service domain. 501 o In the absence of TLS SNI, if the certificate identifies the host 502 name then it does not need to list all the possible service 503 domains. 505 o When the server certificate is replaced it is much easier if there 506 is one part of the DNS that needs updating to match, instead of an 507 unbounded number of hosted service domains. 509 o The same TLSA records work with this specification, and with 510 direct connections to the host name in the style of [RFC6698]. 512 o Some application protocols, such as SMTP, allow a client to 513 perform transactions with multiple service domains in the same 514 connection. It is not in general feasible for the client to 515 specify the service domain using TLS SNI when the connection is 516 established, and the server might not be able to present a 517 certificate that authenticates all possible service domains. 519 o It is common for SMTP servers to act in multiple roles, for 520 example as outgoing relays or as incoming MX servers, depending on 521 the client identity. It is simpler if the server can present the 522 same certificate regardless of the role in which it is to act. 523 Sometimes the server does not know its role until the client has 524 authenticated, which usually occurs after TLS has been 525 established. 527 This specification does not provide an option to put TLSA records 528 under the service domain because that would add complexity without 529 providing any benefit, and security protocols are best kept simple. 530 As described above, there are real-world cases where authenticating 531 the service domain cannot be made to work, so there would be 532 complicated criteria for when service domain TLSA records might be 533 used and when they cannot. This is all avoided by putting the TLSA 534 records under the server host name. 536 The disadvantage is that clients which do not do DNSSEC validation 537 must, according to [RFC6125] rules, check the server certificate 538 against the service domain, since they have no other way to 539 authenticate the server. This means that SNI support or its 540 functional equivalent is necessary for backward compatibility. 542 Authors' Addresses 544 Tony Finch 545 University of Cambridge Computing Service 546 New Museums Site 547 Pembroke Street 548 Cambridge CB2 3QH 549 ENGLAND 551 Phone: +44 797 040 1426 552 Email: dot@dotat.at 553 URI: http://dotat.at/ 554 Matthew Miller 555 Cisco Systems, Inc. 556 1899 Wynkoop Street, Suite 600 557 Denver, CO 80202 558 USA 560 Email: mamille2@cisco.com 562 Peter Saint-Andre 563 &yet 565 Email: ietf@stpeter.im