All field guides

FIELD GUIDE Published

Certificate rotation in containers: trust stores and 47-day certs

A container trusts the CA roots baked in when its image was built, often in three or four separate stores: the base image's ca-certificates bundle, Node's compiled-in Mozilla snapshot, the JDK's cacerts and Python's certifi, and none of them change until you rebuild and restart. Point every runtime at one OS bundle with a switch that replaces its own store, such as Node's --use-openssl-ca or a Java trustStore generated from the OS bundle, because additive switches like Node's --use-system-ca, Temurin's USE_SYSTEM_CA_CERTS and pip's truststore keep the bundled roots and so never remove one; rebuild whenever ca-certificates, certifi or a runtime ships rather than only on a schedule, and renew with ACME Renewal Information: CA/Browser Forum ballot SC-081v3 cut maximum TLS certificate validity from 398 days to 200 on 15 March 2026, and cuts it to 100 on 15 March 2027 and 47 on 15 March 2029. When Mozilla learned on 17 October 2026 that eight eMudhra intermediate keys were integers below 256 (one was 4), Firefox was protected in under three hours, but an image built the day before kept trusting the emSign ECC Root CA - G3 root until it was rebuilt on updated packages and restarted.

Written with AI and checked against the cited sources before publication.

The mechanism

In a container, the trust store is a file, or several files, written when the image was built. Nothing updates it while the container runs, so the design question is where each process gets its roots, and how an upstream change reaches it.

Where a container's roots come from

One image often carries three or four separate trust stores.

  • The base image's `ca-certificates` package. On Debian and Ubuntu, update-ca-certificates reads /etc/ca-certificates.conf, takes the listed certificates under /usr/share/ca-certificates plus every .crt under /usr/local/share/ca-certificates, and writes one concatenated file, ca-certificates.crt, with the individual certificates in /etc/ssl/certs. Google's distroless/static image lists ca-certificates among its four contents. The image trusts whatever version was installed at build time.
  • Software that reads the OS store. Go's SystemCertPool reads the system locations, which SSL_CERT_FILE and SSL_CERT_DIR override, and its documentation warns that "New changes in the system cert pool might not be reflected in subsequent calls." For images with no bundle, Go 1.20 added x509.SetFallbackRoots, roots compiled into your binary.
  • Node.js. By default Node uses its own bundled store, which the docs describe as "a snapshot of Mozilla CA store that is fixed at release time." --use-openssl-ca switches to OpenSSL's store, which on most Linux distributions is the distribution's package. --use-system-ca (added in v23.8.0; on Linux since v23.9.0) adds the system store to the bundled one rather than replacing it: Node "uses the trusted CA certificates present in the system store along with the --use-bundled-ca option and the NODE_EXTRA_CA_CERTS environment variable", and on Linux it reads the OpenSSL store "with the difference being that it caches the certificates after first load". So it cannot drop a root that Node's bundled snapshot still holds; --use-openssl-ca can. NODE_EXTRA_CA_CERTS adds certificates but "is only read when the Node.js process is first launched", and is ignored when a client passes its own ca option.
  • Java. The JSSE default trust manager uses the file named by javax.net.ssl.trustStore; if that is unset, java-home/lib/security/jssecacerts if it exists, otherwise java-home/lib/security/cacerts. In Temurin and Oracle builds that cacerts ships with the JDK, not the OS. Distribution packages differ: OpenJDK from Debian or Ubuntu packages uses a keystore at /etc/ssl/certs/java/cacerts built from the OS store, and the eMudhra disclosure site warns that it "is not refreshed when the system trust store changes, due to a long-standing bug in ca-certificates-java". The Eclipse Temurin images copy certificates from /certificates into both the JVM truststore and the system store when you set USE_SYSTEM_CA_CERTS; the entrypoint imports the system store into the existing cacerts, so it adds roots and never removes one.
  • Python. Requests uses the certifi package, and its docs say "For the sake of security we recommend upgrading certifi frequently!" certifi's own docs say the bundle "is extracted from the Mozilla Included CA Certificate List", and it is pinned in your lock file like any other dependency. REQUESTS_CA_BUNDLE points Requests at another file. pip, since 24.2, uses system certificates "in addition to certifi" through the truststore package, which is additive too.

