Cloudflare's Certificate Transparency Monitoring system faced a significant challenge: alert fatigue due to the high volume of routine certificate renewals. This article details the architectural decisions and trade-offs made to filter out internal certificate issuances, ensuring that only unexpected or suspicious certificates trigger alerts. The core problem was correlating information from disparate certificate management and CT alerting flows.
Read original on Cloudflare BlogCloudflare's Certificate Transparency (CT) Monitoring service provides an early warning system for mis-issued TLS certificates. Initially, it suffered from a 'noise problem' where high-volume, legitimate certificate renewals issued by Cloudflare itself would trigger excessive alerts, making it difficult for users to identify genuinely suspicious activity. This scenario highlights a common challenge in monitoring systems: balancing comprehensiveness with actionable signal-to-noise ratio.
The fundamental issue stemmed from the existence of two independent systems: a certificate management system responsible for internal certificate issuance data, and a CT alerting service that processes data from public CT logs. These systems operated with different information and at different times. The alerting service lacked a direct signal from the issuance flow to confirm if a certificate was legitimately issued by Cloudflare, leading to false positives.
Initial attempts to use identifiers like `stripped_fingerprint` (a hash of the `TBSCertificate`) for correlation failed because the ordering service didn't receive the pre-certificate, meaning it couldn't produce this value early enough for the alerting service to look it up effectively. This 'race condition' between pre-certificate logging and ordering service recording meant the identifier wasn't consistently available when needed by the alerting service.
Key System Design Takeaway
When designing distributed systems that need to correlate data across multiple, independently operating services, ensure that a consistent, early, and reproducible identifier is established and shared across all relevant flows from the very beginning of a transaction or event lifecycle. This prevents race conditions and ensures reliable data lookup.
The chosen solution involved using the public key, specifically its SHA-256 hash (`spki_sha256`), as the universal identifier. This key satisfies all critical requirements:
The certificate ordering service now computes and records `spki_sha256` at key generation. When the alerting service processes a log entry, it recomputes the `spki_sha256` from the certificate's public key and queries the ordering service's database. A match indicates a Cloudflare-managed certificate, leading to alert suppression. This architectural change significantly reduces noise, allowing the monitoring system to focus on actionable threats.
This filtering mechanism ensures that only certificates not issued by Cloudflare trigger alerts, effectively addressing the noise problem. It also handles abandoned pre-certificates silently. Future plans include integrating CT Monitoring with Cloudflare Notifications for broader alert routing (webhooks, PagerDuty), enhancing the system's extensibility and integration capabilities within a larger operational ecosystem.