[Certificate Fundamentals Part 8] Lifecycle and Automation: Expiration Incidents, Inventory, ACME, ARI, and Expiration Monitoring

Certificate Fundamentals Part 8 Lifecycle and Automation: Expiration Incidents, Inventory, ACME, ARI, and Expiration Monitoring Certificates and PKI

“Let’s Encrypt sends me an email before a certificate expires, so we’re fine.”
“We renew once a year, and as long as we follow the procedure, there’s no problem.”

Neither of these works anymore. Let’s Encrypt ended its expiration notification emails in 2025, and as we saw in Part 6, the maximum validity period of a certificate will shrink to 47 days in 2029. A task that used to happen once a year will happen almost every month.

Through Part 7 we looked at how certificates and TLS work. Part 8 turns to operations: inventory, automatic renewal with ACME, and expiration monitoring to prevent expiration.


Real expiration incidents

An expired certificate is a classic failure whose cause is simple but whose impact is large.

Diagram showing that because there is only one expiration date, even if Center A and Center B are redundant they stop at the same moment, along with the roughly 4.5-hour mobile phone service outage on December 6, 2018 and the several-hour Microsoft Teams outage on February 3, 2020
  • December 6, 2018: SoftBank’s and Y!mobile’s 4G mobile phone services, among others, became unavailable nationwide in Japan for about 4.5 hours. The cause was software in switching equipment made by Ericsson, which mishandled the expiration date of an embedded digital certificate. Carriers in 11 other countries had failures at the same time, and it has been explained that the expiration date had been embedded in the software at shipment and could not be checked from the carriers’ side
  • February 3, 2020: Microsoft Teams became unavailable for several hours. Microsoft announced that the cause was the expiration of an authentication certificate

There are three lessons.

  1. Certificates are not only the ones you bought yourself; they are also embedded inside products
  2. Even when you know the expiration date, relying on memory or manual work leads to omissions
  3. The moment a certificate expires, every machine stops at once, and redundancy cannot save you

There is one expiration date, regardless of the number of machines. The moment it passes, everything stops.


Why manual renewal breaks down

Maximum validityApplies fromRenewals per certificate per year (approx.)Annual work for 100 certificates
398 daysSeptember 2020about 1about 100
200 daysMarch 15, 2026about 2 to 3about 200 to 300
100 daysMarch 15, 2027about 4 to 6about 400 to 600
47 daysMarch 15, 2029about 8 to 12about 800 to 1,200

(The range in counts covers renewing right at expiration versus renewing with room to spare, with one-third of the validity left.)

A 47-day certificate means work almost every month. Done by hand, you would repeat creating a CSR, domain validation (with validation reuse down to 10 days from 2029), deployment, and checking the reload every month, and someone will inevitably miss one because of vacation or a job transfer.

The core of the countermeasure is to automate with ACME whatever can be automated and reduce the number of certificates handled by hand.


Certificate inventory (CT, scanning, and a ledger)

Neither automation nor monitoring can start until you know how many certificates are where. Combine three methods for the inventory.

Diagram showing CT logs (crt.sh) collecting public CA certificates, scans (443, 636, and so on) collecting internal and device certificates, and automation tools and monitoring collecting renewal status, all compared against a ledger to find rogue certificates that are not in the ledger and certificates that are in the ledger but cannot be found
  1. CT logs (Part 5): All public CA certificates are recorded, so searching your own domains on a site such as crt.sh lists even certificates that someone inside the company obtained. However, certificates from a private CA and self-signed certificates do not appear
  2. Network scans: Connect to port 443, LDAPS (port 636), mail ports 465 and 587, and so on across your internal address ranges, and collect the certificates that come back. This also finds certificates on appliances and management consoles
  3. A ledger: For each certificate, record the name (SAN), issuer, expiration date, the location of the private key, where it is deployed, how it is renewed (automatic or manual), and the person in charge

Comparing the scan and CT results with the ledger reveals “certificates that are not in the ledger (rogue certificates)” and “certificates that are in the ledger but cannot be found.” CT misses private CAs and scans miss places they cannot reach, so combining them matters.