So one image that runs a Python worker and a Node process on a Temurin base can trust three different root lists at once, each updated by a different release process.

What a distrust changes, and for whom

Chrome's CRLSets "are the primary means by which Chrome quickly blocks certificates in emergency situations", and the same page says "Online (i.e. OCSP and CRL) checks are not generally performed by Chrome." Firefox has OneCRL. Both reach users within hours without a software update. A server-side client gets the change only when the root is removed from the store it reads, which means a new package or library version, a rebuild, a deploy and a restart.

How a root removal reaches a running container1. Root removed upstream: Mozilla root store change, new NSS release. 2. Package or library ships: ca-certificates, certifi, Node or JDK update. 3. Image rebuilt: Scheduled or triggered build picks it up (where it breaks). 4. Image rolled out: Every cluster, region and cron job. 5. Process restarted: Most runtimes read roots once, at start-up.1. Root removed upstreamMozilla root store change, new NSS release2. Package or library shipsca-certificates, certifi, Node or JDK update3. Image rebuiltScheduled or triggered build picks it upbreaks here4. Image rolled outEvery cluster, region and cron job5. Process restartedMost runtimes read roots once, at start-up
Figure 1. How a root removal reaches a running container Illustrative: the usual path; each step is a separate delay, and the rebuild usually waits for a schedule
Steps as text
  1. Root removed upstream: Mozilla root store change, new NSS release
  2. Package or library ships: ca-certificates, certifi, Node or JDK update
  3. Image rebuilt: Scheduled or triggered build picks it up (where it breaks)
  4. Image rolled out: Every cluster, region and cron job
  5. Process restarted: Most runtimes read roots once, at start-up

Mozilla made this explicit in the eMudhra case (below): on top of blocking the intermediates, it removed the root, saying "This will protect clients which do not use revocation information or lack a mechanism to withdraw trust in specific intermediates."

Browsers can also distrust by date, which a PEM bundle cannot. In June 2024 Chrome announced that from Chrome 131, certificates chaining to Entrust's roots "whose earliest Signed Certificate Timestamp (SCT) is dated after November 11, 2024 (11:59:59 PM UTC), will no longer be trusted by default", while older ones kept working. Mozilla expresses the same idea as CKA_NSS_SERVER_DISTRUST_AFTER in its root list. curl's issue 15547 (November 2024) shows what happens when that list becomes a flat bundle: mk-ca-bundle.pl compared the distrust date against the current time, and the fix, which curl committed the next day, was to ignore the date, even though it "would cause consumers of mk-ca-bundle.pl to accept certificates that Firefox would have rejected". A flat file can only keep a root or drop it.

Lifetimes are going down

CA/Browser Forum ballot SC-081v3 passed on 11 April 2025 with no votes against; Apple proposed it, and Google Chrome and Mozilla endorsed it. It is in the Baseline Requirements as version 2.1.5, effective 16 May 2025. Section 6.3.2 now reads: certificates issued from 15 March 2026 "MUST NOT have a Validity Period greater than 200 days"; from 15 March 2027, 100 days; from 15 March 2029, 47 days. Domain validation can be reused for 200, then 100, then 10 days. Its rationale: "relying solely on revocation is untenable".

Let's Encrypt is moving faster than the cap. Its December 2025 post announced 64-day certificates on the default profile from 10 February 2027, and 45-day certificates with "a 7 hour authorization reuse period" from 16 February 2028. It warns that "renewing at a hardcoded interval of 60 days will no longer be sufficient" and recommends ACME Renewal Information (ARI), which lets the CA tell your client when to renew.

