API Evolution Watchtower
Monitor third-party OpenAPI specifications for consumer-impacting contract changes and govern accepted revisions with persistent PASS/WARN/BLOCK decisions.
Audit Smallstep step-ca daemon health, monitor root X.509 certificate expiration horizons, and dispatch automated Slack alerts before mTLS outages occur.
Smallstep step-ca is an open-source, automated private Certificate Authority (CA) used by DevOps and platform teams to issue mTLS identity certificates, manage internal Zero Trust PKI, and automate short-lived certificate lifecycles across Kubernetes clusters and microservices. However, if the CA daemon encounters an unhandled crash, or if the underlying root or intermediate X.509 certificates expire without renewal, all downstream service authentication, mTLS encryption handshakes, and automated certificate rotations fail simultaneously across the entire infrastructure.
This blueprint provides an automated sentinel that periodically probes Smallstep step-ca daemon health, retrieves active root certificate chains over the public authority endpoint, calculates the exact days remaining until certificate expiration, classifies operational risk through a conditional Switch gate, dispatches context-rich Slack incident alerts, and exports structured PKI telemetry for security compliance auditing.
scheduled_pki_audit (io.kestra.plugin.core.trigger.Schedule) initiates automated surveillance every six hours. It is shipped disabled by default for initial connection verification.probe_ca_health (io.kestra.plugin.core.http.Request) invokes the Smallstep CA endpoint GET /health to confirm that the PKI daemon process is running and accepting client requests.probe_root_certificates (io.kestra.plugin.scripts.python.Script running inside Docker) fetches the active root certificate bundle from GET /roots, parses the X.509 validity boundaries using Python's cryptography library, and computes the exact days remaining until expiration against UTC timestamps.classify_certificate_health (io.kestra.plugin.core.flow.Switch) evaluates the calculated days remaining against team risk tolerances:CRITICAL_EXPIRY_RISK: Triggered when days remaining falls below critical_days_threshold (default 15 days). Dispatches an urgent incident card to #security-pki via io.kestra.plugin.slack.notifications.SlackIncomingWebhook containing the certificate subject, serial number, expiration timestamp, and CA rotation runbook guidance.EXPIRY_WARNING: Triggered when validity falls below warning_days_threshold (default 45 days). Sends an advisory Slack message to schedule routine provisioner renewal.HEALTHY: Logs nominal validity status via io.kestra.plugin.core.log.Log when certificates are well within operating parameters.finalize_pki_audit (io.kestra.plugin.core.output.OutputValues) publishes clean telemetry (subject, issuer, validity window, days remaining, daemon status) for compliance reporting and long-term monitoring dashboards.errors handler captures connection timeouts, unreachable endpoints, or crashed daemon states to alert the PKI operations team out-of-band.step-ca.Certificate Authority outages cause catastrophic ripple effects across distributed systems. Standalone monitoring scripts or cron tasks lack persistent execution histories, centralized audit logs, secret masking, and robust error recovery. Kestra provides declarative scheduling, containerized cryptographic parsing, conditional alerting logic, and enterprise collaboration integrations out of the box.
step-ca, reachable over HTTP or HTTPS. Smallstep publishes an official open-source Docker image (smallstep/step-ca:latest) requiring no paid license or commercial account.SLACK_WEBHOOK_URL: Slack Incoming Webhook URL used to dispatch operational and security alerts.docker run -d --name step-ca-sentinel -p 9000:9000 -e DOCKER_STEPCA_INIT_NAME="Internal PKI" -e DOCKER_STEPCA_INIT_DNS_NAMES="localhost" smallstep/step-ca:latest
SLACK_WEBHOOK_URL in your Kestra namespace secrets.company.security.stepca_url: https://localhost:9000) to confirm connectivity and view root certificate validity metrics.scheduled_pki_audit to activate continuous six-hour PKI surveillance.step-cli container task to execute step ca renew automatically when intermediate validity enters warning status.io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for Sev-1 paging when root CA validity drops below 7 days.io.kestra.plugin.prometheus.PushGateway for visualization on Grafana infrastructure dashboards.