The ACME flow (RFC 8555)

ACME (Automatic Certificate Management Environment, RFC 8555) is a standard procedure that automates everything from requesting to issuing a certificate over an HTTPS API.

Diagram showing the flow in which an ACME client sends newAccount and newOrder, places the CA's challenge token on the web or DNS and asks for validation, the CA validates from multiple locations, the client sends the CSR with finalize, downloads the certificate, deploys it and reloads, and repeats renewal before expiration or when ARI says so
  1. Account: Create a key pair and register it with the CA. Every later request is signed with this key
  2. Order (newOrder): Tell the CA the names you want on the certificate
  3. Authorization: The CA returns a challenge for each name (Part 6), and the client places a token on the web server or in DNS and asks the CA to validate it
  4. Sending the CSR (finalize): When every name has been validated, send the CSR created on the device
  5. Issuance: Download the certificate, deploy it, and reload the service
  6. Renewal: When the expiration date approaches or the CA signals the time (ARI), repeat from step 2

A person is involved only in the initial setup. After that, steps 2 to 5 run automatically. A new key is normally created at each renewal.


How to choose a challenge

SituationSuitable challengeNotes
A public web server where port 80 is reachable from outsideHTTP-01Behind a load balancer, make sure any server that receives the request can return the token
You need a wildcard certificateDNS-01Cannot be obtained with HTTP-01 or TLS-ALPN-01
An internal server not reachable from outside (the name is in a public domain)DNS-01You will keep credentials for an API that updates DNS on the server
You do not want to hand out broad DNS permissionsDNS-01 plus CNAME delegationCNAME _acme-challenge to a zone used only for validation, and let the client update only that zone
You can open only port 443TLS-ALPN-01Few clients support it
You have many devices and do not want to change DNS every timeDNS-PERSIST-01A fixed TXT record is enough. Let’s Encrypt offers it in staging only (September 2026)

The biggest risk of DNS-01 is that you keep credentials that can rewrite DNS on the server. If permissions for the whole zone leak, it can lead to a website takeover. Limit the damage by narrowing permissions to individual records, or by delegating with a CNAME to a zone used only for validation. You can also restrict which accounts and methods are allowed with the CAA parameters accounturi and validationmethods (RFC 8657, Part 5).


Let’s Encrypt today (September 2026)

ItemDetails
Profilesclassic (default): 90 days, authorization reuse 30 days / tlsserver: 45 days (from May 2026) / shortlived: 160 hours (about 6 days)
Planned shortening of the default validityFrom February 10, 2027, classic becomes 64 days (reuse 10 days); from February 16, 2028, 45 days (reuse 7 hours)
Short-lived certificates and IP address certificatesGenerally available since January 2026. IP address certificates are available only with shortlived
Revocation checkingOCSP ended on August 6, 2025. CRL only (Part 5)
Expiration notification emailsEnded on June 4, 2025. You monitor expiration yourself
Client authentication (clientAuth)Removed from classic on February 11, 2026. tlsclient also ended on July 8
Renewal timingFollowing ARI (RFC 9773) is recommended
DNS-PERSIST-01Available in staging. Not yet available in production

The “emails will come, so we’re fine” from the opening collapses here. The reasons given for ending the notification emails were the spread of automation, the privacy concerns of holding millions of email addresses, and cost. Operations that relied on “an email will come” are already getting no notification. You can choose the profile in your ACME client (with certbot, --preferred-profile).


ACME clients

ClientEnvironmentFeaturesSuited for
certbotLinux and others (Python)Made by the EFF. Plugins that rewrite Apache and nginx configuration. ARI support (4.1 and later)Linux web servers
acme.shLinux and Unix (shell script)Few dependencies. Supports many DNS APIs. The default CA is ZeroSSLSmall environments, DNS-01, distribution to devices
win-acmeWindowsAutomatically updates IIS bindings. Stores to the certificate store or PFXIIS and Windows servers
Posh-ACMEWindows and Linux (PowerShell)A PowerShell module. Rich set of DNS pluginsWhen you want to build it into PowerShell scripts
Caddy, Traefik, etc.Built into web servers and reverse proxiesJust write the name in the configuration, and obtaining and renewing are automaticNew builds, container environments
cert-managerKubernetesRenews automatically in cooperation with Ingress and SecretKubernetes

