Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

Running certificate renewal at 47 days

After this lesson: I can check an inventory of certificates and decide which ones need renewing, an alert or automation.

70 min lesson3 commandsCertificate automation lab: ACME, short-lived TLS certificates and automatic renewal with a private CA

What breaks when certificates last 47 days?

Running certificate renewal means knowing every certificate you have, renewing each one automatically and hearing about a failure before a customer does. Public certificates will last at most 47 days from March 2029.

Anything still renewed by hand will then need a person about twelve times a year, per name.

By the end of this lesson

Note

I can check an inventory of certificates and decide which ones need renewing, an alert or automation.

Key words

WordWhat it means
Inventorya list of every certificate and where it lives
Probea check that connects and reads the live certificate
Alert thresholdthe days left at which a person is told
Manual certificateone a person renews and installs by hand
Validation reusehow long a CA may trust an earlier proof of control

The cells students fill in are left blank in this preview.

Probe what is really being served

A renewal job can report success while the server still sends the old certificate, because nobody reloaded it. So a monitor connects as a client would and reads the live certificate.

The lab's probe checks both HTTPS services against the lab's root. It prints each lifetime and whether two thirds has passed. Dates differ for every copy, so it prints none.

Probe the shop and the CA

Command
docker exec python python3 steps/monitor.py

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

Both live certificates are fresh

The Run prints shop lifetime 24 hours, ok and ca lifetime 24 hours, ok. The CA's own HTTPS certificate is short-lived too, and the CA renews it itself.

If a service could not be reached, the probe would print UNREACHABLE and the kind of error. A monitor must treat that as an alert too.

Keep an inventory of every certificate

You cannot renew what you do not know about. An inventory lists each certificate, when it was issued, how long it lasts and how it is renewed.

A daily check sorts it by days left. Renew once two thirds has passed, and alert when seven days or fewer remain. An expired one is an incident.

Check a small inventory

Command
docker exec python python3 steps/inventory.py

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

What the check prints, on 1 April 2029

CertificateDays leftHowState
old.shop.example-12manualEXPIRED
mail.shop.example-3manualEXPIRED
api.shop.example7acmeALERT
shop.example35acmeok
staff.shop.example45acmeok
vpn.shop.example58manualrenew

The cells students fill in are left blank in this preview.

A common mistake

Warning

Many people think that once ACME is set up, certificates look after themselves. A renewal can fail quietly for weeks: a closed port, a DNS key that expired, a service never reloaded. Monitor the live certificate, not the job.

Hand renewal stops scaling

Take 40 certificates, each needing 30 minutes of a person's time, renewed at two thirds of the lifetime. The Run works out the hours a year for each lifetime.

From 2029 a CA may also reuse a proof of control for only 10 days, so nearly every renewal needs a fresh challenge. Doing that by hand is not realistic.

Count the hours of hand renewal

Command
docker exec python python3 steps/workload.py

Shown here, not run. Press Start lab to type it into your own lab’s terminal.

What the Run prints for 40 certificates

Lifetime in daysRenewals a yearHours a year
3985528
20010955
100219109
47466233

The cells students fill in are left blank in this preview.

Worked example: what breaks, and the fix

Where it breaksWhy it breaks at 47 daysThe fix
A certificate pasted into an applianceSomeone must upload it a dozen times a yearAn ACME client or an API for that device
A firewall that blocks port 80Every HTTP-01 renewal failsOpen port 80 or use DNS-01
A DNS key with a short lifeDNS-01 stops quietlyMonitor the key and the certificate
A server never reloadedThe new file sits unusedReload after renewal and probe the live one

The cells students fill in are left blank in this preview.

About this lab and its source: Certificate automation lab: ACME, short-lived TLS certificates and automatic renewal with a private CA

Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.