Join our Newsletter — 33% off our NHI Course
Home› Guides› ACME and Automated Certificate Management Guide: Protocol, challenges,…
Guide Non-Human Identity (NHI)

ACME and Automated Certificate Management Guide: Protocol, challenges, account keys and safe automation

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 15 min read
On this page

With public TLS certificate lifetimes falling towards 47 days, every certificate that is still renewed by a person is a scheduled outage, yet the automation that replaces those people creates new machine credentials (ACME account keys, DNS API tokens, external account binding secrets) that can mint certificates for your domains if stolen. ACME, the Automatic Certificate Management Environment protocol in RFC 8555, is how public and many private certificate authorities issue and renew certificates without human steps. This guide explains the protocol at the level an engineer needs to run it safely: the objects and state machine, the three challenge types and when to use each, account keys and external account binding, CAA account binding, ACME Renewal Information, rate limits, logging and a phased rollout. It is written for platform, PKI and site reliability engineers and for security teams that own machine identity. For the lifetime schedule and outage patterns, see the Certificate Expiry Outages and 47-Day TLS Certificates Guide; this page goes deeper on ACME itself.

Key takeaways

  • The ACME account key is a machine identity. Whoever holds it can order certificates for any name the account can validate and revoke certificates issued to it, so it needs the same storage, ownership and rotation controls as any other high-value secret.
  • The challenge type decides your attack surface. HTTP-01 trusts whoever controls port 80 on the name; DNS-01 trusts whoever holds the DNS API credential, which often has authority over the whole zone.
  • CAA can pin issuance to your account. RFC 8657 adds accounturi and validationmethods parameters so a CA should issue only to a named ACME account using named challenge types.
  • ARI turns renewal into a server-guided schedule. RFC 9773 lets the CA suggest a renewal window, which spreads load, enables mass reissuance after an incident, and at Let's Encrypt exempts ARI renewals from rate limits.
  • Automation needs monitoring of its own. Log every order, alert on issuance you did not request through Certificate Transparency, and watch renewal failures before the expiry date is near.

How the ACME protocol works

RFC 8555 (March 2019, Standards Track) defines ACME as a JSON over HTTPS protocol between a client and a CA server. Every request except fetching the directory and a fresh nonce is a JSON Web Signature (JWS) signed with the account key.

Resources and the order lifecycle

ResourcePurpose
directorySingle entry URL listing all other endpoints and metadata (for example externalAccountRequired, and renewalInfo where ARI is supported)
newNonceReturns a Replay-Nonce; each nonce is single use, and a stale one returns a badNonce error with a fresh nonce
newAccount, account, keyChangeCreate an account bound to a public key, update or deactivate it, and roll the account key
newOrder, orderRequest a certificate for a set of identifiers; tracks status pending, ready, processing, valid or invalid
authorization, challengeProof of control for each identifier; authorizations move through pending, valid, invalid, deactivated, expired or revoked
finalize, certificateSubmit the CSR once the order is ready, then download the issued chain
revokeCertRevoke a certificate, signed by the account key or by the certificate's own key
  • Request signing: the JWS uses flattened JSON serialisation with a protected header containing alg, nonce and url, plus either jwk (for newAccount and certificate-key revocation) or kid (the account URL) for everything else, never both. The algorithm must not be "none" or a MAC; servers must support ES256 and EdDSA with Ed25519 is recommended.
  • POST-as-GET: reading an order or authorization is a signed POST with an empty payload, so every read is attributable to an account. A plain GET returns 405 except for the directory and newNonce.
  • Content type: requests use application/jose+json; anything else returns 415. Proxies that rewrite content types break ACME clients in ways that look like CA outages.

Challenge types

ChallengeProofWildcardsBest forMain risk
HTTP-01File at http://<name>/.well-known/acme-challenge/<token> containing the token and account key thumbprint; port 80 only; up to 10 redirects to ports 80 or 443NoSingle web servers, CDN-hosted names, IP address certificatesAnyone who can serve content on port 80 for the name, including a hijacked route or a forgotten virtual host, can obtain a certificate
DNS-01TXT record at _acme-challenge.<name> derived from the token and account keyYesWildcards, internal names, many servers behind one name, hosts without inbound accessThe DNS API credential stored with the client; propagation delays and stale TXT records
TLS-ALPN-01Special certificate presented on port 443 for a custom ALPN protocol (RFC 8737)NoTLS-terminating reverse proxies and hosting platforms where port 80 is closedLimited client support; every server behind the name must answer consistently