To use Let’s Encrypt with acme.sh, change the default CA with --set-default-ca --server letsencrypt.

With any client, be sure to set up these three things.

  1. A hook that reloads the service after renewal
  2. Notification when it fails
  3. Permissions on the private key file

Cloud certificate services (ACM and others, Part 9) renew automatically without using ACME.


ARI (ACME Renewal Information)

ACME clients used to renew at a time they decided themselves, such as “30 days before expiration.” But when an incident occurs in which a CA revokes a large number of certificates, users have to renew in a hurry regardless of the expiration date.

Diagram showing an ACME client asking the CA's renewalInfo several times a day and renewing at a random time within the returned suggestedWindow, and showing that when a revocation is planned, the window is moved earlier and the client renews immediately

ARI (ACME Renewal Information, RFC 9773, June 2025) conveys that signal automatically.

  • For each certificate, the client queries the CA’s renewalInfo, and the CA returns the time window in which to renew (suggestedWindow)
  • Normally the second half of the validity period is indicated, and if a revocation is planned, the window is moved earlier
  • The client picks a random time within the window, so renewals also avoid piling up at the CA

The Chrome Root Program requires CAs that support ACME to support ARI, and certbot (4.1 and later), acme.sh, Posh-ACME, and others support it. The idea is that the CA, not the client, decides when to renew.


ACME for a private CA

ACME is not only for public CAs. If you use ACME with a private CA, internal certificates can renew automatically with the same mechanism.

Diagram showing that a commercial public CA issues to public servers by ACME with EAB, step-ca (which supports ACME) issues by ACME to Linux servers, containers, and devices, and AD CS (which does not support ACME) issues to domain-joined Windows by auto-enrollment (GPO) and to Linux and devices by hand or by SCEP (NDES)
  • A typical example is the open-source step-ca (Smallstep). You run an ACME server internally and can validate internal names with HTTP-01 and DNS-01
  • Commercial public CAs (DigiCert, Sectigo, GlobalSign, and others) also support ACME, and use an EAB (External Account Binding) key to tie a client to a contract
  • On the other hand, AD CS does not support ACME. Domain-joined Windows can renew with auto-enrollment (Part 9), but Linux and devices tend to be handled by hand

With AD CS alone, Linux and devices fall out of automation. In that case, consider options such as setting up a separate private CA that supports ACME, putting relay software in front of AD CS, or using SCEP (NDES in AD CS) for devices. In every case, distributing the private CA’s root certificate is a prerequisite.


Expiration monitoring

Even with automation, monitoring is necessary, because automatic renewal can fail silently.

$ echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null \
    | openssl x509 -noout -enddate -checkend $((14*86400))
notAfter=Oct 27 22:17:21 2026 GMT
Certificate will not expire          # If it expires within 14 days: "Certificate will expire", exit code 1
PS> Get-ChildItem Cert:\LocalMachine\My |
      Where-Object NotAfter -lt (Get-Date).AddDays(14) |
      Select-Object Subject, NotAfter, Thumbprint

Subject                   NotAfter              Thumbprint
-------                   --------              ----------
CN=app01.corp.example.com 10/5/2026 8:59:59 AM  3F2A9C… (omitted)
  • Match the threshold to the validity period. Automatic renewal happens with one-third remaining (about 16 days for 47 days), and monitoring warns when “it is still old after the time it should have been renewed.” Example: warn at 14 days remaining, urgent at 7 days
  • Check by actually connecting from outside. Even if the file is new, the old certificate is returned if the service has not reloaded. Also check the expiration of intermediate certificates
  • Example tools: Zabbix (the template for website certificates), Prometheus blackbox_exporter (probe_ssl_earliest_cert_expiry), and external monitoring services

Key renewal and rotation

When you renew a certificate, decide in advance whether to recreate the private key too.

