Certificate Automation
Why certificate renewal automation fails when deployment is still manual
Issued is not installed. Installed is not served. A CA webhook that says renewed does not prove port 443.
The current problem
The most common certificate outage of the last decade was not “the CA was down.” It was “the CA issued, and production still served yesterday’s leaf.” The new private key sat in object storage, a ticket attachment, a chat message, or a control-plane row labelled renewed. Port 443 presented the previous fingerprint until notAfter, and then it presented a handshake error.
Automation made the first half of that story cheaper. ACME (RFC 8555) turned issuance into a JSON conversation. Commercial CA APIs did the same for OV and EV. Webhooks announced certificate.issued and certificate.renewed. Dashboards turned green. None of those signals install a file, test a server configuration, reload a process, or prove that a client at the edge of the network sees the new chain.
From 15 March 2026 a newly issued public subscriber certificate lasts at most 200 days. From 15 March 2027, 100 days. From 15 March 2029, 47 days. Let’s Encrypt is independently moving its default toward 45 days by 16 February 2028, and already offers a 160-hour shortlived profile. The interval in which a human can notice a “renewed but not deployed” leaf and paste a PEM into a panel is shrinking. A deploy path that was “good enough for annual SSL” is now the outage.
Why it matters
Issuance without deployment is a false control. It satisfies the part of the system that talks to a CA and leaves the part that talks to users unchanged. Monitoring that checks “did we get a 200 from the CA?” will not page. Monitoring that checks “does port 443 answer?” will not page either, because the old leaf still answers. The first honest signal is often a user-facing expiry or a synthetic check that compares fingerprints — and by then the lead time is gone.
The people who can reload Nginx, recycle an IIS binding, patch a Kubernetes Secret, or upload a certificate to a load-balancer API are frequently not the people who received the webhook. That organizational split was survivable when the event happened once a year and a change ticket could wait for the next window. It is not survivable four or eight times a year per hostname.
Rollback is the other half of the same gap. Teams that treat the mailbox as the backup (“we still have the email with the ZIP”) discover that the mailbox is not a versioned store, the ZIP does not include the previous chain, and the person who can restore it is not on call. A deploy path that cannot roll back will not be trusted to run unattended, which means it will not run at 03:00 when ARI says the CA wants an early replacement.
Technical background
A TLS server presents a leaf certificate and a chain. Clients authenticate the leaf against a trust store and check notAfter, key usage, name constraints, and (sometimes) revocation. The CA’s job ends when it returns PEM or DER. Everything after that is operations:
- Write the leaf, the chain, and the private key to the locations the server process will read.
- Point the server configuration at those locations if the paths changed.
- Test the configuration (
nginx -t,apachectl configtest, an API dry-run). - Reload or replace the running process so it re-reads the files or the secret.
- Verify from outside the host that the served certificate’s SHA-256 fingerprint matches the one you just wrote.
- Keep the previous files so a bad reload is not a one-way trip.
Those steps are independent of ACME. Certbot’s installers do some of them for a handful of server types. cert-manager does them for Kubernetes Secrets and a list of issuers. Caddy does them for its own listener. A hosting panel does them for the vhosts it knows about. A REST issuance API does none of them unless you connect a target and run a connector.
SNI makes the failure mode subtler. A host may serve ten certificates. You replaced one file. The vhost for billing.example.com still points at billing.example.com.old.pem. The default server still has the old leaf. A load balancer still has the old listener policy. A CDN still has the old custom-origin certificate. The CA was right. The inventory row is right. The user is not.
OCSP stapling and session resumption add another wrinkle. A reload that picks up the new leaf but keeps stapling a response for the old serial will look broken to picky clients. A fleet that rolls one node at a time will present two fingerprints until the roll finishes; your verify step has to know whether it is looking at the node you just changed.
ARI (RFC 9773) can move the renewal earlier than your default lead time. That is useful during a mass-revocation. It is also a load test of your deploy path: if the CA says “renew in the next six hours,” a human paste window is not a path.
The Baseline Requirements do not mention Nginx. They do not have to. They changed the frequency with which this gap is hit.
Operational consequences
The green dashboard outage. Status is renewed. Webhook delivery was 200. PEM is in the bucket. notAfter on the served leaf is last quarter. This is the median failure, not the exotic one.
The wrong person. The security team owns the ACME account. The platform team owns the ingress. The ticket queue owns the change window. Nobody owns the minute after certificate.renewed.
The panel lie. A hosting API accepted a certificate object. The subscription’s vhost still references the previous cert ID. HTTP 200 from the panel is not a handshake.
The secret that did not rotate. Kubernetes has a new Secret. The Ingress annotation still names the old one. Or the Secret updated and the ingress controller caches the previous chain until a rollout.
The extra hop. You deployed to the origin. The CDN still has the old custom certificate. Or you deployed to the CDN and the health-check origin still expires next week.
The partial SAN. The new certificate dropped a name that the old one had. Issuance succeeded. One hostname of five now serves a leaf that does not include it.
The missing chain. The leaf is new; the server still sends the previous intermediate. Some clients have the new intermediate cached. Some do not. You will debug this as “it works for me.”
The late verify. You verify from localhost, or from the deploy runner’s Docker network, and you never see the anycast node that still has the old file.
Each of these is cheaper to prevent than to explain after 15 March 2027, when the same class of bug happens four times a year.
Affected audiences
Anyone who “automated SSL” by wiring Certbot or an API to a cron and leaving install to a wiki. That is the primary audience. The wiki is the outage.
Hosting providers whose AutoSSL issues into a store the vhost does not read until a user clicks “Install.” The click will not happen at 04:00.
SaaS platform teams who issue a certificate for a customer hostname and forget that the listener that must present it is an edge process with its own config reload.
Kubernetes operators who assume a Secret update is a deploy. It is a store update. The workload has to mount or watch it.
Enterprise change-management that still classifies every certificate write as a standard change with a weekly window. The window and the notAfter will eventually disagree.
MSPs who renew in a CA portal and email the PEM to a client admin. That is issuance outsourcing, not lifecycle management.
Implementation options
Deploy hook in the ACME client. Certbot --deploy-hook, lego --hook, Caddy’s automatic reload. Best when one host is the listener and the client runs on that host. Weak when many listeners need the same leaf.
Configuration-management pull. After issuance, Puppet, Ansible, or an image pipeline places files and reloads. Best when you already manage the hosts that way. Weak when the certificate lands in a panel the CM tool does not speak.
Orchestrator-native. cert-manager, Secret Stores, CSI drivers, ingress annotations. Best inside one cluster. Weak for the names that are not in that cluster.
Load-balancer or CDN API. Upload the leaf to the device that actually terminates TLS. Best when termination is centralized. Requires credentials scoped to certificate upload, not to the whole cloud account.
SSH or panel connector from a control plane. A job writes files or calls a panel, then records the expected fingerprint. Best for heterogeneous estates. Requires treating deploy as a first-class stage with its own failure status.
Download-only, honestly. Some appliances have no API. Keep them on a list. Give them an owner. Time-box the paste. Do not mix them into the automated count.
What does not count as a deploy path: emailing PEM; storing PEM in a wiki; a Slack emoji on the webhook; a ticket titled “please install.”
Recommended practices
Write files atomically. Write to a sibling name, fsync, then rename. A reader that opens a half-written key will fail worse than a reader that still sees the old key.
Never overwrite the only copy. Keep .prev or a timestamped backup of leaf, chain, and key. Rollback is a rename and a reload, not a restore-from-backup meeting.
Test configuration before reload. nginx -t is cheaper than a failed worker that cannot start. If the server has no test verb, make one: parse the files, check the modulus of key and leaf match, check the chain issues the leaf.
Reload, do not blindly restart, unless the server cannot reload. Restarts drop connections. Reloads are why this is automatable.
Verify from a vantage that matches the user. Prefer an external handshake to the public name, SNI set, HTTP/1.1 or HTTP/2, and a SHA-256 compare against the inventory. If you terminate at a CDN, verify the CDN name and the origin name as two rows.
Treat private keys as secrets for the whole path. A deploy job that logs PEM, a ticket that attaches a PFX with a password of the hostname, or a chat upload, is a compromise that happens to look like operations.
Page on renewal_failed, on deploy failure, and on fingerprint mismatch. Do not page on “CA issued” unless you have nothing better. The interesting events are the ones that mean users still see the old leaf.
If ARI asks you to renew early, run the same deploy path. An emergency issuance that cannot install is not an emergency response.
Architecture and checklist
The only architecture that survives shorter lifetimes is a single pipeline with three named facts:
issued ≠ installed ≠ served
- Issued — the CA returned a leaf; inventory has PEM, serial,
notAfter. - Installed — the listener’s configured files or secret match that leaf.
- Served — an external handshake shows that fingerprint.
A fourth fact, rolled back, is optional until the first bad leaf, at which point it is mandatory.
[CA / ACME] --PEM--> [object store / control plane]
|
v
[deploy job: atomic write]
|
v
[config test + reload]
|
v
[external handshake == expected SHA-256]
|
success --> mark served, keep .prev
failure --> page, do not mark served
Deploy checklist
- Every automated certificate names a deploy target or a download-only owner.
- The deploy job writes leaf, chain, and key; it does not assume the chain is “the one from last year.”
- Key and leaf moduli (or elliptic curves) are checked before reload.
- Config is tested; reload is explicit; restart is a last resort.
- Previous files remain readable by the same job.
- Verify runs from outside the host, with SNI, against the public name.
- Fingerprint mismatch is a failing status, not a log line.
- Webhook
certificate.renewedupdates inventory, not uptime. - On-call can run the deploy job without the person who wrote it.
- A rehearsal has replaced a leaf in staging and proven the handshake.
Nginx and Apache specifics belong in the reload-safety notes: same user that the server uses to read the files, directory permissions that do not expose the key, and no shell interpolation of hostnames into commands. Kubernetes specifics: Secret size limits, rolling restart vs. watch, and not storing the key in etcd unencrypted if your threat model says otherwise. None of those details change the three facts.
How platforms and tools can help
ACME clients with installers reduce the number of moving parts on a single host. Use them when they support your server. When they do not, use a deploy hook you wrote and tested, not a hook you copied from a gist and never ran.
Panel APIs (Plesk, cPanel/WHM, common load-balancer APIs) can install if you treat their success code as “object stored,” then verify. Many APIs will store a certificate that no vhost references.
SSH-based deploy is old and still honest: copy files, run an allowlisted reload command, keep .prev, record the expected SHA-256. Restrict the login to those commands.
Synthetic monitoring that understands certificates — not only HTTP 200 — is the last line. Prefer checks you own over a CA-provided “everything is fine” badge.
Where a lifecycle platform fits
Teams that already operate reliable ACME, deployment and monitoring may not need another issuance layer. The missing piece, when there is one, is usually the refusal to mark a certificate done at issuance. A control plane that stores an expected fingerprint, runs a deploy job, and keeps a previous copy is one way to encode issued ≠ installed ≠ served. sslcertificates.io is one of those control planes: it will issue on Test (Let’s Encrypt Staging) or Live (Let’s Encrypt Production), and it will not pretend a webhook is a handshake. If your Caddy already reloads itself and your probes already compare fingerprints, you are done.
What to watch next
Shorter lifetimes. 15 March 2027 (100 days), Let’s Encrypt 10 February 2027 (64-day default), 16 February 2028 (45-day default), 15 March 2029 (47 days). Each date reduces the time a manual install can hide.
ARI-driven early renewals. A CA can ask for a replacement this afternoon. Deploy has to be able to run then.
Multi-perspective validation and CDN challenge paths. Issuance may start failing for names whose HTTP-01 only works from one region. That is an issuance bug that will be mis-labelled as a deploy bug if you do not separate the stages.
Chain changes. CAs rotate intermediates. A deploy that only writes the leaf will fail for a subset of clients. Watch CA announcements; test the chain you serve.
Short-lived profiles. A 160-hour leaf makes a human deploy path a contradiction. Do not enable shortlived until install and verify are unattended.
Sources
- RFC 8555 — ACME issuance ends at the certificate object.
- RFC 9773 — ARI can shorten the time between issue and required install.
- CA/Browser Forum TLS Baseline Requirements — 200 / 100 / 47-day maxima for new public leaves.
- Let’s Encrypt documentation — client installers, hooks, and profile lifetimes.
- Let’s Encrypt: 6-day and IP address certificates — why unattended deploy is a precondition for short-lived leaves.
Related reading
Primary sources
- RFC 8555 — Automatic Certificate Management Environment (ACME)
- CA/Browser Forum TLS Baseline Requirements
- RFC 9773 — ACME Renewal Information (ARI)
- Let’s Encrypt documentation
Related reading
When a lifecycle platform is worth it
Teams that already operate reliable ACME, deployment and monitoring workflows may not need another issuance layer. A lifecycle platform becomes more useful when central state, multi-tenant operations, deployment verification or provider abstraction become operational requirements.