DNS-01 can be delegated: a CNAME or NS record for _acme-challenge can point to a separate zone that exists only for validation. That pattern lets the ACME client hold a credential that can write only to the validation zone, rather than to the production zone.

Account keys, external account binding and CAA

Account keys

The account key is the client's identity with the CA. cert-manager describes it as "your identity with your ACME provider" and stores it as a Kubernetes Secret referenced by privateKeySecretRef. Losing it is recoverable (create a new account), but you can no longer revoke certificates issued under the old one through that account. Stealing it is worse: the holder can order certificates for any identifier the account can still validate, and revoke the legitimate certificates.

  • One account per trust boundary: separate accounts for production and non-production, and for business units or clusters with different owners. A shared account across every cluster widens the impact of a single compromised Secret.
  • Storage: keep account keys in a secrets manager or a restricted Kubernetes namespace with encryption at rest and RBAC that only the ACME controller can read. See the Kubernetes Secrets Security Guide.
  • Rotation: RFC 8555 provides a keyChange resource to roll the account key without creating a new account. Use it after staff changes or suspected exposure.

External account binding (EAB)

Commercial and private CAs often set externalAccountRequired in the directory. The client then proves possession of a MAC key and key identifier issued out of band by the CA, by wrapping the new account's public key in an inner JWS signed with that MAC key. In cert-manager this is the externalAccountBinding block with keyID and keySecretRef. The EAB MAC key is a bootstrap credential: it links an ACME account to a paid or internal CA account and its issuance policy. Store it like any other secret, scope it per environment, and revoke it in the CA portal once the account exists if the CA allows.

CAA account and method binding

CAA records (RFC 8659) say which CAs may issue for a domain. RFC 8657 (November 2019) adds two parameters for the issue and issuewild properties:

  • accounturi: limits issuance to named CA accounts. For ACME CAs the URI is the account URL. A property with an unrecognised URI cannot be satisfied.
  • validationmethods: limits the challenge types, using labels such as dns-01 or http-01 from the IANA ACME validation methods registry.

Combined, they mean an attacker who can serve content on port 80 still cannot obtain a certificate from your CA if CAA requires your account and dns-01. RFC 8657 adds caveats: the parameters only help if the CA documents support for them, CAs must check CAA through a DNSSEC-validating resolver for protection against on-path attackers, delegated subdomains are not covered, and account URIs are publicly visible in DNS. See the DNS Security Guide.

Renewal, ARI and rate limits

RFC 9773, ACME Renewal Information (June 2025, Standards Track), adds a renewalInfo URL to the directory. The client builds a CertID from the certificate's Authority Key Identifier and serial number, fetches the suggested window with an unauthenticated GET, picks a random time inside it, and renews then. The response can include an explanationURL and a Retry-After header for the next check. New orders carry a replaces field naming the predecessor certificate, and the CA can answer 409 alreadyReplaced if it has already been replaced.

ARI matters operationally because the CA can move the window earlier for a whole population of certificates, for example after a mis-issuance that requires mass revocation, and well-behaved clients will renew before revocation takes effect. Clients without ARI renew on a fixed fraction of lifetime and miss that signal.

Let's Encrypt limit (as published)ValueDesign implication
Certificates per registered domain50 per 7 days, across all accountsLarge estates under one registered domain need consolidation or SAN certificates
New orders per account300 per 3 hoursSpread mass renewals; use ARI windows
Duplicate certificates5 per identical identifier set per 7 days, no overridesA crash-looping client that re-orders on every start will lock itself out
Failed validations5 per identifier per account per hourTest challenge configuration against staging first
ARI renewalsExempt from all rate limits when the order replaces a certificate not already replacedAdopt ARI-capable clients

Other CAs publish different limits. Always develop and test against the CA's staging environment, which has much higher limits.

