NEW RasterizedDB 1.1.0 is out: sharding and the gateway, the message broker, roles and row-level security, compression, .NET on NuGet, and the enterprise edition. What's new ›
LEDGER TABLES & VAULTS ENTERPRISE

Records nobody can quietly change.

Tamper-evident ledger tables, and secret vaults that keep their keys in hardware. Append-only rows under a retention lock, hash-chained and anchored outside the database, so an edit, a delete or a rollback is found by a single statement.

Ledger tables, secret vaults and encrypted columns are in the enterprise edition of 1.1.0: the rasterizeddb-enterprise release archives, with rdb-studio-enterprise for the LEDGER page.

HOW IT WORKS · ANIMATED 12 s cycle

Rows that cannot be changed without anyone noticing

In the 1.1.0 enterprise edition: a ledger table refuses UPDATE and DELETE until its retention passes, chains every committed row by hash, and copies the chain heads somewhere the database cannot rewrite.

LEDGER TABLE payments · NO DELETE UNTIL 7 YEARS AFTER INSERT 1041 120.00 EUR · acme 7a1c… 1042 89.50 EUR · globex c03e… 1043 410.00 EUR · initech 5b9f… 1044 12.30 EUR · hooli e21d… 1042 89.50 → 0.50 EURedited on disk tx 90h 3f2a… tx 91h 9c1d… tx 92h 0b7e… tx 93h e41b… each transaction's hash covers its rows' digests and the previous hash SEPARATE DISK/mnt/anchor/ledgerhead tx 93 = e41b… S3 · OBJECT LOCKcompliance modehead tx 93 = e41b… UPDATE payments SET amount = 0 WHERE id = 1042 refused: inside its retention superusers included · a legal hold keeps rows longer VERIFY LEDGER payments row 1042: digest mismatch chain checked against the anchored heads
  1. 1
    Append-only by policy

    CREATE LEDGER TABLE with a retention lock: rows can be added, and nothing removes one before its retention ends. Superusers are not exempt.

  2. 2
    Every row is hashed

    Each committed row gets a salted digest, and the transaction's digests are chained to the previous transaction's hash.

  3. 3
    Heads leave the database

    The chain heads are copied to a separate disk, or to S3 with Object Lock in compliance mode, where the database itself cannot rewrite them.

  4. 4
    Changes are refused

    An UPDATE or DELETE inside the retention window is refused, whoever runs it. A legal hold keeps rows past their retention.

  5. 5
    Someone edits a file

    Bytes are changed underneath the engine, behind its back.

  6. 6
    VERIFY finds it

    Recomputing the chain against the anchored heads shows exactly which rows were edited, deleted or rolled back.

1 / 4

Ledger tables

  • Append-only, or VERSIONED to keep every version of a row, with a retention lock and legal holds; superusers are not exempt
  • Every committed row hash-chained, with receipts a client can keep
  • Chain heads anchored to a separate directory or to S3, optionally signed
  • VERIFY LEDGER, or the offline rdb-ledger-verify tool, finds edited, deleted or rolled-back rows
SQL
CREATE LEDGER TABLE payments (
    id      BIGINT NOT NULL,
    payer   TEXT   NOT NULL,
    amount  BIGINT NOT NULL
)
NO DELETE UNTIL 7 YEARS AFTER INSERT
NO DROP UNTIL 90 DAYS IDLE
ANCHOR TO 'dir:/mnt/worm/ledger';

ALTER LEDGER TABLE payments SET LEGAL HOLD 'case-4411';
VERIFY LEDGER payments;
2 / 4

Secret vaults

A self-hosted alternative to cloud key vaults, in the same server as the data.

  • Versioned secrets with soft delete and purge protection
  • Keys from an HSM through PKCS#11, a TPM, a hybrid post-quantum ML-KEM-768 with X25519 key file, or a plain key file for development
  • The secret's value is cut from every place the server keeps statement text
  • An audited, hash-chained record of every read
SQL
CREATE VAULT app_secrets
  KEY PROVIDER 'pkcs11:module=/usr/lib/softhsm/libsofthsm2.so;token=rdb;key=vault-kek;pin-source=/etc/rasterizeddb/hsm.pin'
  RETAIN DELETED 30 DAYS;

VAULT app_secrets SET SECRET 'db/password' = 'correct horse battery staple';
VAULT app_secrets GET SECRET 'db/password';   -- audited
3 / 4

Encrypted columns

  • Column values encrypted with a vault key, decrypted only for roles allowed to read them
  • Works in ledger tables too
  • Keys rotate in the vault
SQL
CREATE TABLE staff (
    id   BIGINT NOT NULL,
    ssn  VARCHAR(11) ENCRYPTED WITH VAULT hr KEY 'pii' NOT NULL
);
4 / 4

Around them

  • Client-certificate (mTLS) login on the PostgreSQL and native protocols
  • The Studio LEDGER page, in the enterprise build of Studio
  • An optional FIPS 140-3 mode built on the AWS-LC FIPS module, under which the ledger's hashes and the vaults' encryption run inside the module
✓ page rendered in 250 µs axum + tera + htmx · no other javascript