What revocation does in practice

Ballot SC063 made OCSP optional and CRLs mandatory from 15 March 2024. Let's Encrypt turned off its OCSP responders on 6 August 2025. The Baseline Requirements give a CA 24 hours to revoke a subscriber certificate for key compromise, and up to 5 days for many other reasons. "Short-lived Subscriber Certificates" (7 days or less) are exempt; they simply expire. For a server-side client that checks no revocation at all, expiry and trust-store updates are what actually end trust. Browsers instead push their own blocklists (CRLSets and OneCRL), which is how they blocked the eMudhra intermediates within hours.

Worked numbers

The lifetime schedule, straight from the Baseline Requirements tables:

Maximum TLS certificate validity and domain validation reuse under SC-081v3Bar chart of Max validity, Domain validation reuse across 4 categories.Max validityDomain validation reuseBefore 2026-03-15398 days398 daysFrom 2026-03-15200 days200 daysFrom 2027-03-15100 days100 daysFrom 2029-03-1547 days10 days
Figure 2. Maximum TLS certificate validity and domain validation reuse under SC-081v3 Source: CA/Browser Forum Baseline Requirements 2.1.5, sections 6.3.2 and 4.2.1 (ballot SC-081v3)
Data as text
Max validity (days)Domain validation reuse (days)
Before 2026-03-15398398
From 2026-03-15200200
From 2027-03-15100100
From 2029-03-154710

What that does to a manual process (illustrative). Take 500 publicly trusted certificates, each renewed when two-thirds of its lifetime has passed, at 30 minutes of human work per renewal. At 398 days that is 365 ÷ 265 ≈ 1.4 renewals per certificate a year, about 690 renewals and 340 hours. At 200 days, about 1,370 renewals; at 100 days, about 2,740; at 47 days, 365 ÷ 31.3 ≈ 11.7 per certificate, about 5,820 renewals and 2,910 hours a year. Put in your own certificate count and minutes per renewal.

Renewals a year for 500 certificates, renewed at two-thirds of lifetimeBar chart of Renewals a year across 4 categories.398 days688 renewals200 days1,369 renewals100 days2,738 renewals47 days5,824 renewals
Figure 3. Renewals a year for 500 certificates, renewed at two-thirds of lifetime Illustrative: 500 certificates, renewal at two-thirds of the maximum validity, 365-day year
Data as text
Renewals a year (renewals)
398 days688
200 days1,369
100 days2,738
47 days5,824

The 10-day validation reuse in 2029 matters as much as the lifetime: an issuance flow that needs a person to answer a domain-control email cannot keep up with it.

How long a distrusted root stays trusted in your fleet. For eMudhra, Mozilla received the report at 20:06 UTC on 17 October 2026 and had the OneCRL block out to standard Firefox installs by 22:59 UTC, under three hours. The certifi project tagged a release removing the emSign roots on 18 October. Your exposure is the sum of a different set of delays (illustrative): the time until your base image or library ships the change, plus your rebuild interval, plus rollout, plus however long old pods keep running. With a 30-day scheduled rebuild and no event-triggered rebuild, an image built the day before the report trusts the root for about 30 days at best, and only if the fixed package shipped before that rebuild. certifi shipped the next day; in November the disclosure site still listed OpenJDK's fix as "Pending". A process that loads roots once, as Node's NODE_EXTRA_CA_CERTS and --use-system-ca do, keeps them even if you update the file underneath it.

How it fails

DST Root CA X3 expires (30 September 2021)

