idnits 2.17.1 draft-ietf-acme-tls-alpn-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 date (August 15, 2018) is 2081 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) -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS180-4' == Outdated reference: A later version (-18) exists of draft-ietf-acme-acme-14 Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ACME Working Group R. Shoemaker 3 Internet-Draft ISRG 4 Intended status: Standards Track August 15, 2018 5 Expires: February 16, 2019 7 ACME TLS ALPN Challenge Extension 8 draft-ietf-acme-tls-alpn-04 10 Abstract 12 This document specifies a new challenge for the Automated Certificate 13 Management Environment (ACME) protocol which allows for domain 14 control validation using TLS. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at https://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on February 16, 2019. 33 Copyright Notice 35 Copyright (c) 2018 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (https://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 52 3. TLS with Application Level Protocol Negotiation (TLS ALPN) 53 Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 3.1. acme-tls/1 Protocol Definition . . . . . . . . . . . . . 5 55 4. Security Considerations . . . . . . . . . . . . . . . . . . . 5 56 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 57 5.1. SMI Security for PKIX Certificate Extension OID . . . . . 6 58 5.2. ALPN Protocol ID . . . . . . . . . . . . . . . . . . . . 6 59 5.3. ACME Validation Method . . . . . . . . . . . . . . . . . 6 60 6. Appendix: Design Rationale . . . . . . . . . . . . . . . . . 7 61 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 62 8. Normative References . . . . . . . . . . . . . . . . . . . . 7 63 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 8 65 1. Introduction 67 The Automatic Certificate Management Environment (ACME) 68 [I-D.ietf-acme-acme] standard specifies methods for validating 69 control of domain names via HTTP and DNS. Deployment experience has 70 shown it is also useful to be able to validate domain control using 71 the TLS layer alone. In particular, this allows hosting providers, 72 CDNs, and TLS-terminating load balancers to validate domain control 73 without modifying the HTTP handling behavior of their backends. This 74 separation of layers can improve security and usability of ACME 75 validation. 77 Early ACME drafts specified two TLS-based challenge types: TLS-SNI-01 78 and TLS-SNI-02. These methods were removed because they relied on 79 assumptions about the deployed base of HTTPS hosting providers that 80 proved to be incorrect. Those incorrect assumptions weakened the 81 security of those methods and are discussed in the "Design Rationale" 82 appendix. 84 This document specifies a new TLS-based challenge type, TLS-ALPN-01. 85 This challenge requires negotiating a new application-layer protocol 86 using the TLS Application-Layer Protocol Negotiation (ALPN) Extension 87 [RFC7301]. Because no existing software implements this protocol, 88 the ability to fulfill TLS-ALPN-01 challenges is effectively opt-in. 89 A service provider must proactively deploy new code in order to 90 implement TLS-ALPN-01, so we can specify stronger controls in that 91 code, resulting in a stronger validation method. 93 2. Terminology 95 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 96 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 97 "OPTIONAL" in this document are to be interpreted as described in BCP 98 14 [RFC2119] [RFC8174] when, and only when, they appear in all 99 capitals, as shown here. 101 3. TLS with Application Level Protocol Negotiation (TLS ALPN) Challenge 103 The TLS with Application Level Protocol Negotiation (TLS ALPN) 104 validation method proves control over a domain name by requiring the 105 client to configure a TLS server to respond to specific connection 106 attempts utilizing the ALPN extension with identifying information. 107 The ACME server validates control of the domain name by connecting to 108 a TLS server at one of the addresses resolved for the domain name and 109 verifying that a certificate with specific content is presented. 111 type (required, string): The string "tls-alpn-01" 113 token (required, string): A random value that uniquely identifies 114 the challenge. This value MUST have at least 128 bits of entropy. 115 It MUST NOT contain any characters outside the base64url alphabet, 116 including padding characters ("="). See [RFC4086] for additional 117 information on randomness requirements. 119 GET /acme/authz/1234/1 HTTP/1.1 120 Host: example.com 122 HTTP/1.1 200 OK 123 { 124 "type": "tls-alpn-01", 125 "url": "https://example.com/acme/authz/1234/1", 126 "status": "pending", 127 "token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA" 128 } 130 The client prepares for validation by constructing a self-signed 131 certificate which MUST contain a acmeIdentifier extension and a 132 subjectAlternativeName extension [RFC5280]. The 133 subjectAlternativeName extension MUST contain a single dNSName entry 134 where the value is the domain name being validated. The 135 acmeIdentifier extension MUST contain the SHA-256 digest [FIPS180-4] 136 of the key authorization [I-D.ietf-acme-acme] for the challenge. The 137 acmeIdentifier extension MUST be critical so that the certificate 138 isn't inadvertently used by non-ACME software. 140 The acmeIdentifier extension has the following format: 142 id-pe-acmeIdentifier OBJECT IDENTIFIER ::= { id-pe 31 } 144 Authorization ::= OCTET STRING (SIZE (32)) 146 The extnValue of the id-pe-acmeIdentifier extension is the ASN.1 DER 147 encoding of the Authorization structure. 149 Once this certificate has been created it MUST be provisioned such 150 that it is returned during a TLS handshake that contains a ALPN 151 extension containing the value "acme-tls/1" and a SNI extension 152 containing the domain name being validated. 154 A client responds with an empty object ({}) to acknowledge that the 155 challenge is ready to be validated by the server. The base64url 156 encoding of the protected headers and payload is described in 157 [I-D.ietf-acme-acme] Section 6.1. 159 POST /acme/authz/1234/1 160 Host: example.com 161 Content-Type: application/jose+json 163 { 164 "protected": base64url({ 165 "alg": "ES256", 166 "kid": "https://example.com/acme/acct/1", 167 "nonce": "JHb54aT_KTXBWQOzGYkt9A", 168 "url": "https://example.com/acme/authz/1234/1" 169 }), 170 "payload": base64url({}), 171 "signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4" 172 } 174 On receiving a response the server constructs and stores the key 175 authorization from the challenge "token" value and the current client 176 account key. 178 The server then verifies the client's control over the domain by 179 verifying that the TLS server was configured as expected using the 180 following steps: 182 1. Compute the expected SHA-256 digest of the expected key 183 authorization. 185 2. Resolve the domain name being validated and choose one of the IP 186 addresses returned for validation (the server MAY validate 187 against multiple addresses if more than one is returned, but this 188 is not required). 190 3. Initiate a TLS connection with the chosen IP address, this 191 connection MUST use TCP port 443. The ClientHello that initiates 192 the handshake MUST contain a ALPN extension with the single 193 protocol name "acme-tls/1" and a Server Name Indication [RFC6066] 194 extension containing the domain name being validated. 196 4. Verify that the ServerHello contains a ALPN extension containing 197 the value "acme-tls/1" and that the certificate returned contains 198 a subjectAltName extension containing the dNSName being validated 199 and no other entries and a critical acmeIdentifier extension 200 containing the digest computed in step 1. The comparison of 201 dNSNames MUST be case insensitive [RFC4343]. Note that as ACME 202 doesn't support Unicode identifiers all dNSNames MUST be encoded 203 using the [RFC3492] rules. 205 If all of the above steps succeed then the validation is successful, 206 otherwise it fails. Once the TLS handshake has been completed the 207 connection MUST be immediately closed and no further data should be 208 exchanged. 210 3.1. acme-tls/1 Protocol Definition 212 The "acme-tls/1" protocol MUST only be used for validating ACME tls- 213 alpn-01 challenges. The protocol consists of a TLS handshake in 214 which the required validation information is transmitted. Once the 215 handshake is completed the client MUST NOT exchange any further data 216 with the server and MUST immediately close the connection. 218 4. Security Considerations 220 The design of this challenges relies on some assumptions centered 221 around how a server behaves during validation. 223 The first assumption is that when a server is being used to serve 224 content for multiple DNS names from a single IP address that it 225 properly segregates control of those names to the users that own 226 them. This means that if User A registers Host A and User B 227 registers Host B the server should not allow a TLS request using a 228 SNI value for Host A to be served by User B or Host B to be served by 229 User A. If the server allows User B to serve this request it allows 230 them to illegitimately validate control of Host A to the ACME server. 232 The second assumption is that a server will not violate [RFC7301] by 233 blindly agreeing to use the "acme-tls/1" protocol without actually 234 understanding it. 236 To further mitigate the risk of users claiming domain names used by 237 other users on the same infrastructure hosting providers, CDNs, and 238 other service providers should not allow users to provide their own 239 certificates for the TLS ALPN validation process. If providers wish 240 to implement TLS ALPN validation they SHOULD only generate 241 certificates used for validation themselves and not expose this 242 functionality to users. 244 5. IANA Considerations 246 [[RFC Editor: please replace XXXX below by the RFC number.]] 248 5.1. SMI Security for PKIX Certificate Extension OID 250 Within the SMI-numbers registry, the "SMI Security for PKIX 251 Certificate Extension (1.3.6.1.5.5.7.1)" table is to be updated to 252 add the following entry: 254 +---------+----------------------+------------+ 255 | Decimal | Description | References | 256 +---------+----------------------+------------+ 257 | 31 | id-pe-acmeIdentifier | RFC XXXX | 258 +---------+----------------------+------------+ 260 5.2. ALPN Protocol ID 262 Within the Transport Layer Security (TLS) Extensions registry, the 263 "Application-Layer Protocol Negotiation (ALPN) Protocol IDs" table is 264 to be updated to add the following entry: 266 +------------+------------------------------------------+-----------+ 267 | Protocol | Identification Sequence | Reference | 268 +------------+------------------------------------------+-----------+ 269 | ACME-TLS/1 | 0x61 0x63 0x6d 0x65 0x2d 0x74 0x6c 0x73 | RFC XXXX | 270 | | 0x2f 0x31 ("acme-tls/1") | | 271 +------------+------------------------------------------+-----------+ 273 5.3. ACME Validation Method 275 The "ACME Validation Methods" registry is to be updated to include 276 the following entry: 278 +-------------+-----------------+-----------+ 279 | Label | Identifier Type | Reference | 280 +-------------+-----------------+-----------+ 281 | tls-alpn-01 | dns | RFC XXXX | 282 +-------------+-----------------+-----------+ 284 6. Appendix: Design Rationale 286 The TLS ALPN challenge exists to replace the TLS SNI challenge 287 defined in the early ACME drafts. This challenge was convenient for 288 service providers who were either operating large TLS layer load 289 balancing systems at which they wanted to perform validation or 290 running servers fronting large numbers of DNS names from a single 291 host as it allowed validation purely within the TLS layer. 293 A security issue was discovered in the TLS SNI challenge by Frans 294 Rosen which allowed users of various service providers to 295 illegitimately validate control of the DNS names of other users of 296 the provider. When the TLS SNI challenge was designed it was assumed 297 that a user would only be able to respond to TLS traffic via SNI for 298 domain names they controlled (i.e. if User A registered Host A and 299 User B registered Host B with a service provider that User A wouldn't 300 be able to respond to SNI traffic for Host B). This turns out not to 301 be a security property provided by a number of large service 302 providers. Because of this users were able to respond to SNI traffic 303 for the SNI names used by the TLS SNI challenge validation process. 304 This meant that if User A and User B had registered Host A and Host B 305 respectively User A would be able to claim the SNI name for a 306 validation for Host B and when the validation connection was made 307 that User A would be able to answer, proving control of Host B. 309 7. Acknowledgements 311 The author would like to thank all those whom have provided design 312 insights and editorial review of this document, including Richard 313 Barnes, Ryan Hurst, Adam Langley, Ryan Sleevi, Jacob Hoffman-Andrews, 314 Daniel McCarney, Marcin Walas, and Martin Thomson and especially 315 Frans Rosen who discovered the vulnerability in the TLS SNI method 316 which necessitated the writing of this specication. 318 8. Normative References 320 [FIPS180-4] 321 Department of Commerce, National., "NIST FIPS 180-4, 322 Secure Hash Standard", March 2012, 323 . 326 [I-D.ietf-acme-acme] 327 Barnes, R., Hoffman-Andrews, J., McCarney, D., and J. 328 Kasten, "Automatic Certificate Management Environment 329 (ACME)", draft-ietf-acme-acme-14 (work in progress), 330 August 2018. 332 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 333 Requirement Levels", BCP 14, RFC 2119, 334 DOI 10.17487/RFC2119, March 1997, 335 . 337 [RFC3492] Costello, A., "Punycode: A Bootstring encoding of Unicode 338 for Internationalized Domain Names in Applications 339 (IDNA)", RFC 3492, DOI 10.17487/RFC3492, March 2003, 340 . 342 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 343 "Randomness Requirements for Security", BCP 106, RFC 4086, 344 DOI 10.17487/RFC4086, June 2005, 345 . 347 [RFC4343] Eastlake 3rd, D., "Domain Name System (DNS) Case 348 Insensitivity Clarification", RFC 4343, 349 DOI 10.17487/RFC4343, January 2006, 350 . 352 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 353 Housley, R., and W. Polk, "Internet X.509 Public Key 354 Infrastructure Certificate and Certificate Revocation List 355 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 356 . 358 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 359 Extensions: Extension Definitions", RFC 6066, 360 DOI 10.17487/RFC6066, January 2011, 361 . 363 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 364 "Transport Layer Security (TLS) Application-Layer Protocol 365 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 366 July 2014, . 368 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 369 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 370 May 2017, . 372 Author's Address 374 Roland Bracewell Shoemaker 375 Internet Security Research Group 377 Email: roland@letsencrypt.org