ACME Working Group | R. Shoemaker |
Internet-Draft | ISRG |
Intended status: Standards Track | September 05, 2019 |
Expires: March 8, 2020 |
ACME TLS ALPN Challenge Extension
draft-ietf-acme-tls-alpn-06
This document specifies a new challenge for the Automated Certificate Management Environment (ACME) protocol which allows for domain control validation using TLS.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 8, 2020.
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
The Automatic Certificate Management Environment (ACME) [RFC8555] standard specifies methods for validating control of domain names via HTTP and DNS. Deployment experience has shown it is also useful to be able to validate domain control using the TLS layer alone. In particular, this allows hosting providers, CDNs, and TLS-terminating load balancers to validate domain control without modifying the HTTP handling behavior of their backends. This separation of layers can improve security and usability of ACME validation.
Early ACME drafts specified two TLS-based challenge types: TLS-SNI-01 and TLS-SNI-02. These methods were removed because they relied on assumptions about the deployed base of HTTPS hosting providers that proved to be incorrect. Those incorrect assumptions weakened the security of those methods and are discussed in the “Design Rationale” appendix.
This document specifies a new TLS-based challenge type, tls-alpn-01. This challenge requires negotiating a new application-layer protocol using the TLS Application-Layer Protocol Negotiation (ALPN) Extension [RFC7301]. Because no existing software implements this protocol, the ability to fulfill tls-alpn-01 challenges is effectively opt-in. A service provider must proactively deploy new code in order to implement tls-alpn-01, so we can specify stronger controls in that code, resulting in a stronger validation method.
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
The TLS with Application Layer Protocol Negotiation (TLS ALPN) validation method proves control over a domain name by requiring the client to configure a TLS server to respond to specific connection attempts utilizing the ALPN extension with identifying information. The ACME server validates control of the domain name by connecting to a TLS server at one of the addresses resolved for the domain name and verifying that a certificate with specific content is presented.
The tls-alpn-01 ACME challenge object has the following format:
The client prepares for validation by constructing a self-signed certificate which MUST contain a acmeIdentifier extension and a subjectAlternativeName extension [RFC5280]. The subjectAlternativeName extension MUST contain a single dNSName entry where the value is the domain name being validated. The acmeIdentifier extension MUST contain the SHA-256 digest [FIPS180-4] of the key authorization [RFC8555] for the challenge. The acmeIdentifier extension MUST be critical so that the certificate isn’t inadvertently used by non-ACME software.
The acmeIdentifier extension is identified by the id-pe-acmeIdentifier object identifier (OID) in the id-pe arc [RFC5280]:
id-pe-acmeIdentifier OBJECT IDENTIFIER ::= { id-pe 31 }
The extension has the following ASN.1 [X.680] format :
Authorization ::= OCTET STRING (SIZE (32))
The extnValue of the id-pe-acmeIdentifier extension is the ASN.1 DER encoding [X.690] of the Authorization structure, which contains the SHA-256 digest of the key authorization for the challenge.
Once this certificate has been created it MUST be provisioned such that it is returned during a TLS handshake where the “acme-tls/1” application-layer protocol has been negotiated and a Server Name Indication (SNI) extension [RFC6066] has been provided containing the domain name being validated.
A client responds by POSTing an empty JSON object ({}) to the challenge URL to acknowledge that the challenge is ready to be validated by the server. The base64url encoding of the protected headers and payload is described in [RFC8555] Section 6.1.
POST /acme/authz/1234/1 Host: example.com Content-Type: application/jose+json { "protected": base64url({ "alg": "ES256", "kid": "https://example.com/acme/acct/1", "nonce": "JHb54aT_KTXBWQOzGYkt9A", "url": "https://example.com/acme/authz/1234/1" }), "payload": base64url({}), "signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4" }
On receiving this request from a client the server constructs and stores the key authorization from the challenge “token” value and the current client account key.
The server then verifies the client’s control over the domain by verifying that the TLS server was configured as expected using the following steps:
The comparison of dNSNames MUST be case insensitive [RFC4343]. Note that as ACME doesn’t support Unicode identifiers all dNSNames MUST be encoded using [RFC3492] rules.
If all of the above steps succeed then the validation is successful, otherwise it fails.
The “acme-tls/1” protocol MUST only be used for validating ACME tls-alpn-01 challenges. The protocol consists of a TLS handshake in which the required validation information is transmitted. Once the handshake is completed the client MUST NOT exchange any further data with the server and MUST immediately close the connection.
The design of this challenge relies on some assumptions centered around how a server behaves during validation.
The first assumption is that when a server is being used to serve content for multiple DNS names from a single IP address that it properly segregates control of those names to the users that own them. This means that if User A registers Host A and User B registers Host B the server should not allow a TLS request using a SNI value for Host A to be served by User B or Host B to be served by User A. If the server allows User B to serve this request it allows them to illegitimately validate control of Host A to the ACME server.
The second assumption is that a server will not violate [RFC7301] by blindly agreeing to use the “acme-tls/1” protocol without actually understanding it.
To further mitigate the risk of users claiming domain names used by other users on the same infrastructure hosting providers, CDNs, and other service providers SHOULD NOT allow users to provide their own certificates for the TLS ALPN validation process. If providers wish to implement TLS ALPN validation they SHOULD only generate certificates used for validation themselves and not expose this functionality to users.
The extensions to the ACME protocol described in this document build upon the Security Considerations and threat model defined in [RFC8555] Section 10.1.
[[RFC Editor: please replace XXXX below by the RFC number.]]
Within the SMI-numbers registry, the “SMI Security for PKIX Certificate Extension (1.3.6.1.5.5.7.1)” table is to be updated to add the following entry:
Decimal | Description | References |
---|---|---|
31 | id-pe-acmeIdentifier | RFC XXXX |
Within the Transport Layer Security (TLS) Extensions registry, the “Application-Layer Protocol Negotiation (ALPN) Protocol IDs” table is to be updated to add the following entry:
Protocol | Identification Sequence | Reference |
---|---|---|
ACME-TLS/1 | 0x61 0x63 0x6d 0x65 0x2d 0x74 0x6c 0x73 0x2f 0x31 (“acme-tls/1”) | RFC XXXX |
The “ACME Validation Methods” registry is to be updated to include the following entry:
Label | Identifier Type | Reference |
---|---|---|
tls-alpn-01 | dns | RFC XXXX |
The TLS ALPN challenge exists to replace the TLS SNI challenge defined in the early ACME drafts. This challenge was convenient for service providers who were either operating large TLS layer load balancing systems at which they wanted to perform validation or running servers fronting large numbers of DNS names from a single host as it allowed validation purely within the TLS layer.
A security issue was discovered in the TLS SNI challenge by Frans Rosen which allowed users of various service providers to illegitimately validate control of the DNS names of other users of the provider. When the TLS SNI challenge was designed it was assumed that a user would only be able to respond to TLS traffic via SNI for domain names they controlled (i.e. if User A registered Host A and User B registered Host B with a service provider that User A wouldn’t be able to respond to SNI traffic for Host B). This turns out not to be a security property provided by a number of large service providers. Because of this users were able to respond to SNI traffic for the SNI names used by the TLS SNI challenge validation process. This meant that if User A and User B had registered Host A and Host B respectively User A would be able to claim the SNI name for Host B and when the validation connection was made that User A would be able to answer, proving ‘control’ of Host B. As the SNI name used was a subdomain of the domain name being validated, rather than the domain name itself, it was likely to not already be registered with the service provider for traffic routing, making it much easier for a hijack to occur.
The author would like to thank all those whom have provided design insights and editorial review of this document, including Richard Barnes, Ryan Hurst, Adam Langley, Ryan Sleevi, Jacob Hoffman-Andrews, Daniel McCarney, Marcin Walas, Martin Thomson and especially Frans Rosén who discovered the vulnerability in the TLS SNI method which necessitated the writing of this specification.