draft-ietf-acme-acme-14.txt   draft-ietf-acme-acme-15.txt 
ACME Working Group R. Barnes ACME Working Group R. Barnes
Internet-Draft Cisco Internet-Draft Cisco
Intended status: Standards Track J. Hoffman-Andrews Intended status: Standards Track J. Hoffman-Andrews
Expires: February 11, 2019 EFF Expires: March 29, 2019 EFF
D. McCarney D. McCarney
Let's Encrypt Let's Encrypt
J. Kasten J. Kasten
University of Michigan University of Michigan
August 10, 2018 September 25, 2018
Automatic Certificate Management Environment (ACME) Automatic Certificate Management Environment (ACME)
draft-ietf-acme-acme-14 draft-ietf-acme-acme-15
Abstract Abstract
Public Key Infrastructure X.509 (PKIX) certificates are used for a Public Key Infrastructure X.509 (PKIX) certificates are used for a
number of purposes, the most significant of which is the number of purposes, the most significant of which is the
authentication of domain names. Thus, certification authorities authentication of domain names. Thus, certification authorities
(CAs) in the Web PKI are trusted to verify that an applicant for a (CAs) in the Web PKI are trusted to verify that an applicant for a
certificate legitimately represents the domain name(s) in the certificate legitimately represents the domain name(s) in the
certificate. Today, this verification is done through a collection certificate. Today, this verification is done through a collection
of ad hoc mechanisms. This document describes a protocol that a CA of ad hoc mechanisms. This document describes a protocol that a CA
skipping to change at page 2, line 7 skipping to change at page 2, line 7
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on February 11, 2019. This Internet-Draft will expire on March 29, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 34 skipping to change at page 2, line 34
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Deployment Model and Operator Experience . . . . . . . . . . 5 2. Deployment Model and Operator Experience . . . . . . . . . . 5
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7
4. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 7 4. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 7
5. Character Encoding . . . . . . . . . . . . . . . . . . . . . 10 5. Character Encoding . . . . . . . . . . . . . . . . . . . . . 10
6. Message Transport . . . . . . . . . . . . . . . . . . . . . . 10 6. Message Transport . . . . . . . . . . . . . . . . . . . . . . 10
6.1. HTTPS Requests . . . . . . . . . . . . . . . . . . . . . 10 6.1. HTTPS Requests . . . . . . . . . . . . . . . . . . . . . 10
6.2. Request Authentication . . . . . . . . . . . . . . . . . 11 6.2. Request Authentication . . . . . . . . . . . . . . . . . 11
6.3. Request URL Integrity . . . . . . . . . . . . . . . . . . 12 6.3. GET and POST-as-GET Requests . . . . . . . . . . . . . . 12
6.3.1. "url" (URL) JWS Header Parameter . . . . . . . . . . 13 6.4. Request URL Integrity . . . . . . . . . . . . . . . . . . 13
6.4. Replay protection . . . . . . . . . . . . . . . . . . . . 13 6.4.1. "url" (URL) JWS Header Parameter . . . . . . . . . . 14
6.4.1. Replay-Nonce . . . . . . . . . . . . . . . . . . . . 14 6.5. Replay protection . . . . . . . . . . . . . . . . . . . . 14
6.4.2. "nonce" (Nonce) JWS Header Parameter . . . . . . . . 14 6.5.1. Replay-Nonce . . . . . . . . . . . . . . . . . . . . 15
6.5. Rate Limits . . . . . . . . . . . . . . . . . . . . . . . 14 6.5.2. "nonce" (Nonce) JWS Header Parameter . . . . . . . . 15
6.6. Errors . . . . . . . . . . . . . . . . . . . . . . . . . 15 6.6. Rate Limits . . . . . . . . . . . . . . . . . . . . . . . 15
6.6.1. Subproblems . . . . . . . . . . . . . . . . . . . . . 17 6.7. Errors . . . . . . . . . . . . . . . . . . . . . . . . . 16
7. Certificate Management . . . . . . . . . . . . . . . . . . . 18 6.7.1. Subproblems . . . . . . . . . . . . . . . . . . . . . 18
7.1. Resources . . . . . . . . . . . . . . . . . . . . . . . . 18 7. Certificate Management . . . . . . . . . . . . . . . . . . . 19
7.1. Resources . . . . . . . . . . . . . . . . . . . . . . . . 19
7.1.1. Directory . . . . . . . . . . . . . . . . . . . . . . 21 7.1.1. Directory . . . . . . . . . . . . . . . . . . . . . . 21
7.1.2. Account Objects . . . . . . . . . . . . . . . . . . . 23 7.1.2. Account Objects . . . . . . . . . . . . . . . . . . . 23
7.1.3. Order Objects . . . . . . . . . . . . . . . . . . . . 24 7.1.3. Order Objects . . . . . . . . . . . . . . . . . . . . 24
7.1.4. Authorization Objects . . . . . . . . . . . . . . . . 27 7.1.4. Authorization Objects . . . . . . . . . . . . . . . . 27
7.1.5. Challenge Objects . . . . . . . . . . . . . . . . . . 29 7.1.5. Challenge Objects . . . . . . . . . . . . . . . . . . 29
7.1.6. Status Changes . . . . . . . . . . . . . . . . . . . 29 7.1.6. Status Changes . . . . . . . . . . . . . . . . . . . 29
7.2. Getting a Nonce . . . . . . . . . . . . . . . . . . . . . 31 7.2. Getting a Nonce . . . . . . . . . . . . . . . . . . . . . 31
7.3. Account Creation . . . . . . . . . . . . . . . . . . . . 32 7.3. Account Creation . . . . . . . . . . . . . . . . . . . . 32
7.3.1. Finding an Account URL Given a Key . . . . . . . . . 34 7.3.1. Finding an Account URL Given a Key . . . . . . . . . 34
7.3.2. Account Update . . . . . . . . . . . . . . . . . . . 35 7.3.2. Account Update . . . . . . . . . . . . . . . . . . . 35
7.3.3. Account Information . . . . . . . . . . . . . . . . . 35 7.3.3. Changes of Terms of Service . . . . . . . . . . . . . 35
7.3.4. Changes of Terms of Service . . . . . . . . . . . . . 36 7.3.4. External Account Binding . . . . . . . . . . . . . . 36
7.3.5. External Account Binding . . . . . . . . . . . . . . 36 7.3.5. Account Key Roll-over . . . . . . . . . . . . . . . . 38
7.3.6. Account Key Roll-over . . . . . . . . . . . . . . . . 38 7.3.6. Account Deactivation . . . . . . . . . . . . . . . . 41
7.3.7. Account Deactivation . . . . . . . . . . . . . . . . 41
7.4. Applying for Certificate Issuance . . . . . . . . . . . . 42 7.4. Applying for Certificate Issuance . . . . . . . . . . . . 42
7.4.1. Pre-Authorization . . . . . . . . . . . . . . . . . . 47 7.4.1. Pre-Authorization . . . . . . . . . . . . . . . . . . 46
7.4.2. Downloading the Certificate . . . . . . . . . . . . . 49 7.4.2. Downloading the Certificate . . . . . . . . . . . . . 48
7.5. Identifier Authorization . . . . . . . . . . . . . . . . 50 7.5. Identifier Authorization . . . . . . . . . . . . . . . . 49
7.5.1. Responding to Challenges . . . . . . . . . . . . . . 51 7.5.1. Responding to Challenges . . . . . . . . . . . . . . 51
7.5.2. Deactivating an Authorization . . . . . . . . . . . . 53 7.5.2. Deactivating an Authorization . . . . . . . . . . . . 53
7.6. Certificate Revocation . . . . . . . . . . . . . . . . . 54 7.6. Certificate Revocation . . . . . . . . . . . . . . . . . 54
8. Identifier Validation Challenges . . . . . . . . . . . . . . 56 8. Identifier Validation Challenges . . . . . . . . . . . . . . 56
8.1. Key Authorizations . . . . . . . . . . . . . . . . . . . 58 8.1. Key Authorizations . . . . . . . . . . . . . . . . . . . 58
8.2. Retrying Challenges . . . . . . . . . . . . . . . . . . . 58 8.2. Retrying Challenges . . . . . . . . . . . . . . . . . . . 58
8.3. HTTP Challenge . . . . . . . . . . . . . . . . . . . . . 59 8.3. HTTP Challenge . . . . . . . . . . . . . . . . . . . . . 59
8.4. DNS Challenge . . . . . . . . . . . . . . . . . . . . . . 61 8.4. DNS Challenge . . . . . . . . . . . . . . . . . . . . . . 61
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 63 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 63
9.1. MIME Type: application/pem-certificate-chain . . . . . . 63 9.1. MIME Type: application/pem-certificate-chain . . . . . . 63
9.2. Well-Known URI for the HTTP Challenge . . . . . . . . . . 64 9.2. Well-Known URI for the HTTP Challenge . . . . . . . . . . 64
9.3. Replay-Nonce HTTP Header . . . . . . . . . . . . . . . . 64 9.3. Replay-Nonce HTTP Header . . . . . . . . . . . . . . . . 65
9.4. "url" JWS Header Parameter . . . . . . . . . . . . . . . 64 9.4. "url" JWS Header Parameter . . . . . . . . . . . . . . . 65
9.5. "nonce" JWS Header Parameter . . . . . . . . . . . . . . 65 9.5. "nonce" JWS Header Parameter . . . . . . . . . . . . . . 65
9.6. URN Sub-namespace for ACME (urn:ietf:params:acme) . . . . 65 9.6. URN Sub-namespace for ACME (urn:ietf:params:acme) . . . . 66
9.7. New Registries . . . . . . . . . . . . . . . . . . . . . 65 9.7. New Registries . . . . . . . . . . . . . . . . . . . . . 66
9.7.1. Fields in Account Objects . . . . . . . . . . . . . . 66 9.7.1. Fields in Account Objects . . . . . . . . . . . . . . 67
9.7.2. Fields in Order Objects . . . . . . . . . . . . . . . 67 9.7.2. Fields in Order Objects . . . . . . . . . . . . . . . 67
9.7.3. Fields in Authorization Objects . . . . . . . . . . . 68 9.7.3. Fields in Authorization Objects . . . . . . . . . . . 68
9.7.4. Error Types . . . . . . . . . . . . . . . . . . . . . 69 9.7.4. Error Types . . . . . . . . . . . . . . . . . . . . . 69
9.7.5. Resource Types . . . . . . . . . . . . . . . . . . . 69 9.7.5. Resource Types . . . . . . . . . . . . . . . . . . . 70
9.7.6. Fields in the "meta" Object within a Directory Object 70 9.7.6. Fields in the "meta" Object within a Directory Object 70
9.7.7. Identifier Types . . . . . . . . . . . . . . . . . . 71 9.7.7. Identifier Types . . . . . . . . . . . . . . . . . . 71
9.7.8. Validation Methods . . . . . . . . . . . . . . . . . 71 9.7.8. Validation Methods . . . . . . . . . . . . . . . . . 72
10. Security Considerations . . . . . . . . . . . . . . . . . . . 73 10. Security Considerations . . . . . . . . . . . . . . . . . . . 73
10.1. Threat Model . . . . . . . . . . . . . . . . . . . . . . 73 10.1. Threat Model . . . . . . . . . . . . . . . . . . . . . . 73
10.2. Integrity of Authorizations . . . . . . . . . . . . . . 74 10.2. Integrity of Authorizations . . . . . . . . . . . . . . 75
10.3. Denial-of-Service Considerations . . . . . . . . . . . . 78 10.3. Denial-of-Service Considerations . . . . . . . . . . . . 78
10.4. Server-Side Request Forgery . . . . . . . . . . . . . . 78 10.4. Server-Side Request Forgery . . . . . . . . . . . . . . 79
10.5. CA Policy Considerations . . . . . . . . . . . . . . . . 79 10.5. CA Policy Considerations . . . . . . . . . . . . . . . . 79
11. Operational Considerations . . . . . . . . . . . . . . . . . 80 11. Operational Considerations . . . . . . . . . . . . . . . . . 81
11.1. Key Selection . . . . . . . . . . . . . . . . . . . . . 80 11.1. Key Selection . . . . . . . . . . . . . . . . . . . . . 81
11.2. DNS security . . . . . . . . . . . . . . . . . . . . . . 81 11.2. DNS security . . . . . . . . . . . . . . . . . . . . . . 82
11.3. Token Entropy . . . . . . . . . . . . . . . . . . . . . 81 11.3. Token Entropy . . . . . . . . . . . . . . . . . . . . . 82
11.4. Malformed Certificate Chains . . . . . . . . . . . . . . 82 11.4. Malformed Certificate Chains . . . . . . . . . . . . . . 83
12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 82 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 83
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 83 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 84
13.1. Normative References . . . . . . . . . . . . . . . . . . 83 13.1. Normative References . . . . . . . . . . . . . . . . . . 84
13.2. Informative References . . . . . . . . . . . . . . . . . 86 13.2. Informative References . . . . . . . . . . . . . . . . . 87
13.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 87 13.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 87 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 89
1. Introduction 1. Introduction
Certificates [RFC5280] in the Web PKI are most commonly used to Certificates [RFC5280] in the Web PKI are most commonly used to
authenticate domain names. Thus, certification authorities (CAs) in authenticate domain names. Thus, certification authorities (CAs) in
the Web PKI are trusted to verify that an applicant for a certificate the Web PKI are trusted to verify that an applicant for a certificate
legitimately represents the domain name(s) in the certificate. legitimately represents the domain name(s) in the certificate.
Different types of certificates reflect different kinds of CA Different types of certificates reflect different kinds of CA
verification of information about the certificate subject. "Domain verification of information about the certificate subject. "Domain
Validation" (DV) certificates are by far the most common type. The Validation" (DV) certificates are by far the most common type. The
only validation the CA is required to perform in the DV issuance only validation the CA is required to perform in the DV issuance
process is to verify that the requester has effective control of the process is to verify that the requester has effective control of the
domain. The CA is not required to attempt to verify the requester's domain [CABFBR]. The CA is not required to attempt to verify the
real-world identity. (This is as opposed to "Organization requester's real-world identity. (This is as opposed to
Validation" (OV) and "Extended Validation" (EV) certificates, where "Organization Validation" (OV) and "Extended Validation" (EV)
the process is intended to also verify the real-world identity of the certificates, where the process is intended to also verify the real-
requester.) world identity of the requester.)
Existing Web PKI certificate authorities tend to use a set of ad hoc Existing Web PKI certificate authorities tend to use a set of ad hoc
protocols for certificate issuance and identity verification. In the protocols for certificate issuance and identity verification. In the
case of DV certificates, a typical user experience is something like: case of DV certificates, a typical user experience is something like:
o Generate a PKCS#10 [RFC2986] Certificate Signing Request (CSR). o Generate a PKCS#10 [RFC2986] Certificate Signing Request (CSR).
o Cut-and-paste the CSR into a CA's web page. o Cut-and-paste the CSR into a CA's web page.
o Prove ownership of the domain by one of the following methods: o Prove ownership of the domain by one of the following methods:
skipping to change at page 5, line 33 skipping to change at page 5, line 33
It should be noted that while the focus of this document is on It should be noted that while the focus of this document is on
validating domain names for purposes of issuing certificates in the validating domain names for purposes of issuing certificates in the
Web PKI, ACME supports extensions for uses with other identifiers in Web PKI, ACME supports extensions for uses with other identifiers in
other PKI contexts. For example, as of this writing, there is other PKI contexts. For example, as of this writing, there is
ongoing work to use ACME for issuance of Web PKI certificates ongoing work to use ACME for issuance of Web PKI certificates
attesting to IP addresses [I-D.ietf-acme-ip] and STIR certificates attesting to IP addresses [I-D.ietf-acme-ip] and STIR certificates
attesting to telephone numbers [I-D.ietf-acme-telephone]. attesting to telephone numbers [I-D.ietf-acme-telephone].
ACME can also be used to automate some aspects of certificate ACME can also be used to automate some aspects of certificate
management even where non-automated processes are still needed. For management even where non-automated processes are still needed. For
example, the external account binding feature (see Section 7.3.5) can example, the external account binding feature (see Section 7.3.4) can
allow an ACME account to use authorizations that have been granted to allow an ACME account to use authorizations that have been granted to
an external, non-ACME account. This allows ACME to address issuance an external, non-ACME account. This allows ACME to address issuance
scenarios that cannot yet be fully automated, such as the issuance of scenarios that cannot yet be fully automated, such as the issuance of
Extended Validation certificates. Extended Validation certificates.
2. Deployment Model and Operator Experience 2. Deployment Model and Operator Experience
The guiding use case for ACME is obtaining certificates for websites The guiding use case for ACME is obtaining certificates for websites
(HTTPS [RFC2818]). In this case, the user's web server is intended (HTTPS [RFC2818]). In this case, a web server is intended to speak
to speak for one or more domains, and the process of certificate for one or more domains, and the process of certificate issuance is
issuance is intended to verify that this web server actually speaks intended to verify that this web server actually speaks for the
for the domain(s). domain(s).
DV certificate validation commonly checks claims about properties DV certificate validation commonly checks claims about properties
related to control of a domain name - properties that can be observed related to control of a domain name - properties that can be observed
by the certificate issuer in an interactive process that can be by the certificate issuer in an interactive process that can be
conducted purely online. That means that under typical conducted purely online. That means that under typical
circumstances, all steps in the request, verification, and issuance circumstances, all steps in the request, verification, and issuance
process can be represented and performed by Internet protocols with process can be represented and performed by Internet protocols with
no out-of-band human intervention. no out-of-band human intervention.
Prior to ACME, when deploying an HTTPS server, a server operator Prior to ACME, when deploying an HTTPS server, a server operator
skipping to change at page 10, line 10 skipping to change at page 10, line 10
names. The use of ACME for other identifiers will require further names. The use of ACME for other identifiers will require further
specification in order to describe how these identifiers are encoded specification in order to describe how these identifiers are encoded
in the protocol and what types of validation challenges the server in the protocol and what types of validation challenges the server
might require. might require.
5. Character Encoding 5. Character Encoding
All requests and responses sent via HTTP by ACME clients, ACME All requests and responses sent via HTTP by ACME clients, ACME
servers, and validation servers as well as any inputs for digest servers, and validation servers as well as any inputs for digest
computations MUST be encoded using the UTF-8 [RFC3629] character set. computations MUST be encoded using the UTF-8 [RFC3629] character set.
Note that identifiers that appear in certificates may have their own
encoding considerations (e.g., DNS names containing non-ASCII
characters are expressed as A-labels rather than U-labels). Any such
encoding considerations are to be applied prior to the aforementioned
UTF-8 encoding.
6. Message Transport 6. Message Transport
Communications between an ACME client and an ACME server are done Communications between an ACME client and an ACME server are done
over HTTPS, using JSON Web Signature (JWS) [RFC7515] to provide some over HTTPS, using JSON Web Signature (JWS) [RFC7515] to provide some
additional security properties for messages sent from the client to additional security properties for messages sent from the client to
the server. HTTPS provides server authentication and the server. HTTPS provides server authentication and
confidentiality. With some ACME-specific extensions, JWS provides confidentiality. With some ACME-specific extensions, JWS provides
authentication of the client's request payloads, anti-replay authentication of the client's request payloads, anti-replay
protection, and integrity for the HTTPS request URL. protection, and integrity for the HTTPS request URL.
skipping to change at page 10, line 31 skipping to change at page 10, line 36
6.1. HTTPS Requests 6.1. HTTPS Requests
Each ACME function is accomplished by the client sending a sequence Each ACME function is accomplished by the client sending a sequence
of HTTPS requests to the server, carrying JSON messages of HTTPS requests to the server, carrying JSON messages
[RFC2818][RFC7159]. Use of HTTPS is REQUIRED. Each subsection of [RFC2818][RFC7159]. Use of HTTPS is REQUIRED. Each subsection of
Section 7 below describes the message formats used by the function Section 7 below describes the message formats used by the function
and the order in which messages are sent. and the order in which messages are sent.
In most HTTPS transactions used by ACME, the ACME client is the HTTPS In most HTTPS transactions used by ACME, the ACME client is the HTTPS
client and the ACME server is the HTTPS server. The ACME server acts client and the ACME server is the HTTPS server. The ACME server acts
as an HTTP and HTTPS client when validating challenges via HTTP. as a client when validating challenges: an HTTP client when
validating an 'http-01' challenge, a DNS client with 'dns-01', etc.
ACME servers SHOULD follow the recommendations of [RFC7525] when ACME servers SHOULD follow the recommendations of [RFC7525] when
configuring their TLS implementations. ACME servers that support TLS configuring their TLS implementations. ACME servers that support TLS
1.3 MAY allow clients to send early data (0-RTT). This is safe 1.3 MAY allow clients to send early data (0-RTT). This is safe
because the ACME protocol itself includes anti-replay protections because the ACME protocol itself includes anti-replay protections
(see Section 6.4). (see Section 6.5) in all cases where they are required. For this
reason, there are no restrictions on what ACME data can be carried in
0-RTT.
ACME clients MUST send a User-Agent header, in accordance with ACME clients MUST send a User-Agent header field, in accordance with
[RFC7231]. This header SHOULD include the name and version of the [RFC7231]. This header field SHOULD include the name and version of
ACME software in addition to the name and version of the underlying the ACME software in addition to the name and version of the
HTTP client software. underlying HTTP client software.
ACME clients SHOULD send an Accept-Language header in accordance with ACME clients SHOULD send an Accept-Language header field in
[RFC7231] to enable localization of error messages. accordance with [RFC7231] to enable localization of error messages.
ACME servers that are intended to be generally accessible need to use ACME servers that are intended to be generally accessible need to use
Cross-Origin Resource Sharing (CORS) in order to be accessible from Cross-Origin Resource Sharing (CORS) in order to be accessible from
browser-based clients [W3C.CR-cors-20130129]. Such servers SHOULD browser-based clients [W3C.REC-cors-20140116]. Such servers SHOULD
set the Access-Control-Allow-Origin header field to the value "*". set the Access-Control-Allow-Origin header field to the value "*".
Binary fields in the JSON objects used by ACME are encoded using Binary fields in the JSON objects used by ACME are encoded using
base64url encoding described in [RFC4648] Section 5, according to the base64url encoding described in [RFC4648] Section 5, according to the
profile specified in JSON Web Signature [RFC7515] Section 2. This profile specified in JSON Web Signature [RFC7515] Section 2. This
encoding uses a URL safe character set. Trailing '=' characters MUST encoding uses a URL safe character set. Trailing '=' characters MUST
be stripped. Encoded values that include trailing '=' characters be stripped. Encoded values that include trailing '=' characters
MUST be rejected as improperly encoded. MUST be rejected as improperly encoded.
6.2. Request Authentication 6.2. Request Authentication
skipping to change at page 11, line 38 skipping to change at page 11, line 46
o The JWS Unprotected Header [RFC7515] MUST NOT be used o The JWS Unprotected Header [RFC7515] MUST NOT be used
o The JWS Payload MUST NOT be detached o The JWS Payload MUST NOT be detached
o The JWS Protected Header MUST include the following fields: o The JWS Protected Header MUST include the following fields:
* "alg" (Algorithm) * "alg" (Algorithm)
+ This field MUST NOT contain "none" or a Message + This field MUST NOT contain "none" or a Message
Authentication Code (MAC)-based algorithm Authentication Code (MAC)-based algorithm (e.g. one in which
the algorithm registry description mentions MAC/HMAC).
* "nonce" (defined in Section 6.4 below)
* "url" (defined in Section 6.3 below) * "nonce" (defined in Section 6.5 below)
* "url" (defined in Section 6.4 below)
* Either "jwk" (JSON Web Key) or "kid" (Key ID) as specified * Either "jwk" (JSON Web Key) or "kid" (Key ID) as specified
below below
An ACME server MUST implement the "ES256" signature algorithm An ACME server MUST implement the "ES256" signature algorithm
[RFC7518] and SHOULD implement the "EdDSA" signature algorithm using [RFC7518] and SHOULD implement the "EdDSA" signature algorithm using
the "Ed25519" variant (indicated by "crv") [RFC8037]. the "Ed25519" variant (indicated by "crv") [RFC8037].
The "jwk" and "kid" fields are mutually exclusive. Servers MUST The "jwk" and "kid" fields are mutually exclusive. Servers MUST
reject requests that contain both. reject requests that contain both.
For newAccount requests, and for revokeCert requests authenticated by For newAccount requests, and for revokeCert requests authenticated by
a certificate key, there MUST be a "jwk" field. This field MUST a certificate key, there MUST be a "jwk" field. This field MUST
contain the public key corresponding to the private key used to sign contain the public key corresponding to the private key used to sign
the JWS. the JWS.
For all other requests, the request is signed using an existing For all other requests, the request is signed using an existing
account and there MUST be a "kid" field. This field MUST contain the account and there MUST be a "kid" field. This field MUST contain the
account URL received by POSTing to the newAccount resource. account URL received by POSTing to the newAccount resource.
Note that authentication via signed JWS request bodies implies that
GET requests are not authenticated. Servers MUST NOT respond to GET
requests for resources that might be considered sensitive. Account
resources are the only sensitive resources defined in this
specification.
If the client sends a JWS signed with an algorithm that the server If the client sends a JWS signed with an algorithm that the server
does not support, then the server MUST return an error with status does not support, then the server MUST return an error with status
code 400 (Bad Request) and type code 400 (Bad Request) and type
"urn:ietf:params:acme:error:badSignatureAlgorithm". The problem "urn:ietf:params:acme:error:badSignatureAlgorithm". The problem
document returned with the error MUST include an "algorithms" field document returned with the error MUST include an "algorithms" field
with an array of supported "alg" values. See Section 6.6 for more with an array of supported "alg" values. See Section 6.7 for more
details on the structure of error responses. details on the structure of error responses.
Because client requests in ACME carry JWS objects in the Flattened Because client requests in ACME carry JWS objects in the Flattened
JSON Serialization, they must have the "Content-Type" header field JSON Serialization, they must have the "Content-Type" header field
set to "application/jose+json". If a request does not meet this set to "application/jose+json". If a request does not meet this
requirement, then the server MUST return a response with status code requirement, then the server MUST return a response with status code
415 (Unsupported Media Type). 415 (Unsupported Media Type).
6.3. Request URL Integrity 6.3. GET and POST-as-GET Requests
Note that authentication via signed JWS request bodies implies that
requests without an entity body are not authenticated, in particular
GET requests. Except for the cases described in this section, if the
server receives a GET request, it MUST return an error with status
code 405 "Method Not Allowed" and type "malformedRequest".
If a client wishes to fetch a resource from the server (which would
otherwise be done with a GET), then it MUST send a POST request with
a JWS body as described above, where the payload of the JWS is a
zero-length octet string. In other words, the "payload" field of the
JWS object MUST be present and set to the empty string ("").
We will refer to these as "POST-as-GET" requests. On receiving a
request with a zero-length (and thus non-JSON) payload, the server
MUST authenticate the sender and verify any access control rules.
Otherwise, the server MUST treat this request as having the same
semantics as a GET request for the same resource.
The server MUST allow GET requests for the directory and newNonce
resources (see Section 7.1), in addition to POST-as-GET requests for
these resources. This enables clients to bootstrap into the ACME
authentication system.
The server MAY allow GET requests for certificate resources in order
to allow certificates to be fetched by a lower-privileged process,
e.g., the web server that will use the referenced certificate chain.
(See [I-D.ietf-acme-star] for more advanced cases.) A server that
allows GET requests for certificate resources can still provide a
degree of access control by assigning them capability URLs
[W3C.WD-capability-urls-20140218]. As above, if the server does not
allow GET requests for a given resource, it MUST return an error with
status code 405 "Method Not Allowed" and type "malformedRequest".
6.4. Request URL Integrity
It is common in deployment for the entity terminating TLS for HTTPS It is common in deployment for the entity terminating TLS for HTTPS
to be different from the entity operating the logical HTTPS server, to be different from the entity operating the logical HTTPS server,
with a "request routing" layer in the middle. For example, an ACME with a "request routing" layer in the middle. For example, an ACME
CA might have a content delivery network terminate TLS connections CA might have a content delivery network terminate TLS connections
from clients so that it can inspect client requests for denial-of- from clients so that it can inspect client requests for denial-of-
service protection. service protection.
These intermediaries can also change values in the request that are These intermediaries can also change values in the request that are
not signed in the HTTPS request, e.g., the request URL and headers. not signed in the HTTPS request, e.g., the request URL and header
ACME uses JWS to provide an integrity mechanism, which protects fields. ACME uses JWS to provide an integrity mechanism, which
against an intermediary changing the request URL to another ACME URL. protects against an intermediary changing the request URL to another
ACME URL.
As noted in Section 6.2 above, all ACME request objects carry a "url" As noted in Section 6.2 above, all ACME request objects carry a "url"
header parameter in their protected header. This header parameter header parameter in their protected header. This header parameter
encodes the URL to which the client is directing the request. On encodes the URL to which the client is directing the request. On
receiving such an object in an HTTP request, the server MUST compare receiving such an object in an HTTP request, the server MUST compare
the "url" header parameter to the request URL. If the two do not the "url" header parameter to the request URL. If the two do not
match, then the server MUST reject the request as unauthorized. match, then the server MUST reject the request as unauthorized.
Except for the directory resource, all ACME resources are addressed Except for the directory resource, all ACME resources are addressed
with URLs provided to the client by the server. In requests sent to with URLs provided to the client by the server. In requests sent to
these resources, the client MUST set the "url" header parameter to these resources, the client MUST set the "url" header parameter to
the exact string provided by the server (rather than performing any the exact string provided by the server (rather than performing any
re-encoding on the URL). The server SHOULD perform the corresponding re-encoding on the URL). The server SHOULD perform the corresponding
string equality check, configuring each resource with the URL string string equality check, configuring each resource with the URL string
provided to clients and having the resource check that requests have provided to clients and having the resource check that requests have
the same string in their "url" header parameter. the same string in their "url" header parameter. The server MUST
reject the request as unauthorized if the string equality check
fails.
6.3.1. "url" (URL) JWS Header Parameter 6.4.1. "url" (URL) JWS Header Parameter
The "url" header parameter specifies the URL [RFC3986] to which this The "url" header parameter specifies the URL [RFC3986] to which this
JWS object is directed. The "url" header parameter MUST be carried JWS object is directed. The "url" header parameter MUST be carried
in the protected header of the JWS. The value of the "url" header in the protected header of the JWS. The value of the "url" header
parameter MUST be a string representing the target URL. parameter MUST be a string representing the target URL.
6.4. Replay protection 6.5. Replay protection
In order to protect ACME resources from any possible replay attacks, In order to protect ACME resources from any possible replay attacks,
ACME requests have a mandatory anti-replay mechanism. This mechanism ACME POST requests have a mandatory anti-replay mechanism. This
is based on the server maintaining a list of nonces that it has mechanism is based on the server maintaining a list of nonces that it
issued to clients, and requiring any signed request from the client has issued, and requiring any signed request from the client to carry
to carry such a nonce. such a nonce.
An ACME server provides nonces to clients using the HTTP Replay-Nonce An ACME server provides nonces to clients using the HTTP Replay-Nonce
header field, as specified in Section 6.4.1 below. The server MUST header field, as specified in Section 6.5.1 below. The server MUST
include a Replay-Nonce header field in every successful response to a include a Replay-Nonce header field in every successful response to a
POST request and SHOULD provide it in error responses as well. POST request and SHOULD provide it in error responses as well.
Every JWS sent by an ACME client MUST include, in its protected Every JWS sent by an ACME client MUST include, in its protected
header, the "nonce" header parameter, with contents as defined in header, the "nonce" header parameter, with contents as defined in
Section 6.4.2 below. As part of JWS verification, the ACME server Section 6.5.2 below. As part of JWS verification, the ACME server
MUST verify that the value of the "nonce" header is a value that the MUST verify that the value of the "nonce" header is a value that the
server previously provided in a Replay-Nonce header field. Once a server previously provided in a Replay-Nonce header field. Once a
nonce value has appeared in an ACME request, the server MUST consider nonce value has appeared in an ACME request, the server MUST consider
it invalid, in the same way as a value it had never issued. it invalid, in the same way as a value it had never issued.
When a server rejects a request because its nonce value was When a server rejects a request because its nonce value was
unacceptable (or not present), it MUST provide HTTP status code 400 unacceptable (or not present), it MUST provide HTTP status code 400
(Bad Request), and indicate the ACME error type (Bad Request), and indicate the ACME error type
"urn:ietf:params:acme:error:badNonce". An error response with the "urn:ietf:params:acme:error:badNonce". An error response with the
"badNonce" error type MUST include a Replay-Nonce header with a fresh "badNonce" error type MUST include a Replay-Nonce header with a fresh
nonce. On receiving such a response, a client SHOULD retry the nonce. On receiving such a response, a client SHOULD retry the
request using the new nonce. request using the new nonce.
The precise method used to generate and track nonces is up to the The precise method used to generate and track nonces is up to the
server. For example, the server could generate a random 128-bit server. For example, the server could generate a random 128-bit
value for each response, keep a list of issued nonces, and strike value for each response, keep a list of issued nonces, and strike
nonces from this list as they are used. nonces from this list as they are used.
6.4.1. Replay-Nonce 6.5.1. Replay-Nonce
The "Replay-Nonce" header field includes a server-generated value The "Replay-Nonce" header field includes a server-generated value
that the server can use to detect unauthorized replay in future that the server can use to detect unauthorized replay in future
client requests. The server MUST generate the value provided in client requests. The server MUST generate the value provided in
Replay-Nonce in such a way that they are unique to each message, with Replay-Nonce in such a way that they are unique to each message, with
high probability. For instance, it is acceptable to generate Replay- high probability, and unpredictable to anyone besides the server.
Nonces randomly. For instance, it is acceptable to generate Replay-Nonces randomly.
The value of the Replay-Nonce field MUST be an octet string encoded The value of the Replay-Nonce field MUST be an octet string encoded
according to the base64url encoding described in Section 2 of according to the base64url encoding described in Section 2 of
[RFC7515]. Clients MUST ignore invalid Replay-Nonce values. The [RFC7515]. Clients MUST ignore invalid Replay-Nonce values. The
ABNF [RFC5234] for the Replay-Nonce header field follows: ABNF [RFC5234] for the Replay-Nonce header field follows:
base64url = [A-Z] / [a-z] / [0-9] / "-" / "_" base64url = ALPHA / DIGIT / "-" / "_"
Replay-Nonce = *base64url Replay-Nonce = 1*base64url
The Replay-Nonce header field SHOULD NOT be included in HTTP request The Replay-Nonce header field SHOULD NOT be included in HTTP request
messages. messages.
6.4.2. "nonce" (Nonce) JWS Header Parameter 6.5.2. "nonce" (Nonce) JWS Header Parameter
The "nonce" header parameter provides a unique value that enables the The "nonce" header parameter provides a unique value that enables the
verifier of a JWS to recognize when replay has occurred. The "nonce" verifier of a JWS to recognize when replay has occurred. The "nonce"
header parameter MUST be carried in the protected header of the JWS. header parameter MUST be carried in the protected header of the JWS.
The value of the "nonce" header parameter MUST be an octet string, The value of the "nonce" header parameter MUST be an octet string,
encoded according to the base64url encoding described in Section 2 of encoded according to the base64url encoding described in Section 2 of
[RFC7515]. If the value of a "nonce" header parameter is not valid [RFC7515]. If the value of a "nonce" header parameter is not valid
according to this encoding, then the verifier MUST reject the JWS as according to this encoding, then the verifier MUST reject the JWS as
malformed. malformed.
6.5. Rate Limits 6.6. Rate Limits
Creation of resources can be rate limited by ACME servers to ensure Creation of resources can be rate limited by ACME servers to ensure
fair usage and prevent abuse. Once the rate limit is exceeded, the fair usage and prevent abuse. Once the rate limit is exceeded, the
server MUST respond with an error with the type server MUST respond with an error with the type
"urn:ietf:params:acme:error:rateLimited". Additionally, the server "urn:ietf:params:acme:error:rateLimited". Additionally, the server
SHOULD send a "Retry-After" header [RFC7231] indicating when the SHOULD send a "Retry-After" header [RFC7231] indicating when the
current request may succeed again. If multiple rate limits are in current request may succeed again. If multiple rate limits are in
place, that is the time where all rate limits allow access again for place, that is the time where all rate limits allow access again for
the current request with exactly the same parameters. the current request with exactly the same parameters.
In addition to the human-readable "detail" field of the error In addition to the human-readable "detail" field of the error
response, the server MAY send one or multiple link relations in the response, the server MAY send one or multiple link relations in the
"Link" header [RFC8288] pointing to documentation about the specific "Link" header [RFC8288] pointing to documentation about the specific
rate limit that was hit, using the "help" link relation type. rate limit that was hit, using the "help" link relation type.
6.6. Errors 6.7. Errors
Errors can be reported in ACME both at the HTTP layer and within Errors can be reported in ACME both at the HTTP layer and within
challenge objects as defined in Section 8. ACME servers can return challenge objects as defined in Section 8. ACME servers can return
responses with an HTTP error response code (4XX or 5XX). For responses with an HTTP error response code (4XX or 5XX). For
example: If the client submits a request using a method not allowed example: If the client submits a request using a method not allowed
in this document, then the server MAY return status code 405 (Method in this document, then the server MAY return status code 405 (Method
Not Allowed). Not Allowed).
When the server responds with an error status, it SHOULD provide When the server responds with an error status, it SHOULD provide
additional information using a problem document [RFC7807]. To additional information using a problem document [RFC7807]. To
skipping to change at page 16, line 39 skipping to change at page 17, line 34
| | | | | |
| tls | The server received a TLS error during | | tls | The server received a TLS error during |
| | validation | | | validation |
| | | | | |
| unauthorized | The client lacks sufficient | | unauthorized | The client lacks sufficient |
| | authorization | | | authorization |
| | | | | |
| unsupportedContact | A contact URL for an account used an | | unsupportedContact | A contact URL for an account used an |
| | unsupported protocol scheme | | | unsupported protocol scheme |
| | | | | |
| unsupportedIdentifier | Identifier is not supported, but may be | | unsupportedIdentifier | An identifier is of an unsupported type |
| | in future |
| | | | | |
| userActionRequired | Visit the "instance" URL and take | | userActionRequired | Visit the "instance" URL and take |
| | actions specified there | | | actions specified there |
+-------------------------+-----------------------------------------+ +-------------------------+-----------------------------------------+
This list is not exhaustive. The server MAY return errors whose This list is not exhaustive. The server MAY return errors whose
"type" field is set to a URI other than those defined above. Servers "type" field is set to a URI other than those defined above. Servers
MUST NOT use the ACME URN namespace Section 9.6 for errors other than MUST NOT use the ACME URN namespace for errors not listed in the
the standard types. Clients SHOULD display the "detail" field of all appropriate IANA registry (see Section 9.6). Clients SHOULD display
errors. the "detail" field of all errors.
In the remainder of this document, we use the tokens in the table In the remainder of this document, we use the tokens in the table
above to refer to error types, rather than the full URNs. For above to refer to error types, rather than the full URNs. For
example, an "error of type 'badCSR'" refers to an error document with example, an "error of type 'badCSR'" refers to an error document with
"type" value "urn:ietf:params:acme:error:badCSR". "type" value "urn:ietf:params:acme:error:badCSR".
6.6.1. Subproblems 6.7.1. Subproblems
Sometimes a CA may need to return multiple errors in response to a Sometimes a CA may need to return multiple errors in response to a
request. Additionally, the CA may need to attribute errors to request. Additionally, the CA may need to attribute errors to
specific identifiers. For instance, a new-order request may contain specific identifiers. For instance, a new-order request may contain
multiple identifiers for which the CA cannot issue. In this multiple identifiers for which the CA cannot issue. In this
situation, an ACME problem document MAY contain the "subproblems" situation, an ACME problem document MAY contain the "subproblems"
field, containing a JSON array of problem documents, each of which field, containing a JSON array of problem documents, each of which
MAY contain an "identifier" field. If present, the "identifier" MAY contain an "identifier" field. If present, the "identifier"
field MUST contain an ACME identifier (Section 9.7.7). The field MUST contain an ACME identifier (Section 9.7.7). The
"identifier" field MUST NOT be present at the top level in ACME "identifier" field MUST NOT be present at the top level in ACME
skipping to change at page 19, line 27 skipping to change at page 19, line 49
o A "directory" resource (Section 7.1.1) o A "directory" resource (Section 7.1.1)
o A "newNonce" resource (Section 7.2) o A "newNonce" resource (Section 7.2)
o A "newAccount" resource (Section 7.3) o A "newAccount" resource (Section 7.3)
o A "newOrder" resource (Section 7.4) o A "newOrder" resource (Section 7.4)
o A "revokeCert" resource (Section 7.6) o A "revokeCert" resource (Section 7.6)
o A "keyChange" resource (Section 7.3.6) o A "keyChange" resource (Section 7.3.5)
The server MUST provide "directory" and "newNonce" resources. The server MUST provide "directory" and "newNonce" resources.
ACME uses different URLs for different management functions. Each ACME uses different URLs for different management functions. Each
function is listed in a directory along with its corresponding URL, function is listed in a directory along with its corresponding URL,
so clients only need to be configured with the directory URL. These so clients only need to be configured with the directory URL. These
URLs are connected by a few different link relations [RFC5988]. URLs are connected by a few different link relations [RFC5988].
The "up" link relation is used with challenge resources to indicate The "up" link relation is used with challenge resources to indicate
the authorization resource to which a challenge belongs. It is also the authorization resource to which a challenge belongs. It is also
used from certificate resources to indicate a resource from which the used, with some media types, from certificate resources to indicate a
client may fetch a chain of CA certificates that could be used to resource from which the client may fetch a chain of CA certificates
validate the certificate in the original resource. that could be used to validate the certificate in the original
resource.
The "index" link relation is present on all resources other than the The "index" link relation is present on all resources other than the
directory and indicates the URL of the directory. directory and indicates the URL of the directory.
The following diagram illustrates the relations between resources on The following diagram illustrates the relations between resources on
an ACME server. For the most part, these relations are expressed by an ACME server. For the most part, these relations are expressed by
URLs provided as strings in the resources' JSON representations. URLs provided as strings in the resources' JSON representations.
Lines with labels in quotes indicate HTTP link relations. Lines with labels in quotes indicate HTTP link relations.
directory directory
skipping to change at page 21, line 5 skipping to change at page 21, line 7
challenge challenge
ACME Resources and Relationships ACME Resources and Relationships
The following table illustrates a typical sequence of requests The following table illustrates a typical sequence of requests
required to establish a new account with the server, prove control of required to establish a new account with the server, prove control of
an identifier, issue a certificate, and fetch an updated certificate an identifier, issue a certificate, and fetch an updated certificate
some time after issuance. The "->" is a mnemonic for a Location some time after issuance. The "->" is a mnemonic for a Location
header pointing to a created resource. header pointing to a created resource.
+-----------------------+--------------------------+----------------+ +-------------------+--------------------------------+--------------+
| Action | Request | Response | | Action | Request | Response |
+-----------------------+--------------------------+----------------+ +-------------------+--------------------------------+--------------+
| Get directory | GET directory | 200 | | Get directory | GET directory | 200 |
| | | | | | | |
| Get nonce | HEAD newNonce | 200 | | Get nonce | HEAD newNonce | 200 |
| | | | | | | |
| Create account | POST newAccount | 201 -> account | | Create account | POST newAccount | 201 -> |
| | | | | | | account |
| Submit order | POST newOrder | 201 -> order | | | | |
| | | | | Submit order | POST newOrder | 201 -> order |
| Fetch challenges | GET order | 200 | | | | |
| | authorizations | | | Fetch challenges | POST-as-GET order's | 200 |
| | | | | | authorization urls | |
| Respond to challenges | POST challenge urls | 200 | | | | |
| | | | | Respond to | POST-as-GET authorization | 200 |
| Poll for status | GET order | 200 | | challenges | challenge urls | |
| | | | | | | |
| Finalize order | POST order finalize | 200 | | Poll for status | POST-as-GET order | 200 |
| | | | | | | |
| Poll for status | GET order | 200 | | Finalize order | POST order's finalize url | 200 |
| | | | | | | |
| Download certificate | GET order certificate | 200 | | Poll for status | POST-as-GET order | 200 |
+-----------------------+--------------------------+----------------+ | | | |
| Download | POST-as-GET order's | 200 |
| certificate | certificate url | |
+-------------------+--------------------------------+--------------+
The remainder of this section provides the details of how these The remainder of this section provides the details of how these
resources are structured and how the ACME protocol makes use of them. resources are structured and how the ACME protocol makes use of them.
7.1.1. Directory 7.1.1. Directory
In order to help clients configure themselves with the right URLs for In order to help clients configure themselves with the right URLs for
each ACME operation, ACME servers provide a directory object. This each ACME operation, ACME servers provide a directory object. This
should be the only URL needed to configure clients. It is a JSON should be the only URL needed to configure clients. It is a JSON
object, whose field names are drawn from the following table and object, whose field names are drawn from the resource registry
whose values are the corresponding URLs. (Section 9.7.5) and whose values are the corresponding URLs.
+------------+--------------------+ +------------+--------------------+
| Field | URL in value | | Field | URL in value |
+------------+--------------------+ +------------+--------------------+
| newNonce | New nonce | | newNonce | New nonce |
| | | | | |
| newAccount | New account | | newAccount | New account |
| | | | | |
| newOrder | New order | | newOrder | New order |
| | | | | |
skipping to change at page 22, line 39 skipping to change at page 22, line 39
o a host which only functions as an ACME server could place the o a host which only functions as an ACME server could place the
directory under the path "/". directory under the path "/".
If the ACME server does not implement pre-authorization If the ACME server does not implement pre-authorization
(Section 7.4.1) it MUST omit the "newAuthz" field of the directory. (Section 7.4.1) it MUST omit the "newAuthz" field of the directory.
The object MAY additionally contain a field "meta". If present, it The object MAY additionally contain a field "meta". If present, it
MUST be a JSON object; each field in the object is an item of MUST be a JSON object; each field in the object is an item of
metadata relating to the service provided by the ACME server. metadata relating to the service provided by the ACME server.
The following metadata items are defined, all of which are OPTIONAL: The following metadata items are defined (Section 9.7.6), all of
which are OPTIONAL:
termsOfService (optional, string): A URL identifying the current termsOfService (optional, string): A URL identifying the current
terms of service. terms of service.
website (optional, string): An HTTP or HTTPS URL locating a website website (optional, string): An HTTP or HTTPS URL locating a website
providing more information about the ACME server. providing more information about the ACME server.
caaIdentities (optional, array of string): Each string MUST be a caaIdentities (optional, array of string): The hostnames that the
lowercase hostname which the ACME server recognizes as referring ACME server recognizes as referring to itself for the purposes of
to itself for the purposes of CAA record validation as defined in CAA record validation as defined in [RFC6844]. Each string MUST
[RFC6844]. This allows clients to determine the correct issuer represent the same sequence of ASCII code points that the server
domain name to use when configuring CAA records. will expect to see as the "Issuer Domain Name" in a CAA issue or
issuewild property tag. This allows clients to determine the
correct issuer domain name to use when configuring CAA records.
externalAccountRequired (optional, boolean): If this field is externalAccountRequired (optional, boolean): If this field is
present and set to "true", then the CA requires that all new- present and set to "true", then the CA requires that all new-
account requests include an "externalAccountBinding" field account requests include an "externalAccountBinding" field
associating the new account with an external account. associating the new account with an external account.
Clients access the directory by sending a GET request to the Clients access the directory by sending a GET request to the
directory URL. directory URL.
HTTP/1.1 200 OK HTTP/1.1 200 OK
skipping to change at page 23, line 45 skipping to change at page 23, line 47
status (required, string): The status of this account. Possible status (required, string): The status of this account. Possible
values are: "valid", "deactivated", and "revoked". The value values are: "valid", "deactivated", and "revoked". The value
"deactivated" should be used to indicate client-initiated "deactivated" should be used to indicate client-initiated
deactivation whereas "revoked" should be used to indicate server- deactivation whereas "revoked" should be used to indicate server-
initiated deactivation. (See Section 7.1.6) initiated deactivation. (See Section 7.1.6)
contact (optional, array of string): An array of URLs that the contact (optional, array of string): An array of URLs that the
server can use to contact the client for issues related to this server can use to contact the client for issues related to this
account. For example, the server may wish to notify the client account. For example, the server may wish to notify the client
about server-initiated revocation or certificate expiration. about server-initiated revocation or certificate expiration. For
information on supported URL schemes, see Section 7.3
termsOfServiceAgreed (optional, boolean): Including this field in a termsOfServiceAgreed (optional, boolean): Including this field in a
new-account request, with a value of true, indicates the client's new-account request, with a value of true, indicates the client's
agreement with the terms of service. This field is not updateable agreement with the terms of service. This field is not updateable
by the client. by the client.
orders (required, string): A URL from which a list of orders orders (required, string): A URL from which a list of orders
submitted by this account can be fetched via a GET request, as submitted by this account can be fetched via a POST-as-GET
described in Section 7.1.2.1. request, as described in Section 7.1.2.1.
{ {
"status": "valid", "status": "valid",
"contact": [ "contact": [
"mailto:cert-admin@example.com", "mailto:cert-admin@example.com",
"mailto:admin@example.com" "mailto:admin@example.com"
], ],
"termsOfServiceAgreed": true, "termsOfServiceAgreed": true,
"orders": "https://example.com/acme/acct/1/orders" "orders": "https://example.com/acme/acct/1/orders"
} }
7.1.2.1. Orders List 7.1.2.1. Orders List
Each account object includes an "orders" URL from which a list of Each account object includes an "orders" URL from which a list of
orders created by the account can be fetched via GET request. The orders created by the account can be fetched via POST-as-GET request.
result of the GET request MUST be a JSON object whose "orders" field The result of the request MUST be a JSON object whose "orders" field
is an array of URLs, each identifying an order belonging to the is an array of URLs, each identifying an order belonging to the
account. The server SHOULD include pending orders, and SHOULD NOT account. The server SHOULD include pending orders, and SHOULD NOT
include orders that are invalid in the array of URLs. The server MAY include orders that are invalid in the array of URLs. The server MAY
return an incomplete list, along with a Link header with a "next" return an incomplete list, along with a Link header field with a
link relation indicating where further entries can be acquired. "next" link relation indicating where further entries can be
acquired.
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
Link: <https://example.com/acme/acct/1/orders?cursor=2>;rel="next" Link: <https://example.com/acme/acct/1/orders?cursor=2>;rel="next"
{ {
"orders": [ "orders": [
"https://example.com/acme/acct/1/order/1", "https://example.com/acme/acct/1/order/1",
"https://example.com/acme/acct/1/order/2", "https://example.com/acme/acct/1/order/2",
/* 47 more URLs not shown for example brevity */ /* 47 more URLs not shown for example brevity */
skipping to change at page 25, line 42 skipping to change at page 25, line 44
authorizations (required, array of string): For pending orders, the authorizations (required, array of string): For pending orders, the
authorizations that the client needs to complete before the authorizations that the client needs to complete before the
requested certificate can be issued (see Section 7.5), including requested certificate can be issued (see Section 7.5), including
unexpired authorizations that the client has completed in the past unexpired authorizations that the client has completed in the past
for identifiers specified in the order. The authorizations for identifiers specified in the order. The authorizations
required are dictated by server policy and there may not be a 1:1 required are dictated by server policy and there may not be a 1:1
relationship between the order identifiers and the authorizations relationship between the order identifiers and the authorizations
required. For final orders (in the "valid" or "invalid" state), required. For final orders (in the "valid" or "invalid" state),
the authorizations that were completed. Each entry is a URL from the authorizations that were completed. Each entry is a URL from
which an authorization can be fetched with a GET request. which an authorization can be fetched with a POST-as-GET request.
finalize (required, string): A URL that a CSR must be POSTed to once finalize (required, string): A URL that a CSR must be POSTed to once
all of the order's authorizations are satisfied to finalize the all of the order's authorizations are satisfied to finalize the
order. The result of a successful finalization will be the order. The result of a successful finalization will be the
population of the certificate URL for the order. population of the certificate URL for the order.
certificate (optional, string): A URL for the certificate that has certificate (optional, string): A URL for the certificate that has
been issued in response to this order. been issued in response to this order.
{ {
"status": "valid", "status": "valid",
"expires": "2015-03-01T14:09:00Z", "expires": "2015-03-01T14:09:07.99Z",
"identifiers": [ "identifiers": [
{ "type": "dns", "value": "example.com" }, { "type": "dns", "value": "example.com" },
{ "type": "dns", "value": "www.example.com" } { "type": "dns", "value": "www.example.com" }
], ],
"notBefore": "2016-01-01T00:00:00Z", "notBefore": "2016-01-01T00:00:00Z",
"notAfter": "2016-01-08T00:00:00Z", "notAfter": "2016-01-08T00:00:00Z",
"authorizations": [ "authorizations": [
skipping to change at page 27, line 48 skipping to change at page 27, line 51
Possible values are: "pending", "valid", "invalid", "deactivated", Possible values are: "pending", "valid", "invalid", "deactivated",
"expired", and "revoked". (See Section 7.1.6) "expired", and "revoked". (See Section 7.1.6)
expires (optional, string): The timestamp after which the server expires (optional, string): The timestamp after which the server
will consider this authorization invalid, encoded in the format will consider this authorization invalid, encoded in the format
specified in RFC 3339 [RFC3339]. This field is REQUIRED for specified in RFC 3339 [RFC3339]. This field is REQUIRED for
objects with "valid" in the "status" field. objects with "valid" in the "status" field.
challenges (required, array of objects): For pending authorizations, challenges (required, array of objects): For pending authorizations,
the challenges that the client can fulfill in order to prove the challenges that the client can fulfill in order to prove
possession of the identifier. For final authorizations (in the possession of the identifier. For valid authorizations, the
"valid" or "invalid" state), the challenges that were used. Each challenge that was validated. For invalid authorizations, the
array entry is an object with parameters required to validate the challenge that was attempted and failed. Each array entry is an
challenge. A client should attempt to fulfill one of these object with parameters required to validate the challenge. A
challenges, and a server should consider any one of the challenges client should attempt to fulfill one of these challenges, and a
sufficient to make the authorization valid. server should consider any one of the challenges sufficient to
make the authorization valid.
wildcard (optional, boolean): For authorizations created as a result wildcard (optional, boolean): For authorizations created as a result
of a newOrder request containing a DNS identifier with a value of a newOrder request containing a DNS identifier with a value
that contained a wildcard prefix this field MUST be present, and that contained a wildcard prefix this field MUST be present, and
true. true.
The only type of identifier defined by this specification is a fully- The only type of identifier defined by this specification is a fully-
qualified domain name (type: "dns"). If a domain name contains non- qualified domain name (type: "dns"). The domain name MUST be encoded
ASCII Unicode characters it MUST be encoded using the rules defined in the form in which it would apper in a certificate. That is, it
in [RFC3492]. Servers MUST verify any identifier values that begin MUST be encoded according to the rules in Section 7 of [RFC5280].
with the ASCII Compatible Encoding prefix "xn--" as defined in Servers MUST verify any identifier values that begin with the ASCII
[RFC5890] are properly encoded. Wildcard domain names (with "*" as Compatible Encoding prefix "xn--" as defined in [RFC5890] are
the first label) MUST NOT be included in authorization objects. If properly encoded. Wildcard domain names (with "*" as the first
an authorization object conveys authorization for the base domain of label) MUST NOT be included in authorization objects. If an
a newOrder DNS type identifier with a wildcard prefix then the authorization object conveys authorization for the base domain of a
optional authorizations "wildcard" field MUST be present with a value newOrder DNS type identifier with a wildcard prefix then the optional
of true. authorizations "wildcard" field MUST be present with a value of true.
Section 8 describes a set of challenges for domain name validation. Section 8 describes a set of challenges for domain name validation.
{ {
"status": "valid", "status": "valid",
"expires": "2015-03-01T14:09:00Z", "expires": "2015-03-01T14:09:07.99Z",
"identifier": { "identifier": {
"type": "dns", "type": "dns",
"value": "example.org" "value": "example.org"
}, },
"challenges": [ "challenges": [
{ {
"url": "https://example.com/acme/authz/1234/0", "url": "https://example.com/acme/authz/1234/0",
"type": "http-01", "type": "http-01",
"status": "valid", "status": "valid",
"token": "DGyRejmCefe7v4NfDGDKfA", "token": "DGyRejmCefe7v4NfDGDKfA",
"validated": "2014-12-01T12:05:00Z" "validated": "2014-12-01T12:05:58.16Z"
} }
], ],
"wildcard": false "wildcard": false
} }
7.1.5. Challenge Objects 7.1.5. Challenge Objects
An ACME challenge object represents a server's offer to validate a An ACME challenge object represents a server's offer to validate a
client's possession of an identifier in a specific way. Unlike the client's possession of an identifier in a specific way. Unlike the
skipping to change at page 30, line 5 skipping to change at page 30, line 5
+---------+---------+ +---------+---------+
| | | |
V V V V
valid invalid valid invalid
State Transitions for Challenge Objects State Transitions for Challenge Objects
Authorization objects are created in the "pending" state. If one of Authorization objects are created in the "pending" state. If one of
the challenges listed in the authorization transitions to the "valid" the challenges listed in the authorization transitions to the "valid"
state, then the authorization also changes to the "valid" state. If state, then the authorization also changes to the "valid" state. If
there is an error while the authorization is still pending, then the the client attempts to fulfill a challenge and fails, or if there is
an error while the authorization is still pending, then the
authorization transitions to the "invalid" state. Once the authorization transitions to the "invalid" state. Once the
authorization is in the valid state, it can expire ("expired"), be authorization is in the valid state, it can expire ("expired"), be
deactivated by the client ("deactivated", see Section 7.5.2), or deactivated by the client ("deactivated", see Section 7.5.2), or
revoked by the server ("revoked"). revoked by the server ("revoked").
pending --------------------+ pending --------------------+
| | | |
| | Challenge failure | |
Error | Challenge valid | or | |
+---------+---------+ | Error | Challenge valid |
| | | +---------+---------+ |
V V | | | |
invalid valid | V V |
| | invalid valid |
| | | |
| | | |
+--------------+--------------+ | |
| | | +--------------+--------------+
| | | | | |
Server | Client | Time after | | | |
revoke | deactivate | "expires" | Server | Client | Time after |
V V V revoke | deactivate | "expires" |
revoked deactivated expired V V V
revoked deactivated expired
State Transitions for Authorization Objects State Transitions for Authorization Objects
Order objects are created in the "pending" state. Once all of the Order objects are created in the "pending" state. Once all of the
authorizations listed in the order object are in the "valid" state, authorizations listed in the order object are in the "valid" state,
the order transitions to the "ready" state. The order moves to the the order transitions to the "ready" state. The order moves to the
"processing" state after the client submits a request to the order's "processing" state after the client submits a request to the order's
"finalize" URL and the CA begins the issuance process for the "finalize" URL and the CA begins the issuance process for the
certificate. Once the certificate is issued, the order enters the certificate. Once the certificate is issued, the order enters the
"valid" state. If an error occurs at any of these stages, the order "valid" state. If an error occurs at any of these stages, the order
skipping to change at page 32, line 32 skipping to change at page 32, line 32
clients receive the same nonce repeatedly, leading to badNonce clients receive the same nonce repeatedly, leading to badNonce
errors. The server MUST include a Cache-Control header field with errors. The server MUST include a Cache-Control header field with
the "no-store" directive in responses for the new-nonce resource, in the "no-store" directive in responses for the new-nonce resource, in
order to prevent caching of this resource. order to prevent caching of this resource.
7.3. Account Creation 7.3. Account Creation
A client creates a new account with the server by sending a POST A client creates a new account with the server by sending a POST
request to the server's new-account URL. The body of the request is request to the server's new-account URL. The body of the request is
a stub account object optionally containing the "contact" and a stub account object optionally containing the "contact" and
"termsOfServiceAgreed" fields. "termsOfServiceAgreed" fields, and optionally the
"onlyReturnExisting" and "externalAccountBinding" fields.
contact (optional, array of string): Same meaning as the contact (optional, array of string): Same meaning as the
corresponding server field defined in Section 7.1.2 corresponding server field defined in Section 7.1.2
termsOfServiceAgreed (optional, boolean): Same meaning as the termsOfServiceAgreed (optional, boolean): Same meaning as the
corresponding server field defined in Section 7.1.2 corresponding server field defined in Section 7.1.2
onlyReturnExisting (optional, boolean): If this field is present onlyReturnExisting (optional, boolean): If this field is present
with the value "true", then the server MUST NOT create a new with the value "true", then the server MUST NOT create a new
account if one does not already exist. This allows a client to account if one does not already exist. This allows a client to
look up an account URL based on an account key (see look up an account URL based on an account key (see
Section 7.3.1). Section 7.3.1).
externalAccountBinding (optional, object): An optional field for externalAccountBinding (optional, object): An optional field for
binding the new account with an existing non-ACME account (see binding the new account with an existing non-ACME account (see
Section 7.3.5). Section 7.3.4).
POST /acme/new-account HTTP/1.1 POST /acme/new-account HTTP/1.1
Host: example.com Host: example.com
Content-Type: application/jose+json Content-Type: application/jose+json
{ {
"protected": base64url({ "protected": base64url({
"alg": "ES256", "alg": "ES256",
"jwk": {...}, "jwk": {...},
"nonce": "6S8IqOGY7eL2lsGoTZYifg", "nonce": "6S8IqOGY7eL2lsGoTZYifg",
skipping to change at page 34, line 5 skipping to change at page 34, line 5
server encounters a "mailto" contact URL that does not meet these server encounters a "mailto" contact URL that does not meet these
criteria, then it SHOULD reject it as invalid. criteria, then it SHOULD reject it as invalid.
If the server rejects a contact URL for using an unsupported scheme If the server rejects a contact URL for using an unsupported scheme
it MUST return an error of type "unsupportedContact", with a it MUST return an error of type "unsupportedContact", with a
description describing the error and what types of contact URLs the description describing the error and what types of contact URLs the
server considers acceptable. If the server rejects a contact URL for server considers acceptable. If the server rejects a contact URL for
using a supported scheme but an invalid value then the server MUST using a supported scheme but an invalid value then the server MUST
return an error of type "invalidContact". return an error of type "invalidContact".
If the server wishes to present the client with terms under which the If the server wishes to require the client to agree to terms under
ACME service is to be used, it MUST indicate the URL where such terms which the ACME service is to be used, it MUST indicate the URL where
can be accessed in the "termsOfService" subfield of the "meta" field such terms can be accessed in the "termsOfService" subfield of the
in the directory object, and the server MUST reject new-account "meta" field in the directory object, and the server MUST reject new-
requests that do not have the "termsOfServiceAgreed" field set to account requests that do not have the "termsOfServiceAgreed" field
"true". Clients SHOULD NOT automatically agree to terms by default. set to "true". Clients SHOULD NOT automatically agree to terms by
Rather, they SHOULD require some user interaction for agreement to default. Rather, they SHOULD require some user interaction for
terms. agreement to terms.
The server creates an account and stores the public key used to The server creates an account and stores the public key used to
verify the JWS (i.e., the "jwk" element of the JWS header) to verify the JWS (i.e., the "jwk" element of the JWS header) to
authenticate future requests from the account. The server returns authenticate future requests from the account. The server returns
this account object in a 201 (Created) response, with the account URL this account object in a 201 (Created) response, with the account URL
in a Location header field. The account URL is used as the "kid" in a Location header field. The account URL is used as the "kid"
value in the JWS authenticating subsequent requests by this account value in the JWS authenticating subsequent requests by this account
(See Section 6.2). (See Section 6.2).
HTTP/1.1 201 Created HTTP/1.1 201 Created
skipping to change at page 35, line 15 skipping to change at page 35, line 15
({"onlyReturnExisting": true}). If a client sends such a request and ({"onlyReturnExisting": true}). If a client sends such a request and
an account does not exist, then the server MUST return an error an account does not exist, then the server MUST return an error
response with status code 400 (Bad Request) and type response with status code 400 (Bad Request) and type
"urn:ietf:params:acme:error:accountDoesNotExist". "urn:ietf:params:acme:error:accountDoesNotExist".
7.3.2. Account Update 7.3.2. Account Update
If the client wishes to update this information in the future, it If the client wishes to update this information in the future, it
sends a POST request with updated information to the account URL. sends a POST request with updated information to the account URL.
The server MUST ignore any updates to the "orders" field, The server MUST ignore any updates to the "orders" field,
"termsOfServiceAgreed" field (see Section 7.3.4), or any other fields "termsOfServiceAgreed" field (see Section 7.3.3), the "status" field
it does not recognize. If the server accepts the update, it MUST (except as allowed by Section 7.3.6), or any other fields it does not
return a response with a 200 (OK) status code and the resulting recognize. If the server accepts the update, it MUST return a
account object. response with a 200 (OK) status code and the resulting account
object.
For example, to update the contact information in the above account, For example, to update the contact information in the above account,
the client could send the following request: the client could send the following request:
POST /acme/acct/1 HTTP/1.1 POST /acme/acct/1 HTTP/1.1
Host: example.com Host: example.com
Content-Type: application/jose+json Content-Type: application/jose+json
{ {
"protected": base64url({ "protected": base64url({
skipping to change at page 35, line 43 skipping to change at page 35, line 44
}), }),
"payload": base64url({ "payload": base64url({
"contact": [ "contact": [
"mailto:certificates@example.com", "mailto:certificates@example.com",
"mailto:admin@example.com" "mailto:admin@example.com"
] ]
}), }),
"signature": "hDXzvcj8T6fbFbmn...rDzXzzvzpRy64N0o" "signature": "hDXzvcj8T6fbFbmn...rDzXzzvzpRy64N0o"
} }
7.3.3. Account Information 7.3.3. Changes of Terms of Service
Servers MUST NOT respond to GET requests for account resources as
these requests are not authenticated. If a client wishes to query
the server for information about its account (e.g., to examine the
"contact" or "orders" fields), then it SHOULD do so by sending a POST
request with an empty update. That is, it should send a JWS whose
payload is an empty object ({}).
7.3.4. Changes of Terms of Service
As described above, a client can indicate its agreement with the CA's As described above, a client can indicate its agreement with the CA's
terms of service by setting the "termsOfServiceAgreed" field in its terms of service by setting the "termsOfServiceAgreed" field in its
account object to "true". account object to "true".
If the server has changed its terms of service since a client If the server has changed its terms of service since a client
initially agreed, and the server is unwilling to process a request initially agreed, and the server is unwilling to process a request
without explicit agreement to the new terms, then it MUST return an without explicit agreement to the new terms, then it MUST return an
error response with status code 403 (Forbidden) and type error response with status code 403 (Forbidden) and type
"urn:ietf:params:acme:error:userActionRequired". This response MUST "urn:ietf:params:acme:error:userActionRequired". This response MUST
include a Link header with link relation "terms-of-service" and the include a Link header field with link relation "terms-of-service" and
latest terms-of-service URL. the latest terms-of-service URL.
The problem document returned with the error MUST also include an The problem document returned with the error MUST also include an
"instance" field, indicating a URL that the client should direct a "instance" field, indicating a URL that the client should direct a
human user to visit in order for instructions on how to agree to the human user to visit in order for instructions on how to agree to the
terms. terms.
HTTP/1.1 403 Forbidden HTTP/1.1 403 Forbidden
Replay-Nonce: IXVHDyxIRGcTE0VSblhPzw Replay-Nonce: T81bdZroZ2ITWSondpTmAw
Link: <https://example.com/acme/terms/2017-6-02>;rel="terms-of-service" Link: <https://example.com/acme/terms/2017-6-02>;rel="terms-of-service"
Content-Type: application/problem+json Content-Type: application/problem+json
Content-Language: en Content-Language: en
{ {
"type": "urn:ietf:params:acme:error:userActionRequired", "type": "urn:ietf:params:acme:error:userActionRequired",
"detail": "Terms of service have changed", "detail": "Terms of service have changed",
"instance": "https://example.com/acme/agreement/?token=W8Ih3PswD-8" "instance": "https://example.com/acme/agreement/?token=W8Ih3PswD-8"
} }
7.3.5. External Account Binding 7.3.4. External Account Binding
The server MAY require a value for the "externalAccountBinding" field The server MAY require a value for the "externalAccountBinding" field
to be present in "newAccount" requests. This can be used to to be present in "newAccount" requests. This can be used to
associate an ACME account with an existing account in a non-ACME associate an ACME account with an existing account in a non-ACME
system, such as a CA customer database. system, such as a CA customer database.
To enable ACME account binding, the CA operating the ACME server To enable ACME account binding, the CA operating the ACME server
needs to provide the ACME client with a MAC key and a key identifier, needs to provide the ACME client with a MAC key and a key identifier,
using some mechanism outside of ACME. The key identifier MUST be an using some mechanism outside of ACME. The key identifier MUST be an
ASCII string. The MAC key SHOULD be provided in base64url-encoded ASCII string. The MAC key SHOULD be provided in base64url-encoded
form, to maximize compatibility between non-ACME provisioning systems form, to maximize compatibility between non-ACME provisioning systems
and ACME clients. and ACME clients.
The ACME client then computes a binding JWS to indicate the external The ACME client then computes a binding JWS to indicate the external
account holder's approval of the ACME account key. The payload of account holder's approval of the ACME account key. The payload of
this JWS is the account key being registered, in JWK form. The this JWS is the ACME account key being registered, in JWK form. The
protected header of the JWS MUST meet the following criteria: protected header of the JWS MUST meet the following criteria:
o The "alg" field MUST indicate a MAC-based algorithm o The "alg" field MUST indicate a MAC-based algorithm
o The "kid" field MUST contain the key identifier provided by the CA o The "kid" field MUST contain the key identifier provided by the CA
o The "nonce" field MUST NOT be present o The "nonce" field MUST NOT be present
o The "url" field MUST be set to the same value as the outer JWS o The "url" field MUST be set to the same value as the outer JWS
The "signature" field of the JWS will contain the MAC value computed The "signature" field of the JWS will contain the MAC value computed
with the MAC key provided by the CA. with the MAC key provided by the CA.
POST /acme/new-account HTTP/1.1 POST /acme/new-account HTTP/1.1
Host: example.com Host: example.com
Content-Type: application/jose+json Content-Type: application/jose+json
{ {
skipping to change at page 37, line 46 skipping to change at page 37, line 37
"kid": /* key identifier from CA */, "kid": /* key identifier from CA */,
"url": "https://example.com/acme/new-account" "url": "https://example.com/acme/new-account"
}), }),
"payload": base64url(/* same as in "jwk" above */), "payload": base64url(/* same as in "jwk" above */),
"signature": /* MAC using MAC key from CA */ "signature": /* MAC using MAC key from CA */
} }
}), }),
"signature": "5TWiqIYQfIDfALQv...x9C2mg8JGPxl5bI4" "signature": "5TWiqIYQfIDfALQv...x9C2mg8JGPxl5bI4"
} }
If a CA requires that new-account requests contain an If such a CA requires that new-account requests contain an
"externalAccountBinding" field, then it MUST provide the value "true" "externalAccountBinding" field, then it MUST provide the value "true"
in the "externalAccountRequired" subfield of the "meta" field in the in the "externalAccountRequired" subfield of the "meta" field in the
directory object. If the CA receives a new-account request without directory object. If the CA receives a new-account request without
an "externalAccountBinding" field, then it SHOULD reply with an error an "externalAccountBinding" field, then it SHOULD reply with an error
of type "externalAccountRequired". of type "externalAccountRequired".
When a CA receives a new-account request containing an When a CA receives a new-account request containing an
"externalAccountBinding" field, it decides whether or not to verify "externalAccountBinding" field, it decides whether or not to verify
the binding. If the CA does not verify the binding, then it MUST NOT the binding. If the CA does not verify the binding, then it MUST NOT
reflect the "externalAccountBinding" field in the resulting account reflect the "externalAccountBinding" field in the resulting account
skipping to change at page 38, line 32 skipping to change at page 38, line 22
used to verify the outer JWS (i.e., the "jwk" field of the outer used to verify the outer JWS (i.e., the "jwk" field of the outer
JWS) JWS)
If all of these checks pass and the CA creates a new account, then If all of these checks pass and the CA creates a new account, then
the CA may consider the new account associated with the external the CA may consider the new account associated with the external
account corresponding to the MAC key. The account object the CA account corresponding to the MAC key. The account object the CA
returns MUST include an "externalAccountBinding" field with the same returns MUST include an "externalAccountBinding" field with the same
value as the field in the request. If any of these checks fail, then value as the field in the request. If any of these checks fail, then
the CA MUST reject the new-account request. the CA MUST reject the new-account request.
7.3.6. Account Key Roll-over 7.3.5. Account Key Roll-over
A client may wish to change the public key that is associated with an A client may wish to change the public key that is associated with an
account in order to recover from a key compromise or proactively account in order to recover from a key compromise or proactively
mitigate the impact of an unnoticed key compromise. mitigate the impact of an unnoticed key compromise.
To change the key associated with an account, the client sends a To change the key associated with an account, the client sends a
request to the server containing signatures by both the old and new request to the server containing signatures by both the old and new
keys. The signature by the new key covers the account URL and the keys. The signature by the new key covers the account URL and the
old key, signifying a request by the new key holder to take over the old key, signifying a request by the new key holder to take over the
account from the old key holder. The signature by the old key covers account from the old key holder. The signature by the old key covers
skipping to change at page 39, line 23 skipping to change at page 39, line 15
The outer JWS MUST meet the normal requirements for an ACME JWS (see The outer JWS MUST meet the normal requirements for an ACME JWS (see
Section 6.2). The inner JWS MUST meet the normal requirements, with Section 6.2). The inner JWS MUST meet the normal requirements, with
the following differences: the following differences:
o The inner JWS MUST have a "jwk" header parameter, containing the o The inner JWS MUST have a "jwk" header parameter, containing the
public key of the new key pair. public key of the new key pair.
o The inner JWS MUST have the same "url" header parameter as the o The inner JWS MUST have the same "url" header parameter as the
outer JWS. outer JWS.
o The inner JWS is NOT REQUIRED to have a "nonce" header parameter. o The inner JWS MAY omit the "nonce" header parameter. The server
The server MUST ignore any value provided for the "nonce" header MUST ignore any value provided for the "nonce" header parameter.
parameter.
This transaction has signatures from both the old and new keys so This transaction has signatures from both the old and new keys so
that the server can verify that the holders of the two keys both that the server can verify that the holders of the two keys both
agree to the change. The signatures are nested to preserve the agree to the change. The signatures are nested to preserve the
property that all signatures on POST messages are signed by exactly property that all signatures on POST messages are signed by exactly
one key. The "inner" JWS effectively represents a request by the one key. The "inner" JWS effectively represents a request by the
holder of the new key to take over the account form the holder of the holder of the new key to take over the account form the holder of the
old key. The "outer" JWS represents the current account holder's old key. The "outer" JWS represents the current account holder's
assent to this request. assent to this request.
POST /acme/key-change HTTP/1.1 POST /acme/key-change HTTP/1.1
Host: example.com Host: example.com
Content-Type: application/jose+json Content-Type: application/jose+json
{ {
"protected": base64url({ "protected": base64url({
"alg": "ES256", "alg": "ES256",
"kid": "https://example.com/acme/acct/1", "kid": "https://example.com/acme/acct/1",
"nonce": "K60BWPrMQG9SDxBDS_xtSw", "nonce": "S9XaOcxP5McpnTcWPIhYuB",
"url": "https://example.com/acme/key-change" "url": "https://example.com/acme/key-change"
}), }),
"payload": base64url({ "payload": base64url({
"protected": base64url({ "protected": base64url({
"alg": "ES256", "alg": "ES256",
"jwk": /* new key */, "jwk": /* new key */,
"url": "https://example.com/acme/key-change" "url": "https://example.com/acme/key-change"
}), }),
"payload": base64url({ "payload": base64url({
"account": "https://example.com/acme/acct/1", "account": "https://example.com/acme/acct/1",
skipping to change at page 41, line 28 skipping to change at page 41, line 5
responds with an error status code and a problem document describing responds with an error status code and a problem document describing
the error. If there is an existing account with the new key the error. If there is an existing account with the new key
provided, then the server SHOULD use status code 409 (Conflict) and provided, then the server SHOULD use status code 409 (Conflict) and
provide the URL of that account in the Location header field. provide the URL of that account in the Location header field.
Note that changing the account key for an account SHOULD NOT have any Note that changing the account key for an account SHOULD NOT have any
other impact on the account. For example, the server MUST NOT other impact on the account. For example, the server MUST NOT
invalidate pending orders or authorization transactions based on a invalidate pending orders or authorization transactions based on a
change of account key. change of account key.
7.3.7. Account Deactivation 7.3.6. Account Deactivation
A client can deactivate an account by posting a signed update to the A client can deactivate an account by posting a signed update to the
server with a status field of "deactivated." Clients may wish to do account URL with a status field of "deactivated." Clients may wish
this when the account key is compromised or decommissioned. to do this when the account key is compromised or decommissioned. A
deactivated account can no longer request certificate issuance or
access resources related to the account, such as orders or
authorizations. If a server receives a POST or POST-as-GET from a
deactivated account, it MUST return an error response with status
code 401 (Unauthorized) and type
"urn:ietf:params:acme:error:unauthorized".
POST /acme/acct/1 HTTP/1.1 POST /acme/acct/1 HTTP/1.1
Host: example.com Host: example.com
Content-Type: application/jose+json Content-Type: application/jose+json
{ {
"protected": base64url({ "protected": base64url({
"alg": "ES256", "alg": "ES256",
"kid": "https://example.com/acme/acct/1", "kid": "https://example.com/acme/acct/1",
"nonce": "ntuJWWSic4WVNSqeUmshgg", "nonce": "ntuJWWSic4WVNSqeUmshgg",
skipping to change at page 43, line 20 skipping to change at page 42, line 41
"protected": base64url({ "protected": base64url({
"alg": "ES256", "alg": "ES256",
"kid": "https://example.com/acme/acct/1", "kid": "https://example.com/acme/acct/1",
"nonce": "5XJ1L3lEkMG7tR6pA00clA", "nonce": "5XJ1L3lEkMG7tR6pA00clA",
"url": "https://example.com/acme/new-order" "url": "https://example.com/acme/new-order"
}), }),
"payload": base64url({ "payload": base64url({
"identifiers": [ "identifiers": [
{ "type": "dns", "value": "example.com" } { "type": "dns", "value": "example.com" }
], ],
"notBefore": "2016-01-01T00:00:00Z", "notBefore": "2016-01-01T00:04:00+04:00",
"notAfter": "2016-01-08T00:00:00Z" "notAfter": "2016-01-08T00:04:00+04:00"
}), }),
"signature": "H6ZXtGjTZyUnPeKn...wEA4TklBdh3e454g" "signature": "H6ZXtGjTZyUnPeKn...wEA4TklBdh3e454g"
} }
The server MUST return an error if it cannot fulfill the request as The server MUST return an error if it cannot fulfill the request as
specified, and MUST NOT issue a certificate with contents other than specified, and MUST NOT issue a certificate with contents other than
those requested. If the server requires the request to be modified those requested. If the server requires the request to be modified
in a certain way, it should indicate the required changes using an in a certain way, it should indicate the required changes using an
appropriate error type and description. appropriate error type and description.
skipping to change at page 44, line 18 skipping to change at page 43, line 24
{ {
"status": "pending", "status": "pending",
"expires": "2016-01-01T00:00:00Z", "expires": "2016-01-01T00:00:00Z",
"notBefore": "2016-01-01T00:00:00Z", "notBefore": "2016-01-01T00:00:00Z",
"notAfter": "2016-01-08T00:00:00Z", "notAfter": "2016-01-08T00:00:00Z",
"identifiers": [ "identifiers": [
{ "type": "dns", "value": "example.com" }, { "type": "dns", "value": "example.com" },
{ "type": "dns", "value": "www.example.com" }
], ],
"authorizations": [ "authorizations": [
"https://example.com/acme/authz/1234", "https://example.com/acme/authz/1234",
"https://example.com/acme/authz/2345"
], ],
"finalize": "https://example.com/acme/order/asdf/finalize" "finalize": "https://example.com/acme/order/asdf/finalize"
} }
The order object returned by the server represents a promise that if The order object returned by the server represents a promise that if
the client fulfills the server's requirements before the "expires" the client fulfills the server's requirements before the "expires"
time, then the server will be willing to finalize the order upon time, then the server will be willing to finalize the order upon
request and issue the requested certificate. In the order object, request and issue the requested certificate. In the order object,
any authorization referenced in the "authorizations" array whose any authorization referenced in the "authorizations" array whose
status is "pending" represents an authorization transaction that the status is "pending" represents an authorization transaction that the
client must complete before the server will issue the certificate client must complete before the server will issue the certificate
(see Section 7.5). If the client fails to complete the required (see Section 7.5). If the client fails to complete the required
actions before the "expires" time, then the server SHOULD change the actions before the "expires" time, then the server SHOULD change the
status of the order to "invalid" and MAY delete the order resource. status of the order to "invalid" and MAY delete the order resource.
Clients SHOULD NOT make any assumptions about the sort order of Clients MUST NOT make any assumptions about the sort order of
"identifiers" or "authorizations" elements in the returned order "identifiers" or "authorizations" elements in the returned order
object. object.
Once the client believes it has fulfilled the server's requirements, Once the client believes it has fulfilled the server's requirements,
it should send a POST request to the order resource's finalize URL. it should send a POST request to the order resource's finalize URL.
The POST body MUST include a CSR: The POST body MUST include a CSR:
csr (required, string): A CSR encoding the parameters for the csr (required, string): A CSR encoding the parameters for the
certificate being requested [RFC2986]. The CSR is sent in the certificate being requested [RFC2986]. The CSR is sent in the
base64url-encoded version of the DER format. (Note: Because this base64url-encoded version of the DER format. (Note: Because this
skipping to change at page 46, line 5 skipping to change at page 45, line 7
o If the CSR requests extensions that the CA is not willing to o If the CSR requests extensions that the CA is not willing to
include include
In such cases, the problem document returned by the server SHOULD use In such cases, the problem document returned by the server SHOULD use
error code "badCSR", and describe specific reasons the CSR was error code "badCSR", and describe specific reasons the CSR was
rejected in its "details" field. After returning such an error, the rejected in its "details" field. After returning such an error, the
server SHOULD leave the order in the "ready" state, to allow the server SHOULD leave the order in the "ready" state, to allow the
client to submit a new finalize request with an amended CSR. client to submit a new finalize request with an amended CSR.
A valid request to finalize an order will return the order to be A request to finalize an order will return the order to be finalized.
finalized. The client should begin polling the order by sending a The client should begin polling the order by sending a POST-as-GET
GET request to the order resource to obtain its current state. The request to the order resource to obtain its current state. The
status of the order will indicate what action the client should take: status of the order will indicate what action the client should take:
o "invalid": The certificate will not be issued. Consider this o "invalid": The certificate will not be issued. Consider this
order process abandoned. order process abandoned.
o "pending": The server does not believe that the client has o "pending": The server does not believe that the client has
fulfilled the requirements. Check the "authorizations" array for fulfilled the requirements. Check the "authorizations" array for
entries that are still pending. entries that are still pending.
o "ready": The server agrees that the requirements have been o "ready": The server agrees that the requirements have been
fulfilled, and is awaiting finalization. Submit a finalization fulfilled, and is awaiting finalization. Submit a finalization
request. request.
o "processing": The certificate is being issued. Send a GET request o "processing": The certificate is being issued. Send a POST-as-GET
after the time given in the "Retry-After" header field of the request after the time given in the "Retry-After" header field of
response, if any. the response, if any.
o "valid": The server has issued the certificate and provisioned its o "valid": The server has issued the certificate and provisioned its
URL to the "certificate" field of the order. Download the URL to the "certificate" field of the order. Download the
certificate. certificate.
HTTP/1.1 200 OK HTTP/1.1 200 OK
Replay-Nonce: CGf81JWBsq8QyIgPCi9Q9X Replay-Nonce: CGf81JWBsq8QyIgPCi9Q9X
Location: https://example.com/acme/order/asdf Location: https://example.com/acme/order/asdf
{ {
"status": "valid", "status": "valid",
"expires": "2016-01-01T00:00:00Z", "expires": "2015-12-31T00:17:00.00-09:00",
"notBefore": "2016-01-01T00:00:00Z", "notBefore": "2015-12-31T00:17:00.00-09:00",
"notAfter": "2016-01-08T00:00:00Z", "notAfter": "2015-12-31T00:17:00.00-09:00",
"identifiers": [ "identifiers": [
{ "type": "dns", "value": "example.com" }, { "type": "dns", "value": "example.com" },
{ "type": "dns", "value": "www.example.com" } { "type": "dns", "value": "www.example.com" }
], ],
"authorizations": [ "authorizations": [
"https://example.com/acme/authz/1234", "https://example.com/acme/authz/1234",
"https://example.com/acme/authz/2345" "https://example.com/acme/authz/2345"
], ],
skipping to change at page 48, line 12 skipping to change at page 47, line 12
"new authorization" resource in its directory by adding the field "new authorization" resource in its directory by adding the field
"newAuthz" with a URL for the new authorization resource. "newAuthz" with a URL for the new authorization resource.
To request authorization for an identifier, the client sends a POST To request authorization for an identifier, the client sends a POST
request to the new-authorization resource specifying the identifier request to the new-authorization resource specifying the identifier
for which authorization is being requested. for which authorization is being requested.
identifier (required, object): The identifier to appear in the identifier (required, object): The identifier to appear in the
resulting authorization object (see Section 7.1.4) resulting authorization object (see Section 7.1.4)
type (required, string): The type of identifier.
value (required, string): The identifier itself.
POST /acme/new-authz HTTP/1.1 POST /acme/new-authz HTTP/1.1
Host: example.com Host: example.com
Content-Type: application/jose+json Content-Type: application/jose+json
{ {
"protected": base64url({ "protected": base64url({
"alg": "ES256", "alg": "ES256",
"kid": "https://example.com/acme/acct/1", "kid": "https://example.com/acme/acct/1",
"nonce": "uQpSjlRb4vQVCjVYAyyUWg", "nonce": "uQpSjlRb4vQVCjVYAyyUWg",
"url": "https://example.com/acme/new-authz" "url": "https://example.com/acme/new-authz"
skipping to change at page 49, line 16 skipping to change at page 48, line 21
identifier identifier
The server allocates a new URL for this authorization, and returns a The server allocates a new URL for this authorization, and returns a
201 (Created) response, with the authorization URL in the Location 201 (Created) response, with the authorization URL in the Location
header field, and the JSON authorization object in the body. The header field, and the JSON authorization object in the body. The
client then follows the process described in Section 7.5 to complete client then follows the process described in Section 7.5 to complete
the authorization process. the authorization process.
7.4.2. Downloading the Certificate 7.4.2. Downloading the Certificate
To download the issued certificate, the client simply sends a GET To download the issued certificate, the client simply sends a POST-
request to the certificate URL. as-GET request to the certificate URL.
The default format of the certificate is application/pem-certificate- The default format of the certificate is application/pem-certificate-
chain (see Section 9). chain (see Section 9).
The server MAY provide one or more link relation header fields The server MAY provide one or more link relation header fields
[RFC5988] with relation "alternate". Each such field SHOULD express [RFC5988] with relation "alternate". Each such field SHOULD express
an alternative certificate chain starting with the same end-entity an alternative certificate chain starting with the same end-entity
certificate. This can be used to express paths to various trust certificate. This can be used to express paths to various trust
anchors. Clients can fetch these alternates and use their own anchors. Clients can fetch these alternates and use their own
heuristics to decide which is optimal. heuristics to decide which is optimal.
GET /acme/cert/asdf HTTP/1.1 GET /acme/cert/asdf HTTP/1.1
Host: example.com Host: example.com
Accept: application/pkix-cert Accept: application/pem-certificate-chain
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/pem-certificate-chain Content-Type: application/pem-certificate-chain
Link: <https://example.com/acme/some-directory>;rel="index" Link: <https://example.com/acme/some-directory>;rel="index"
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
[End-entity certificate contents] [End-entity certificate contents]
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
[Issuer certificate contents] [Issuer certificate contents]
skipping to change at page 49, line 46 skipping to change at page 49, line 4
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
[End-entity certificate contents] [End-entity certificate contents]
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
[Issuer certificate contents] [Issuer certificate contents]
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
[Other certificate contents] [Other certificate contents]
-----END CERTIFICATE----- -----END CERTIFICATE-----
A certificate resource represents a single, immutable certificate. A certificate resource represents a single, immutable certificate.
If the client wishes to obtain a renewed certificate, the client If the client wishes to obtain a renewed certificate, the client
initiates a new order process to request one. initiates a new order process to request one.
Because certificate resources are immutable once issuance is Because certificate resources are immutable once issuance is
complete, the server MAY enable the caching of the resource by adding complete, the server MAY enable the caching of the resource by adding
Expires and Cache-Control headers specifying a point in time in the Expires and Cache-Control header fields specifying a point in time in
distant future. These headers have no relation to the certificate's the distant future. These header fields have no relation to the
period of validity. certificate's period of validity.
The ACME client MAY request other formats by including an Accept The ACME client MAY request other formats by including an Accept
header [RFC7231] in its request. For example, the client could use header field [RFC7231] in its request. For example, the client could
the media type "application/pkix-cert" [RFC2585] or "applicaiton/ use the media type "application/pkix-cert" [RFC2585] or "applicaiton/
pkcs7-mime" [RFC5751] to request the end-entity certificate in DER pkcs7-mime" [RFC5751] to request the end-entity certificate in DER
format. Server support for alternate formats is OPTIONAL. For format. Server support for alternate formats is OPTIONAL. For
formats that can only express a single certificate, the server SHOULD formats that can only express a single certificate, the server SHOULD
provide one or more "Link: rel="up"" headers pointing to an issuer or provide one or more "Link: rel="up"" header fields pointing to an
issuers so that ACME clients can build a certificate chain as defined issuer or issuers so that ACME clients can build a certificate chain
in TLS. as defined in TLS [RFC8446].
7.5. Identifier Authorization 7.5. Identifier Authorization
The identifier authorization process establishes the authorization of The identifier authorization process establishes the authorization of
an account to manage certificates for a given identifier. This an account to manage certificates for a given identifier. This
process assures the server of two things: process assures the server of two things:
1. That the client controls the private key of the account key pair, 1. That the client controls the private key of the account key pair,
and and
skipping to change at page 50, line 40 skipping to change at page 49, line 46
key pair (e.g., to request certificates with multiple identifiers), key pair (e.g., to request certificates with multiple identifiers),
or to associate multiple accounts with an identifier (e.g., to allow or to associate multiple accounts with an identifier (e.g., to allow
multiple entities to manage certificates). multiple entities to manage certificates).
Authorization resources are created by the server in response to Authorization resources are created by the server in response to
certificate orders or authorization requests submitted by an account certificate orders or authorization requests submitted by an account
key holder; their URLs are provided to the client in the responses to key holder; their URLs are provided to the client in the responses to
these requests. The authorization object is implicitly tied to the these requests. The authorization object is implicitly tied to the
account key used to sign the request. account key used to sign the request.
When a client receives an order from the server it downloads the When a client receives an order from the server in reply to a new
authorization resources by sending GET requests to the indicated order request, it downloads the authorization resources by sending
URLs. If the client initiates authorization using a request to the POST-as-GET requests to the indicated URLs. If the client initiates
new authorization resource, it will have already received the pending authorization using a request to the new authorization resource, it
authorization object in the response to that request. will have already received the pending authorization object in the
response to that request.
GET /acme/authz/1234 HTTP/1.1 POST /acme/authz/1234 HTTP/1.1
Host: example.com Host: example.com
Content-Type: application/jose+json
Accept: application/pkix-cert
{
"protected": base64url({
"alg": "ES256",
"kid": "https://example.com/acme/acct/1",
"nonce": "uQpSjlRb4vQVCjVYAyyUWg",
"url": "https://example.com/acme/authz/1234",
}),
"payload": "",
"signature": "nuSDISbWG8mMgE7H...QyVUL68yzf3Zawps"
}
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
Link: <https://example.com/acme/some-directory>;rel="index" Link: <https://example.com/acme/some-directory>;rel="index"
{ {
"status": "pending", "status": "pending",
"expires": "2018-03-03T14:09:00Z", "expires": "2018-03-03T14:09:30Z",
"identifier": { "identifier": {
"type": "dns", "type": "dns",
"value": "example.org" "value": "example.org"
}, },
"challenges": [ "challenges": [
{ {
"type": "http-01", "type": "http-01",
"url": "https://example.com/acme/authz/1234/0", "url": "https://example.com/acme/authz/1234/0",
skipping to change at page 51, line 40 skipping to change at page 51, line 8
"token": "DGyRejmCefe7v4NfDGDKfA" "token": "DGyRejmCefe7v4NfDGDKfA"
} }
], ],
"wildcard": false "wildcard": false
} }
7.5.1. Responding to Challenges 7.5.1. Responding to Challenges
To prove control of the identifier and receive authorization, the To prove control of the identifier and receive authorization, the
client needs to respond with information to complete the challenges. client needs to provision the required challenge response based on
To do this, the client updates the authorization object received from the challenge type and indicate to the server that it is ready for
the server by filling in any required information in the elements of the challenge validation to be attempted.
the "challenges" dictionary.
The client sends these updates back to the server in the form of a The client indicates to the server it is ready for the challenge
JSON object with contents as specified by the challenge type, carried validation by sending an empty JSON body ("{}"), carried in a POST
in a POST request to the challenge URL (not authorization URL) once request to the challenge URL (not authorization URL).
it is ready for the server to attempt validation.
For example, if the client were to respond to the "http-01" challenge For example, if the client were to respond to the "http-01" challenge
in the above authorization, it would send the following request: in the above authorization, it would send the following request:
POST /acme/authz/1234/0 HTTP/1.1 POST /acme/authz/1234/0 HTTP/1.1
Host: example.com Host: example.com
Content-Type: application/jose+json Content-Type: application/jose+json
{ {
"protected": base64url({ "protected": base64url({
skipping to change at page 52, line 50 skipping to change at page 52, line 15
than the one that was completed, and may modify the "expires" field. than the one that was completed, and may modify the "expires" field.
The server SHOULD NOT remove challenges with status "invalid". The server SHOULD NOT remove challenges with status "invalid".
Usually, the validation process will take some time, so the client Usually, the validation process will take some time, so the client
will need to poll the authorization resource to see when it is will need to poll the authorization resource to see when it is
finalized. For challenges where the client can tell when the server finalized. For challenges where the client can tell when the server
has validated the challenge (e.g., by seeing an HTTP or DNS request has validated the challenge (e.g., by seeing an HTTP or DNS request
from the server), the client SHOULD NOT begin polling until it has from the server), the client SHOULD NOT begin polling until it has
seen the validation request from the server. seen the validation request from the server.
To check on the status of an authorization, the client sends a GET To check on the status of an authorization, the client sends a POST-
request to the authorization URL, and the server responds with the as-GET request to the authorization URL, and the server responds with
current authorization object. In responding to poll requests while the current authorization object. In responding to poll requests
the validation is still in progress, the server MUST return a 200 while the validation is still in progress, the server MUST return a
(OK) response and MAY include a Retry-After header field to suggest a 200 (OK) response and MAY include a Retry-After header field to
polling interval to the client. suggest a polling interval to the client.
GET /acme/authz/1234 HTTP/1.1 POST /acme/authz/1234 HTTP/1.1
Host: example.com Host: example.com
Content-Type: application/jose+json
Accept: application/pkix-cert
{
"protected": base64url({
"alg": "ES256",
"kid": "https://example.com/acme/acct/1",
"nonce": "uQpSjlRb4vQVCjVYAyyUWg",
"url": "https://example.com/acme/authz/1234",
}),
"payload": "",
"signature": "nuSDISbWG8mMgE7H...QyVUL68yzf3Zawps"
}
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
{ {
"status": "valid", "status": "valid",
"expires": "2018-09-09T14:09:00Z", "expires": "2018-09-09T14:09:01.13Z",
"identifier": { "identifier": {
"type": "dns", "type": "dns",
"value": "example.org" "value": "example.org"
}, },
"challenges": [ "challenges": [
{ {
"type": "http-01", "type": "http-01",
"url": "https://example.com/acme/authz/1234/0", "url": "https://example.com/acme/authz/1234/0",
"status": "valid", "status": "valid",
"validated": "2014-12-01T12:05:00Z", "validated": "2014-12-01T12:05:13.72Z",
"token": "IlirfxKKXAsHtmzK29Pj8A" "token": "IlirfxKKXAsHtmzK29Pj8A"
} }
], ],
"wildcard": false "wildcard": false
} }
7.5.2. Deactivating an Authorization 7.5.2. Deactivating an Authorization
If a client wishes to relinquish its authorization to issue If a client wishes to relinquish its authorization to issue
skipping to change at page 57, line 43 skipping to change at page 57, line 43
Section 7.1.6) Section 7.1.6)
validated (optional, string): The time at which the server validated validated (optional, string): The time at which the server validated
this challenge, encoded in the format specified in RFC 3339 this challenge, encoded in the format specified in RFC 3339
[RFC3339]. This field is REQUIRED if the "status" field is [RFC3339]. This field is REQUIRED if the "status" field is
"valid". "valid".
error (optional, object): Error that occurred while the server was error (optional, object): Error that occurred while the server was
validating the challenge, if any, structured as a problem document validating the challenge, if any, structured as a problem document
[RFC7807]. Multiple errors can be indicated by using subproblems [RFC7807]. Multiple errors can be indicated by using subproblems
Section 6.6.1. Section 6.7.1. A challenge object with an error MUST have status
equal to "invalid".
All additional fields are specified by the challenge type. If the All additional fields are specified by the challenge type. If the
server sets a challenge's "status" to "invalid", it SHOULD also server sets a challenge's "status" to "invalid", it SHOULD also
include the "error" field to help the client diagnose why the include the "error" field to help the client diagnose why the
challenge failed. challenge failed.
Different challenges allow the server to obtain proof of different Different challenges allow the server to obtain proof of different
aspects of control over an identifier. In some challenges, like HTTP aspects of control over an identifier. In some challenges, like HTTP
and DNS, the client directly proves its ability to do certain things and DNS, the client directly proves its ability to do certain things
related to the identifier. The choice of which challenges to offer related to the identifier. The choice of which challenges to offer
skipping to change at page 58, line 17 skipping to change at page 58, line 20
The identifier validation challenges described in this section all The identifier validation challenges described in this section all
relate to validation of domain names. If ACME is extended in the relate to validation of domain names. If ACME is extended in the
future to support other types of identifiers, there will need to be future to support other types of identifiers, there will need to be
new challenge types, and they will need to specify which types of new challenge types, and they will need to specify which types of
identifier they apply to. identifier they apply to.
8.1. Key Authorizations 8.1. Key Authorizations
All challenges defined in this document make use of a key All challenges defined in this document make use of a key
authorization string. A key authorization is a string that expresses authorization string. A key authorization is a string that
a domain holder's authorization for a specified key to satisfy a concatinates the token for the challenge with a key fingerprint,
specified challenge, by concatenating the token for the challenge separated by a "." character:
with a key fingerprint, separated by a "." character:
keyAuthorization = token || '.' || base64url(JWK_Thumbprint(accountKey)) keyAuthorization = token || '.' || base64url(Thumbprint(accountKey))
The "JWK_Thumbprint" step indicates the computation specified in The "Thumbprint" step indicates the computation specified in
[RFC7638], using the SHA-256 digest [FIPS180-4]. As noted in [RFC7638], using the SHA-256 digest [FIPS180-4]. As noted in
[RFC7518] any prepended zero octets in the fields of a JWK object [RFC7518] any prepended zero octets in the fields of a JWK object
MUST be stripped before doing the computation. MUST be stripped before doing the computation.
As specified in the individual challenges below, the token for a As specified in the individual challenges below, the token for a
challenge is a string comprised entirely of characters in the URL- challenge is a string comprised entirely of characters in the URL-
safe base64 alphabet. The "||" operator indicates concatenation of safe base64 alphabet. The "||" operator indicates concatenation of
strings. strings.
8.2. Retrying Challenges 8.2. Retrying Challenges
skipping to change at page 60, line 5 skipping to change at page 60, line 5
be completed over HTTP, not HTTPS. be completed over HTTP, not HTTPS.
type (required, string): The string "http-01" type (required, string): The string "http-01"
token (required, string): A random value that uniquely identifies token (required, string): A random value that uniquely identifies
the challenge. This value MUST have at least 128 bits of entropy. the challenge. This value MUST have at least 128 bits of entropy.
It MUST NOT contain any characters outside the base64url alphabet, It MUST NOT contain any characters outside the base64url alphabet,
and MUST NOT include base64 padding characters ("="). See and MUST NOT include base64 padding characters ("="). See
[RFC4086] for additional information on randomness requirements. [RFC4086] for additional information on randomness requirements.
GET /acme/authz/1234/0 HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
Content-Type: application/json
{ {
"type": "http-01", "type": "http-01",
"url": "https://example.com/acme/authz/0", "url": "https://example.com/acme/authz/0",
"status": "pending", "status": "pending",
"token": "LoqXcYV8q5ONbJQxbmR7SCTNo3tiAXDfowyjxAjEuX0" "token": "LoqXcYV8q5ONbJQxbmR7SCTNo3tiAXDfowyjxAjEuX0"
} }
A client fulfills this challenge by constructing a key authorization A client fulfills this challenge by constructing a key authorization
from the "token" value provided in the challenge and the client's from the "token" value provided in the challenge and the client's
account key. The client then provisions the key authorization as a account key. The client then provisions the key authorization as a
resource on the HTTP server for the domain in question. resource on the HTTP server for the domain in question.
The path at which the resource is provisioned is comprised of the The path at which the resource is provisioned is comprised of the
fixed prefix "/.well-known/acme-challenge/", followed by the "token" fixed prefix "/.well-known/acme-challenge/", followed by the "token"
value in the challenge. The value of the resource MUST be the ASCII value in the challenge. The value of the resource MUST be the ASCII
representation of the key authorization. representation of the key authorization.
GET /.well-known/acme-challenge/LoqXcYV8q5ONbJQxbmR7SCTNo3tiAXDfowyjxAjEuX0 GET /.well-known/acme-challenge/LoqXcYV8...jxAjEuX0
Host: example.org Host: example.org
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/octet-stream Content-Type: application/octet-stream
LoqXcYV8q5ONbJQxbmR7SCTNo3tiAXDfowyjxAjEuX0.9jg46WB3rR_AHD-EBXdN7cBkH1WOu0tA3M9fm21mqTI LoqXcYV8...jxAjEuX0.9jg46WB3...fm21mqTI
(In the above, "..." indicates that the token and the JWK thumbprint
in the key authorization have been truncated to fit on the page.)
A client responds with an empty object ({}) to acknowledge that the A client responds with an empty object ({}) to acknowledge that the
challenge can be validated by the server. challenge can be validated by the server.
POST /acme/authz/1234/0 POST /acme/authz/1234/0
Host: example.com Host: example.com
Content-Type: application/jose+json Content-Type: application/jose+json
{ {
"protected": base64url({ "protected": base64url({
"alg": "ES256", "alg": "ES256",
"kid": "https://example.com/acme/acct/1", "kid": "https://example.com/acme/acct/1",
"nonce": "JHb54aT_KTXBWQOzGYkt9A", "nonce": "UQI1PoRi5OuXzxuX7V7wL0",
"url": "https://example.com/acme/authz/1234/0" "url": "https://example.com/acme/authz/1234/0"
}), }),
"payload": base64url({}), "payload": base64url({}),
"signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4" "signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4"
} }
On receiving a response, the server constructs and stores the key On receiving a response, the server constructs and stores the key
authorization from the challenge "token" value and the current client authorization from the challenge "token" value and the current client
account key. account key.
Given a challenge/response pair, the server verifies the client's Given a challenge/response pair, the server verifies the client's
skipping to change at page 61, line 24 skipping to change at page 61, line 24
* the domain field is set to the domain name being verified; and * the domain field is set to the domain name being verified; and
* the token field is set to the token in the challenge. * the token field is set to the token in the challenge.
2. Verify that the resulting URL is well-formed. 2. Verify that the resulting URL is well-formed.
3. Dereference the URL using an HTTP GET request. This request MUST 3. Dereference the URL using an HTTP GET request. This request MUST
be sent to TCP port 80 on the HTTP server. be sent to TCP port 80 on the HTTP server.
4. Verify that the body of the response is well-formed key 4. Verify that the body of the response is a well-formed key
authorization. The server SHOULD ignore whitespace characters at authorization. The server SHOULD ignore whitespace characters at
the end of the body. the end of the body.
5. Verify that key authorization provided by the HTTP server matches 5. Verify that key authorization provided by the HTTP server matches
the key authorization stored by the server. the key authorization stored by the server.
The server SHOULD follow redirects when dereferencing the URL. The server SHOULD follow redirects when dereferencing the URL.
Clients might use redirects, for example, so that the response can be
provided by a centralized certificate management server. See
Section 10.2 for security considerations related to redirects.
If all of the above verifications succeed, then the validation is If all of the above verifications succeed, then the validation is
successful. If the request fails, or the body does not pass these successful. If the request fails, or the body does not pass these
checks, then it has failed. checks, then it has failed.
The client SHOULD de-provision the resource provisioned for this
challenge once the challenge is complete, i.e., once the "status"
field of the challenge has the value "valid" or "invalid".
8.4. DNS Challenge 8.4. DNS Challenge
When the identifier being validated is a domain name, the client can When the identifier being validated is a domain name, the client can
prove control of that domain by provisioning a TXT resource record prove control of that domain by provisioning a TXT resource record
containing a designated value for a specific validation domain name. containing a designated value for a specific validation domain name.
type (required, string): The string "dns-01" type (required, string): The string "dns-01"
token (required, string): A random value that uniquely identifies token (required, string): A random value that uniquely identifies
the challenge. This value MUST have at least 128 bits of entropy. the challenge. This value MUST have at least 128 bits of entropy.
It MUST NOT contain any characters outside the base64url alphabet, It MUST NOT contain any characters outside the base64url alphabet,
including padding characters ("="). including padding characters ("="). See [RFC4086] for additional
information on randomness requirements.
GET /acme/authz/1234/2 HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
Content-Type: application/json
{ {
"type": "dns-01", "type": "dns-01",
"url": "https://example.com/acme/authz/1234/2", "url": "https://example.com/acme/authz/1234/2",
"status": "pending", "status": "pending",
"token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA" "token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA"
} }
A client fulfills this challenge by constructing a key authorization A client fulfills this challenge by constructing a key authorization
from the "token" value provided in the challenge and the client's from the "token" value provided in the challenge and the client's
skipping to change at page 62, line 44 skipping to change at page 62, line 43
challenge can be validated by the server. challenge can be validated by the server.
POST /acme/authz/1234/2 POST /acme/authz/1234/2
Host: example.com Host: example.com
Content-Type: application/jose+json Content-Type: application/jose+json
{ {
"protected": base64url({ "protected": base64url({
"alg": "ES256", "alg": "ES256",
"kid": "https://example.com/acme/acct/1", "kid": "https://example.com/acme/acct/1",
"nonce": "JHb54aT_KTXBWQOzGYkt9A", "nonce": "SS2sSl1PtspvFZ08kNtzKd",
"url": "https://example.com/acme/authz/1234/2" "url": "https://example.com/acme/authz/1234/2"
}), }),
"payload": base64url({}), "payload": base64url({}),
"signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4" "signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4"
} }
On receiving a response, the server constructs and stores the key On receiving a response, the server constructs and stores the key
authorization from the challenge "token" value and the current client authorization from the challenge "token" value and the current client
account key. account key.
To validate a DNS challenge, the server performs the following steps: To validate a DNS challenge, the server performs the following steps:
skipping to change at page 63, line 22 skipping to change at page 63, line 22
2. Query for TXT records for the validation domain name 2. Query for TXT records for the validation domain name
3. Verify that the contents of one of the TXT records match the 3. Verify that the contents of one of the TXT records match the
digest value digest value
If all of the above verifications succeed, then the validation is If all of the above verifications succeed, then the validation is
successful. If no DNS record is found, or DNS record and response successful. If no DNS record is found, or DNS record and response
payload do not pass these checks, then the validation fails. payload do not pass these checks, then the validation fails.
The client SHOULD de-provision the resource record(s) provisioned for
this challenge once the challenge is complete, i.e., once the
"status" field of the challenge has the value "valid" or "invalid".
9. IANA Considerations 9. IANA Considerations
9.1. MIME Type: application/pem-certificate-chain 9.1. MIME Type: application/pem-certificate-chain
A file of this type contains one or more certificates encoded with
the PEM textual encoding, according to RFC 7468 [RFC7468]. The
textual encoding of certificates in this file MUST use the strict
encoding and MUST NOT include explanatory text. The ABNF for this
format is as follows, where "stricttextualmsg" and "eol" are as
defined in Section 3 of RFC 7468:
certchain = stricttextualmsg *(eol stricttextualmsg)
In order to provide easy interoperation with TLS, the first
certificate MUST be an end-entity certificate. Each following
certificate SHOULD directly certify the one preceding it. Because
certificate validation requires that trust anchors be distributed
independently, a certificate that represents a trust anchor MAY be
omitted from the chain, provided that supported peers are known to
possess any omitted certificates.
The "Media Types" registry should be updated with the following The "Media Types" registry should be updated with the following
additional value: additional value:
MIME media type name: application MIME media type name: application
MIME subtype name: pem-certificate-chain MIME subtype name: pem-certificate-chain
Required parameters: None Required parameters: None
Optional parameters: None Optional parameters: None
Encoding considerations: None Encoding considerations: 7bit
Security considerations: Carries a cryptographic certificate and its Security considerations: Carries a cryptographic certificate and its
associated certificate chain associated certificate chain. This media type carries no active
content.
Interoperability considerations: None Interoperability considerations: None
Published specification: draft-ietf-acme-acme [[ RFC EDITOR: Please Published specification: draft-ietf-acme-acme [[ RFC EDITOR: Please
replace draft-ietf-acme-acme above with the RFC number assigned to replace draft-ietf-acme-acme above with the RFC number assigned to
this ]] this ]]
Applications which use this media type: Any MIME-compliant transport Applications which use this media type: ACME clients and servers,
HTTP servers, other applications that need to be configured with a
certificate chain
Additional information: Additional information:
File contains one or more certificates encoded with the PEM textual Deprecated alias names for this type: n/a Magic number(s): n/a File
encoding, according to RFC 7468 [RFC7468]. In order to provide easy extension(s): .pem Macintosh file type code(s): n/a
interoperation with TLS, the first certificate MUST be an end-entity
certificate. Each following certificate SHOULD directly certify the Person & email address to contact for further information: See
one preceding it. Because certificate validation requires that trust Authors' Addresses section.
anchors be distributed independently, a certificate that specifies a
trust anchor MAY be omitted from the chain, provided that supported Intended usage: COMMON
peers are known to possess any omitted certificates.
Restrictions on usage: n/a
Author: See Authors' Addresses section.
Change controller: Internet Engineering Task Force iesg@ietf.org [2]
9.2. Well-Known URI for the HTTP Challenge 9.2. Well-Known URI for the HTTP Challenge
The "Well-Known URIs" registry should be updated with the following The "Well-Known URIs" registry should be updated with the following
additional value (using the template from [RFC5785]): additional value (using the template from [RFC5785]):
URI suffix: acme-challenge URI suffix: acme-challenge
Change controller: IETF Change controller: IETF
skipping to change at page 64, line 37 skipping to change at page 65, line 16
9.3. Replay-Nonce HTTP Header 9.3. Replay-Nonce HTTP Header
The "Message Headers" registry should be updated with the following The "Message Headers" registry should be updated with the following
additional value: additional value:
+------------------+----------+----------+--------------------------+ +------------------+----------+----------+--------------------------+
| Header Field | Protocol | Status | Reference | | Header Field | Protocol | Status | Reference |
| Name | | | | | Name | | | |
+------------------+----------+----------+--------------------------+ +------------------+----------+----------+--------------------------+
| Replay-Nonce | http | standard | [[this-RFC, Section | | Replay-Nonce | http | standard | [[this-RFC, Section |
| | | | 6.4.1] | | | | | 6.5.1] |
+------------------+----------+----------+--------------------------+ +------------------+----------+----------+--------------------------+
9.4. "url" JWS Header Parameter 9.4. "url" JWS Header Parameter
The "JSON Web Signature and Encryption Header Parameters" registry The "JSON Web Signature and Encryption Header Parameters" registry
should be updated with the following additional value: should be updated with the following additional value:
o Header Parameter Name: "url" o Header Parameter Name: "url"
o Header Parameter Description: URL o Header Parameter Description: URL
o Header Parameter Usage Location(s): JWE, JWS o Header Parameter Usage Location(s): JWE, JWS
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 6.3.1 of RFC XXXX
o Specification Document(s): Section 6.4.1 of RFC XXXX
[[ RFC EDITOR: Please replace XXXX above with the RFC number assigned [[ RFC EDITOR: Please replace XXXX above with the RFC number assigned
to this document ]] to this document ]]
9.5. "nonce" JWS Header Parameter 9.5. "nonce" JWS Header Parameter
The "JSON Web Signature and Encryption Header Parameters" registry The "JSON Web Signature and Encryption Header Parameters" registry
should be updated with the following additional value: should be updated with the following additional value:
o Header Parameter Name: "nonce" o Header Parameter Name: "nonce"
o Header Parameter Description: Nonce o Header Parameter Description: Nonce
o Header Parameter Usage Location(s): JWE, JWS o Header Parameter Usage Location(s): JWE, JWS
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 6.4.2 of RFC XXXX o Specification Document(s): Section 6.5.2 of RFC XXXX
[[ RFC EDITOR: Please replace XXXX above with the RFC number assigned [[ RFC EDITOR: Please replace XXXX above with the RFC number assigned
to this document ]] to this document ]]
9.6. URN Sub-namespace for ACME (urn:ietf:params:acme) 9.6. URN Sub-namespace for ACME (urn:ietf:params:acme)
The "IETF URN Sub-namespace for Registered Protocol Parameter The "IETF URN Sub-namespace for Registered Protocol Parameter
Identifiers" registry should be updated with the following additional Identifiers" registry should be updated with the following additional
value, following the template in [RFC3553]: value, following the template in [RFC3553]:
skipping to change at page 69, line 37 skipping to change at page 69, line 48
Template: Template:
o Type: The label to be included in the URN for this error, o Type: The label to be included in the URN for this error,
following "urn:ietf:params:acme:error:" following "urn:ietf:params:acme:error:"
o Description: A human-readable description of the error o Description: A human-readable description of the error
o Reference: Where the error is defined o Reference: Where the error is defined
Initial contents: The types and descriptions in the table in Initial contents: The types and descriptions in the table in
Section 6.6 above, with the Reference field set to point to this Section 6.7 above, with the Reference field set to point to this
specification. specification.
9.7.5. Resource Types 9.7.5. Resource Types
This registry lists the types of resources that ACME servers may list This registry lists the types of resources that ACME servers may list
in their directory objects. in their directory objects.
Template: Template:
o Field name: The value to be used as a field name in the directory o Field name: The value to be used as a field name in the directory
skipping to change at page 72, line 11 skipping to change at page 72, line 21
registry. registry.
Template: Template:
o Label: The identifier for this validation method o Label: The identifier for this validation method
o Identifier Type: The type of identifier that this method applies o Identifier Type: The type of identifier that this method applies
to to
o ACME: "Y" if the validation method corresponds to an ACME o ACME: "Y" if the validation method corresponds to an ACME
challenge type; "N" otherwise. challenge type; "N" otherwise
o Reference: Where the validation method is defined o Reference: Where the validation method is defined
This registry may also contain reserved entries (e.g., to avoid
collisions). Such entries should have the "ACME" field set to "N"
and the "Identifier Type" set to "RESERVED".
Initial Contents Initial Contents
+------------+-----------------+------+-----------+ +------------+-----------------+------+-----------+
| Label | Identifier Type | ACME | Reference | | Label | Identifier Type | ACME | Reference |
+------------+-----------------+------+-----------+ +------------+-----------------+------+-----------+
| http-01 | dns | Y | RFC XXXX | | http-01 | dns | Y | RFC XXXX |
| | | | | | | | | |
| dns-01 | dns | Y | RFC XXXX | | dns-01 | dns | Y | RFC XXXX |
| | | | | | | | | |
| tls-sni-01 | RESERVED | N | RFC XXXX | | tls-sni-01 | RESERVED | N | RFC XXXX |
skipping to change at page 74, line 42 skipping to change at page 74, line 42
On the ACME channel, in addition to network layer attackers, we also On the ACME channel, in addition to network layer attackers, we also
need to account for man-in-the-middle (MitM) attacks at the need to account for man-in-the-middle (MitM) attacks at the
application layer, and for abusive use of the protocol itself. application layer, and for abusive use of the protocol itself.
Protection against application layer MitM addresses potential Protection against application layer MitM addresses potential
attackers such as Content Distribution Networks (CDNs) and attackers such as Content Distribution Networks (CDNs) and
middleboxes with a TLS MitM function. Preventing abusive use of ACME middleboxes with a TLS MitM function. Preventing abusive use of ACME
means ensuring that an attacker with access to the validation channel means ensuring that an attacker with access to the validation channel
can't obtain illegitimate authorization by acting as an ACME client can't obtain illegitimate authorization by acting as an ACME client
(legitimately, in terms of the protocol). (legitimately, in terms of the protocol).
ACME does not protect against other types of abuse by a MitM on the
ACME channel. For example, such an attacker could send a bogus
"badSignatureAlgorithm" error response to downgrade a client to the
lowest-quality signature algorithm that the server supports. A MitM
that is present on all connections (such as a CDN), can cause denial-
of-service conditions in a variety of ways.
10.2. Integrity of Authorizations 10.2. Integrity of Authorizations
ACME allows anyone to request challenges for an identifier by ACME allows anyone to request challenges for an identifier by
registering an account key and sending a new-order request using that registering an account key and sending a new-order request using that
account key. The integrity of the authorization process thus depends account key. The integrity of the authorization process thus depends
on the identifier validation challenges to ensure that the challenge on the identifier validation challenges to ensure that the challenge
can only be completed by someone who both (1) holds the private key can only be completed by someone who both (1) holds the private key
of the account key pair, and (2) controls the identifier in question. of the account key pair, and (2) controls the identifier in question.
Validation responses need to be bound to an account key pair in order Validation responses need to be bound to an account key pair in order
skipping to change at page 76, line 40 skipping to change at page 76, line 40
| | | Considers challenge | | | Considers challenge
| | | fulfilled by B. | | | fulfilled by B.
| | | | | |
Man-in-the-Middle Attack Exploiting a Validation Method without Man-in-the-Middle Attack Exploiting a Validation Method without
Account Key Binding Account Key Binding
All of the challenges defined in this document have a binding between All of the challenges defined in this document have a binding between
the account private key and the validation query made by the server, the account private key and the validation query made by the server,
via the key authorization. The key authorization reflects the via the key authorization. The key authorization reflects the
account public key, is provided to the server in the validation account public key and is provided to the server in the validation
response over the validation channel and signed afterwards by the response over the validation channel.
corresponding private key in the challenge response over the ACME
channel.
The association of challenges to identifiers is typically done by The association of challenges to identifiers is typically done by
requiring the client to perform some action that only someone who requiring the client to perform some action that only someone who
effectively controls the identifier can perform. For the challenges effectively controls the identifier can perform. For the challenges
in this document, the actions are: in this document, the actions are:
o HTTP: Provision files under .well-known on a web server for the o HTTP: Provision files under .well-known on a web server for the
domain domain
o DNS: Provision DNS resource records for the domain o DNS: Provision DNS resource records for the domain
skipping to change at page 78, line 18 skipping to change at page 78, line 14
validation response to the account key used to request challenges. A validation response to the account key used to request challenges. A
passive attacker on the validation channel can observe the correct passive attacker on the validation channel can observe the correct
validation response and even replay it, but that response can only be validation response and even replay it, but that response can only be
used with the account key for which it was generated. used with the account key for which it was generated.
An active attacker on the validation channel can subvert the ACME An active attacker on the validation channel can subvert the ACME
process, by performing normal ACME transactions and providing a process, by performing normal ACME transactions and providing a
validation response for his own account key. The risks due to validation response for his own account key. The risks due to
hosting providers noted above are a particular case. hosting providers noted above are a particular case.
It is RECOMMENDED that the server perform DNS queries and make HTTP Attackers can also exploit vulnerabilities in Internet routing
connections from various network perspectives, in order to make MitM protocols to gain access to the validation channel (see, e.g.,
attacks harder. [RFC7132]). In order to make such attacks more difficult, it is
RECOMMENDED that the server perform DNS queries and make HTTP
connections from multiple points in the network. Since routing
attacks are often localized or dependent on the position of the
attacker, forcing the attacker to attack multiple points (the
server's validation vantage points) or a specific point (the DNS /
HTTP server) makes it more difficult to subvert ACME validation using
attacks on routing.
10.3. Denial-of-Service Considerations 10.3. Denial-of-Service Considerations
As a protocol run over HTTPS, standard considerations for TCP-based As a protocol run over HTTPS, standard considerations for TCP-based
and HTTP-based DoS mitigation also apply to ACME. and HTTP-based DoS mitigation also apply to ACME.
At the application layer, ACME requires the server to perform a few At the application layer, ACME requires the server to perform a few
potentially expensive operations. Identifier validation transactions potentially expensive operations. Identifier validation transactions
require the ACME server to make outbound connections to potentially require the ACME server to make outbound connections to potentially
attacker-controlled servers, and certificate issuance can require attacker-controlled servers, and certificate issuance can require
skipping to change at page 79, line 9 skipping to change at page 79, line 15
10.4. Server-Side Request Forgery 10.4. Server-Side Request Forgery
Server-Side Request Forgery (SSRF) attacks can arise when an attacker Server-Side Request Forgery (SSRF) attacks can arise when an attacker
can cause a server to perform HTTP requests to an attacker-chosen can cause a server to perform HTTP requests to an attacker-chosen
URL. In the ACME HTTP challenge validation process, the ACME server URL. In the ACME HTTP challenge validation process, the ACME server
performs an HTTP GET request to a URL in which the attacker can performs an HTTP GET request to a URL in which the attacker can
choose the domain. This request is made before the server has choose the domain. This request is made before the server has
verified that the client controls the domain, so any client can cause verified that the client controls the domain, so any client can cause
a query to any domain. a query to any domain.
Some server implementations include information from the validation Some ACME server implementations include information from the
server's response (in order to facilitate debugging). Such validation server's response (in order to facilitate debugging).
implementations enable an attacker to extract this information from Such implementations enable an attacker to extract this information
any web server that is accessible to the ACME server, even if it is from any web server that is accessible to the ACME server, even if it
not accessible to the ACME client. For example, the ACME server is not accessible to the ACME client. For example, the ACME server
might be able to access servers behind a firewall that would prevent might be able to access servers behind a firewall that would prevent
access by the ACME client. access by the ACME client.
It might seem that the risk of SSRF through this channel is limited It might seem that the risk of SSRF through this channel is limited
by the fact that the attacker can only control the domain of the URL, by the fact that the attacker can only control the domain of the URL,
not the path. However, if the attacker first sets the domain to one not the path. However, if the attacker first sets the domain to one
they control, then they can send the server an HTTP redirect (e.g., a they control, then they can send the server an HTTP redirect (e.g., a
302 response) which will cause the server to query an arbitrary URL. 302 response) which will cause the server to query an arbitrary URL.
In order to further limit the SSRF risk, ACME server operators should In order to further limit the SSRF risk, ACME server operators should
skipping to change at page 80, line 19 skipping to change at page 80, line 22
o Has issuance been authorized or forbidden by a Certificate o Has issuance been authorized or forbidden by a Certificate
Authority Authorization (CAA) record? [RFC6844] Authority Authorization (CAA) record? [RFC6844]
CAs that use ACME to automate issuance will need to ensure that their CAs that use ACME to automate issuance will need to ensure that their
servers perform all necessary checks before issuing. servers perform all necessary checks before issuing.
CAs using ACME to allow clients to agree to terms of service should CAs using ACME to allow clients to agree to terms of service should
keep in mind that ACME clients can automate this agreement, possibly keep in mind that ACME clients can automate this agreement, possibly
not involving a human user. not involving a human user.
ACME does not specify how the server constructs the URLs that it uses
to address resources. If the server operator uses URLs that are
predictable to third parties, this can leak information about what
URLs exist on the server, since an attacker can probe for whether
POST-as-GET request to the URL returns "Not Found" or "Unauthorized".
For example, suppose that the CA uses highly structured URLs with
several low-entropy fields:
o Accounts: https://example.com/:accountID
o Orders: https://example.com/:accountID/:orderID
o Authorizations: https://example.com/:accountID/:authorizationID
o Certificates: https://example.com/:accountID/:certID
If the ID fields have low entropy, then an attacker can find out how
many users a CA has, how many authorizations each account has, etc.
In order to avoid leaking these correlations, servers SHOULD assign
capability URLs for dynamically-created resources
[W3C.WD-capability-urls-20140218]. These URLs incorporate large
unpredictable components to prevent third parties from guessing them.
These URLs SHOULD NOT have a structure that would enable a third
party to infer correlations between resources.
For example, a CA might assign URLs for each resource type from an
independent namespace, using unpredictable IDs for each resource:
o Accounts: https://example.com/acct/:accountID
o Orders: https://example.com/order/:orderID
o Authorizations: https://example.com/authz/:authorizationID
o Certificates: https://example.com/cert/:certID
Such a scheme would leak only the type of resource, hiding the
additional correlations revealed in the example above.
11. Operational Considerations 11. Operational Considerations
There are certain factors that arise in operational reality that There are certain factors that arise in operational reality that
operators of ACME-based CAs will need to keep in mind when operators of ACME-based CAs will need to keep in mind when
configuring their services. For example: configuring their services. For example:
11.1. Key Selection 11.1. Key Selection
ACME relies on two different classes of key pair: ACME relies on two different classes of key pair:
skipping to change at page 81, line 16 skipping to change at page 82, line 11
no other purpose besides ACME authentication. For example, the no other purpose besides ACME authentication. For example, the
public key of an account key pair SHOULD NOT be included in a public key of an account key pair SHOULD NOT be included in a
certificate. ACME clients and servers SHOULD verify that a CSR certificate. ACME clients and servers SHOULD verify that a CSR
submitted in a finalize request does not contain a public key for any submitted in a finalize request does not contain a public key for any
known account key pair. In particular, when a server receives a known account key pair. In particular, when a server receives a
finalize request, it MUST verify that the public key in a CSR is not finalize request, it MUST verify that the public key in a CSR is not
the same as the public key of the account key pair used to the same as the public key of the account key pair used to
authenticate that request. This assures that vulnerabilities in the authenticate that request. This assures that vulnerabilities in the
protocols with which the certificate is used (e.g., signing oracles protocols with which the certificate is used (e.g., signing oracles
in TLS [JSS15]) do not result in compromise of the ACME account. in TLS [JSS15]) do not result in compromise of the ACME account.
Because ACME accounts are uniquely identified by their account key
pair (see Section 7.3.1) the server MUST not allow account key pair
reuse across multiple accounts.
11.2. DNS security 11.2. DNS security
As noted above, DNS forgery attacks against the ACME server can As noted above, DNS forgery attacks against the ACME server can
result in the server making incorrect decisions about domain control result in the server making incorrect decisions about domain control
and thus mis-issuing certificates. Servers SHOULD perform DNS and thus mis-issuing certificates. Servers SHOULD perform DNS
queries over TCP, which provides better resistance to some forgery queries over TCP, which provides better resistance to some forgery
attacks than DNS over UDP. attacks than DNS over UDP.
An ACME-based CA will often need to make DNS queries, e.g., to An ACME-based CA will often need to make DNS queries, e.g., to
skipping to change at page 81, line 43 skipping to change at page 82, line 41
An ACME-based CA must use only a resolver if it trusts the resolver An ACME-based CA must use only a resolver if it trusts the resolver
and every component of the network route by which it is accessed. It and every component of the network route by which it is accessed. It
is therefore RECOMMENDED that ACME-based CAs operate their own is therefore RECOMMENDED that ACME-based CAs operate their own
DNSSEC-validating resolvers within their trusted network and use DNSSEC-validating resolvers within their trusted network and use
these resolvers both for both CAA record lookups and all record these resolvers both for both CAA record lookups and all record
lookups in furtherance of a challenge scheme (A, AAAA, TXT, etc.). lookups in furtherance of a challenge scheme (A, AAAA, TXT, etc.).
11.3. Token Entropy 11.3. Token Entropy
The http-01, and dns-01 validation methods mandate the usage of a The http-01 and dns-01 validation methods mandate the usage of a
random token value to uniquely identify the challenge. The value of random token value to uniquely identify the challenge. The value of
the token is required to contain at least 128 bits of entropy for the the token is required to contain at least 128 bits of entropy for the
following security properties. First, the ACME client should not be following security properties. First, the ACME client should not be
able to influence the ACME server's choice of token as this may allow able to influence the ACME server's choice of token as this may allow
an attacker to reuse a domain owner's previous challenge responses an attacker to reuse a domain owner's previous challenge responses
for a new validation request. Secondly, the entropy requirement for a new validation request. Secondly, the entropy requirement
prevents ACME clients from implementing a "naive" validation server prevents ACME clients from implementing a "naive" validation server
that automatically replies to challenges without participating in the that automatically replies to challenges by predicting the token.
creation of the initial authorization request.
11.4. Malformed Certificate Chains 11.4. Malformed Certificate Chains
ACME provides certificate chains in the widely-used format known ACME provides certificate chains in the widely-used format known
colloquially as PEM (though it may diverge from the actual Privacy colloquially as PEM (though it may diverge from the actual Privacy
Enhanced Mail specifications [RFC1421], as noted in [RFC7468]). Some Enhanced Mail specifications [RFC1421], as noted in [RFC7468]). Some
current software will allow the configuration of a private key and a current software will allow the configuration of a private key and a
certificate in one PEM file, by concatenating the textual encodings certificate in one PEM file, by concatenating the textual encodings
of the two objects. In the context of ACME, such software might be of the two objects. In the context of ACME, such software might be
vulnerable to "key replacement" attacks. A malicious ACME server vulnerable to "key replacement" attacks. A malicious ACME server
skipping to change at page 84, line 5 skipping to change at page 85, line 5
[RFC2986] Nystrom, M. and B. Kaliski, "PKCS #10: Certification [RFC2986] Nystrom, M. and B. Kaliski, "PKCS #10: Certification
Request Syntax Specification Version 1.7", RFC 2986, Request Syntax Specification Version 1.7", RFC 2986,
DOI 10.17487/RFC2986, November 2000, DOI 10.17487/RFC2986, November 2000,
<https://www.rfc-editor.org/info/rfc2986>. <https://www.rfc-editor.org/info/rfc2986>.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>. <https://www.rfc-editor.org/info/rfc3339>.
[RFC3492] Costello, A., "Punycode: A Bootstring encoding of Unicode
for Internationalized Domain Names in Applications
(IDNA)", RFC 3492, DOI 10.17487/RFC3492, March 2003,
<https://www.rfc-editor.org/info/rfc3492>.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
2003, <https://www.rfc-editor.org/info/rfc3629>. 2003, <https://www.rfc-editor.org/info/rfc3629>.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, DOI 10.17487/RFC3986, January 2005, RFC 3986, DOI 10.17487/RFC3986, January 2005,
<https://www.rfc-editor.org/info/rfc3986>. <https://www.rfc-editor.org/info/rfc3986>.
[RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker,
skipping to change at page 86, line 27 skipping to change at page 87, line 23
<https://www.rfc-editor.org/info/rfc8126>. <https://www.rfc-editor.org/info/rfc8126>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8288] Nottingham, M., "Web Linking", RFC 8288, [RFC8288] Nottingham, M., "Web Linking", RFC 8288,
DOI 10.17487/RFC8288, October 2017, DOI 10.17487/RFC8288, October 2017,
<https://www.rfc-editor.org/info/rfc8288>. <https://www.rfc-editor.org/info/rfc8288>.
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>.
13.2. Informative References 13.2. Informative References
[CABFBR] CA/Browser Forum, ., "CA/Browser Forum Baseline
Requirements", September 2018,
<https://cabforum.org/baseline-requirements-documents/>.
[I-D.ietf-acme-caa] [I-D.ietf-acme-caa]
Landau, H., "CAA Record Extensions for Account URI and Landau, H., "CAA Record Extensions for Account URI and
ACME Method Binding", draft-ietf-acme-caa-05 (work in ACME Method Binding", draft-ietf-acme-caa-05 (work in
progress), June 2018. progress), June 2018.
[I-D.ietf-acme-ip] [I-D.ietf-acme-ip]
Shoemaker, R., "ACME IP Identifier Validation Extension", Shoemaker, R., "ACME IP Identifier Validation Extension",
draft-ietf-acme-ip-04 (work in progress), July 2018. draft-ietf-acme-ip-04 (work in progress), July 2018.
[I-D.ietf-acme-star]
Sheffer, Y., Lopez, D., Dios, O., Pastor, A., and T.
Fossati, "Support for Short-Term, Automatically-Renewed
(STAR) Certificates in Automated Certificate Management
Environment (ACME)", draft-ietf-acme-star-03 (work in
progress), March 2018.
[I-D.ietf-acme-telephone] [I-D.ietf-acme-telephone]
Peterson, J. and R. Barnes, "ACME Identifiers and Peterson, J. and R. Barnes, "ACME Identifiers and
Challenges for Telephone Numbers", draft-ietf-acme- Challenges for Telephone Numbers", draft-ietf-acme-
telephone-01 (work in progress), October 2017. telephone-01 (work in progress), October 2017.
[I-D.vixie-dnsext-dns0x20] [I-D.vixie-dnsext-dns0x20]
Vixie, P. and D. Dagon, "Use of Bit 0x20 in DNS Labels to Vixie, P. and D. Dagon, "Use of Bit 0x20 in DNS Labels to
Improve Transaction Identity", draft-vixie-dnsext- Improve Transaction Identity", draft-vixie-dnsext-
dns0x20-00 (work in progress), March 2008. dns0x20-00 (work in progress), March 2008.
skipping to change at page 87, line 20 skipping to change at page 88, line 30
[RFC3553] Mealling, M., Masinter, L., Hardie, T., and G. Klyne, "An [RFC3553] Mealling, M., Masinter, L., Hardie, T., and G. Klyne, "An
IETF URN Sub-namespace for Registered Protocol IETF URN Sub-namespace for Registered Protocol
Parameters", BCP 73, RFC 3553, DOI 10.17487/RFC3553, June Parameters", BCP 73, RFC 3553, DOI 10.17487/RFC3553, June
2003, <https://www.rfc-editor.org/info/rfc3553>. 2003, <https://www.rfc-editor.org/info/rfc3553>.
[RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
Uniform Resource Identifiers (URIs)", RFC 5785, Uniform Resource Identifiers (URIs)", RFC 5785,
DOI 10.17487/RFC5785, April 2010, DOI 10.17487/RFC5785, April 2010,
<https://www.rfc-editor.org/info/rfc5785>. <https://www.rfc-editor.org/info/rfc5785>.
[RFC7132] Kent, S. and A. Chi, "Threat Model for BGP Path Security",
RFC 7132, DOI 10.17487/RFC7132, February 2014,
<https://www.rfc-editor.org/info/rfc7132>.
[RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre,
"Recommendations for Secure Use of Transport Layer "Recommendations for Secure Use of Transport Layer
Security (TLS) and Datagram Transport Layer Security Security (TLS) and Datagram Transport Layer Security
(DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May
2015, <https://www.rfc-editor.org/info/rfc7525>. 2015, <https://www.rfc-editor.org/info/rfc7525>.
[W3C.CR-cors-20130129] [W3C.REC-cors-20140116]
Kesteren, A., "Cross-Origin Resource Sharing", World Wide Kesteren, A., "Cross-Origin Resource Sharing", World Wide
Web Consortium CR CR-cors-20130129, January 2013, Web Consortium Recommendation REC-cors-20140116, January
<http://www.w3.org/TR/2013/CR-cors-20130129>. 2014, <http://www.w3.org/TR/2014/REC-cors-20140116>.
[W3C.WD-capability-urls-20140218]
Tennison, J., "Good Practices for Capability URLs", World
Wide Web Consortium WD WD-capability-urls-20140218,
February 2014,
<http://www.w3.org/TR/2014/WD-capability-urls-20140218>.
13.3. URIs 13.3. URIs
[1] https://github.com/ietf-wg-acme/acme [1] https://github.com/ietf-wg-acme/acme
[2] mailto:iesg@ietf.org
Authors' Addresses Authors' Addresses
Richard Barnes Richard Barnes
Cisco Cisco
Email: rlb@ipv.sx Email: rlb@ipv.sx
Jacob Hoffman-Andrews Jacob Hoffman-Andrews
EFF EFF
 End of changes. 150 change blocks. 
339 lines changed or deleted 521 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/