IdenTrust's own incident report gives the time: "September 30, 2021 at 8:01 am MT, the IdenTrust Root DST X3 (DST X3) expired as expected", which is 14:01 UTC. Let's Encrypt had been chaining its certificates through a cross-sign from that root. After the expiry it relied on "our own ISRG Root X1 for trust on almost all devices", but its default chain still included ISRG Root X1 cross-signed by DST Root CA X3, to keep old Android devices working. Clients whose trust stores lacked ISRG Root X1 failed. So did clients that had it but ran OpenSSL 1.0.x: Let's Encrypt warned that "even clients that trust ISRG Root X1 will fail when presented with the Android-compatible certificate chain we are recommending by default." OpenSSL's advisory explains why: OpenSSL 1.0.2 "always prefers the untrusted chain and if that chain contains a path that leads to an expired trusted root certificate (DST Root CA X3), it will be selected" and the expiry reported. Its fixes included removing DST Root CA X3 from the client's trust store and setting X509_V_FLAG_TRUSTED_FIRST.

The lesson for containers: an old base image ships both an old trust store and an old TLS library, and an expiry exercises both at once. ISRG Root X1 itself is listed by Let's Encrypt as "Trusted until: 2030-06-04", an approximate date "based on current Root Program policies". The next migration of this kind already has a date.

eMudhra's intermediate keys (17 October 2026)

On 17 October 2026 at 20:06 UTC, Mozilla received a report, forwarded by the Chrome Root Program, that the private keys of eight eMudhra intermediates had been compromised: six TLS intermediates and two code-signing intermediates. In Bugzilla bug 2083449, Mozilla's Dennis Jackson wrote that "The 8 impacted keys all used integers less than 256", so each could be recovered from its public certificate. Anyone can confirm this from the public certificates alone: multiply the P-384 base point by each integer from 1 to 255 and compare the results with the public keys of the eight certificates listed in the bug. We ran that check on the copies published on crt.sh, matched by the SHA-256 fingerprints in the bug, and got private keys of 4, 56, 66, 115, 155, 156, 230 and 237. Those are the same values a commenter lists in comment 67; neither Mozilla nor eMudhra published them. The key of EM OV TLS CA - G3C is 4. eMudhra's full incident report in the bug traces this to a "Host‑side ceremony script error" in the 30 April 2025 key ceremony, where "a single line in that read‑back truncated the private value to its leading byte, so the re‑created object held a scalar below 256".

eMudhra revoked all eight intermediates as caCompromise between 09:24 and 09:38 UTC on 18 October. Mozilla had already blocked them through OneCRL, by 22:59 UTC on 17 October; on 20 October it decided on "the emergency removal of trust in emSign ECC Root CA - G3" and shipped NSS 3.131.1 to remove it for "other applications that use Mozilla's trust store or versions derived from it". Chrome blocked the certificates through a CRLSet and committed to the same removal. eMudhra says "roughly 30,800 certificates" were issued under the affected G3 hierarchies.

The container lesson: a revoked intermediate is only distrusted by clients that check revocation for every CA certificate in the chain. Of the 107,107 certificates others issued with six of the keys on 20 and 21 October, "all but two carry no revocation pointer at all", so a client that checks only the server certificate found nothing to check (comment 44 in the bug). The root also stayed in every image whose ca-certificates, certifi, Node or JDK predated the removal. Removing that one root is not the whole fix: Sectigo had cross-signed six of the TLS intermediates, and the disclosure site warns that removing emSign ECC Root CA - G3 "does not block the six Sectigo cross-signed intermediates, which chain to AAA Certificate Services". Its Debian and Ubuntu workaround disables that Comodo root too. An attacker with one of the six TLS intermediate keys could issue a certificate for any name that such a client would accept. Our episode This Certificate Authority's Private Key Was the Number 4 covers the ceremony and why containers kept trusting the root.

Traps without a single postmortem

  • Pinning an intermediate. Let's Encrypt says "We currently maintain four intermediates in active rotation". Any client that pins one will break on a normal renewal.
  • A bundle in a ConfigMap is not a hot reload. Kubernetes' own CA rotation procedure says to "Restart all pods using in-cluster configurations" after the bundle changes. Most runtimes read roots at start-up.
  • The `ca` option replaces, not adds. In Node, passing ca to a TLS client means neither the bundled nor the extra certificates are used. Code that adds a private CA this way silently stops trusting public CAs.

