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