Lifetimes are the other driver: under the CA/Browser Forum schedule summarised in the sibling guide, maximum public TLS certificate validity steps down to 200 days from 15 March 2026, 100 days from 15 March 2027 and 47 days from 15 March 2029. At 47 days, a renewal process that fails silently for three weeks is an outage.

Choosing an ACME architecture

PatternHow it worksChoose whenTrade-off
Client on every hostEach server runs its own client with HTTP-01Small estates, simple web serversMany account keys, little central visibility
Integrated in the TLS terminatorLoad balancer, ingress controller or web server obtains certificates itself (for example cert-manager, or a server with built-in ACME)Kubernetes and modern proxiesAccount key lives with the platform; scope who can request names
Central issuance serviceOne hardened service validates with DNS-01 and distributes certificates to hostsLarge estates, wildcards, internal names, appliances without ACME clientsDistribution of private keys becomes a new risk; private keys should ideally be generated on the host and only the CSR sent
Private ACME CAInternal CA exposes ACME for internal names and mTLSService-to-service TLS, device certificates, short-lived internal certificatesYou own the CA's validation logic and must restrict which accounts can request which names

Small versus large organisations: a small organisation can use HTTP-01 clients on each server plus CAA restricting issuance to one CA. A large organisation should use DNS-01 through a delegated validation zone, CAA accounturi binding, per-environment accounts, and a central inventory that records which account issued each certificate. See the Machine Identity, PKI and Certificate Lifecycle Guide.

Where identity fits

ACME automation replaces a human with several non-human identities. Each needs an owner, a scope, storage controls and a revocation path.

CredentialWhat it can do if stolenControl
ACME account private keyOrder certificates for names the account can validate, revoke the account's certificatesPer-environment accounts, secrets manager or restricted namespace, keyChange rotation, CAA accounturi
DNS provider API tokenPass DNS-01 for any name in the zone with any CA, and change production recordsToken scoped to the validation zone or to TXT records under _acme-challenge only; separate validation zone via CNAME delegation
EAB MAC keyCreate new ACME accounts tied to your commercial or internal CA accountStore as a secret, one per environment, revoke after use where possible
Certificate private keysImpersonate the serviceGenerate on the host, never in the central service where avoidable; short lifetimes
Kubernetes RBAC on Certificate resourcesRequest certificates for arbitrary names through the cluster's issuerApproval policy restricting namespaces to their own names

Let's Encrypt itself warns that storing full DNS API credentials on a web server raises the impact of a compromise and recommends narrowly scoped credentials or validating from a separate server. Credentials found in files on a compromised host map to ATT&CK T1552.001 Credentials In Files, and the certificate abuse that follows to T1649 Steal or Forge Authentication Certificates. See the Secrets Management Guide and the MITRE ATT&CK T1649 Steal or Forge Authentication Certificates Guide.

Rolling out ACME automation

  1. Inventory certificates and owners. Pull every public certificate for your domains from Certificate Transparency logs and every internal certificate from scans and CA databases. Record owner, issuing CA and renewal method. See the Certificate Transparency Monitoring Guide for Web Teams.
  2. Choose the architecture per platform using the table above, and choose challenge types per name (DNS-01 for wildcards and internal names, HTTP-01 or TLS-ALPN-01 elsewhere).
  3. Prepare DNS. Create a validation zone, CNAME _acme-challenge records into it, and issue a DNS API token that can write only there.
  4. Create accounts per environment against the CA's staging endpoint first. Store account keys and EAB secrets in the secrets manager.
  5. Pilot on low-risk names. Run renewals on staging, then production, for a handful of services. Prefer ARI-capable clients and confirm they record the renewal window.
  6. Publish CAA. Restrict issue and issuewild to the CAs you use, then add accounturi and validationmethods once the CA confirms support. Test issuance after each change, because a CAA mistake blocks renewals.
  7. Add monitoring (next section) before migrating critical services.
  8. Migrate by tier, leaving the most critical services until the process has run through at least one full renewal cycle.
  9. Rollback: keep the last valid certificate and key deployable, and keep a documented manual issuance path with a second CA account and CAA permitting a second CA, so a CA outage or an ACME regression does not become a service outage.