Decision table

OptionWhat it costsChoose it when
OS bundle from the base image, rebuilt on a scheduleExposure equals upstream shipping time plus your rebuild interval plus rollout; needs a scheduled rebuild even with no code changeThe default for most services; also rebuild whenever ca-certificates, certifi or a runtime ships
Point every runtime at the OS bundle (Node --use-openssl-ca, REQUESTS_CA_BUNDLE, Java -Djavax.net.ssl.trustStore set to a keystore generated from the OS bundle)One-time config per runtime; you inherit the distribution's update speed. Additive switches (--use-system-ca, Temurin USE_SYSTEM_CA_CERTS, pip's truststore) add the OS roots but keep the bundled ones, so they never remove a rootYou run more than one language in an image and want one store to patch
Leave runtime-bundled stores (Node default, certifi, JDK cacerts)Each changes only when you bump that runtime or packageYou already bump runtimes weekly and track their release notes
Mount a trust bundle at runtime (volume or ConfigMap)Still needs a rolling restart; the mount becomes a dependencyYou run a private CA, or must update trust faster than you can rebuild images
x509.SetFallbackRoots or other compiled-in rootsRoots change only when you rebuild the binaryScratch images with no OS bundle, and you rebuild often
ACME with ARIClient support; a renewal path that must work unattendedAll public certificates; required in practice before 47-day certificates
Fixed renewal intervalBreaks as lifetimes shrink; 60 days is already too long for 45-day certificatesNever as the only trigger
Private CA rotation with an old-plus-new bundleTwo phases and restarts, as in Kubernetes' documented procedureRotating any internal root without an outage

The no-outage rotation pattern, for public or private trust: first ship a bundle that trusts both old and new roots to every client and restart them; then switch servers to certificates from the new chain; remove the old root only after the last old certificate has expired or been replaced.

A check you can run this week

For each production image, list every trust store and when it last changed. For a root that was just removed, such as emSign ECC Root CA - G3, check each one (the file-name check follows Debian and Ubuntu naming). AAA Certificate Services is included because of the Sectigo cross-signs; finding it is not a finding by itself, since the disclosure site warns that removing it "may break verification of unaffected websites".

docker run --rm --entrypoint sh IMAGE -c '
  ls -l /etc/ssl/certs/ca-certificates.crt
  ls /etc/ssl/certs | grep -i -E "emsign.*g3|aaa_services"
  python3 -c "import certifi;t=open(certifi.where()).read();print(certifi.__version__,t.count(\"emSign ECC Root CA - G3\"))" 2>/dev/null
  node -e "const {X509Certificate}=require(\"crypto\");console.log(require(\"tls\").rootCertificates.map(p=>new X509Certificate(p).subject).filter(s=>/emSign ECC Root CA - G3/.test(s)))" 2>/dev/null
  keytool -list -v -cacerts -storepass changeit 2>/dev/null | grep -i "emsign.*g3"'

Distroless and scratch images have no shell. Copy the bundle out and read it on your machine:

id=$(docker create IMAGE none)
docker cp -L "$id":/etc/ssl/certs/ca-certificates.crt - | tar -xOf - \
  | openssl crl2pkcs7 -nocrl -certfile /dev/stdin | openssl pkcs7 -print_certs -noout | grep -i -E "emsign.*g3|aaa certificate services"
docker rm "$id" >/dev/null

none is a placeholder command so docker create works on images with no default command; the container is never started.

Then answer one review question with a number: if a root were removed from Mozilla's store tomorrow, how many hours until no running process in production trusts it? If the answer depends on someone remembering to rebuild, add a rebuild that triggers on ca-certificates, certifi and runtime releases.

Sources

The primary sources this guide was checked against.

Hear it discussed

Episodes of the show that work through this decision.