idnits 2.17.1 draft-ietf-acme-tls-alpn-01.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 seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (May 30, 2018) is 2150 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-12 Summary: 1 error (**), 0 flaws (~~), 3 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 May 30, 2018 5 Expires: December 1, 2018 7 ACME TLS ALPN Challenge Extension 8 draft-ietf-acme-tls-alpn-01 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 December 1, 2018. 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 . . . . . . . . . . . . . . . . . 6 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 In this document, the key words "MUST", "MUST NOT", "REQUIRED", 96 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 97 and "OPTIONAL" are to be interpreted as described in BCP 14, RFC 2119 98 [RFC2119]. 100 3. TLS with Application Level Protocol Negotiation (TLS ALPN) Challenge 102 The TLS with Application Level Protocol Negotiation (TLS ALPN) 103 validation method proves control over a domain name by requiring the 104 client to configure a TLS server to respond to specific connection 105 attempts utilizing the ALPN extension with identifying information. 106 The ACME server validates control of the domain name by connecting to 107 a TLS server at one of the addresses resolved for the domain name and 108 verifying that a certificate with specific content is presented. 110 type (required, string): The string "tls-alpn-01" 112 token (required, string): A random value that uniquely identifies 113 the challenge. This value MUST have at least 128 bits of entropy. 114 It MUST NOT contain any characters outside the base64url alphabet, 115 including padding characters ("="). 117 GET /acme/authz/1234/1 HTTP/1.1 118 Host: example.com 120 HTTP/1.1 200 OK 121 { 122 "type": "tls-alpn-01", 123 "url": "https://example.com/acme/authz/1234/1", 124 "status": "pending", 125 "token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA" 126 } 128 The client prepares for validation by constructing a self-signed 129 certificate which MUST contain a acmeValidation-v1 extension and a 130 subjectAlternativeName extension [RFC5280]. The 131 subjectAlternativeName extension MUST contain a single dNSName entry 132 where the value is the domain name being validated. The 133 acmeValidation-v1 extension MUST contain the SHA-256 digest 134 [FIPS180-4] of the key authorization [I-D.ietf-acme-acme] for the 135 challenge. The acmeValidation extension MUST be critical so that the 136 certificate isn't inadvertently used by non-ACME software. 138 id-pe-acmeIdentifier OBJECT IDENTIFIER ::= { id-pe 30 } 140 id-pe-acmeIdentifier-v1 OBJECT IDENTIFIER ::= { id-pe-acmeIdentifier 1 } 142 acmeValidation-v1 ::= OCTET STRING (SIZE (32)) 144 Once this certificate has been created it MUST be provisioned such 145 that it is returned during a TLS handshake that contains a ALPN 146 extension containing the value "acme-tls/1" and a SNI extension 147 containing the domain name being validated. 149 A client responds with an empty object ({}) to acknowledge that the 150 challenge is ready to be validated by the server. 152 POST /acme/authz/1234/1 153 Host: example.com 154 Content-Type: application/jose+json 156 { 157 "protected": base64url({ 158 "alg": "ES256", 159 "kid": "https://example.com/acme/acct/1", 160 "nonce": "JHb54aT_KTXBWQOzGYkt9A", 161 "url": "https://example.com/acme/authz/1234/1" 162 }), 163 "payload": base64url({}), 164 "signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4" 165 } 167 On receiving a response the server constructs and stores the key 168 authorization from the challenge "token" value and the current client 169 account key. 171 The server then verifies the client's control over the domain by 172 verifying that the TLS server was configured as expected using the 173 following steps: 175 1. Compute the expected SHA-256 digest of the expected key 176 authorization. 178 2. Resolve the domain name being validated and choose one of the IP 179 addresses returned for validation (the server MAY validate 180 against multiple addresses if more than one is returned, but this 181 is not required). 183 3. Initiate a TLS connection with the chosen IP address, this 184 connection MUST use TCP port 443. The ClientHello that initiates 185 the handshake MUST contain a ALPN extension with the single 186 protocol name "acme-tls/1" and a Server Name Indication [RFC6066] 187 extension containing the domain name being validated. 189 4. Verify that the ServerHello contains a ALPN extension containing 190 the value "acme-tls/1" and that the certificate returned contains 191 a subjectAltName extension containing the dNSName being validated 192 and no other entries and a critical acmeValidation extension 193 containing the digest computed in step 1. The comparison of 194 dNSNames MUST be case insensitive [RFC4343]. Note that as ACME 195 doesn't support Unicode identifiers all dNSNames MUST be encoded 196 using the [RFC3492] rules. 198 If all of the above steps succeed then the validation is successful, 199 otherwise it fails. Once the TLS handshake has been completed the 200 connection MUST be immediately closed and no further data should be 201 exchanged. 203 3.1. acme-tls/1 Protocol Definition 205 The "acme-tls/1" protocol MUST only be used for validating ACME tls- 206 alpn-01 challenges. The protocol consists of a TLS handshake in 207 which the required validation information is transmitted. Once the 208 handshake is completed the client MUST NOT exchange any further data 209 with the server and MUST immediately close the connection. 211 4. Security Considerations 213 The design of this challenges relies on some assumptions centered 214 around how a server behaves during validation. 216 The first assumption is that when a server is being used to serve 217 content for multiple DNS names from a single IP address that it 218 properly segregates control of those names to the users that own 219 them. This means that if User A registers Host A and User B 220 registers Host B the server should not allow a TLS request using a 221 SNI value for Host A to be served by User B or Host B to be served by 222 User A. If the server allows User B to serve this request it allows 223 them to illegitimately validate control of Host A to the ACME server. 225 The second assumption is that a server will not violate [RFC7301] by 226 blindly agreeing to use the "acme-tls/1" protocol without actually 227 understanding it. 229 To further mitigate the risk of users claiming domain names used by 230 other users on the same infrastructure hosting providers, CDNs, and 231 other service providers should not allow users to provide their own 232 certificates for the TLS ALPN validation process. If providers wish 233 to implement TLS ALPN validation they SHOULD only generate 234 certificates used for validation themselves and not expose this 235 functionality to users. 237 5. IANA Considerations 239 5.1. SMI Security for PKIX Certificate Extension OID 241 Within the SMI-numbers registry, the "SMI Security for PKIX 242 Certificate Extension (1.3.6.1.5.5.7.1)" table is to be updated to 243 add the following entry: 245 +---------+----------------------+------------+ 246 | Decimal | Description | References | 247 +---------+----------------------+------------+ 248 | 30 | id-pe-acmeIdentifier | RFC XXXX | 249 +---------+----------------------+------------+ 251 5.2. ALPN Protocol ID 253 Within the Transport Layer Security (TLS) Extensions registry, the 254 "Application-Layer Protocol Negotiation (ALPN) Protocol IDs" table is 255 to be updated to add the following entry: 257 +------------+------------------------------------------+-----------+ 258 | Protocol | Identification Sequence | Reference | 259 +------------+------------------------------------------+-----------+ 260 | ACME-TLS/1 | 0x61 0x63 0x6d 0x65 0x2d 0x74 0x6c 0x73 | RFC XXXX | 261 | | 0x2f 0x31 ("acme-tls/1") | | 262 +------------+------------------------------------------+-----------+ 264 5.3. ACME Validation Method 266 The "ACME Validation Methods" registry is to be updated to include 267 the following entry: 269 +-------------+-----------------+-----------+ 270 | Label | Identifier Type | Reference | 271 +-------------+-----------------+-----------+ 272 | tls-alpn-01 | dns | RFC XXXX | 273 +-------------+-----------------+-----------+ 275 6. Appendix: Design Rationale 277 The TLS ALPN challenge exists to replace the TLS SNI challenge 278 defined in the early ACME drafts. This challenge was convenient for 279 service providers who were either operating large TLS layer load 280 balancing systems at which they wanted to perform validation or 281 running servers fronting large numbers of DNS names from a single 282 host as it allowed validation purely within the TLS layer. 284 A security issue was discovered in the TLS SNI challenge by Frans 285 Rosen which allowed users of various service providers to 286 illegitimately validate control of the DNS names of other users of 287 the provider. When the TLS SNI challenge was designed it was assumed 288 that a user would only be able to respond to TLS traffic via SNI for 289 domain names they controlled (i.e. if User A registered Host A and 290 User B registered Host B with a service provider that User A wouldn't 291 be able to respond to SNI traffic for Host B). This turns out not to 292 be a security property provided by a number of large service 293 providers. Because of this users were able to respond to SNI traffic 294 for the SNI names used by the TLS SNI challenge validation process. 295 This meant that if User A and User B had registered Host A and Host B 296 respectively User A would be able to claim the SNI name for a 297 validation for Host B and when the validation connection was made 298 that User A would be able to answer, proving control of Host B. 300 7. Acknowledgements 302 The author would like to thank all those whom have provided design 303 insights and editorial review of this document, including Richard 304 Barnes, Ryan Hurst, Adam Langley, Ryan Sleevi, Jacob Hoffman-Andrews, 305 Daniel McCarney, Marcin Walas, and Martin Thomson and especially 306 Frans Rosen who discovered the vulnerability in the TLS SNI method 307 which necessitated the writing of this specication. 309 8. Normative References 311 [FIPS180-4] 312 Department of Commerce, National., "NIST FIPS 180-4, 313 Secure Hash Standard", March 2012, 314 . 317 [I-D.ietf-acme-acme] 318 Barnes, R., Hoffman-Andrews, J., McCarney, D., and J. 319 Kasten, "Automatic Certificate Management Environment 320 (ACME)", draft-ietf-acme-acme-12 (work in progress), April 321 2018. 323 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 324 Requirement Levels", BCP 14, RFC 2119, 325 DOI 10.17487/RFC2119, March 1997, 326 . 328 [RFC3492] Costello, A., "Punycode: A Bootstring encoding of Unicode 329 for Internationalized Domain Names in Applications 330 (IDNA)", RFC 3492, DOI 10.17487/RFC3492, March 2003, 331 . 333 [RFC4343] Eastlake 3rd, D., "Domain Name System (DNS) Case 334 Insensitivity Clarification", RFC 4343, 335 DOI 10.17487/RFC4343, January 2006, 336 . 338 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 339 Housley, R., and W. Polk, "Internet X.509 Public Key 340 Infrastructure Certificate and Certificate Revocation List 341 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 342 . 344 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 345 Extensions: Extension Definitions", RFC 6066, 346 DOI 10.17487/RFC6066, January 2011, 347 . 349 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 350 "Transport Layer Security (TLS) Application-Layer Protocol 351 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 352 July 2014, . 354 Author's Address 356 Roland Bracewell Shoemaker 357 Internet Security Research Group 359 Email: roland@letsencrypt.org