Detection and measurement

  • CT monitoring: alert on any certificate for your domains that does not match an order in your ACME logs. Unrequested issuance means a credential, a validation path or a CA has been abused.
  • Order logs: log every newOrder, finalize, revokeCert and keyChange with the account and the requesting workload. ACME's POST-as-GET design makes every action attributable to an account.
  • DNS audit logs: alert on writes to _acme-challenge records outside the validation zone and on use of the DNS token from unexpected addresses.
  • Renewal health: alert when a certificate passes its ARI window or two thirds of its lifetime without renewal, not when it is days from expiry.

Metrics:

  • Percentage of certificates renewed automatically, by environment.
  • Percentage of ACME clients using ARI.
  • Number of certificates within 7 days of expiry (target zero).
  • Number of DNS API tokens with zone-wide write access used for ACME (target zero).
  • Percentage of domains with CAA, and with accounturi binding.
  • Count of CT-observed certificates with no matching internal order.

Framework mapping

FrameworkReferenceRelevance
NIST SP 800-53 Rev. 5SC-17 Public Key Infrastructure CertificatesIssuing certificates under an approved policy, including automated issuance
NIST SP 800-53 Rev. 5SC-12 Cryptographic Key Establishment and Management; IA-5(2) Public Key-based AuthenticationAccount keys and certificate keys, validation of certificates
NIST SP 800-53 Rev. 5CM-2 Baseline Configuration; AU-6 Audit Record ReviewCAA and client configuration baselines, order and CT log review
NIST CSF 2.0PR.AA-01; PR.DS-02; ID.AM-08Machine credentials managed, data in transit protected, certificate lifecycle
ISO/IEC 27001:2022 Annex A8.24 Use of cryptographyKey management including certificate lifecycle
MITRE ATT&CKT1649 Steal or Forge Authentication Certificates; T1588.004 Digital Certificates; T1584.002 DNS Server; T1552.001 Credentials In FilesCertificate theft, adversary-obtained certificates, DNS takeover enabling validation, stolen ACME and DNS credentials

Common failure patterns

  • Zone-wide DNS tokens on web servers. One compromised host can then validate any name in the zone with any CA and alter production DNS. Delegate _acme-challenge to a validation zone.
  • A single account key shared everywhere. Copying one Secret to every cluster means one leak lets an attacker order and revoke across the estate. Use per-environment accounts.
  • Restart loops hitting duplicate certificate limits. A client that requests a new certificate on every start can exhaust the 5 per 7 days duplicate limit and leave the service with no valid certificate.
  • Stale HTTP-01 paths. Old virtual hosts, wildcard DNS records or dangling CDN configurations that still answer on port 80 let others pass HTTP-01 for your names. Combine CAA validationmethods with clean-up of unused DNS records. See the DNS Hijack Playbook.
  • CAA changes without testing. Adding accounturi with the wrong URL, or removing a CA still used by one team, silently breaks renewals until certificates expire.
  • Monitoring expiry instead of renewal. Alerting at 7 days remaining gives no time to fix an ACME failure on a 47-day certificate. Alert on missed renewal windows.

Practitioner checklist

  • Inventory all certificates from CT logs and internal CAs, with owner and renewal method.
  • Use separate ACME accounts per environment and store account keys and EAB secrets in a secrets manager.
  • Delegate _acme-challenge to a validation zone and scope DNS tokens to it.
  • Publish CAA restricting issuers, then add accounturi and validationmethods after testing.
  • Adopt ARI-capable clients and log the suggested window for each certificate.
  • Test every client against CA staging before production and guard against restart loops.
  • Restrict who can request names through shared issuers such as cert-manager with approval policies.
  • Alert on CT-observed certificates with no matching internal order.
  • Alert on missed renewal windows, not on imminent expiry.
  • Maintain a tested fallback: a second CA account permitted by CAA and a manual issuance runbook.

Standards and references

Related NHI Mgmt Group resources: Certificate Expiry Outages and 47-Day TLS Certificates Guide · Machine Identity, PKI and Certificate Lifecycle Guide · Certificate Revocation Guide · Certificate Transparency Guide · Secrets Management Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.