Diagram showing that the recommendation is a new key at every renewal (keys A, B, C), that reusing key A leaves a key that leaked during the first certificate's period dangerous, that when pinning or DANE is in use the new key is registered first and then the certificate is switched, and that renewal is a chance to change the key type from RSA to ECDSA and to post-quantum
  • The rule is to make a new key at every renewal. If you keep using the same key for years and it leaks even once during that time, the new certificate remains in danger too. Most ACME clients create a new key every time by default
  • However, if an app or device checks by fixing the public key (pinning), or if the hash of the public key is published in DNS with DANE (TLSA records, Part 6 of the earlier series DNS Fundamentals), you need a procedure that registers the new key first and then switches
  • If you suspect a key has leaked, create a new key, reissue the certificate, and revoke the old one (Part 5)

Renewal is also a chance to review the key type. Considering a switch from RSA to ECDSA and a future move to post-quantum certificates, “cryptographic agility,” the ability to change key types easily, is a big benefit of automation. If the key is the same, the leak continues even when the certificate is new.


Handling devices you cannot automate

Not every certificate can be automated with ACME. Appliances such as load balancers, server management controllers, old business systems, and certificates entrusted to outside services may not let you install an ACME client.

Flowchart: if you can install an ACME client, automate; if you can replace the certificate through an API or SSH, obtain it with an external ACME client and distribute it; if you can place a load balancer or proxy in front, terminate TLS there and automate; if a public CA is not needed, switch to a private CA; if none of these work, manage it in the ledger as manual renewal

Think in this order.

  1. Check the product’s features: More products have a built-in ACME client or support swapping certificates through an API
  2. Obtain outside and distribute: A certificate obtained by an ACME client on another server with DNS-01 is distributed to the device through an API or SSH
  3. Terminate in front: Terminate TLS at a load balancer or reverse proxy placed in front, and automate there (Part 9)
  4. Switch to a private CA: For management consoles and the like that do not need to be public, using a certificate from a private CA means the 47-day constraint does not apply

For devices where none of these work, manage them in the ledger as “manual renewal” and prepare monitoring, a procedure, and a replacement plan. Aim for a state in which people watch over only the devices that remain at the end, using the ledger.


Think about it

  1. How many certificates in your area of responsibility can you list without looking at the ledger? If you search your company domains on crt.sh, do any certificates you don’t know about appear?
  2. Of the certificates you use now, how many can be automated with ACME, how many can be automated if you obtain them outside and distribute them, and how many must be done by hand?
  3. Do you have a mechanism that notices expirations and failed renewals before users do? When one fails, who is notified, and how?

Hint: The order of judgments in this article’s “Certificate inventory,” “How to choose a challenge,” “ACME clients,” “Expiration monitoring,” and “Handling devices you cannot automate” will help. Question 2 of Part 11 designs this topic.


Summary

  • Expiration stops every machine at once. Watch for certificates embedded in products too
  • In the 47-day era there are 8 to 12 renewals a year. Manual work will inevitably miss some
  • Take inventory before automating. Compare CT, scans, and the ledger
  • Automate from request to renewal with ACME. The challenge is HTTP-01 or DNS-01, and with DNS-01 narrow the permissions
  • Let’s Encrypt’s notification emails no longer come. Use ARI to align renewal timing with the CA
  • Monitor by actually connecting from outside. Watch devices you cannot automate with the ledger

Next time, we cover private PKI (AD CS), cloud certificate services, TLS termination at load balancers, and vSphere certificates.


The Certificate Fundamentals series (11 parts)

All 11 parts with a reading guide: Certificate Fundamentals

  1. Why Do We Need Certificates?
  2. Cryptography basics
  3. Trying it with openssl and PowerShell
  4. Inside an X.509 certificate
  5. PKI and how trust works
  6. Certificate types and issuance
  7. How TLS works
  8. Lifecycle and automation (this article)
  9. Private PKI and the cloud
  10. Certificate troubleshooting
  11. Certificate design exercises

This series is the English edition of 【証明書入門】, originally written in Japanese.

コメント

Copied title and URL