draft-ietf-acme-acme-04.txt   draft-ietf-acme-acme-05.txt 
Network Working Group R. Barnes Network Working Group R. Barnes
Internet-Draft Mozilla Internet-Draft Mozilla
Intended status: Standards Track J. Hoffman-Andrews Intended status: Standards Track J. Hoffman-Andrews
Expires: May 4, 2017 EFF Expires: August 7, 2017 EFF
J. Kasten J. Kasten
University of Michigan University of Michigan
October 31, 2016 February 03, 2017
Automatic Certificate Management Environment (ACME) Automatic Certificate Management Environment (ACME)
draft-ietf-acme-acme-04 draft-ietf-acme-acme-05
Abstract Abstract
Certificates in the Web's X.509 PKI (PKIX) are used for a number of Certificates in the Web's X.509 PKI (PKIX) are used for a number of
purposes, the most significant of which is the authentication of purposes, the most significant of which is the authentication of
domain names. Thus, certificate authorities in the Web PKI are domain names. Thus, certificate authorities in the Web PKI are
trusted to verify that an applicant for a certificate legitimately trusted to verify that an applicant for a certificate legitimately
represents the domain name(s) in the certificate. Today, this represents the domain name(s) in the certificate. Today, this
verification is done through a collection of ad hoc mechanisms. This verification is done through a collection of ad hoc mechanisms. This
document describes a protocol that a certificate authority (CA) and document describes a protocol that a certificate authority (CA) and
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 http://datatracker.ietf.org/drafts/current/. Drafts is at http://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 May 4, 2017. This Internet-Draft will expire on August 7, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2017 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Deployment Model and Operator Experience . . . . . . . . . . 4 2. Deployment Model and Operator Experience . . . . . . . . . . 5
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6
4. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 6 4. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 6
5. Message Transport . . . . . . . . . . . . . . . . . . . . . . 8 5. Message Transport . . . . . . . . . . . . . . . . . . . . . . 8
5.1. HTTPS Requests . . . . . . . . . . . . . . . . . . . . . 8 5.1. HTTPS Requests . . . . . . . . . . . . . . . . . . . . . 8
5.2. Request Authentication . . . . . . . . . . . . . . . . . 9 5.2. Request Authentication . . . . . . . . . . . . . . . . . 9
5.3. Equivalence of JWKs . . . . . . . . . . . . . . . . . . . 10 5.3. Equivalence of JWKs . . . . . . . . . . . . . . . . . . . 11
5.4. Request URI Integrity . . . . . . . . . . . . . . . . . . 10 5.4. Request URI Integrity . . . . . . . . . . . . . . . . . . 11
5.4.1. "url" (URL) JWS header parameter . . . . . . . . . . 11 5.4.1. "url" (URL) JWS header parameter . . . . . . . . . . 12
5.5. Replay protection . . . . . . . . . . . . . . . . . . . . 11 5.5. Replay protection . . . . . . . . . . . . . . . . . . . . 12
5.5.1. Replay-Nonce . . . . . . . . . . . . . . . . . . . . 12 5.5.1. Replay-Nonce . . . . . . . . . . . . . . . . . . . . 13
5.5.2. "nonce" (Nonce) JWS header parameter . . . . . . . . 12 5.5.2. "nonce" (Nonce) JWS header parameter . . . . . . . . 13
5.6. Rate limits . . . . . . . . . . . . . . . . . . . . . . . 13 5.6. Rate limits . . . . . . . . . . . . . . . . . . . . . . . 13
5.7. Errors . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.7. Errors . . . . . . . . . . . . . . . . . . . . . . . . . 14
6. Certificate Management . . . . . . . . . . . . . . . . . . . 15 6. Certificate Management . . . . . . . . . . . . . . . . . . . 16
6.1. Resources . . . . . . . . . . . . . . . . . . . . . . . . 15 6.1. Resources . . . . . . . . . . . . . . . . . . . . . . . . 16
6.1.1. Directory . . . . . . . . . . . . . . . . . . . . . . 17 6.1.1. Directory . . . . . . . . . . . . . . . . . . . . . . 18
6.1.2. Registration Objects . . . . . . . . . . . . . . . . 19 6.1.2. Account Objects . . . . . . . . . . . . . . . . . . . 20
6.1.3. Application Objects . . . . . . . . . . . . . . . . . 20 6.1.3. Order Objects . . . . . . . . . . . . . . . . . . . . 21
6.1.4. Authorization Objects . . . . . . . . . . . . . . . . 23 6.1.4. Authorization Objects . . . . . . . . . . . . . . . . 23
6.2. Getting a Nonce . . . . . . . . . . . . . . . . . . . . . 25 6.2. Getting a Nonce . . . . . . . . . . . . . . . . . . . . . 24
6.3. Registration . . . . . . . . . . . . . . . . . . . . . . 25 6.3. Account Creation . . . . . . . . . . . . . . . . . . . . 25
6.3.1. Changes of Terms of Service . . . . . . . . . . . . . 28 6.3.1. Changes of Terms of Service . . . . . . . . . . . . . 27
6.3.2. Account Key Roll-over . . . . . . . . . . . . . . . . 29 6.3.2. External Account Binding . . . . . . . . . . . . . . 28
6.3.3. Account deactivation . . . . . . . . . . . . . . . . 31 6.3.3. Account Key Roll-over . . . . . . . . . . . . . . . . 30
6.3.4. Account deactivation . . . . . . . . . . . . . . . . 32
6.4. Applying for Certificate Issuance . . . . . . . . . . . . 32 6.4. Applying for Certificate Issuance . . . . . . . . . . . . 33
6.4.1. Pre-Authorization . . . . . . . . . . . . . . . . . . 34 6.4.1. Pre-Authorization . . . . . . . . . . . . . . . . . . 35
6.4.2. Downloading the Certificate . . . . . . . . . . . . . 36 6.4.2. Downloading the Certificate . . . . . . . . . . . . . 37
6.5. Identifier Authorization . . . . . . . . . . . . . . . . 38 6.5. Identifier Authorization . . . . . . . . . . . . . . . . 39
6.5.1. Responding to Challenges . . . . . . . . . . . . . . 39 6.5.1. Responding to Challenges . . . . . . . . . . . . . . 40
6.5.2. Deactivating an Authorization . . . . . . . . . . . . 41 6.5.2. Deactivating an Authorization . . . . . . . . . . . . 42
6.6. Certificate Revocation . . . . . . . . . . . . . . . . . 42 6.6. Certificate Revocation . . . . . . . . . . . . . . . . . 43
7. Identifier Validation Challenges . . . . . . . . . . . . . . 44 7. Identifier Validation Challenges . . . . . . . . . . . . . . 45
7.1. Key Authorizations . . . . . . . . . . . . . . . . . . . 46 7.1. Key Authorizations . . . . . . . . . . . . . . . . . . . 47
7.2. HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . 46 7.2. HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.3. TLS with Server Name Indication (TLS SNI) . . . . . . . . 48 7.3. TLS with Server Name Indication (TLS SNI) . . . . . . . . 50
7.4. DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 7.4. DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.5. Out-of-Band . . . . . . . . . . . . . . . . . . . . . . . 52 7.5. Out-of-Band . . . . . . . . . . . . . . . . . . . . . . . 54
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 52 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 55
8.1. Well-Known URI for the HTTP Challenge . . . . . . . . . . 53 8.1. Well-Known URI for the HTTP Challenge . . . . . . . . . . 55
8.2. Replay-Nonce HTTP Header . . . . . . . . . . . . . . . . 53 8.2. Replay-Nonce HTTP Header . . . . . . . . . . . . . . . . 55
8.3. "url" JWS Header Parameter . . . . . . . . . . . . . . . 53 8.3. "url" JWS Header Parameter . . . . . . . . . . . . . . . 56
8.4. "nonce" JWS Header Parameter . . . . . . . . . . . . . . 53 8.4. "nonce" JWS Header Parameter . . . . . . . . . . . . . . 56
8.5. URN Sub-namespace for ACME (urn:ietf:params:acme) . . . . 54 8.5. URN Sub-namespace for ACME (urn:ietf:params:acme) . . . . 56
8.6. New Registries . . . . . . . . . . . . . . . . . . . . . 54 8.6. New Registries . . . . . . . . . . . . . . . . . . . . . 57
8.6.1. Error Codes . . . . . . . . . . . . . . . . . . . . . 54 8.6.1. Fields in Account Objects . . . . . . . . . . . . . . 57
8.6.2. Resource Types . . . . . . . . . . . . . . . . . . . 55 8.6.2. Fields in Order Objects . . . . . . . . . . . . . . . 58
8.6.3. Identifier Types . . . . . . . . . . . . . . . . . . 55 8.6.3. Error Codes . . . . . . . . . . . . . . . . . . . . . 59
8.6.4. Challenge Types . . . . . . . . . . . . . . . . . . . 56 8.6.4. Resource Types . . . . . . . . . . . . . . . . . . . 59
9. Security Considerations . . . . . . . . . . . . . . . . . . . 57 8.6.5. Identifier Types . . . . . . . . . . . . . . . . . . 60
9.1. Threat model . . . . . . . . . . . . . . . . . . . . . . 57 8.6.6. Challenge Types . . . . . . . . . . . . . . . . . . . 60
9.2. Integrity of Authorizations . . . . . . . . . . . . . . . 58 9. Security Considerations . . . . . . . . . . . . . . . . . . . 61
9.3. Denial-of-Service Considerations . . . . . . . . . . . . 60 9.1. Threat model . . . . . . . . . . . . . . . . . . . . . . 62
9.4. Server-Side Request Forgery . . . . . . . . . . . . . . . 61 9.2. Integrity of Authorizations . . . . . . . . . . . . . . . 63
9.5. CA Policy Considerations . . . . . . . . . . . . . . . . 62 9.3. Denial-of-Service Considerations . . . . . . . . . . . . 65
10. Operational Considerations . . . . . . . . . . . . . . . . . 62 9.4. Server-Side Request Forgery . . . . . . . . . . . . . . . 65
10.1. DNS over TCP . . . . . . . . . . . . . . . . . . . . . . 62 9.5. CA Policy Considerations . . . . . . . . . . . . . . . . 66
10.2. Default Virtual Hosts . . . . . . . . . . . . . . . . . 63 10. Operational Considerations . . . . . . . . . . . . . . . . . 67
10.3. Use of DNSSEC Resolvers . . . . . . . . . . . . . . . . 63 10.1. DNS over TCP . . . . . . . . . . . . . . . . . . . . . . 67
11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 64 10.2. Default Virtual Hosts . . . . . . . . . . . . . . . . . 67
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 64 10.3. Use of DNSSEC Resolvers . . . . . . . . . . . . . . . . 68
12.1. Normative References . . . . . . . . . . . . . . . . . . 64 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 68
12.2. Informative References . . . . . . . . . . . . . . . . . 66 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 69
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 67 12.1. Normative References . . . . . . . . . . . . . . . . . . 69
12.2. Informative References . . . . . . . . . . . . . . . . . 71
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 72
1. Introduction 1. Introduction
Certificates in the Web PKI [RFC5280] are most commonly used to Certificates in the Web PKI [RFC5280] are most commonly used to
authenticate domain names. Thus, certificate authorities in the Web authenticate domain names. Thus, certificate authorities in the Web
PKI are trusted to verify that an applicant for a certificate 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
verification of information about the certificate subject. "Domain
Validation" (DV) certificates are by far the most common type. For
DV validation, the CA merely verifies that the requester has
effective control of the web server and/or DNS server for the domain,
but does not explicitly attempt to verify their real-world identity.
(This is as opposed to "Organization Validation" (OV) and "Extended
Validation" (EV) certificates, where the process is intended to also
verify the real-world identity of the requester.)
Existing Web PKI certificate authorities tend to run on a set of ad Existing Web PKI certificate authorities tend to run on a set of ad
hoc protocols for certificate issuance and identity verification. A hoc protocols for certificate issuance and identity verification. In
typical user experience is something like: the 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 web page. o Cut-and-paste the CSR into a CA 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:
* Put a CA-provided challenge at a specific place on the web * Put a CA-provided challenge at a specific place on the web
server. server.
skipping to change at page 4, line 50 skipping to change at page 5, line 16
This document describes an extensible framework for automating the This document describes an extensible framework for automating the
issuance and domain validation procedure, thereby allowing servers issuance and domain validation procedure, thereby allowing servers
and infrastructural software to obtain certificates without user and infrastructural software to obtain certificates without user
interaction. Use of this protocol should radically simplify the interaction. Use of this protocol should radically simplify the
deployment of HTTPS and the practicality of PKIX authentication for deployment of HTTPS and the practicality of PKIX authentication for
other protocols based on TLS [RFC5246]. other protocols based on TLS [RFC5246].
2. Deployment Model and Operator Experience 2. Deployment Model and Operator Experience
The major guiding use case for ACME is obtaining certificates for Web The guiding use case for ACME is obtaining certificates for Web sites
sites (HTTPS [RFC2818]). In that case, the server is intended to (HTTPS [RFC2818]). In this case, the user's web server is intended
speak for one or more domains, and the process of certificate to speak for one or more domains, and the process of certificate
issuance is intended to verify that the server actually speaks for issuance is intended to verify that this server actually speaks for
the domain(s). the domain(s).
Different types of certificates reflect different kinds of CA
verification of information about the certificate subject. "Domain
Validation" (DV) certificates are by far the most common type. For
DV validation, the CA merely verifies that the requester has
effective control of the web server and/or DNS server for the domain,
but does not explicitly attempt to verify their real-world identity.
(This is as opposed to "Organization Validation" (OV) and "Extended
Validation" (EV) certificates, where the process is intended to also
verify the real-world identity of the requester.)
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 issuing authority in an interactive process that can be by the issuing authority 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.
When deploying a current HTTPS server, an operator generally gets a At time of writing, when deploying an HTTPS server, an operator
prompt to generate a self-signed certificate. When an operator typically gets a prompt to generate a self-signed certificate. If
deploys an ACME-compatible web server, the experience would be the operator were instead deploying an ACME-compatible web server,
something like this: the experience would be something like this:
o The ACME client prompts the operator for the intended domain o The ACME client prompts the operator for the intended domain
name(s) that the web server is to stand for. name(s) that the web server is to stand for.
o The ACME client presents the operator with a list of CAs from o The ACME client presents the operator with a list of CAs from
which it could get a certificate. (This list will change over which it could get a certificate. (This list will change over
time based on the capabilities of CAs and updates to ACME time based on the capabilities of CAs and updates to ACME
configuration.) The ACME client might prompt the operator for configuration.) The ACME client might prompt the operator for
payment information at this point. payment information at this point.
skipping to change at page 6, line 5 skipping to change at page 6, line 10
o Once the CA is satisfied, the certificate is issued and the ACME o Once the CA is satisfied, the certificate is issued and the ACME
client automatically downloads and installs it, potentially client automatically downloads and installs it, potentially
notifying the operator via e-mail, SMS, etc. notifying the operator via e-mail, SMS, etc.
o The ACME client periodically contacts the CA to get updated o The ACME client periodically contacts the CA to get updated
certificates, stapled OCSP responses, or whatever else would be certificates, stapled OCSP responses, or whatever else would be
required to keep the server functional and its credentials up-to- required to keep the server functional and its credentials up-to-
date. date.
The overall idea is that it's nearly as easy to deploy with a CA- In this way, it would be nearly as easy to deploy with a CA-issued
issued certificate as a self-signed certificate, and that once the certificate as with a self-signed certificate. Furthermore, the
operator has done so, the process is self-sustaining with minimal maintenance of that CA-issued certificate would require minimal
manual intervention. Close integration of ACME with HTTPS servers, manual intervention. Such close integration of ACME with HTTPS
for example, can allow the immediate and automated deployment of servers would allow the immediate and automated deployment of
certificates as they are issued, optionally sparing the human certificates as they are issued, sparing the human administrator from
administrator from additional configuration work. much of the time-consuming work described in the previous section.
3. Terminology 3. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
The two main roles in ACME are "client" and "server". The ACME The two main roles in ACME are "client" and "server". The ACME
client uses the protocol to request certificate management actions, client uses the protocol to request certificate management actions,
such as issuance or revocation. An ACME client therefore typically such as issuance or revocation. An ACME client therefore typically
skipping to change at page 6, line 35 skipping to change at page 6, line 40
the requested actions if the client is authorized. the requested actions if the client is authorized.
An ACME client is represented by an "account key pair". The client An ACME client is represented by an "account key pair". The client
uses the private key of this key pair to sign all messages sent to uses the private key of this key pair to sign all messages sent to
the server. The server uses the public key to verify the the server. The server uses the public key to verify the
authenticity and integrity of messages from the client. authenticity and integrity of messages from the client.
4. Protocol Overview 4. Protocol Overview
ACME allows a client to request certificate management actions using ACME allows a client to request certificate management actions using
a set of JSON messages carried over HTTPS. In some ways, ACME a set of JSON messages carried over HTTPS. In many ways, ACME
functions much like a traditional CA, in which a user creates an functions much like a traditional CA, in which a user creates an
account, adds identifiers to that account (proving control of the account, requests a certificate, and proves control of the domains in
domains), and requests certificate issuance for those domains while that certificate in order for the CA to sign the requested
logged in to the account. certificate.
In ACME, the account is represented by an account key pair. The "add
a domain" function is accomplished by authorizing the key pair for a
given domain. Certificate issuance and revocation are authorized by
a signature with the key pair.
The first phase of ACME is for the client to register with the ACME The first phase of ACME is for the client to request an account with
server. The client generates an asymmetric key pair and associates the ACME server. The client generates an asymmetric key pair and
this key pair with a set of contact information by signing the requests a new account, optionally providing contact information,
contact information. The server acknowledges the registration by agreeing to terms of service, and/or associating the account with an
replying with a registration object echoing the client's input. existing account in another system. The creation request is signed
with the generated private key to prove that the client controls it.
Client Server Client Server
Contact Information Contact Information
ToS Agreement
Additional Data
Signature -------> Signature ------->
<------- Registration <------- Account
Once the client is registered, there are three major steps it needs Once an account is registered, there are three major steps the client
to take to get a certificate: needs to take to get a certificate:
1. Apply for a certificate to be issued 1. Submit an order for a certificate to be issued
2. Fulfill the server's requirements for issuance 2. Prove control of any identifiers requested in the certificate
3. Await issuance and download the issued certificate 3. Await issuance and download the issued certificate
The client's application for a certificate describes the desired The client's order for a certificate describes the desired
certificate using a PKCS#10 Certificate Signing Request (CSR) plus a certificate using a PKCS#10 Certificate Signing Request (CSR) plus a
few additional fields that capture semantics that are not supported few additional fields that capture semantics that are not supported
in the CSR format. If the server is willing to consider issuing such in the CSR format. If the server is willing to consider issuing such
a certificate, it responds with a list of requirements that the a certificate, it responds with a list of requirements that the
client must satisfy before the certificate will be issued. client must satisfy before the certificate will be issued.
For example, in most cases, the server will require the client to For example, in most cases, the server will require the client to
demonstrate that it controls the identifiers in the requested demonstrate that it controls the identifiers in the requested
certificate. Because there are many different ways to validate certificate. Because there are many different ways to validate
possession of different types of identifiers, the server will choose possession of different types of identifiers, the server will choose
from an extensible set of challenges that are appropriate for the from an extensible set of challenges that are appropriate for the
identifier being claimed. The client responds with a set of identifier being claimed. The client responds with a set of
responses that tell the server which challenges the client has responses that tell the server which challenges the client has
completed. The server then validates the challenges to check that completed. The server then validates the challenges to check that
the client has accomplished the challenge. the client has accomplished the challenge.
Once the validation process is complete and the server is satisfied Once the validation process is complete and the server is satisfied
that the client has met its requirements, the server will issue the that the client has met its requirements, the server will issue the
requested certificate and make it available to the client. requested certificate and make it available to the client.
Application Order
Signature -------> Signature ------->
<------- Requirements Required
(e.g., Challenges) <------- Authorizations
Responses Responses
Signature -------> Signature ------->
<~~~~~~~~Validation~~~~~~~~> <~~~~~~~~Validation~~~~~~~~>
<------- Certificate <------- Certificate
To revoke a certificate, the client simply sends a revocation request To revoke a certificate, the client sends a signed revocation request
indicating the certificate to be revoked, signed with an authorized indicating the certificate to be revoked:
key pair. The server indicates whether the request has succeeded.
Client Server Client Server
Revocation request Revocation request
Signature --------> Signature -------->
<-------- Result <-------- Result
Note that while ACME is defined with enough flexibility to handle Note that while ACME is defined with enough flexibility to handle
different types of identifiers in principle, the primary use case different types of identifiers in principle, the primary use case
addressed by this document is the case where domain names are used as addressed by this document is the case where domain names are used as
identifiers. For example, all of the identifier validation identifiers. For example, all of the identifier validation
challenges described in Section 7 below address validation of domain challenges described in Section 7 below address validation of domain
names. The use of ACME for other protocols 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. Message Transport 5. 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
skipping to change at page 9, line 23 skipping to change at page 9, line 33
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. be stripped.
5.2. Request Authentication 5.2. Request Authentication
All ACME requests with a non-empty body MUST encapsulate the body in All ACME requests with a non-empty body MUST encapsulate their
a JWS object, signed using the account key pair. The server MUST payload in a JWS object, signed (in most cases) using the account's
verify the JWS before processing the request. (For readability, private key. The server MUST verify the JWS before processing the
however, the examples below omit this encapsulation.) Encapsulating request. Encapsulating request bodies in JWS provides a simple
request bodies in JWS provides a simple authentication of requests by authentication of requests.
way of key continuity.
JWS objects sent in ACME requests MUST meet the following additional JWS objects sent in ACME requests MUST meet the following additional
criteria: criteria:
o The JWS MUST be encoded using UTF-8 o The JWS MUST be encoded using UTF-8
o The JWS MUST NOT have the value "none" in its "alg" field o The JWS MUST NOT have the value "none" in its "alg" field
o The JWS MUST NOT have a MAC-based algorithm in its "alg" field
o The JWS Protected Header MUST include the following fields: o The JWS Protected Header MUST include the following fields:
* "alg" * "alg"
* "jwk" (only for requests to new-reg and revoke-cert resources) * "jwk" (only for requests to new-reg and revoke-cert resources)
* "kid" (for all other requests). * "kid" (for all other requests).
* "nonce" (defined below) * "nonce" (defined below)
* "url" (defined below) * "url" (defined below)
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.
skipping to change at page 10, line 11 skipping to change at page 10, line 21
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 new-reg requests, and for revoke-cert requests authenticated by For new-reg requests, and for revoke-cert requests authenticated by
certificate key, there MUST be a "jwk" field. certificate key, there MUST be a "jwk" field.
For all other requests, there MUST be a "kid" field. This field must For all other requests, there MUST be a "kid" field. This field must
contain the account URI received by POSTing to the new-reg resource. contain the account URI received by POSTing to the new-reg resource.
Note that authentication via signed POST implies that GET requests Note that authentication via signed JWS request bodies implies that
are not authenticated. Servers MUST NOT respond to GET requests for GET requests are not authenticated. Servers MUST NOT respond to GET
resources that might be considered sensitive. requests for resources that might be considered sensitive.
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
code 400 (Bad Request) and type
"urn:ietf:params:acme:error:badSignatureAlgorithm". The problem
document returned with the error MUST include an "algorithms" field
with an array of supported "alg" values.
HTTP/1.1 400 Bad Request
Replay-Nonce: IXVHDyxIRGcTE0VSblhPzw
Content-Type: application/problem+json
Content-Language: en
{
"type": "urn:ietf:params:acme:error:badSignatureAlgorithm",
"detail": "Algorithm 'ES384' is not supported",
"algorithms": ["RS256", "RS384", "ES256"]
}
In the examples below, JWS objects are shown in the JSON or flattened In the examples below, JWS objects are shown in the JSON or flattened
JSON serialization, with the protected header and payload expressed JSON serialization, with the protected header and payload expressed
as base64url(content) instead of the actual base64-encoded value, so as base64url(content) instead of the actual base64-encoded value, so
that the content is readable. Some fields are omitted for brevity, that the content is readable. Some fields are omitted for brevity,
marked with "...". marked with "...".
5.3. Equivalence of JWKs 5.3. Equivalence of JWKs
At some points in the protocol, it is necessary for the server to At some points in the protocol, it is necessary for the server to
skipping to change at page 11, line 4 skipping to change at page 11, line 37
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 URI and headers. not signed in the HTTPS request, e.g., the request URI and headers.
ACME uses JWS to provide an integrity mechanism, which protects
ACME uses JWS to provide a limited integrity mechanism, which against an intermediary changing the request URI to another ACME URI.
protects against an intermediary changing the request URI to another
ACME URI of a different type. (It does not protect against changing
between URIs of the same type, e.g., from one authorization URI to
another).
As noted above, all ACME request objects carry a "url" parameter in As noted above, all ACME request objects carry a "url" parameter in
their protected header. This header parameter encodes the URL to their protected header. This header parameter encodes the URL to
which the client is directing the request. On receiving such an which the client is directing the request. On receiving such an
object in an HTTP request, the server MUST compare the "url" object in an HTTP request, the server MUST compare the "url"
parameter to the request URI. If the two do not match, then the parameter to the request URI. If the two do not match, then the
server MUST reject the request as unauthorized. 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. For these resources, with URLs provided to the client by the server. For these resources,
the client MUST set the "url" field to the exact string provided by the client MUST set the "url" field to the exact string provided by
the server (rather than performing any re-encoding on the URL). The the server (rather than performing any re-encoding on the URL). The
server SHOULD perform the corresponding string equality check, server SHOULD perform the corresponding string equality check,
configuring each resource with the URL string provided to clients and configuring each resource with the URL string provided to clients and
having the resource check that requests have the same string in their having the resource check that requests have the same string in their
"url" fields. "url" fields.
5.4.1. "url" (URL) JWS header parameter 5.4.1. "url" (URL) JWS header parameter
The "url" header parameter specifies the URL to which this JWS object The "url" header parameter specifies the URL [RFC3986] to which this
is directed [RFC3986]. The "url" parameter MUST be carried in the JWS object is directed. The "url" parameter MUST be carried in the
protected header of the JWS. The value of the "url" header MUST be a protected header of the JWS. The value of the "url" header MUST be a
JSON string representing the URL. JSON string representing the URL.
5.5. Replay protection 5.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 requests have a mandatory anti-replay mechanism. This mechanism
is based on the server maintaining a list of nonces that it has is based on the server maintaining a list of nonces that it has
issued to clients, and requiring any signed request from the client issued to clients, and requiring any signed request from the client
to carry such a nonce. to carry such a nonce.
skipping to change at page 12, line 8 skipping to change at page 12, line 36
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 below. header, the "nonce" header parameter, with contents as defined below.
As part of JWS verification, the ACME server MUST verify that the As part of JWS verification, the ACME server MUST verify that the
value of the "nonce" header is a value that the server previously value of the "nonce" header is a value that the server previously
provided in a Replay-Nonce header field. Once a nonce value has provided in a Replay-Nonce header field. Once a nonce value has
appeared in an ACME request, the server MUST consider it invalid, in appeared in an ACME request, the server MUST consider it invalid, in
the same way as a value it had never issued. 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 SHOULD provide HTTP status code 400 unacceptable (or not present), it MUST provide HTTP status code 400
(Bad Request), and indicate the ACME error code (Bad Request), and indicate the ACME error code
"urn:ietf:params:acme:error:badNonce". An error response with the "urn:ietf:params:acme:error:badNonce". An error response with the
"badNonce" error code MUST include a Replay-Nonce header with a fresh "badNonce" error code 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.
skipping to change at page 13, line 9 skipping to change at page 13, line 40
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.
5.6. Rate limits 5.6. Rate limits
Creation of resources can be rate limited to ensure fair usage and Creation of resources can be rate limited to ensure fair usage and
prevent abuse. Once the rate limit is exceeded, the server MUST prevent abuse. Once the rate limit is exceeded, the server MUST
respond with an error with the code "rateLimited". Additionally, the respond with an error with the type
server SHOULD send a "Retry-After" header indicating when the current "urn:ietf:params:acme:error:rateLimited". Additionally, the server
SHOULD send a "Retry-After" header indicating when the current
request may succeed again. If multiple rate limits are in place, request may succeed again. If multiple rate limits are in place,
that is the time where all rate limits allow access again for the that is the time where all rate limits allow access again for the
current request with exactly the same parameters. 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 tokens in the "Link" response, the server MAY send one or multiple tokens in the "Link"
header pointing to documentation about the specific hit rate limits header pointing to documentation about the specific hit rate limits
using the "rate-limit" relation. using the "rate-limit" relation.
5.7. Errors 5.7. Errors
skipping to change at page 14, line 14 skipping to change at page 15, line 14
+-----------------------+-------------------------------------------+ +-----------------------+-------------------------------------------+
| Code | Description | | Code | Description |
+-----------------------+-------------------------------------------+ +-----------------------+-------------------------------------------+
| badCSR | The CSR is unacceptable (e.g., due to a | | badCSR | The CSR is unacceptable (e.g., due to a |
| | short key) | | | short key) |
| | | | | |
| badNonce | The client sent an unacceptable anti- | | badNonce | The client sent an unacceptable anti- |
| | replay nonce | | | replay nonce |
| | | | | |
| badSignatureAlgorithm | The JWS was signed with an algorithm the |
| | server does not support |
| | |
| caa | CAA records forbid the CA from issuing |
| | |
| connection | The server could not connect to | | connection | The server could not connect to |
| | validation target | | | validation target |
| | | | | |
| dnssec | DNSSEC validation failed | | dnssec | DNSSEC validation failed |
| | | | | |
| caa | CAA records forbid the CA from issuing | | invalidContact | The contact URI for a registration was |
| | invalid |
| | | | | |
| malformed | The request message was malformed | | malformed | The request message was malformed |
| | | | | |
| rateLimited | The request exceeds a rate limit |
| | |
| rejectedIdentifier | The server will not issue for the |
| | identifier |
| | |
| serverInternal | The server experienced an internal error | | serverInternal | The server experienced an internal error |
| | | | | |
| tls | The server received a TLS error during | | tls | The server received a TLS error during |
| | validation | | | validation |
| | | | | |
| unauthorized | The client lacks sufficient authorization | | unauthorized | The client lacks sufficient authorization |
| | | | | |
| unknownHost | The server could not resolve a domain | | unknownHost | The server could not resolve a domain |
| | name | | | name |
| | | | | |
| rateLimited | The request exceeds a rate limit |
| | |
| invalidContact | The contact URI for a registration was |
| | invalid |
| | |
| rejectedIdentifier | The server will not issue for the |
| | identifier |
| | |
| unsupportedIdentifier | Identifier is not supported, but may be | | unsupportedIdentifier | Identifier is not supported, but may be |
| | in future | | | in future |
| | | | | |
| agreementRequired | The client must agree to terms before | | userActionRequired | The user visit the "instance" URL and |
| | proceeding | | | take 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 for errors other than the MUST NOT use the ACME URN namespace for errors other than the
standard types. Clients SHOULD display the "detail" field of such standard types. Clients SHOULD display the "detail" field of all
errors. errors.
Authorization and challenge objects can also contain error Authorization and challenge objects can also contain error
information to indicate why the server was unable to validate information to indicate why the server was unable to validate
authorization. authorization.
6. Certificate Management 6. Certificate Management
In this section, we describe the certificate management functions In this section, we describe the certificate management functions
that ACME enables: that ACME enables:
o Account Key Registration o Account Creation
o Application for a Certificate o Ordering a Certificate
o Account Key Authorization o Identifier Authorization
o Certificate Issuance o Certificate Issuance
o Certificate Revocation o Certificate Revocation
6.1. Resources 6.1. Resources
ACME is structured as a REST application with a few types of ACME is structured as a REST application with a few types of
resources: resources:
o Registration resources, representing information about an account o Account resources, representing information about an account
o Application resources, representing an account's requests to issue o Order resources, representing an account's requests to issue
certificates certificates
o Authorization resources, representing an account's authorization o Authorization resources, representing an account's authorization
to act for an identifier to act for an identifier
o Challenge resources, representing a challenge to prove control of o Challenge resources, representing a challenge to prove control of
an identifier an identifier
o Certificate resources, representing issued certificates o Certificate resources, representing issued certificates
o A "directory" resource o A "directory" resource
o A "new-nonce" resource o A "new-nonce" resource
o A "new-registration" resource o A "new-account" resource
o A "new-application" resource
o A "new-order" resource
o A "revoke-certificate" resource o A "revoke-certificate" resource
o A "key-change" resource o A "key-change" resource
The server MUST provide "directory" and "new-nonce" resources.
For the singular resources above ("directory", "new-nonce", "new- The server MUST provide "directory" and "new-nonce" resources.
registration", "new-application", "revoke-certificate", and "key-
change") the resource may be addressed by multiple URIs, but all must
provide equivalent functionality.
ACME uses different URIs for different management functions. Each ACME uses different URIs for different management functions. Each
function is listed in a directory along with its corresponding URI, function is listed in a directory along with its corresponding URI,
so clients only need to be configured with the directory URI. These so clients only need to be configured with the directory URI. These
URIs are connected by a few different link relations [RFC5988]. URIs 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 from certificate resources to indicate a resource from which the
client may fetch a chain of CA certificates that could be used to client may fetch a chain of CA certificates that could be used to
skipping to change at page 16, line 38 skipping to change at page 17, line 37
Lines with labels in quotes indicate HTTP link relations Lines with labels in quotes indicate HTTP link relations
directory directory
| |
|--> new-nonce |--> new-nonce
| |
--------------------------------------------------+ --------------------------------------------------+
| | | | | | | |
| | | | | | | |
V V V V V V V V
new-reg new-authz new-app revoke-cert new-account new-authz new-order revoke-cert
| | | ^ | | | ^
| | | | "revoke" | | | "author" | "revoke"
V | V | V | V <-------- |
reg | app ---------> cert ---------+ acct | order --------> cert ---------+
| | ^ | | | ^ |
| | | "up" | "up" | | | "up" | "up"
| V | V | V | V
+------> authz cert-chain +------> authz cert-chain
| ^ | ^
| | "up" | | "up"
V | V |
challenge challenge
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 a nonce | HEAD new-nonce | 200 | | Get a nonce | HEAD new-nonce | 204 |
| | | | | | | |
| Register | POST new-reg | 201 -> reg | | Create account | POST new-account | 201 -> account |
| | | | | | | |
| Apply for a cert | POST new-app | 201 -> app | | Submit an order | POST new-order | 201 -> order |
| | | | | | | |
| Fetch challenges | GET authz | 200 | | Fetch challenges | GET authz | 200 |
| | | | | | | |
| Answer challenges | POST challenge | 200 | | Respond to challenge | POST challenge | 200 |
| | | | | | | |
| Poll for status | GET authz | 200 | | Poll for status | GET authz | 200 |
| | | | | | | |
| Request issuance | POST app | 200 | | Check for new cert | GET cert | 200 |
| | | | +----------------------+------------------+----------------+
| Check for new cert | GET cert | 200 |
+--------------------+----------------+------------+
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.
6.1.1. Directory 6.1.1. Directory
In order to help clients configure themselves with the right URIs for In order to help clients configure themselves with the right URIs 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
dictionary, whose keys are drawn from the following table and whose dictionary, whose keys are drawn from the following table and whose
values are the corresponding URLs. values are the corresponding URLs.
+-------------+--------------------+ +-------------+--------------------+
| Key | URL in value | | Key | URL in value |
+-------------+--------------------+ +-------------+--------------------+
| new-nonce | New nonce | | new-nonce | New nonce |
| | | | | |
| new-reg | New registration | | new-account | New account |
| | | | | |
| new-app | New application | | new-order | New order |
| | | | | |
| new-authz | New authorization | | new-authz | New authorization |
| | | | | |
| revoke-cert | Revoke certificate | | revoke-cert | Revoke certificate |
| | | | | |
| key-change | Key change | | key-change | Key change |
+-------------+--------------------+ +-------------+--------------------+
There is no constraint on the actual URI of the directory except that There is no constraint on the actual URI of the directory except that
it should be different from the other ACME server resources' URIs, it should be different from the other ACME server resources' URIs,
skipping to change at page 18, line 41 skipping to change at page 19, line 41
The dictionary MAY additionally contain a key "meta". If present, it The dictionary MAY additionally contain a key "meta". If present, it
MUST be a JSON dictionary; each item in the dictionary is an item of MUST be a JSON dictionary; each item in the dictionary 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, all of which are OPTIONAL:
"terms-of-service" (optional, string): A URI identifying the current "terms-of-service" (optional, string): A URI identifying the current
terms of service. terms of service.
"website" (optional, string)): An HTTP or HTTPS URL locating a "website" (optional, string): An HTTP or HTTPS URL locating a
website providing more information about the ACME server. website providing more information about the ACME server.
"caa-identities" (optional, array of string): Each string MUST be a "caa-identities" (optional, array of string): Each string MUST be a
lowercase hostname which the ACME server recognises as referring lowercase hostname which the ACME server recognises as referring
to itself for the purposes of CAA record validation as defined in to itself for the purposes of CAA record validation as defined in
[RFC6844]. This allows clients to determine the correct issuer [RFC6844]. This allows clients to determine the correct issuer
domain name to use when configuring CAA record. domain name to use when configuring CAA record.
Clients access the directory by sending a GET request to the Clients access the directory by sending a GET request to the
directory URI. directory URI.
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
{ {
"new-nonce": "https://example.com/acme/new-nonce", "new-nonce": "https://example.com/acme/new-nonce",
"new-reg": "https://example.com/acme/new-reg", "new-account": "https://example.com/acme/new-account",
"new-app": "https://example.com/acme/new-app", "new-order": "https://example.com/acme/new-order",
"new-authz": "https://example.com/acme/new-authz", "new-authz": "https://example.com/acme/new-authz",
"revoke-cert": "https://example.com/acme/revoke-cert", "revoke-cert": "https://example.com/acme/revoke-cert",
"key-change": "https://example.com/acme/key-change", "key-change": "https://example.com/acme/key-change",
"meta": { "meta": {
"terms-of-service": "https://example.com/acme/terms", "terms-of-service": "https://example.com/acme/terms",
"website": "https://www.example.com/", "website": "https://www.example.com/",
"caa-identities": ["example.com"] "caa-identities": ["example.com"]
} }
} }
6.1.2. Registration Objects 6.1.2. Account Objects
An ACME registration resource represents a set of metadata associated An ACME account resource represents a set of metadata associated to
to an account key pair. Registration resources have the following an account. Account resources have the following structure:
structure:
key (required, dictionary): The public key of the account key pair, key (required, dictionary): The public key of the account's key
encoded as a JSON Web Key object [RFC7517]. This field is not pair, encoded as a JSON Web Key object [RFC7517]. The client may
updateable by the client. not directly update this field, but must use the key-change
resource instead.
status (required, string): The status of this registration. status (required, string): The status of this account. Possible
Possible values are: "valid", "deactivated", and "revoked". values are: "valid", "deactivated", and "revoked". The value
"deactivated" should be used to indicate user initiated "deactivated" should be used to indicate user initiated
deactivation whereas "revoked" should be used to indicate deactivation whereas "revoked" should be used to indicate
administratively initiated deactivation. administratively initiated deactivation.
contact (optional, array of string): An array of URIs that the contact (optional, array of string): An array of URIs 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
authorization. For example, the server may wish to notify the account. For example, the server may wish to notify the client
client about server-initiated revocation. about server-initiated revocation or certificate expiration.
terms-of-service-agreed (optional, boolean): Including this field in terms-of-service-agreed (optional, boolean): Including this field in
a new-registration request, with a value of true, indicates the a new-account request, with a value of true, indicates the
client's agreement with the terms of service. This field is not client's agreement with the terms of service. This field is not
updateable by the client. updateable by the client.
applications (required, string): A URI from which a list of orders (required, string): A URI from which a list of orders
authorizations submitted by this account can be fetched via a GET submitted by this account can be fetched via a GET request, as
request. The result of the GET request MUST be a JSON object described in Section 6.1.2.1
whose "applications" field is an array of strings, where each
string is the URI of an authorization belonging to this
registration. The server SHOULD include pending applications, and
SHOULD NOT include applications that are invalid. The server MAY
return an incomplete list, along with a Link header with link
relation "next" indicating a URL to retrieve further entries.
This field is not updateable by the client.
{ {
"contact": [ "contact": [
"mailto:cert-admin@example.com", "mailto:cert-admin@example.com",
"tel:+12025551212" "tel:+12025551212"
], ],
"terms-of-service-agreed": true, "terms-of-service-agreed": true,
"applications": "https://example.com/acme/reg/1/apps" "orders": "https://example.com/acme/acct/1/orders"
} }
6.1.2.1. Applications List 6.1.2.1. Orders List
Each registration object includes an applications URI from which a Each account object includes an "orders" URI from which a list of
list of applications created by the registration can be fetched via orders created by the account can be fetched via GET request. The
GET request. The result of the GET request MUST be a JSON object result of the GET request MUST be a JSON object whose "orders" field
whose "applications" field is an array of URIs, each identifying an is an array of URIs, each identifying an order belonging to the
applications belonging to the registration. The server SHOULD account. The server SHOULD include pending orders, and SHOULD NOT
include pending applications, and SHOULD NOT include applications include orders that are invalid in the array of URIs. The server MAY
that are invalid in the array of URIs. The server MAY return an return an incomplete list, along with a Link header with link
incomplete list, along with a Link header with link relation "next" relation "next" indicating a URL to retrieve further entries.
indicating a URL to retrieve further entries.
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
Link: href="/acme/reg/1/apps?cursor=2", rel="next" Link: href="/acme/acct/1/orders?cursor=2", rel="next"
{ {
"applications": [ "orders": [
"https://example.com/acme/reg/1/apps/1", "https://example.com/acme/acct/1/order/1",
"https://example.com/acme/reg/1/apps/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 */
"https://example.com/acme/reg/1/apps/50" "https://example.com/acme/acct/1/order/50"
] ]
} }
6.1.3. Application Objects 6.1.3. Order Objects
An ACME application object represents a client's request for a An ACME order object represents a client's request for a certificate,
certificate, and is used to track the progress of that application and is used to track the progress of that order through to issuance.
through to issuance. Thus, the object contains information about the Thus, the object contains information about the requested
requested certificate, the server's requirements, and any certificate, the authorizations that the server requires the client
certificates that have resulted from this application. to complete, and any certificates that have resulted from this order.
status (required, string): The status of this application. Possible status (required, string): The status of this order. Possible
values are: "pending", "valid", and "invalid". values are: "pending", "processing", "valid", and "invalid".
expires (optional, string): The timestamp after which the server expires (optional, string): The timestamp after which the server
will consider this application invalid, encoded in the format will consider this order invalid, encoded in the format specified
specified in RFC 3339 [RFC3339]. This field is REQUIRED for in RFC 3339 [RFC3339]. This field is REQUIRED for objects with
objects with "pending" or "valid" in the status field. "pending" or "valid" in the status field.
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: This field base64url-encoded version of the DER format. (Note: Because this
uses the same modified Base64 encoding rules used elsewhere in field uses base64url, and does not include headers, it is
this document, so it is different from PEM.) different from PEM.)
notBefore (optional, string): The requested value of the notBefore notBefore (optional, string): The requested value of the notBefore
field in the certificate, in the date format defined in [RFC3339] field in the certificate, in the date format defined in [RFC3339]
notAfter (optional, string): The requested value of the notAfter notAfter (optional, string): The requested value of the notAfter
field in the certificate, in the date format defined in [RFC3339] field in the certificate, in the date format defined in [RFC3339]
requirements (required, array): The requirements that the client authorizations (required, array of string): For pending orders, the
needs to fulfill before the requested certificate can be granted authorizations that the client needs to complete before the
(for pending applications). For final applications, the requested certificate can be issued (see Section 6.5). For final
requirements that were met. Each entry is a dictionary with orders, the authorizations that were completed. Each entry is a
parameters describing the requirement (see below). URL from which an authorization can be fetched with a GET request.
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 application. been issued in response to this order.
{ {
"status": "pending", "status": "pending",
"expires": "2015-03-01T14:09:00Z", "expires": "2015-03-01T14:09:00Z",
"csr": "jcRf4uXra7FGYW5ZMewvV...rhlnznwy8YbpMGqwidEXfE", "csr": "jcRf4uXra7FGYW5ZMewvV...rhlnznwy8YbpMGqwidEXfE",
"notBefore": "2016-01-01T00:00:00Z", "notBefore": "2016-01-01T00:00:00Z",
"notAfter": "2016-01-08T00:00:00Z", "notAfter": "2016-01-08T00:00:00Z",
"requirements": [ "authorizations": [
{ "https://example.com/acme/authz/1234",
"type": "authorization", "https://example.com/acme/authz/2345"
"status": "valid", ],
"url": "https://example.com/acme/authz/1234"
},
{
"type": "out-of-band",
"status": "pending",
"url": "https://example.com/acme/payment/1234"
}
]
"certificate": "https://example.com/acme/cert/1234" "certificate": "https://example.com/acme/cert/1234"
} }
The elements of the "requirements" array are immutable once set, The elements of the "authorizations" array are immutable once set.
except for their "status" fields. If any other part of the object The server MUST NOT change the contents of the "authorizations" array
changes after the object is created, the client MUST consider the after it is created. If a client observes a change in the contents
application invalid. of the "authorizations" array, then it SHOULD consider the order
invalid.
The "requirements" array in the challenge SHOULD reflect everything
that the CA required the client to do before issuance, even if some
requirements were fulfilled in earlier applications. For example, if
a CA allows multiple applications to be fufilled based on a single
authorization transaction, then it must reflect that authorization in
all of the applications.
Each entry in the "requirements" array expresses a requirement from
the CA for the client to take a particular action. All requirements
objects have the following basic fields:
type (required, string): The type of requirement (see below for
defined types)
status (required, string): The status of this requirement. Possible
values are: "pending", "valid", and "invalid".
All additional fields are specified by the requirement type.
6.1.3.1. Authorization Requirement
A requirement with type "authorization" requests that the ACME client
complete an authorization transaction. The server specifies the
authorization by pre-provisioning a pending authorization resource
and providing the URI for this resource in the requirement.
url (required, string): The URL for the authorization resource
To fulfill this requirement, the ACME client should fetch the
authorization object from the indicated URL, then follow the process
for obtaining authorization as specified in Section 6.5.
6.1.3.2. Out-of-Band Requirement
A requirement with type "out-of-band" requests that the ACME client
have a human user visit a web page in order to receive further
instructions for how to fulfill the requirement. The requirement
object provides a URI for the web page to be visited.
url (required, string): The URL to be visited. The scheme of this
URL MUST be "http" or "https"
To fulfill this requirement, the ACME client should direct the user The "authorizations" array in the challenge SHOULD reflect all
to the indicated web page. authorizations that the CA takes into account in deciding to issue,
even if some authorizations were fulfilled in earlier orders or in
pre-authorization transactions. For example, if a CA allows multiple
orders to be fufilled based on a single authorization transaction,
then it SHOULD reflect that authorization in all of the order.
6.1.4. Authorization Objects 6.1.4. Authorization Objects
An ACME authorization object represents a server's authorization for An ACME authorization object represents a server's authorization for
an account to represent an identifier. In addition to the an account to represent an identifier. In addition to the
identifier, an authorization includes several metadata fields, such identifier, an authorization includes several metadata fields, such
as the status of the authorization (e.g., "pending", "valid", or as the status of the authorization (e.g., "pending", "valid", or
"revoked") and which challenges were used to validate possession of "revoked") and which challenges were used to validate possession of
the identifier. the identifier.
skipping to change at page 24, line 11 skipping to change at page 23, line 36
Possible values are: "pending", "processing", "valid", "invalid" Possible values are: "pending", "processing", "valid", "invalid"
and "revoked". If this field is missing, then the default value and "revoked". If this field is missing, then the default value
is "pending". is "pending".
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.
scope (optional, string): If this field is present, then it MUST scope (optional, string): If this field is present, then it MUST
contain a URI for an application resource, such that this contain a URI for an order resource, such that this authorization
authorization is only valid for that resource. If this field is is only valid for that resource. If this field is absent, then
absent, then the CA MUST consider this authorization valid for all the CA MUST consider this authorization valid for all orders until
applications until the authorization expires. [[ Open issue: More the authorization expires. [[ Open issue: More flexible scoping?
flexible scoping? ]] ]]
challenges (required, array): The challenges that the client can challenges (required, array): The challenges that the client can
fulfill in order to prove possession of the identifier (for fulfill in order to prove possession of the identifier (for
pending authorizations). For final authorizations, the challenges pending authorizations). For final authorizations, the challenges
that were used. Each array entry is a dictionary with parameters that were used. Each array entry is a dictionary with parameters
required to validate the challenge, as specified in Section 7. A required to validate the challenge, as specified in Section 7. A
client should attempt to fulfill at most one of these challenges, client should attempt to fulfill at most one of these challenges,
and a server should consider any one of the challenges sufficient and a server should consider any one of the challenges sufficient
to make the authorization valid. to make the authorization valid.
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"). The value of the identifier qualified domain name (type: "dns"). The value of the identifier
MUST be the ASCII representation of the domain name. If a domain MUST be the ASCII representation of the domain name. If a domain
name contains Unicode characters it MUST be encoded using the rules name contains Unicode characters it MUST be encoded using the rules
defined in [RFC3492]. Servers MUST verify any identifier values that defined in [RFC3492]. Servers MUST verify any identifier values that
begin with the ASCII Compatible Encoding prefix "xn-" as defined in begin with the ASCII Compatible Encoding prefix "xn-" as defined in
[RFC5890] are properly encoded. Wildcard domain names (with "*" as [RFC5890] are properly encoded. Wildcard domain names (with "*" as
the first label) MUST NOT be included in authorization requests. the first label) MUST NOT be included in authorization objects.
{ {
"status": "valid", "status": "valid",
"expires": "2015-03-01T14:09:00Z", "expires": "2015-03-01T14:09:00Z",
"identifier": { "identifier": {
"type": "dns", "type": "dns",
"value": "example.org" "value": "example.org"
}, },
skipping to change at page 25, line 17 skipping to change at page 24, line 45
Before sending a POST request to the server, an ACME client needs to Before sending a POST request to the server, an ACME client needs to
have a fresh anti-replay nonce to put in the "nonce" header of the have a fresh anti-replay nonce to put in the "nonce" header of the
JWS. In most cases, the client will have gotten a nonce from a JWS. In most cases, the client will have gotten a nonce from a
previous request. However, the client might sometimes need to get a previous request. However, the client might sometimes need to get a
new nonce, e.g., on its first request to the server or if an existing new nonce, e.g., on its first request to the server or if an existing
nonce is no longer valid. nonce is no longer valid.
To get a fresh nonce, the client sends a HEAD request to the new- To get a fresh nonce, the client sends a HEAD request to the new-
nonce resource on the server. The server's response MUST include a nonce resource on the server. The server's response MUST include a
Replay-Nonce header field containing a fresh nonce, and SHOULD have Replay-Nonce header field containing a fresh nonce, and SHOULD have
status code 200 (OK). The server SHOULD also respond to GET requests status code 204 (No Content). The server SHOULD also respond to GET
for this resource, returning an empty body (while still providing a requests for this resource, returning an empty body (while still
Replay-Nonce header). providing a Replay-Nonce header).
HEAD /acme/new-nonce HTTP/1.1 HEAD /acme/new-nonce HTTP/1.1
Host: example.com Host: example.com
HTTP/1.1 200 OK HTTP/1.1 204 No Content
Replay-Nonce: oFvnlFP1wIhRlYS2jTaXbA Replay-Nonce: oFvnlFP1wIhRlYS2jTaXbA
Cache-Control: no-store Cache-Control: no-store
Caching of responses from the new-nonce resource can cause clients to Proxy caching of responses from the new-nonce resource can cause
be unable to communicate with the ACME server. The server MUST clients receive the same nonce repeatedly, leading to badNonce
include a Cache-Control header field with the "no-store" directive in errors. The server MUST include a Cache-Control header field with
responses for the new-nonce resource, in order to prevent caching of the "no-store" directive in responses for the new-nonce resource, in
this resource. order to prevent caching of this resource.
6.3. Registration 6.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-registration URI. The body of the request to the server's new-account URI. The body of the request is
request is a stub registration object containing only the "contact" a stub account object containing only the "contact" field.
field.
POST /acme/new-reg 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",
"url": "https://example.com/acme/new-reg" "url": "https://example.com/acme/new-account"
}) }),
"payload": base64url({ "payload": base64url({
"terms-of-service-agreed": true, "terms-of-service-agreed": true,
"contact": [ "contact": [
"mailto:cert-admin@example.com", "mailto:cert-admin@example.com",
"tel:+12025551212" "tel:+12025551212"
] ]
}), }),
"signature": "RZPOnYoPs1PhjszF...-nh6X1qtOFPB519I" "signature": "RZPOnYoPs1PhjszF...-nh6X1qtOFPB519I"
} }
The server MUST ignore any values provided in the "key", and The server MUST ignore any values provided in the "key", and "orders"
"applications" fields in registration bodies sent by the client, as fields in account bodies sent by the client, as well as any other
well as any other fields that it does not recognize. If new fields fields that it does not recognize. If new fields are specified in
are specified in the future, the specification of those fields MUST the future, the specification of those fields MUST describe whether
describe whether they may be provided by the client. they may be provided by the client.
In general, the server MUST ignore any fields in the request object
that it does not recognize. In particular, it MUST NOT reflect
unrecognized fields in the resulting account object. This allows
clients to detect when servers do not support an extension field.
The server SHOULD validate that the contact URLs in the "contact" The server SHOULD validate that the contact URLs in the "contact"
field are valid and supported by the server. If the client provides field are valid and supported by the server. If the client provides
the server with an invalid or unsupported contact URL, then the the server with an invalid or unsupported contact URL, then the
server MUST return an error of type "invalidContact", with a server MUST return an error of type "invalidContact", with a
description describing the error and what types of contact URL the description describing the error and what types of contact URL the
server considers acceptable. server considers acceptable.
The server creates a registration object with the included contact The server creates an account object with the included contact
information. The "key" element of the registration is set to the information. The "key" element of the account is set to the public
public key used to verify the JWS (i.e., the "jwk" element of the JWS key used to verify the JWS (i.e., the "jwk" element of the JWS
header). The server returns this registration object in a 201 header). The server returns this account object in a 201 (Created)
(Created) response, with the registration URI in a Location header response, with the account URI in a Location header field.
field.
If the server already has a registration object with the provided If the server already has an account registered with the provided
account key, then it MUST return a 200 (OK) response and provide the account key, then it MUST return a 200 (OK) response and provide the
URI of that registration in a Content-Location header field. This URI of that account in a Content-Location header field. This allows
allows a client that has an account key but not the corresponding a client that has an account key but not the corresponding account
registration URI to recover the registration URI. URI to recover the account URI.
If the server wishes to present the client with terms under which the If the server wishes to present the client with terms under which the
ACME service is to be used, it MUST indicate the URI where such terms ACME service is to be used, it MUST indicate the URI where such terms
can be accessed in the "terms-of-service" subfield of the "meta" can be accessed in the "terms-of-service" subfield of the "meta"
field in the directory object, and the server MUST reject new- field in the directory object, and the server MUST reject new-account
registration requests that do not have the "terms-of-service-agreed" requests that do not have the "terms-of-service-agreed" set to
set to "true". "true". Clients SHOULD NOT automatically agree to terms by default.
Rather, they SHOULD require some user interaction for agreement to
terms.
HTTP/1.1 201 Created HTTP/1.1 201 Created
Content-Type: application/json Content-Type: application/json
Replay-Nonce: D8s4D2mLs8Vn-goWuPQeKA Replay-Nonce: D8s4D2mLs8Vn-goWuPQeKA
Location: https://example.com/acme/reg/asdf Location: https://example.com/acme/acct/1
Link: <https://example.com/acme/some-directory>;rel="directory" Link: <https://example.com/acme/some-directory>;rel="directory"
{ {
"key": { /* JWK from JWS header */ }, "key": { /* JWK from JWS header */ },
"status": "valid", "status": "valid",
"contact": [ "contact": [
"mailto:cert-admin@example.com", "mailto:cert-admin@example.com",
"tel:+12025551212" "tel:+12025551212"
] ]
skipping to change at page 27, line 27 skipping to change at page 27, line 4
{ {
"key": { /* JWK from JWS header */ }, "key": { /* JWK from JWS header */ },
"status": "valid", "status": "valid",
"contact": [ "contact": [
"mailto:cert-admin@example.com", "mailto:cert-admin@example.com",
"tel:+12025551212" "tel:+12025551212"
] ]
} }
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 registration sends a POST request with updated information to the account URI.
URI. The server MUST ignore any updates to the "key", or The server MUST ignore any updates to the "key", or "order" fields or
"applications" fields or any other fields it does not recognize. The any other fields it does not recognize. The server MUST verify that
server MUST verify that the request is signed with the private key the request is signed with the private key corresponding to the "key"
corresponding to the "key" field of the request before updating the field of the request before updating the registration.
registration.
For example, to update the contact information in the above For example, to update the contact information in the above account,
registration, the client could send the following request: the client could send the following request:
POST /acme/reg/asdf 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/reg/asdf", "kid": "https://example.com/acme/acct/1",
"nonce": "ax5RnthDqp_Yf4_HZnFLmA", "nonce": "ax5RnthDqp_Yf4_HZnFLmA",
"url": "https://example.com/acme/reg/asdf" "url": "https://example.com/acme/acct/1"
}) }),
"payload": base64url({ "payload": base64url({
"contact": [ "contact": [
"mailto:certificates@example.com", "mailto:certificates@example.com",
"tel:+12125551212" "tel:+12125551212"
] ]
}), }),
"signature": "hDXzvcj8T6fbFbmn...rDzXzzvzpRy64N0o" "signature": "hDXzvcj8T6fbFbmn...rDzXzzvzpRy64N0o"
} }
Servers SHOULD NOT respond to GET requests for registration resources Servers SHOULD NOT respond to GET requests for account resources as
as these requests are not authenticated. If a client wishes to query these requests are not authenticated. If a client wishes to query
the server for information about its account (e.g., to examine the the server for information about its account (e.g., to examine the
"contact" or "certificates" fields), then it SHOULD do so by sending "contact" or "certificates" fields), then it SHOULD do so by sending
a POST request with an empty update. That is, it should send a JWS a POST request with an empty update. That is, it should send a JWS
whose payload is trivial ({}). whose payload is trivial ({}).
6.3.1. Changes of Terms of Service 6.3.1. 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 "terms-of-service-agreed" field in terms of service by setting the "terms-of-service-agreed" field in
its registration object to "true". its 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:agreementRequired". 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 with link relation "terms-of-service" and the
latest terms-of-service URL. 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: IXVHDyxIRGcTE0VSblhPzw
Content-Type: application/problem+json Content-Type: application/problem+json
Content-Language: en Content-Language: en
{ {
"type": "urn:ietf:params:acme:error:agreementRequired" "type": "urn:ietf:params:acme:error:userActionRequired",
"detail": "Terms of service have changed" "detail": "Terms of service have changed",
"instance": "http://example.com/agreement/?token=W8Ih3PswD-8" "instance": "http://example.com/agreement/?token=W8Ih3PswD-8"
} }
6.3.2. Account Key Roll-over 6.3.2. External Account Binding
The server MAY require a value to be present for the "external-
account-binding" field. This can be used to an ACME account with an
existing account in a non-ACME system, such as a CA customer
database.
To enable ACME account binding, a CA needs to provision the ACME
client with a MAC key and a key identifier. The key identifier MUST
be an ASCII string. The MAC key SHOULD be provided in base64url-
encoded form, to maximize compatibility between provisioning systems
and ACME clients.
The ACME client then computes a binding JWS to indicate the external
account's approval of the ACME account key. The payload of this JWS
is the account key being registered, in JWK form. The protected
header of the JWS MUST meet the following criteria:
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 "nonce" field MUST NOT be present
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
with the MAC key provided by the CA.
POST /acme/new-reg HTTP/1.1
Host: example.com
Content-Type: application/jose+json
{
"protected": base64url({
"alg": "ES256",
"jwk": /* account key */,
"nonce": "K60BWPrMQG9SDxBDS_xtSw",
"url": "https://example.com/acme/new-account"
}),
"payload": base64url({
"contact": ["mailto:example@anonymous.invalid"],
"terms-of-service-agreed": true,
"external-account-binding": {
"protected": base64url({
"alg": "HS256",
"kid": /* key identifier from CA */,
"url": "https://example.com/acme/new-account"
}),
"payload": base64url(/* same as in "jwk" above */),
"signature": /* MAC using MAC key from CA */
}
}),
"signature": "5TWiqIYQfIDfALQv...x9C2mg8JGPxl5bI4"
}
When a CA receives a new-account request containing an "external-
account-binding" field, it must decide whether or not to verify the
binding. If the CA does not verify the binding, then it MUST NOT
reflect the "external-account-binding" field in the resulting account
object (if any). To verify the account binding, the CA MUST take the
following steps:
1. Verify that the value of the field is a well-formed JWS
2. Verify that the JWS protected meets the above criteria
3. Retrieve the MAC key corresponding to the key identifier in the
"kid" field
4. Verify that the MAC on the JWS verifies using that MAC key
5. Verify that the payload of the JWS represents the same key as was
used to verify the outer JWS (i.e., the "jwk" field of the outer
JWS)
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
account corresponding to the MAC key, and MUST reflect value of the
"external-account-binding" field in the resulting account object. If
any of these checks fail, then the CA MUST reject the new-
registration request.
6.3.3. Account Key Roll-over
A client may wish to change the public key that is associated with a A client may wish to change the public key that is associated with a
registration 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 first To change the key associated with an account, the client first
constructs a key-change object describing the change that it would constructs a key-change object describing the change that it would
like the server to make: like the server to make:
account (required, string): The URL for account being modified. The account (required, string): The URL for account being modified. The
content of this field MUST be the exact string provided in the content of this field MUST be the exact string provided in the
Location header field in response to the new-registration request Location header field in response to the new-account request that
that created the account. created the account.
newKey (required, JWK): The JWK representation of the new key newKey (required, JWK): The JWK representation of the new key
The client then encapsulates the key-change object in a JWS, signed The client then encapsulates the key-change object in a JWS, signed
with the requested new account key (i.e., the key matching the with the requested new account key (i.e., the key matching the
"newKey" value). "newKey" value).
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 5.2). The inner JWS MUST meet the normal requirements, with Section 5.2). The inner JWS MUST meet the normal requirements, with
the following exceptions: the following exceptions:
skipping to change at page 30, line 20 skipping to change at page 31, line 20
"protected": base64url({ "protected": base64url({
"alg": "ES256", "alg": "ES256",
"jwk": /* old key */, "jwk": /* old key */,
"nonce": "K60BWPrMQG9SDxBDS_xtSw", "nonce": "K60BWPrMQG9SDxBDS_xtSw",
"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"
}), }),
"payload": base64url({ "payload": base64url({
"account": "https://example.com/acme/reg/asdf", "account": "https://example.com/acme/acct/1",
"newKey": /* new key */ "newKey": /* new key */
}) }),
"signature": "Xe8B94RD30Azj2ea...8BmZIRtcSKPSd8gU" "signature": "Xe8B94RD30Azj2ea...8BmZIRtcSKPSd8gU"
}), }),
"signature": "5TWiqIYQfIDfALQv...x9C2mg8JGPxl5bI4" "signature": "5TWiqIYQfIDfALQv...x9C2mg8JGPxl5bI4"
} }
On receiving key-change request, the server MUST perform the On receiving key-change request, the server MUST perform the
following steps in addition to the typical JWS validation: following steps in addition to the typical JWS validation:
1. Validate the POST request belongs to a currently active account, 1. Validate the POST request belongs to a currently active account,
as described in Message Transport. as described in Message Transport.
skipping to change at page 30, line 52 skipping to change at page 32, line 6
4. Check that the inner JWS verifies using the key in its "jwk" 4. Check that the inner JWS verifies using the key in its "jwk"
field field
5. Check that the payload of the inner JWS is a well-formed key- 5. Check that the payload of the inner JWS is a well-formed key-
change object (as described above) change object (as described above)
6. Check that the "url" parameters of the inner and outer JWSs are 6. Check that the "url" parameters of the inner and outer JWSs are
the same the same
7. Check that the "account" field of the key-change object contains 7. Check that the "account" field of the key-change object contains
the URL for the registration matching the old key the URL for the account matching the old key
8. Check that the "newKey" field of the key-change object contains 8. Check that the "newKey" field of the key-change object contains
the key used to sign the inner JWS. the key used to sign the inner JWS.
If all of these checks pass, then the server updates the If all of these checks pass, then the server updates the
corresponding registration by replacing the old account key with the corresponding account by replacing the old account key with the new
new public key and returns status code 200. Otherwise, the server public key and returns status code 200. Otherwise, the server
responds with an error status code and a problem document describing responds with an error status code and a problem document describing
the error. the error.
6.3.3. Account deactivation 6.3.4. Account deactivation
A client may deactivate an account by posting a signed update to the A client may deactivate an account by posting a signed update to the
server with a status field of "deactivated." Clients may wish to do server with a status field of "deactivated." Clients may wish to do
this when the account key is compromised. this when the account key is compromised.
POST /acme/reg/asdf 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/reg/asdf", "kid": "https://example.com/acme/acct/1",
"nonce": "ntuJWWSic4WVNSqeUmshgg", "nonce": "ntuJWWSic4WVNSqeUmshgg",
"url": "https://example.com/acme/reg/asdf" "url": "https://example.com/acme/acct/1"
}) }),
"payload": base64url({ "payload": base64url({
"status": "deactivated" "status": "deactivated"
}), }),
"signature": "earzVLd3m5M4xJzR...bVTqn7R08AKOVf3Y" "signature": "earzVLd3m5M4xJzR...bVTqn7R08AKOVf3Y"
} }
The server MUST verify that the request is signed by the account key. The server MUST verify that the request is signed by the account key.
If the server accepts the deactivation request, it should reply with If the server accepts the deactivation request, it should reply with
a 200 (OK) status code and the current contents of the registration a 200 (OK) status code and the current contents of the account
object. object.
Once an account is deactivated, the server MUST NOT accept further Once an account is deactivated, the server MUST NOT accept further
requests authorized by that account's key. It is up to server policy requests authorized by that account's key. It is up to server policy
how long to retain data related to that account, whether to revoke how long to retain data related to that account, whether to revoke
certificates issued by that account, and whether to send email to certificates issued by that account, and whether to send email to
that account's contacts. ACME does not provide a way to reactivate a that account's contacts. ACME does not provide a way to reactivate a
deactivated account. deactivated account.
6.4. Applying for Certificate Issuance 6.4. Applying for Certificate Issuance
The holder of an account key pair may use ACME to submit an A client may use ACME to submit an order for a certificate to be
application for a certificate to be issued. The client makes this issued. The client makes this request by sending a POST request to
request by sending a POST request to the server's new-application the server's new-order resource. The body of the POST is a JWS
resource. The body of the POST is a JWS object whose JSON payload is object whose JSON payload is a subset of the order object defined in
a subset of the application object defined in Section 6.1.3, Section 6.1.3, containing the fields that describe the certificate to
containing the fields that describe the certificate to be issued: be issued:
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: This field base64url-encoded version of the DER format. (Note: Because this
uses the same modified Base64 encoding rules used elsewhere in field uses base64url, and does not include headers, it is
this document, so it is different from PEM.) different from PEM.)
notBefore (optional, string): The requested value of the notBefore notBefore (optional, string): The requested value of the notBefore
field in the certificate, in the date format defined in [RFC3339] field in the certificate, in the date format defined in [RFC3339]
notAfter (optional, string): The requested value of the notAfter notAfter (optional, string): The requested value of the notAfter
field in the certificate, in the date format defined in [RFC3339] field in the certificate, in the date format defined in [RFC3339]
POST /acme/new-app HTTP/1.1 POST /acme/new-order 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/reg/asdf", "kid": "https://example.com/acme/acct/1",
"nonce": "5XJ1L3lEkMG7tR6pA00clA", "nonce": "5XJ1L3lEkMG7tR6pA00clA",
"url": "https://example.com/acme/new-app" "url": "https://example.com/acme/new-order"
}) }),
"payload": base64url({ "payload": base64url({
"csr": "5jNudRx6Ye4HzKEqT5...FS6aKdZeGsysoCo4H9P", "csr": "5jNudRx6Ye4HzKEqT5...FS6aKdZeGsysoCo4H9P",
"notBefore": "2016-01-01T00:00:00Z", "notBefore": "2016-01-01T00:00:00Z",
"notAfter": "2016-01-08T00:00:00Z" "notAfter": "2016-01-08T00:00:00Z"
}), }),
"signature": "H6ZXtGjTZyUnPeKn...wEA4TklBdh3e454g" "signature": "H6ZXtGjTZyUnPeKn...wEA4TklBdh3e454g"
} }
The CSR encodes the client's requests with regard to the content of The CSR encodes the client's requests with regard to the content of
the certificate to be issued. The CSR MUST indicate the requested the certificate to be issued. The CSR MUST indicate the requested
skipping to change at page 33, line 10 skipping to change at page 34, line 10
requesting a subjectAltName extension. requesting a subjectAltName extension.
The server MUST return an error if it cannot fulfil the request as The server MUST return an error if it cannot fulfil 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 code and description. appropriate error code and description.
If the server is willing to issue the requested certificate, it If the server is willing to issue the requested certificate, it
responds with a 201 (Created) response. The body of this response is responds with a 201 (Created) response. The body of this response is
an application object reflecting the client's request and any an order object reflecting the client's request and any
requirements the client must fulfill before the certificate will be authorizations the client must complete before the certificate will
issued. be issued.
HTTP/1.1 201 Created HTTP/1.1 201 Created
Replay-Nonce: MYAuvOpaoIiywTezizk5vw Replay-Nonce: MYAuvOpaoIiywTezizk5vw
Location: https://example.com/acme/app/asdf Location: https://example.com/acme/order/asdf
{ {
"status": "pending", "status": "pending",
"expires": "2015-03-01T14:09:00Z", "expires": "2016-01-01T00:00:00Z",
"csr": "jcRf4uXra7FGYW5ZMewvV...rhlnznwy8YbpMGqwidEXfE", "csr": "jcRf4uXra7FGYW5ZMewvV...rhlnznwy8YbpMGqwidEXfE",
"notBefore": "2016-01-01T00:00:00Z", "notBefore": "2016-01-01T00:00:00Z",
"notAfter": "2016-01-08T00:00:00Z", "notAfter": "2016-01-08T00:00:00Z",
"requirements": [ "authorizations": [
{ "https://example.com/acme/authz/1234",
"type": "authorization", "https://example.com/acme/authz/2345"
"status": "valid",
"url": "https://example.com/acme/authz/1234"
},
{
"type": "out-of-band",
"status": "pending",
"url": "https://example.com/acme/payment/1234"
}
] ]
} }
The application object returned by the server represents a promise The order object returned by the server represents a promise that if
that if the client fulfills the server's requirements before the the client fulfills the server's requirements before the "expires"
"expires" time, then the server will issue the requested certificate. time, then the server will issue the requested certificate. In the
In the application object, any object in the "requirements" array order object, any authorization referenced in the "authorizations"
whose status is "pending" represents an action that the client must array whose status is "pending" represents an authorization
perform before the server will issue the certificate. If the client transaction that the client must complete before the server will
fails to complete the required actions before the "expires" time, issue the certificate (see Section 6.5). If the client fails to
then the server SHOULD change the status of the application to complete the required actions before the "expires" time, then the
"invalid" and MAY delete the application resource. server SHOULD change the status of the order to "invalid" and MAY
delete the order resource.
The server MUST issue the requested certificate and update the The server MUST issue the requested certificate and update the order
application resource with a URL for the certificate as soon as the resource with a URL for the certificate shortly after the client has
client has fulfilled the server's requirements. If the client has fulfilled the server's requirements. If the client has already
already satisfied the server's requirements at the time of this satisfied the server's requirements at the time of this request
request (e.g., by obtaining authorization for all of the identifiers (e.g., by obtaining authorization for all of the identifiers in the
in the certificate in previous transactions), then the server MUST certificate in previous transactions), then the server MUST
proactively issue the requested certificate and provide a URL for it proactively issue the requested certificate and provide a URL for it
in the "certificate" field of the application. The server MUST, in the "certificate" field of the order. The server MUST, however,
however, still list the satisfied requirements in the "requirements" still list the completed authorizations in the "authorizations"
array, with the state "valid". array.
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 GET request to the application resource to obtain it should send a GET request to the order resource to obtain its
its current state. The status of the application will indicate what current state. The status of the order will indicate what action the
action the client should take: client should take:
o "invalid": The certificate will not be issued. Consider this o "invalid": The certificate will not be issued. Consider this
application 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 "requirements" array for fulfilled the requirements. Check the "authorizations" array for
requirements that are still pending. entries that are still pending.
o "processing": The server agrees that the requirements have been o "processing": The server agrees that the requirements have been
fulfilled, and is in the process of generating the certificate. fulfilled, and is in the process of generating the certificate.
Retry after the time given in the "Retry-After" header field of Retry after the time given in the "Retry-After" header field of
the 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 application. Download the URL to the "certificate" field of the order. Download the
certificate. certificate.
6.4.1. Pre-Authorization 6.4.1. Pre-Authorization
The application process described above presumes that authorization The order process described above presumes that authorization objects
objects are created reactively, in response to an application for are created reactively, in response to a certificate order. Some
issuance. Some servers may also wish to enable clients to obtain servers may also wish to enable clients to obtain authorization for
authorization for an identifier proactively, outside of the context an identifier proactively, outside of the context of a specific
of a specific issuance. For example, a client hosting virtual issuance. For example, a client hosting virtual servers for a
servers for a collection of names might wish to obtain authorization collection of names might wish to obtain authorization before any
before any servers are created, and only create a certificate when a servers are created, and only create a certificate when a server
server starts up. starts up.
In some cases, a CA running an ACME server might have a completely In some cases, a CA running an ACME server might have a completely
external, non-ACME process for authorizing a client to issue for an external, non-ACME process for authorizing a client to issue for an
identifier. In these case, the CA should provision its ACME server identifier. In these case, the CA should provision its ACME server
with authorization objects corresponding to thsee authorizations and with authorization objects corresponding to these authorizations and
reflect them as alread-valid requirements in any issuance reflect them as already valid in any orders submitted by the client.
applications requested by the client.
If a CA wishes to allow pre-authorization within ACME, it can offer a If a CA wishes to allow pre-authorization within ACME, it can offer a
"new authorization" resource in its directory by adding the key "new- "new authorization" resource in its directory by adding the key "new-
authz" with a URL for the new authorization resource. authz" 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 and how the server should for which authorization is being requested and how the server should
behave with respect to existing authorizations for this identifier. behave with respect to existing authorizations for this identifier.
skipping to change at page 35, line 34 skipping to change at page 36, line 27
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",
"jwk": {...}, "jwk": {...},
"nonce": "uQpSjlRb4vQVCjVYAyyUWg", "nonce": "uQpSjlRb4vQVCjVYAyyUWg",
"url": "https://example.com/acme/new-authz" "url": "https://example.com/acme/new-authz"
}) }),
"payload": base64url({ "payload": base64url({
"identifier": { "identifier": {
"type": "dns", "type": "dns",
"value": "example.net" "value": "example.net"
}, },
"existing": "accept" "existing": "accept"
}), }),
"signature": "nuSDISbWG8mMgE7H...QyVUL68yzf3Zawps" "signature": "nuSDISbWG8mMgE7H...QyVUL68yzf3Zawps"
} }
skipping to change at page 37, line 8 skipping to change at page 38, line 6
entity certificate in DER format. entity certificate in DER format.
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.
The server MUST also provide a link relation header field with The server MUST also provide a link relation header field with
relation "author" to indicate the application under which this relation "author" to indicate the order under which this certificate
certificate was issued. was issued.
If the CA participates in Certificate Transparency (CT) [RFC6962], If the CA participates in Certificate Transparency (CT) [RFC6962],
then they may want to provide the client with a Signed Certificate then they may want to provide the client with a Signed Certificate
Timestamp (SCT) that can be used to prove that a certificate was Timestamp (SCT) that can be used to prove that a certificate was
submitted to a CT log. An SCT can be included as an extension in the submitted to a CT log. An SCT can be included as an extension in the
certificate or as an extension to OCSP responses for the certificate. certificate or as an extension to OCSP responses for the certificate.
The server can also provide the client with direct access to an SCT The server can also provide the client with direct access to an SCT
for a certificate using a Link relation header field with relation for a certificate using a Link relation header field with relation
"ct-sct". "ct-sct".
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/pkix-cert
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/pkix-cert Content-Type: application/pkix-cert
Link: <https://example.com/acme/ca-cert>;rel="up";title="issuer" Link: <https://example.com/acme/ca-cert>;rel="up";title="issuer"
Link: <https://example.com/acme/revoke-cert>;rel="revoke" Link: <https://example.com/acme/revoke-cert>;rel="revoke"
Link: <https://example.com/acme/app/asdf>;rel="author" Link: <https://example.com/acme/order/asdf>;rel="author"
Link: <https://example.com/acme/sct/asdf>;rel="ct-sct" Link: <https://example.com/acme/sct/asdf>;rel="ct-sct"
Link: <https://example.com/acme/some-directory>;rel="directory" Link: <https://example.com/acme/some-directory>;rel="directory"
-----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 application 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 headers specifying a point in time in the
distant future. These headers have no relation to the certificate's distant future. These headers have no relation to the certificate's
period of validity. period of validity.
6.5. Identifier Authorization 6.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 must assure the server of two things: First, that the client process must assure the server of two things: First, that the client
controls the private key of the account key pair, and second, that controls the private key of the account key pair, and second, that
the client holds the identifier in question. This process may be the client controls the identifier in question. This process may be
repeated to associate multiple identifiers to a key pair (e.g., to repeated to associate multiple identifiers to a key pair (e.g., to
request certificates with multiple identifiers), or to associate request certificates with multiple identifiers), or to associate
multiple accounts with an identifier (e.g., to allow multiple multiple accounts with an identifier (e.g., to allow multiple
entities to manage certificates). The server may declare that an entities to manage certificates). The server may declare that an
authorization is only valid for a specific application by setting the authorization is only valid for a specific order by setting the
"scope" field of the authorization to the URI for that application. "scope" field of the authorization to the URI for that order.
Authorization resources are created by the server in response to Authorization resources are created by the server in response to
certificate applications or authorization requests submitted by an certificate orders or authorization requests submitted by an account
account key holder; their URLs are provided to the client in the key holder; their URLs are provided to the client in the responses to
responses to these requests. The authorization object is implicitly these requests. The authorization object is implicitly tied to the
tied to the account key used to sign the request. account key used to sign the request.
When a client receives an application from the server with an When a client receives an order from the server it downloads the
"authorization" requirement, it downloads the authorization resource authorization resource by sending a GET request to the indicated URL.
by sending a GET request to the indicated URL. If the client If the client initiates authorization using a request to the new
initiates authorization using a request to the new authorization authorization resource, it will have already recevied the pending
resource, it will have already recevied the pending authorization authorization object in the response to that request.
object in the response to that request.
GET /acme/authz/1234 HTTP/1.1 GET /acme/authz/1234 HTTP/1.1
Host: example.com Host: example.com
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="directory" Link: <https://example.com/acme/some-directory>;rel="directory"
{ {
"status": "pending", "status": "pending",
"expires": "2018-03-03T14:09:00Z",
"identifier": { "identifier": {
"type": "dns", "type": "dns",
"value": "example.org" "value": "example.org"
}, },
"challenges": [ "challenges": [
{ {
"type": "http-01", "type": "http-01",
"url": "https://example.com/authz/asdf/0", "url": "https://example.com/authz/1234/0",
"token": "IlirfxKKXAsHtmzK29Pj8A" "token": "DGyRejmCefe7v4NfDGDKfA"
},
{
"type": "tls-sni-02",
"url": "https://example.com/authz/1234/1",
"token": "DGyRejmCefe7v4NfDGDKfA"
}, },
{ {
"type": "dns-01", "type": "dns-01",
"url": "https://example.com/authz/asdf/1", "url": "https://example.com/authz/1234/2",
"token": "DGyRejmCefe7v4NfDGDKfA" "token": "DGyRejmCefe7v4NfDGDKfA"
} }
], ]
} }
6.5.1. Responding to Challenges 6.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 respond with information to complete the challenges.
To do this, the client updates the authorization object received from To do this, the client updates the authorization object received from
the server by filling in any required information in the elements of the server by filling in any required information in the elements of
the "challenges" dictionary. (This is also the stage where the the "challenges" dictionary. (This is also the stage where the
client should perform any actions required by the challenge.) client should perform any actions required by the challenge.)
skipping to change at page 40, line 12 skipping to change at page 41, line 17
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/asdf/0 HTTP/1.1 POST /acme/authz/asdf/0 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/reg/asdf", "kid": "https://example.com/acme/acct/1",
"nonce": "Q_s3MWoqT05TrdkM2MTDcw", "nonce": "Q_s3MWoqT05TrdkM2MTDcw",
"url": "https://example.com/acme/authz/asdf/0" "url": "https://example.com/acme/authz/asdf/0"
}) }),
"payload": base64url({ "payload": base64url({
"type": "http-01", "type": "http-01",
"keyAuthorization": "IlirfxKKXA...vb29HhjjLPSggwiE" "keyAuthorization": "IlirfxKKXA...vb29HhjjLPSggwiE"
}), }),
"signature": "9cbg5JO1Gf5YLjjz...SpkUfcdPai9uVYYQ" "signature": "9cbg5JO1Gf5YLjjz...SpkUfcdPai9uVYYQ"
} }
The server updates the authorization document by updating its The server updates the authorization document by updating its
representation of the challenge with the response fields provided by representation of the challenge with the response fields provided by
the client. The server MUST ignore any fields in the response object the client. The server MUST ignore any fields in the response object
skipping to change at page 40, line 41 skipping to change at page 41, line 46
provide the server with appropriate information to validate the provide the server with appropriate information to validate the
challenge, then the server MUST return an HTTP error. On receiving challenge, then the server MUST return an HTTP error. On receiving
such an error, the client SHOULD undo any actions that have been such an error, the client SHOULD undo any actions that have been
taken to fulfill the challenge, e.g., removing files that have been taken to fulfill the challenge, e.g., removing files that have been
provisioned to a web server. provisioned to a web server.
The server is said to "finalize" the authorization when it has The server is said to "finalize" the authorization when it has
completed one of the validations, by assigning the authorization a completed one of the validations, by assigning the authorization a
status of "valid" or "invalid", corresponding to whether it considers status of "valid" or "invalid", corresponding to whether it considers
the account authorized for the identifier. If the final state is the account authorized for the identifier. If the final state is
"valid", the server MUST add an "expires" field to the authorization. "valid", then the server MUST include an "expires" field. When
When finalizing an authorization, the server MAY remove challenges finalizing an authorization, the server MAY remove challenges other
other than the one that was completed. The server SHOULD NOT remove than the one that was completed, and may modify the "expires" field.
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 GET
request to the authorization URI, and the server responds with the request to the authorization URI, and the server responds with the
skipping to change at page 41, line 19 skipping to change at page 42, line 26
(Accepted) response, and MAY include a Retry-After header field to (Accepted) response, and MAY include a Retry-After header field to
suggest a polling interval to the client. suggest a polling interval to the client.
GET /acme/authz/asdf HTTP/1.1 GET /acme/authz/asdf HTTP/1.1
Host: example.com Host: example.com
HTTP/1.1 200 OK HTTP/1.1 200 OK
{ {
"status": "valid", "status": "valid",
"expires": "2015-03-01T14:09:00Z", "expires": "2018-09-09T14:09:00Z",
"identifier": { "identifier": {
"type": "dns", "type": "dns",
"value": "example.org" "value": "example.org"
}, },
"challenges": [ "challenges": [
{ {
"type": "http-01" "type": "http-01"
"url": "https://example.com/authz/asdf/0",
"status": "valid", "status": "valid",
"validated": "2014-12-01T12:05:00Z", "validated": "2014-12-01T12:05:00Z",
"token": "IlirfxKKXAsHtmzK29Pj8A", "token": "IlirfxKKXAsHtmzK29Pj8A",
"keyAuthorization": "IlirfxKKXA...vb29HhjjLPSggwiE" "keyAuthorization": "IlirfxKKXA...vb29HhjjLPSggwiE"
} }
] ]
} }
6.5.2. Deactivating an Authorization 6.5.2. Deactivating an Authorization
skipping to change at page 42, line 12 skipping to change at page 43, line 12
sending a POST request with the static object {"status": sending a POST request with the static object {"status":
"deactivated"}. "deactivated"}.
POST /acme/authz/asdf HTTP/1.1 POST /acme/authz/asdf 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/reg/asdf", "kid": "https://example.com/acme/acct/1",
"nonce": "xWCM9lGbIyCgue8di6ueWQ", "nonce": "xWCM9lGbIyCgue8di6ueWQ",
"url": "https://example.com/acme/authz/asdf" "url": "https://example.com/acme/authz/asdf"
}) }),
"payload": base64url({ "payload": base64url({
"status": "deactivated" "status": "deactivated"
}), }),
"signature": "srX9Ji7Le9bjszhu...WTFdtujObzMtZcx4" "signature": "srX9Ji7Le9bjszhu...WTFdtujObzMtZcx4"
} }
The server MUST verify that the request is signed by the account key The server MUST verify that the request is signed by the account key
corresponding to the account that owns the authorization. If the corresponding to the account that owns the authorization. If the
server accepts the deactivation, it should reply with a 200 (OK) server accepts the deactivation, it should reply with a 200 (OK)
status code and the current contents of the authorization object. status code and the current contents of the authorization object.
skipping to change at page 42, line 38 skipping to change at page 43, line 38
sufficient for issuing certificates. sufficient for issuing certificates.
6.6. Certificate Revocation 6.6. Certificate Revocation
To request that a certificate be revoked, the client sends a POST To request that a certificate be revoked, the client sends a POST
request to the ACME server's revoke-cert URI. The body of the POST request to the ACME server's revoke-cert URI. The body of the POST
is a JWS object whose JSON payload contains the certificate to be is a JWS object whose JSON payload contains the certificate to be
revoked: revoked:
certificate (required, string): The certificate to be revoked, in certificate (required, string): The certificate to be revoked, in
the base64url-encoded version of the DER format. (Note: This the base64url-encoded version of the DER format. (Note: Because
field uses the same modified Base64 encoding rules used elsewhere this field uses base64url, and does not include headers, it is
in this document, so it is different from PEM.) different from PEM.)
reason (optional, int): One of the revocation reasonCodes defined in reason (optional, int): One of the revocation reasonCodes defined in
RFC 5280 [RFC5280] Section 5.3.1 to be used when generating OCSP [RFC5280] Section 5.3.1 to be used when generating OCSP responses
responses and CRLs. If this field is not set the server SHOULD and CRLs. If this field is not set the server SHOULD use the
use the unspecified (0) reasonCode value when generating OCSP unspecified (0) reasonCode value when generating OCSP responses
responses and CRLs. The server MAY disallow a subset of and CRLs. The server MAY disallow a subset of reasonCodes from
reasonCodes from being used by the user. being used by the user.
POST /acme/revoke-cert HTTP/1.1 POST /acme/revoke-cert 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/reg/asdf", // OR "jwk" "kid": "https://example.com/acme/acct/1", // OR "jwk"
"nonce": "JHb54aT_KTXBWQOzGYkt9A", "nonce": "JHb54aT_KTXBWQOzGYkt9A",
"url": "https://example.com/acme/revoke-cert" "url": "https://example.com/acme/revoke-cert"
}) }),
"payload": base64url({ "payload": base64url({
"certificate": "MIIEDTCCAvegAwIBAgIRAP8...", "certificate": "MIIEDTCCAvegAwIBAgIRAP8...",
"reason": 1 "reason": 1
}), }),
"signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4" "signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4"
} }
Revocation requests are different from other ACME request in that Revocation requests are different from other ACME request in that
they can be signed either with an account key pair or the key pair in they can be signed either with an account key pair or the key pair in
the certificate. Before revoking a certificate, the server MUST the certificate. Before revoking a certificate, the server MUST
verify that the key used to sign the request is authorized to revoke verify that the key used to sign the request is authorized to revoke
the certificate. The server SHOULD consider at least the following the certificate. The server SHOULD consider at least the following
keys authorized for a given certificate: accounts authorized for a given certificate:
o the public key in the certificate. o the account that issued the certificate.
o an account key that is authorized to act for all of the o an account that holds authorizations for all of the identifiers in
identifier(s) in the certificate. the certificate.
The server SHOULD also consider a revocation request valid if it is
signed with the private key corresponding to the public key in the
certificate.
If the revocation succeeds, the server responds with status code 200 If the revocation succeeds, the server responds with status code 200
(OK). If the revocation fails, the server returns an error. (OK). If the revocation fails, the server returns an error.
HTTP/1.1 200 OK HTTP/1.1 200 OK
Replay-Nonce: IXVHDyxIRGcTE0VSblhPzw Replay-Nonce: IXVHDyxIRGcTE0VSblhPzw
Content-Length: 0 Content-Length: 0
--- or --- --- or ---
HTTP/1.1 403 Forbidden HTTP/1.1 403 Forbidden
Replay-Nonce: IXVHDyxIRGcTE0VSblhPzw Replay-Nonce: IXVHDyxIRGcTE0VSblhPzw
Content-Type: application/problem+json Content-Type: application/problem+json
Content-Language: en Content-Language: en
{ {
"type": "urn:ietf:params:acme:error:unauthorized" "type": "urn:ietf:params:acme:error:unauthorized",
"detail": "No authorization provided for name example.net" "detail": "No authorization provided for name example.net",
"instance": "http://example.com/doc/unauthorized" "instance": "http://example.com/doc/unauthorized"
} }
7. Identifier Validation Challenges 7. Identifier Validation Challenges
There are few types of identifiers in the world for which there is a There are few types of identifiers in the world for which there is a
standardized mechanism to prove possession of a given identifier. In standardized mechanism to prove possession of a given identifier. In
all practical cases, CAs rely on a variety of means to test whether all practical cases, CAs rely on a variety of means to test whether
an entity applying for a certificate with a given identifier actually an entity applying for a certificate with a given identifier actually
controls that identifier. controls that identifier.
Challenges provide the server with assurance that an account key Challenges provide the server with assurance that an account holder
holder is also the entity that controls an identifier. For each type is also the entity that controls an identifier. For each type of
of challenge, it must be the case that in order for an entity to challenge, it must be the case that in order for an entity to
successfully complete the challenge the entity must both: successfully complete the challenge the entity must both:
o Hold the private key of the account key pair used to respond to o Hold the private key of the account key pair used to respond to
the challenge the challenge
o Control the identifier in question o Control the identifier in question
Section 9 documents how the challenges defined in this document meet Section 9 documents how the challenges defined in this document meet
these requirements. New challenges will need to document how they these requirements. New challenges will need to document how they
do. do.
skipping to change at page 45, line 37 skipping to change at page 46, line 37
error (optional, dictionary of string): The error that occurred error (optional, dictionary of string): The error that occurred
while the server was validating the challenge, if any. This field while the server was validating the challenge, if any. This field
is structured as a problem document [RFC7807]. is structured as a problem document [RFC7807].
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 they failed include the "error" field to help the client diagnose why they failed
the challenge. the challenge.
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
and TLS SNI, the client directly proves its ability to do certain HTTP, TLS SNI, and DNS, the client directly proves its ability to do
things related to the identifier. The choice of which challenges to certain things related to the identifier. The choice of which
offer to a client under which circumstances is a matter of server challenges to offer to a client under which circumstances is a matter
policy. of server policy.
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 identifier, there will need to be future to support other types of identifier, 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.
[[ Editor's Note: In pre-RFC versions of this specification, [[ Editor's Note: In pre-RFC versions of this specification,
challenges are labeled by type, and with the version of the draft in challenges are labeled by type, and with the version of the draft in
which they were introduced. For example, if an HTTP challenge were which they were introduced. For example, if an HTTP challenge were
skipping to change at page 46, line 21 skipping to change at page 47, line 21
authorization string. A key authorization is a string that expresses authorization string. A key authorization is a string that expresses
a domain holder's authorization for a specified key to satisfy a a domain holder's authorization for a specified key to satisfy a
specified challenge, by concatenating the token for the challenge specified challenge, by concatenating the token for the challenge
with a key fingerprint, separated by a "." character: with a key fingerprint, separated by a "." character:
key-authz = token || '.' || base64url(JWK\_Thumbprint(accountKey)) key-authz = token || '.' || base64url(JWK\_Thumbprint(accountKey))
The "JWK_Thumbprint" step indicates the computation specified in The "JWK_Thumbprint" step indicates the computation specified in
[RFC7638], using the SHA-256 digest. As specified in the individual [RFC7638], using the SHA-256 digest. As specified in the individual
challenges below, the token for a challenge is a JSON string challenges below, the token for a challenge is a JSON string
comprised entirely of characters in the URL-safe Base64 alphabet. comprised entirely of characters in the URL-safe base64 alphabet.
The "||" operator indicates concatenation of strings. The "||" operator indicates concatenation of strings.
In computations involving key authorizations, such as the digest In computations involving key authorizations, such as the digest
computations required for the DNS and TLS SNI challenges, the key computations required for the DNS and TLS SNI challenges, the key
authorization string MUST be represented in UTF-8 form (or, authorization string MUST be represented in UTF-8 form (or,
equivalently, ASCII). equivalently, ASCII).
An example of how to compute a JWK thumbprint can be found in An example of how to compute a JWK thumbprint can be found in
Section 3.1 of [RFC7638]. Note that some cryptographic libraries Section 3.1 of [RFC7638]. Note that some cryptographic libraries
prepend a zero octet to the representation of the RSA public key prepend a zero octet to the representation of the RSA public key
skipping to change at page 47, line 10 skipping to change at page 48, line 10
records, at its discretion. Because many webservers allocate a records, at its discretion. Because many webservers allocate a
default HTTPS virtual host to a particular low-privilege tenant user default HTTPS virtual host to a particular low-privilege tenant user
in a subtle and non-intuitive manner, the challenge must be completed in a subtle and non-intuitive manner, the challenge must be completed
over HTTP, not HTTPS. 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,
in order to prevent an attacker from guessing it. It MUST NOT in order to prevent an attacker from guessing it. It MUST NOT
contain any characters outside the URL-safe Base64 alphabet and contain any characters outside the base64url alphabet and MUST NOT
MUST NOT contain any padding characters ("="). contain any padding characters ("=").
GET /acme/authz/1234/0 HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
{ {
"type": "http-01", "type": "http-01",
"url": "https://example.com/acme/authz/0",
"status": "pending",
"token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA" "token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA"
} }
A client responds to this challenge by constructing a key A client responds to this challenge by constructing a key
authorization from the "token" value provided in the challenge and authorization from the "token" value provided in the challenge and
the client's account key. The client then provisions the key the client's account key. The client then provisions the key
authorization as a resource on the HTTP server for the domain in authorization as a resource on the HTTP server for the domain in
question. 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
skipping to change at page 47, line 39 skipping to change at page 49, line 5
.well-known/acme-challenge/evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA .well-known/acme-challenge/evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA
The client's response to this challenge indicates its agreement to The client's response to this challenge indicates its agreement to
this challenge by sending the server the key authorization covering this challenge by sending the server the key authorization covering
the challenge's token and the client's account key. the challenge's token and the client's account key.
keyAuthorization (required, string): The key authorization for this keyAuthorization (required, string): The key authorization for this
challenge. This value MUST match the token from the challenge and challenge. This value MUST match the token from the challenge and
the client's account key. the client's account key.
/* BEGIN JWS-signed content */ POST /acme/authz/1234/0
Host: example.com
Content-Type: application/jose+json
{ {
"keyAuthorization": "evaGxfADs...62jcerQ" "protected": base64url({
"alg": "ES256",
"kid": "https://example.com/acme/acct/1",
"nonce": "JHb54aT_KTXBWQOzGYkt9A",
"url": "https://example.com/acme/authz/1234/0"
}),
"payload": base64url({
"keyAuthorization": "evaGxfADs...62jcerQ"
}),
"signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4"
} }
/* END JWS-signed content */
On receiving a response, the server MUST verify that the key On receiving a response, the server MUST verify that the key
authorization in the response matches the "token" value in the authorization in the response matches the "token" value in the
challenge and the client's account key. If they do not match, then challenge and the client's account key. If they do not match, then
the server MUST return an HTTP error in response to the POST request the server MUST return an HTTP error in response to the POST request
in which the client sent the challenge. in which the client sent the challenge.
Given a challenge/response pair, the server verifies the client's Given a challenge/response pair, the server verifies the client's
control of the domain by verifying that the resource was provisioned control of the domain by verifying that the resource was provisioned
as expected. as expected.
skipping to change at page 48, line 47 skipping to change at page 50, line 24
domain name to respond to specific connection attempts utilizing the domain name to respond to specific connection attempts utilizing the
Server Name Indication extension [RFC6066]. The server verifies the Server Name Indication extension [RFC6066]. The server verifies the
client's challenge by accessing the reconfigured server and verifying client's challenge by accessing the reconfigured server and verifying
a particular challenge certificate is presented. a particular challenge certificate is presented.
type (required, string): The string "tls-sni-02" type (required, string): The string "tls-sni-02"
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,
in order to prevent an attacker from guessing it. It MUST NOT in order to prevent an attacker from guessing it. It MUST NOT
contain any characters outside the URL-safe Base64 alphabet and contain any characters outside the base64url alphabet and MUST NOT
MUST NOT contain any padding characters ("="). contain any padding characters ("=").
GET /acme/authz/1234/1 HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
{ {
"type": "tls-sni-02", "type": "tls-sni-02",
"url": "https://example.com/acme/authz/1234/1",
"status": "pending",
"token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA" "token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA"
} }
A client responds to this challenge by constructing a self-signed A client responds to this challenge by constructing a self-signed
certificate which the client MUST provision at the domain name certificate which the client MUST provision at the domain name
concerned in order to pass the challenge. concerned in order to pass the challenge.
The certificate may be constructed arbitrarily, except that each The certificate may be constructed arbitrarily, except that each
certificate MUST have exactly two subjectAlternativeNames, SAN A and certificate MUST have exactly two subjectAlternativeNames, SAN A and
SAN B. Both MUST be dNSNames. SAN B. Both MUST be dNSNames.
skipping to change at page 49, line 40 skipping to change at page 51, line 21
The client MUST ensure that the certificate is served to TLS The client MUST ensure that the certificate is served to TLS
connections specifying a Server Name Indication (SNI) value of SAN A. connections specifying a Server Name Indication (SNI) value of SAN A.
The response to the TLS-SNI challenge simply acknowledges that the The response to the TLS-SNI challenge simply acknowledges that the
client is ready to fulfill this challenge. client is ready to fulfill this challenge.
keyAuthorization (required, string): The key authorization for this keyAuthorization (required, string): The key authorization for this
challenge. This value MUST match the token from the challenge and challenge. This value MUST match the token from the challenge and
the client's account key. the client's account key.
/* BEGIN JWS-signed content */ POST /acme/authz/1234/1
Host: example.com
Content-Type: application/jose+json
{ {
"keyAuthorization": "evaGxfADs...62jcerQ" "protected": base64url({
"alg": "ES256",
"kid": "https://example.com/acme/acct/1",
"nonce": "JHb54aT_KTXBWQOzGYkt9A",
"url": "https://example.com/acme/authz/1234/1"
}),
"payload": base64url({
"keyAuthorization": "evaGxfADs...62jcerQ"
}),
"signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4"
} }
/* END JWS-signed content */
On receiving a response, the server MUST verify that the key On receiving a response, the server MUST verify that the key
authorization in the response matches the "token" value in the authorization in the response matches the "token" value in the
challenge and the client's account key. If they do not match, then challenge and the client's account key. If they do not match, then
the server MUST return an HTTP error in response to the POST request the server MUST return an HTTP error in response to the POST request
in which the client sent the challenge. in which the client sent the challenge.
Given a challenge/response pair, the ACME server verifies the Given a challenge/response pair, the ACME server verifies the
client's control of the domain by verifying that the TLS server was client's control of the domain by verifying that the TLS server was
configured appropriately, using these steps: configured appropriately, using these steps:
skipping to change at page 50, line 25 skipping to change at page 52, line 15
(i.e., SNI) containing SAN A. The server SHOULD ensure that it (i.e., SNI) containing SAN A. The server SHOULD ensure that it
does not reveal SAN B in any way when making the TLS connection, does not reveal SAN B in any way when making the TLS connection,
such that the presentation of SAN B in the returned certificate such that the presentation of SAN B in the returned certificate
proves association with the client. proves association with the client.
3. Verify that the certificate contains a subjectAltName extension 3. Verify that the certificate contains a subjectAltName extension
containing dNSName entries of SAN A and SAN B and no other containing dNSName entries of SAN A and SAN B and no other
entries. The comparison MUST be insensitive to case and ordering entries. The comparison MUST be insensitive to case and ordering
of names. of names.
It is RECOMMENDED that the ACME server validation TLS connections It is RECOMMENDED that the server open multiple TLS connections from
from multiple vantage points to reduce the risk of DNS hijacking various network perspectives, in order to make MitM attacks harder.
attacks.
If all of the above verifications succeed, then the validation is If all of the above verifications succeed, then the validation is
successful. Otherwise, the validation fails. successful. Otherwise, the validation fails.
7.4. DNS 7.4. DNS
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 resource record under prove control of that domain by provisioning a resource record under
it. The DNS challenge requires the client to provision a TXT record it. The DNS challenge requires the client to provision a TXT record
containing a designated value under a specific validation domain containing a designated value under a specific validation domain
name. 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,
in order to prevent an attacker from guessing it. It MUST NOT in order to prevent an attacker from guessing it. It MUST NOT
contain any characters outside the URL-safe Base64 alphabet and contain any characters outside the base64url alphabet and MUST NOT
MUST NOT contain any padding characters ("="). contain any padding characters ("=").
GET /acme/authz/1234/2 HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
{ {
"type": "dns-01", "type": "dns-01",
"url": "https://example.com/acme/authz/1234/2",
"status": "pending",
"token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA" "token": "evaGxfADs6pSRb2LAv9IZf17Dt3juxGJ-PCt92wr-oA"
} }
A client responds to this challenge by constructing a key A client responds to this challenge by constructing a key
authorization from the "token" value provided in the challenge and authorization from the "token" value provided in the challenge and
the client's account key. The client then computes the SHA-256 the client's account key. The client then computes the SHA-256
digest of the key authorization. digest of the key authorization.
The record provisioned to the DNS is the base64url encoding of this The record provisioned to the DNS is the base64url encoding of this
digest. The client constructs the validation domain name by digest. The client constructs the validation domain name by
prepending the label "_acme-challenge" to the domain name being prepending the label "_acme-challenge" to the domain name being
validated, then provisions a TXT record with the digest value under validated, then provisions a TXT record with the digest value under
that name. For example, if the domain name being validated is that name. For example, if the domain name being validated is
skipping to change at page 51, line 27 skipping to change at page 53, line 23
_acme-challenge.example.com. 300 IN TXT "gfj9Xq...Rg85nM" _acme-challenge.example.com. 300 IN TXT "gfj9Xq...Rg85nM"
The response to the DNS challenge provides the computed key The response to the DNS challenge provides the computed key
authorization to acknowledge that the client is ready to fulfill this authorization to acknowledge that the client is ready to fulfill this
challenge. challenge.
keyAuthorization (required, string): The key authorization for this keyAuthorization (required, string): The key authorization for this
challenge. This value MUST match the token from the challenge and challenge. This value MUST match the token from the challenge and
the client's account key. the client's account key.
/* BEGIN JWS-signed content */ POST /acme/authz/1234/2
Host: example.com
Content-Type: application/jose+json
{ {
"keyAuthorization": "evaGxfADs...62jcerQ" "protected": base64url({
"alg": "ES256",
"kid": "https://example.com/acme/acct/1",
"nonce": "JHb54aT_KTXBWQOzGYkt9A",
"url": "https://example.com/acme/authz/1234/2"
}),
"payload": base64url({
"keyAuthorization": "evaGxfADs...62jcerQ"
}),
"signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4"
} }
/* END JWS-signed content */
On receiving a response, the server MUST verify that the key On receiving a response, the server MUST verify that the key
authorization in the response matches the "token" value in the authorization in the response matches the "token" value in the
challenge and the client's account key. If they do not match, then challenge and the client's account key. If they do not match, then
the server MUST return an HTTP error in response to the POST request the server MUST return an HTTP error in response to the POST request
in which the client sent the challenge. in which the client sent the challenge.
To validate a DNS challenge, the server performs the following steps: To validate a DNS challenge, the server performs the following steps:
1. Compute the SHA-256 digest of the key authorization 1. Compute the SHA-256 digest of the key authorization
skipping to change at page 51, line 44 skipping to change at page 54, line 4
authorization in the response matches the "token" value in the authorization in the response matches the "token" value in the
challenge and the client's account key. If they do not match, then challenge and the client's account key. If they do not match, then
the server MUST return an HTTP error in response to the POST request the server MUST return an HTTP error in response to the POST request
in which the client sent the challenge. in which the client sent the challenge.
To validate a DNS challenge, the server performs the following steps: To validate a DNS challenge, the server performs the following steps:
1. Compute the SHA-256 digest of the key authorization 1. Compute the SHA-256 digest of the key authorization
2. Query for TXT records under the validation domain name 2. Query for TXT records under the validation domain name
3. Verify that the contents of one of the TXT records matches the 3. Verify that the contents of one of the TXT records matches the
digest value digest value
It is RECOMMENDED that the server perform multiple DNS queries from
various network perspectives, in order to make MitM attacks harder.
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.
7.5. Out-of-Band 7.5. Out-of-Band
There may be cases where a server cannot perform automated validation There may be cases where a server cannot perform automated validation
of an identifier, for example if validation requires some manual of an identifier, for example if validation requires some manual
steps. In such cases, the server may provide an "out of band" (OOB) steps. In such cases, the server may provide an "out of band" (OOB)
challenge to request that the client perform some action outside of challenge to request that the client perform some action outside of
skipping to change at page 52, line 24 skipping to change at page 54, line 33
web page to receive instructions on how to validate possession of the web page to receive instructions on how to validate possession of the
identifier, by providing a URL for that web page. identifier, by providing a URL for that web page.
type (required, string): The string "oob-01" type (required, string): The string "oob-01"
href (required, string): The URL to be visited. The scheme of this href (required, string): The URL to be visited. The scheme of this
URL MUST be "http" or "https". Note that this field is distinct URL MUST be "http" or "https". Note that this field is distinct
from the "url" field of the challenge, which identifies the from the "url" field of the challenge, which identifies the
challenge itself. challenge itself.
GET /acme/authz/1234/3 HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
{ {
"type": "oob-01", "type": "oob-01",
"href": "https://example.com/validate/evaGxfADs6pSRb2LAv9IZ" "href": "https://example.com/validate/evaGxfADs6pSRb2LAv9IZ"
} }
A client responds to this challenge by presenting the indicated URL A client responds to this challenge by presenting the indicated URL
for a human user to navigate to. If the user choses to complete this for a human user to navigate to. If the user choses to complete this
challege (by vising the website and completing its instructions), the challege (by vising the website and completing its instructions), the
client indicates this by sending a simple acknowledgement response to client indicates this by sending a simple acknowledgement response to
the server. the server.
type (required, string): The string "oob-01" type (required, string): The string "oob-01"
POST /acme/authz/1234/3
Host: example.com
Content-Type: application/jose+json
/* BEGIN JWS-signed content */
{ {
"type": "oob-01" "protected": base64url({
"alg": "ES256",
"kid": "https://example.com/acme/acct/1",
"nonce": "JHb54aT_KTXBWQOzGYkt9A",
"url": "https://example.com/acme/authz/1234/3"
}),
"payload": base64url({
"type": "oob-01"
}),
"signature": "Q1bURgJoEslbD1c5...3pYdSMLio57mQNN4"
} }
/* END JWS-signed content */
On receiving a response, the server MUST verify that the value of the On receiving a response, the server MUST verify that the value of the
"type" field is as required. Otherwise, the steps the server takes "type" field is "oob-01". Otherwise, the steps the server takes to
to validate identifier possession are determined by the server's validate identifier possession are determined by the server's local
local policy. policy.
8. IANA Considerations 8. IANA Considerations
[[ Editor's Note: Should we create a registry for tokens that go into
the various JSON objects used by this protocol, i.e., the field names
in the JSON objects? ]]
8.1. Well-Known URI for the HTTP Challenge 8.1. 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
Specification document(s): This document, Section Section 7.2 Specification document(s): This document, Section Section 7.2
skipping to change at page 54, line 24 skipping to change at page 57, line 4
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]:
Registry name: acme Registry name: acme
Specification: RFC XXXX Specification: RFC XXXX
Repository: URL-TBD Repository: URL-TBD
Index value: No transformation needed.
Index value: No transformation needed. The
[[ 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, and replace URL-TBD with the URL assigned by IANA to this document, and replace URL-TBD with the URL assigned by IANA
for registries of ACME parameters. ]] for registries of ACME parameters. ]]
8.6. New Registries 8.6. New Registries
This document requests that IANA create the following new registries: This document requests that IANA create the following new registries:
1. ACME Error Codes 1. ACME Error Codes
2. ACME Resource Types 2. ACME Resource Types
3. ACME Identifier Types 3. ACME Identifier Types
4. ACME Challenge Types 4. ACME Challenge Types
All of these registries should be administered under a Specification All of these registries should be administered under a Specification
Required policy [RFC5226]. Required policy [RFC5226].
8.6.1. Error Codes 8.6.1. Fields in Account Objects
This registry lists field names that are defined for use in ACME
account objects. Fields marked as "configurable" may be included in
a new-account request.
Template:
o Field name: The string to be used as a key in the JSON dictionary
o Field type: The type of value to be provided, e.g., string,
boolean, array of string
o Client configurable: Boolean indicating whether the server should
accept values provided by the client
o Reference: Where this field is defined
Initial contents: The fields and descriptions defined in
Section 6.1.2.
+--------------------------+-------------+--------------+-----------+
| Field Name | Field Type | Configurable | Reference |
+--------------------------+-------------+--------------+-----------+
| key | dictionary | false | RFC XXXX |
| | | | |
| status | string | false | RFC XXXX |
| | | | |
| contact | array of | true | RFC XXXX |
| | string | | |
| | | | |
| external-account-binding | dictionary | true | RFC XXXX |
| | | | |
| terms-of-service-agreed | boolean | false | RFC XXXX |
| | | | |
| orders | array of | false | RFC XXXX |
| | string | | |
+--------------------------+-------------+--------------+-----------+
8.6.2. Fields in Order Objects
This registry lists field names that are defined for use in ACME
order objects. Fields marked as "configurable" may be included in a
new-order request.
Template:
o Field name: The string to be used as a key in the JSON dictionary
o Field type: The type of value to be provided, e.g., string,
boolean, array of string
o Client configurable: Boolean indicating whether the server should
accept values provided by the client
o Reference: Where this field is defined
Initial contents: The fields and descriptions defined in
Section 6.1.3.
+----------------+-------------------+--------------+-----------+
| Field Name | Field Type | Configurable | Reference |
+----------------+-------------------+--------------+-----------+
| status | string | false | RFC XXXX |
| | | | |
| expires | string | false | RFC XXXX |
| | | | |
| csr | string | true | RFC XXXX |
| | | | |
| notBefore | string | true | RFC XXXX |
| | | | |
| notAfter | string | true | RFC XXXX |
| | | | |
| authorizations | array of string | false | RFC XXXX |
| | | | |
| certificate | string | false | RFC XXXX |
+----------------+-------------------+--------------+-----------+
8.6.3. Error Codes
This registry lists values that are used within URN values that are This registry lists values that are used within URN values that are
provided in the "type" field of problem documents in ACME. provided in the "type" field of problem documents in ACME.
Template: Template:
o Code: The label to be included in the URN for this error, o Code: The label to be included in the URN for this error,
following "urn:ietf:params:acme:" following "urn:ietf:params:acme:"
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 codes and descriptions in the table in Initial contents: The codes and descriptions in the table in
Section 5.7 above, with the Reference field set to point to this Section 5.7 above, with the Reference field set to point to this
specification. specification.
8.6.2. Resource Types 8.6.4. 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 Key: The value to be used as a dictionary key in the directory o Key: The value to be used as a dictionary key in the directory
object object
o Resource type: The type of resource labeled by the key o Resource type: The type of resource labeled by the key
skipping to change at page 55, line 27 skipping to change at page 60, line 4
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 Key: The value to be used as a dictionary key in the directory o Key: The value to be used as a dictionary key in the directory
object object
o Resource type: The type of resource labeled by the key o Resource type: The type of resource labeled by the key
o Reference: Where the identifier type is defined o Reference: Where the identifier type is defined
Initial contents: Initial contents:
+-------------+--------------------+-----------+ +-------------+--------------------+-----------+
| Key | Resource type | Reference | | Key | Resource type | Reference |
+-------------+--------------------+-----------+ +-------------+--------------------+-----------+
| new-reg | New registration | RFC XXXX | | new-account | New account | RFC XXXX |
| | | | | | | |
| new-app | New application | RFC XXXX | | new-order | New order | RFC XXXX |
| | | | | | | |
| revoke-cert | Revoke certificate | RFC XXXX | | revoke-cert | Revoke certificate | RFC XXXX |
| | | | | | | |
| key-change | Key change | RFC XXXX | | key-change | Key change | 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 ]]
8.6.3. Identifier Types 8.6.5. Identifier Types
This registry lists the types of identifiers that ACME clients may This registry lists the types of identifiers that ACME clients may
request authorization to issue in certificates. request authorization to issue in certificates.
Template: Template:
o Label: The value to be put in the "type" field of the identifier o Label: The value to be put in the "type" field of the identifier
object object
o Reference: Where the identifier type is defined o Reference: Where the identifier type is defined
skipping to change at page 56, line 21 skipping to change at page 60, line 46
+-------+-----------+ +-------+-----------+
| Label | Reference | | Label | Reference |
+-------+-----------+ +-------+-----------+
| dns | RFC XXXX | | dns | 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 ]]
8.6.4. Challenge Types 8.6.6. Challenge Types
This registry lists the ways that ACME servers can offer to validate This registry lists the ways that ACME servers can offer to validate
control of an identifier. The "Identifier Type" field in template control of an identifier. The "Identifier Type" field in template
must be contained in the Label column of the ACME Identifier Types must be contained in the Label column of the ACME Identifier Types
registry. registry.
Template: Template:
o Label: The value to be put in the "type" field of challenge o Label: The value to be put in the "type" field of challenge
objects using this validation mechanism objects using this validation mechanism
skipping to change at page 58, line 28 skipping to change at page 63, line 8
application-layer MitM addresses potential attackers such as Content application-layer MitM addresses potential attackers such as Content
Distribution Networks (CDNs) and middleboxes with a TLS MitM Distribution Networks (CDNs) and middleboxes with a TLS MitM
function. Preventing abusive use of ACME means ensuring that an function. Preventing abusive use of ACME means ensuring that an
attacker with access to the validation channel can't obtain attacker with access to the validation channel can't obtain
illegitimate authorization by acting as an ACME client (legitimately, illegitimate authorization by acting as an ACME client (legitimately,
in terms of the protocol). in terms of the protocol).
9.2. Integrity of Authorizations 9.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-application request registering an account key and sending a new-order request under that
under that account key. The integrity of the authorization process account key. The integrity of the authorization process thus depends
thus depends on the identifier validation challenges to ensure that on the identifier validation challenges to ensure that the challenge
the challenge can only be completed by someone who both (1) holds the can only be completed by someone who both (1) holds the private key
private key of the account key pair, and (2) controls the identifier of the account key pair, and (2) controls the identifier in question.
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
to avoid situations where an ACME MitM can switch out a legitimate to avoid situations where an ACME MitM can switch out a legitimate
domain holder's account key for one of his choosing, e.g.: domain holder's account key for one of his choosing, e.g.:
o Legitimate domain holder registers account key pair A o Legitimate domain holder registers account key pair A
o MitM registers account key pair B o MitM registers account key pair B
o Legitimate domain holder sends a new-application request signed o Legitimate domain holder sends a new-order request signed under
under account key A account key A
o MitM suppresses the legitimate request, but sends the same request o MitM suppresses the legitimate request, but sends the same request
signed under account key B signed under account key B
o ACME server issues challenges and MitM forwards them to the o ACME server issues challenges and MitM forwards them to the
legitimate domain holder legitimate domain holder
o Legitimate domain holder provisions the validation response o Legitimate domain holder provisions the validation response
o ACME server performs validation query and sees the response o ACME server performs validation query and sees the response
skipping to change at page 62, line 28 skipping to change at page 67, line 4
* If the leftmost label is a '*', then have the appropriate * If the leftmost label is a '*', then have the appropriate
checks been applied? checks been applied?
* Is the name on the Public Suffix List? * Is the name on the Public Suffix List?
* Is the name a high-value name? * Is the name a high-value name?
* Is the name a known phishing domain? * Is the name a known phishing domain?
o Is the key in the CSR sufficiently strong? o Is the key in the CSR sufficiently strong?
o Is the CSR signed with an acceptable algorithm? o Is the CSR signed with an acceptable algorithm?
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
keep in mind that ACME clients can automate this agreement, possibly
not involving a human user. If a CA wishes to have stronger evidence
of user consent, it may present an out-of-band requirement or
challenge to require human involvement.
10. Operational Considerations 10. 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:
10.1. DNS over TCP 10.1. DNS over TCP
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
 End of changes. 208 change blocks. 
552 lines changed or deleted 743 lines changed or added

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