idnits 2.17.1 draft-ietf-acme-tls-alpn-03.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 : ---------------------------------------------------------------------------- ** There is 1 instance of too long lines in the document, the longest one being 1 character in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 13, 2018) is 2073 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: 1 error (**), 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 13, 2018 5 Expires: February 14, 2019 7 ACME TLS ALPN Challenge Extension 8 draft-ietf-acme-tls-alpn-03 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 14, 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 acmeValidation-v1 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 acmeValidation-v1 extension MUST contain the SHA-256 digest 136 [FIPS180-4] of the key authorization [I-D.ietf-acme-acme] for the 137 challenge. The acmeValidation extension MUST be critical so that the 138 certificate isn't inadvertently used by non-ACME software. 140 id-pe-acmeIdentifier OBJECT IDENTIFIER ::= { id-pe 31 } 142 id-pe-acmeIdentifier-v1 OBJECT IDENTIFIER ::= { id-pe-acmeIdentifier 1 } 144 acmeValidation-v1 ::= OCTET STRING (SIZE (32)) 146 Once this certificate has been created it MUST be provisioned such 147 that it is returned during a TLS handshake that contains a ALPN 148 extension containing the value "acme-tls/1" and a SNI extension 149 containing the domain name being validated. 151 A client responds with an empty object ({}) to acknowledge that the 152 challenge is ready to be validated by the server. The base64url 153 encoding of the protected headers and payload is described in 154 [I-D.ietf-acme-acme] Section 6.1. 156 POST /acme/authz/1234/1 157 Host: example.com 158 Content-Type: application/jose+json 160 { 161 "protected": base64url({ 162 "alg": "ES256", 163 "kid": "https://example.com/acme/acct/1", 164 "nonce": "JHb54aT_KTXBWQOzGYkt9A", 165 "url": "https://example.com/acme/authz/1234/1" 166 }), 167 "payload": base64url({}), 168 "signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4" 169 } 171 On receiving a response the server constructs and stores the key 172 authorization from the challenge "token" value and the current client 173 account key. 175 The server then verifies the client's control over the domain by 176 verifying that the TLS server was configured as expected using the 177 following steps: 179 1. Compute the expected SHA-256 digest of the expected key 180 authorization. 182 2. Resolve the domain name being validated and choose one of the IP 183 addresses returned for validation (the server MAY validate 184 against multiple addresses if more than one is returned, but this 185 is not required). 187 3. Initiate a TLS connection with the chosen IP address, this 188 connection MUST use TCP port 443. The ClientHello that initiates 189 the handshake MUST contain a ALPN extension with the single 190 protocol name "acme-tls/1" and a Server Name Indication [RFC6066] 191 extension containing the domain name being validated. 193 4. Verify that the ServerHello contains a ALPN extension containing 194 the value "acme-tls/1" and that the certificate returned contains 195 a subjectAltName extension containing the dNSName being validated 196 and no other entries and a critical acmeValidation extension 197 containing the digest computed in step 1. The comparison of 198 dNSNames MUST be case insensitive [RFC4343]. Note that as ACME 199 doesn't support Unicode identifiers all dNSNames MUST be encoded 200 using the [RFC3492] rules. 202 If all of the above steps succeed then the validation is successful, 203 otherwise it fails. Once the TLS handshake has been completed the 204 connection MUST be immediately closed and no further data should be 205 exchanged. 207 3.1. acme-tls/1 Protocol Definition 209 The "acme-tls/1" protocol MUST only be used for validating ACME tls- 210 alpn-01 challenges. The protocol consists of a TLS handshake in 211 which the required validation information is transmitted. Once the 212 handshake is completed the client MUST NOT exchange any further data 213 with the server and MUST immediately close the connection. 215 4. Security Considerations 217 The design of this challenges relies on some assumptions centered 218 around how a server behaves during validation. 220 The first assumption is that when a server is being used to serve 221 content for multiple DNS names from a single IP address that it 222 properly segregates control of those names to the users that own 223 them. This means that if User A registers Host A and User B 224 registers Host B the server should not allow a TLS request using a 225 SNI value for Host A to be served by User B or Host B to be served by 226 User A. If the server allows User B to serve this request it allows 227 them to illegitimately validate control of Host A to the ACME server. 229 The second assumption is that a server will not violate [RFC7301] by 230 blindly agreeing to use the "acme-tls/1" protocol without actually 231 understanding it. 233 To further mitigate the risk of users claiming domain names used by 234 other users on the same infrastructure hosting providers, CDNs, and 235 other service providers should not allow users to provide their own 236 certificates for the TLS ALPN validation process. If providers wish 237 to implement TLS ALPN validation they SHOULD only generate 238 certificates used for validation themselves and not expose this 239 functionality to users. 241 5. IANA Considerations 243 [[RFC Editor: please replace XXXX below by the RFC number.]] 245 5.1. SMI Security for PKIX Certificate Extension OID 247 Within the SMI-numbers registry, the "SMI Security for PKIX 248 Certificate Extension (1.3.6.1.5.5.7.1)" table is to be updated to 249 add the following entry: 251 +---------+----------------------+------------+ 252 | Decimal | Description | References | 253 +---------+----------------------+------------+ 254 | 31 | id-pe-acmeIdentifier | RFC XXXX | 255 +---------+----------------------+------------+ 257 5.2. ALPN Protocol ID 259 Within the Transport Layer Security (TLS) Extensions registry, the 260 "Application-Layer Protocol Negotiation (ALPN) Protocol IDs" table is 261 to be updated to add the following entry: 263 +------------+------------------------------------------+-----------+ 264 | Protocol | Identification Sequence | Reference | 265 +------------+------------------------------------------+-----------+ 266 | ACME-TLS/1 | 0x61 0x63 0x6d 0x65 0x2d 0x74 0x6c 0x73 | RFC XXXX | 267 | | 0x2f 0x31 ("acme-tls/1") | | 268 +------------+------------------------------------------+-----------+ 270 5.3. ACME Validation Method 272 The "ACME Validation Methods" registry is to be updated to include 273 the following entry: 275 +-------------+-----------------+-----------+ 276 | Label | Identifier Type | Reference | 277 +-------------+-----------------+-----------+ 278 | tls-alpn-01 | dns | RFC XXXX | 279 +-------------+-----------------+-----------+ 281 6. Appendix: Design Rationale 283 The TLS ALPN challenge exists to replace the TLS SNI challenge 284 defined in the early ACME drafts. This challenge was convenient for 285 service providers who were either operating large TLS layer load 286 balancing systems at which they wanted to perform validation or 287 running servers fronting large numbers of DNS names from a single 288 host as it allowed validation purely within the TLS layer. 290 A security issue was discovered in the TLS SNI challenge by Frans 291 Rosen which allowed users of various service providers to 292 illegitimately validate control of the DNS names of other users of 293 the provider. When the TLS SNI challenge was designed it was assumed 294 that a user would only be able to respond to TLS traffic via SNI for 295 domain names they controlled (i.e. if User A registered Host A and 296 User B registered Host B with a service provider that User A wouldn't 297 be able to respond to SNI traffic for Host B). This turns out not to 298 be a security property provided by a number of large service 299 providers. Because of this users were able to respond to SNI traffic 300 for the SNI names used by the TLS SNI challenge validation process. 301 This meant that if User A and User B had registered Host A and Host B 302 respectively User A would be able to claim the SNI name for a 303 validation for Host B and when the validation connection was made 304 that User A would be able to answer, proving control of Host B. 306 7. Acknowledgements 308 The author would like to thank all those whom have provided design 309 insights and editorial review of this document, including Richard 310 Barnes, Ryan Hurst, Adam Langley, Ryan Sleevi, Jacob Hoffman-Andrews, 311 Daniel McCarney, Marcin Walas, and Martin Thomson and especially 312 Frans Rosen who discovered the vulnerability in the TLS SNI method 313 which necessitated the writing of this specication. 315 8. Normative References 317 [FIPS180-4] 318 Department of Commerce, National., "NIST FIPS 180-4, 319 Secure Hash Standard", March 2012, 320 . 323 [I-D.ietf-acme-acme] 324 Barnes, R., Hoffman-Andrews, J., McCarney, D., and J. 325 Kasten, "Automatic Certificate Management Environment 326 (ACME)", draft-ietf-acme-acme-14 (work in progress), 327 August 2018. 329 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 330 Requirement Levels", BCP 14, RFC 2119, 331 DOI 10.17487/RFC2119, March 1997, 332 . 334 [RFC3492] Costello, A., "Punycode: A Bootstring encoding of Unicode 335 for Internationalized Domain Names in Applications 336 (IDNA)", RFC 3492, DOI 10.17487/RFC3492, March 2003, 337 . 339 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 340 "Randomness Requirements for Security", BCP 106, RFC 4086, 341 DOI 10.17487/RFC4086, June 2005, 342 . 344 [RFC4343] Eastlake 3rd, D., "Domain Name System (DNS) Case 345 Insensitivity Clarification", RFC 4343, 346 DOI 10.17487/RFC4343, January 2006, 347 . 349 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 350 Housley, R., and W. Polk, "Internet X.509 Public Key 351 Infrastructure Certificate and Certificate Revocation List 352 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 353 . 355 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 356 Extensions: Extension Definitions", RFC 6066, 357 DOI 10.17487/RFC6066, January 2011, 358 . 360 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 361 "Transport Layer Security (TLS) Application-Layer Protocol 362 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 363 July 2014, . 365 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 366 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 367 May 2017, . 369 Author's Address 371 Roland Bracewell Shoemaker 372 Internet Security Research Group 374 Email: roland@letsencrypt.org