Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 7 min read Case study mediumAdept

Using short-lived certificates to protect TLS secrets

Meta now limits TLS private key exposure on its edge to 10 days by rotating short-lived certificates daily, after rejecting CRL/OCSP revocation (latency, failure modes), remote signing from datacenters (vulnerable to backbone and datacenter outages) and delegated credentials (insufficient browser support). Certificates are issued months ahead from third-party CAs and moved from a locked-down secret store to an edge-only store just 10 days before expiry, which keeps CA issuance off the critical path and provides ready backup certs for emergency rotation. A ConfigBuilder groups certs into expiry-dated bundles, validates them, and rolls them out in stages: canary, then about 100 machines, then the full fleet after a day of baking. The OffloadService signs with both old and new keys during rotation, and caching plus staggered fetches keep daily rotation from overloading the secret store.

Assumes: TLS handshake basicsX.509 certificates and CAsL7 load balancers

Related posts

  • How CDNs Generate Certificates

    Fly.io mediumAdept

    CDNs like Fly obtain Let's Encrypt certificates for customer domains using the ACME tls-alpn-01 challenge, which needs neither DNS access nor port 80. The older tls-sni-01 challenge was removed because shared-hosting providers let customers claim arbitrary .invalid names and upload certificates, enabling issuance for other tenants on the same IP. The history runs through NPN vs. ALPN negotiation, NPN downgrade attacks and the middlebox bug that produced the ClientHello padding extension. Fly's flow ends with its Rust proxy recognizing the "acme-tls/1" ALPN value and serving a self-signed challenge certificate. Subdomain takeover is mitigated by giving every app a unique IPv6 address and requiring a CNAME to it before validation.

  • How Meta enables de-identified authentication at scale

    Meta Engineering mediumAdept

    Meta's Anonymous Credential Service (ACS) authenticates clients without user IDs by splitting authentication into token issuance over an authenticated channel and unlinkable token redemption over an anonymous channel, built on VOPRFs and blind signatures with an HMAC over business data keyed by a shared secret. ACS is a multitenant C++ Thrift service on Twine that isolates use cases with per-use-case keys and rotates them routinely. It serves hundreds of thousands of requests per second for WhatsApp's de-identified telemetry. Scaling lessons include configurable credential reuse limits backed by a ZippyDB counter to cut capacity costs, dithering plus a global rate limiter to absorb synchronized nightly client spikes, and self-service onboarding with Android/iOS SDKs so teams need no cryptography expertise.

  • Our Response To The eMudhra Key Disclosure Incident

    The Go Blog easyNovice

    Weak private keys on eight eMudhra-issued intermediate certificates made them recoverable in microseconds, letting attackers mint trusted TLS certificates for any domain. Because Go's own verifier on Linux has no revocation mechanism, the Go Security team shipped Go 1.27.3 and 1.26.10, its first URGENT-track security release, within about 7.5 hours of notification. The patch blocks certificates chaining to the compromised intermediates. Release tooling problems stretched the release itself to about 4.25 hours, so the team has streamlined the process, will pre-announce URGENT releases, and plans Linux revocation support, possibly via upki. Users should rebuild TLS-using binaries with the patched versions and can check exposure with go version -m or govulncheck.

  • Enforcing encryption at scale

    Meta Engineering hardMaster

    Meta enforces TLS on internal service traffic with SSLWall, a host-level daemon plus eBPF programs that detect and cut off plaintext connections, chosen over L7 firewalls to keep the blast radius small and allow fine-grained rollout. It combines a tc-bpf filter, kprobes on tcp_connect and tcp_v6_destroy_sock, and BPF maps. It supports a passive monitoring mode, bypasses for BGP/SSH, and plaintext-then-TLS flows like STARTTLS and HTTP CONNECT. Lessons included handling TCP Fast Open ordering via kprobe prehandlers, BPF program size limits, and keeping CPU overhead trivial with early exits and arrays instead of LRU maps. For noncompliant long-tail apps, Transparent TLS uses a cgroup/connect6 BPF hook to redirect connect() calls to a local encrypting proxy, skipping connections that already use TLS.

  • How Meta built large-scale cryptographic monitoring

    Meta Engineering mediumAdept

    Meta logs every operation in FBCrypto, its managed cryptographic library, without sampling by aggregating identical events into per-event counts in an in-process buffer and flushing them periodically to Scribe, with data landing in Scuba and Hive. The buffer is a folly::ConcurrentHashMap shared across threads. Randomized first-flush delays smooth write spikes, and derived-key operations are rolled up under the parent key name to cut volume while still giving a pessimistic count for detecting key overuse. The resulting dataset drives key rotation, inventories of weak and quantum-vulnerable algorithms for migration, migration-safety alarms based on success rates, and fleet-wide library version tracking. Remaining challenges include Scribe and Scuba capacity and flushing safely at shutdown.

The quest for software engineering knowledge.

Look:
Layout: