RFC 8555: ACME: Managing certificates automatically
Summary
In March 2019, Richard Barnes, Jacob Hoffman-Andrews, Daniel McCarney and James Kasten standardised the ACME protocol in RFC 8555, with which software requests and renews certificates without human intervention. The authors included staff from Let's Encrypt and the EFF, and Let's Encrypt used the protocol even before standardisation. An account signs every message, and the server verifies control over a domain with challenges such as http-01 or dns-01.
From form to API
The introduction describes the old process: whoever set up an HTTPS server was typically offered a self-signed certificate. With ACME the client asks for the domain names, chooses a certificate authority and handles application, validation and installation itself.
All messages are JSON, signed as JWS with the account key. A replay nonce from the previous server response prevents intercepted requests from being replayed.
How domain validation works
With http-01, the client places a file under /.well-known/acme-challenge/ whose content consists of the token and the fingerprint of the account key. The server must fetch it over TCP port 80 but should follow redirects.
With dns-01, the SHA-256 value of this key authorisation goes into a TXT record under _acme-challenge. For wildcard certificates dns-01 is the usual route, because http-01 has no single host for all names.
Ideas
- An account with its own key signs all ACME messages.
- Orders bundle authorisations for several names.
- http-01 validates via a file on port 80.
- dns-01 validates via a TXT record under _acme-challenge.
- Nonces prevent intercepted requests from being replayed.
- Account keys can be replaced via keyChange.
Insights
- Only automatic renewal made short certificate lifetimes practical.
- An open standard prevented automation from remaining tied to a single provider.
Facts
- RFC 8555 appeared in March 2019 as a Proposed Standard.
- The authors came from Cisco, the EFF, Let's Encrypt and the University of Michigan.
- The http-01 validation must take place over TCP port 80.
- In February 2020 RFC 8737 added the tls-alpn-01 challenge.
References
- RFC 8555: Automatic Certificate Management Environment (ACME)
- RFC 8737: ACME TLS ALPN Challenge Extension (2020)
Remarks
- The tls-alpn-01 challenge from RFC 8737 works without port 80 and validates directly over TLS on port 443.
Recommendations
- Keep port 80 open for http-01 and only redirect it to HTTPS, do not block it.
- For wildcards and internal hosts, use dns-01 with narrowly scoped API keys for the DNS zone.
- Let renewal run automatically and monitor expiry dates in addition.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.