Schedule icon
Webhook icon
OutputValues icon
Switch icon
Parallel icon
Download icon
Request icon
DownloadFiles icon
Fail icon
Write icon
Labels icon
If icon
GoogleChatIncomingWebhook icon
Pause icon
UploadFiles icon
Set icon
Log icon

Ship the Mozilla CA Bundle to Your Scripts with Root Diffs, Review and Rollback

Keep the CA bundle your Kestra scripts trust in step with Mozilla, with SHA-256 checks, root diffs, Google Chat review of removals and rollback.

Categories
CoreInfrastructure

Mozilla's root store decides which certificate authorities most TLS clients outside the browser trust, and it keeps moving: between curl's December 2025 and May 2026 extracts Mozilla removed 24 roots, DigiCert Global Root CA among them. A script with an old bundle keeps trusting CAs Mozilla dropped; one that refreshes blindly fails TLS against endpoints that still chain to a removed root; behind a TLS-inspecting proxy it also needs the proxy's root in the same file. This flow turns that file into a reviewed release for every script task in the namespace.

How it works

  1. A weekly Schedule, the Webhook ({"action": "refresh"} or {"action": "rollback"}) or a manual run starts it.
  2. fetch (Parallel) downloads curl's extract and its .sha256 and reads optional extra roots from trust/extra-roots.pem. A checksum mismatch or an unreadable file stops the run.
  3. inventory lists every root by name and by the SHA-256 of its base64 certificate text, and diff compares it with the version recorded in the KV store: FIRST_PUBLISH, ADDITIONS, REMOVALS, DOWNGRADE, SAME_ROOTS or UNCHANGED.
  4. review (If) sends removals and downgrades to Google Chat and waits on a Pause for Publish or Keep; no decision keeps the current bundle.
  5. apply (Switch) publishes trust/cacert.pem with an archive copy, checks the read-back SHA-256, records the version in the KV store and posts a release note. A run that waited is refused if the published version changed meanwhile.
  6. rollback restores the previous version from the archive and pins it, so the next refresh asks before publishing anything else.

What you get

  • A trust store that follows Mozilla; with the default policy, no removal lands unreviewed.
  • Release notes naming the roots added and removed, and a label per kind of change.
  • Your proxy or internal roots kept in the same file, and every version archived for an offline rollback.
  • Fail-closed checks before the KV state moves, and an errors alert naming the version still recorded.

Who it's for

  • Platform and security engineers who own the trust store of scripts behind TLS inspection or in restricted networks.
  • Teams whose scripts call partner or legacy endpoints that still chain to older roots.

Why orchestrate this with Kestra

  • Namespace files hand every script task the same bundle without rebuilding images.
  • The KV store keeps the published version and the rollback target; Pause, Labels and outputs keep every change reviewable.

Prerequisites

  • Kestra with plugin-googleworkspace, and HTTPS access to curl.se (no account or API key).
  • Optional: a trust/extra-roots.pem namespace file, with a comment line above each certificate to name it.

Secrets

  • GOOGLE_CHAT_WEBHOOK_URL: Google Chat incoming webhook for reviews, release notes and failures (when notify is true).
  • CA_BUNDLE_WEBHOOK_KEY: key that guards the webhook URL.

Quick start

  1. Create both secrets, and upload trust/extra-roots.pem if you need your own roots.
  2. Click Execute; the first run publishes the current bundle.
  3. Point script tasks in the namespace at it:
    namespaceFiles:
      enabled: true
      include:
        - trust/cacert.pem
    env:
      SSL_CERT_FILE: trust/cacert.pem
      REQUESTS_CA_BUNDLE: trust/cacert.pem
    
  4. Keep the weekly schedule on, and run action: rollback if a published change breaks a call.

How to extend

  • Rebuild images or import the bundle into a Java truststore from a Flow trigger on this flow's outcome output.
  • Before approving a removal, test your critical endpoints against the candidate bundle in a script task.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.