Schedule icon
Query icon
Return icon
Switch icon
SlackIncomingWebhook icon
If icon
Log icon

immudb Cryptographic Ledger State & Tamper Sentinel

Audit immudb immutable database state digests, verify cryptographic root hash integrity over PostgreSQL, and alert Slack on tamper anomalies.

Categories
Infrastructure

immudb is an open-source immutable database built on cryptographic verification using cryptographic Merkle trees. Regulated organizations rely on immudb for tamper-proof storage of financial ledgers, clinical data, and security audit logs to satisfy SOC 2, PCI-DSS, ISO 27001, and HIPAA compliance mandates. In production architectures, immutable ledgers can experience silent node desynchronization, unverified state transitions, or network partition isolation. When an immutable store fails to update its cryptographic root digest or when underlying storage becomes corrupted, traditional database monitors continue reporting green connections while audit proofs fail. This blueprint provides a continuous sentinel that queries immudb via its PostgreSQL wire protocol, validates cryptographic state digests, alerts security teams upon tamper anomalies, and enforces compliance quarantine when verified.

How it works

  1. Scheduled trigger (every_fifteen_minutes) initiates diagnostic verification every 15 minutes, with manual on-demand execution supported via inputs.
  2. Diagnostic probe (probe_ledger_state) connects to the immudb PostgreSQL compatibility listener via io.kestra.plugin.jdbc.postgresql.Query and executes SELECT immudb_state().
  3. Classification step (classify_tamper_health) parses the cryptographic root digest using Pebble template conditionals, categorizing health into HEALTHY, ROOT_MISMATCH, TAMPER_DETECTED, or PROBE_FAILED.
  4. Flow router (route_by_compliance) switches downstream remediation and notification branches based on the verified integrity tier.
  5. On TAMPER_DETECTED, alert_tamper_slack broadcasts an urgent security incident alert to Slack, and quarantine_gate conditionally blocks downstream workflows when quarantine_on_tamper is enabled.
  6. On ROOT_MISMATCH, alert_root_mismatch warns operators that the observed state digest has diverged from the configured baseline prefix.
  7. On PROBE_FAILED or network errors, dedicated alerts notify administrators of database reachability loss or invalid credentials.
  8. Audit log task (log_audit_summary) outputs an immutable execution record detailing the verified root digest, target endpoint, and execution lineage.

What you get

  • Automated, continuous validation of cryptographic Merkle root digests across immudb ledgers.
  • Early warning detection of state divergence and tampering before regulatory audits or compliance certifications fail.
  • Automated incident alerts delivered to Slack with endpoint targets and cryptographic state diagnostics.
  • Guarded compliance quarantine controls that prevent corrupted ledgers from propagating false status downstream.
  • Zero-credential-leak architecture keeping administrative passwords masked in execution logs.

Who it's for

  • Security Engineers enforcing cryptographic auditability and Zero Trust data retention.
  • Compliance Officers overseeing SOC 2, HIPAA, and PCI-DSS audit trail integrity.
  • Data Platform Engineers managing immutable ledgers and financial record stores.

Why orchestrate this with Kestra

  • Declarative YAML definition unifies security surveillance, cryptographic verification, and alerting into auditable GitOps workflows.
  • Native PostgreSQL JDBC plugin connectivity eliminates custom Python worker container dependencies and credentials leakage.
  • Centralized secret management protects database credentials from exposure in command arguments, logs, and monitoring agents.
  • Built-in conditional routing cleanly separates routine verification from high-priority security quarantine routines.
  • Immutable execution timelines in Kestra provide historical verification evidence for external compliance auditors.

Prerequisites

  • immudb instance (v1.4+) running with PostgreSQL wire compatibility enabled (default port 5432).
  • Database user with read permissions on default databases and access to immudb_state().
  • Slack incoming webhook URL for security notification routing.

Secrets

  • IMMUDB_USERNAME: Username for authenticating to the immudb PostgreSQL wire compatibility port.
  • IMMUDB_PASSWORD: Password for the immudb database user.
  • SLACK_WEBHOOK_URL: HTTPS incoming webhook URL for the security alert Slack channel.

Quick start

  1. Configure IMMUDB_USERNAME, IMMUDB_PASSWORD, and SLACK_WEBHOOK_URL in your Kestra namespace secrets.
  2. Deploy this flow to your Kestra instance and execute an initial manual run with dry_run: true to confirm connectivity against your immudb server.
  3. Review the execution logs in the Kestra UI to verify the immudb_state() root digest is retrieved successfully.
  4. Enable the every_fifteen_minutes schedule trigger to establish automated continuous integrity verification.

How to extend

  • Add transaction-level verification using immudb_verify_tx(tx_id) to audit specific high-value transactional sequences.
  • Integrate PagerDuty incident creation via io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for high-severity cryptographic corruption.
  • Chain downstream archiving tasks to snapshot verified state digests to cloud object storage.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.