Back to Docs
Recipe

Audit Log Strategy

A tamper-evident, append-only audit pipeline that captures every licensing event, enrichment step, and admin action in Meridian.

Overview

Meridian emits structured audit records for license activations, hardware fingerprint changes, key rotations, and dashboard mutations. Every record is hashed into a local append-only log, then periodically sealed into an immutable external store.

Record Schema

FieldTypePurpose
event_idUUIDv7Time-sortable unique identifier
actorstringUser, license key, or system
actionenumactivate, revoke, enrich, rotate
payloadjsonbContextual diff or full snapshot
prev_hashsha256Chain integrity link

Integrity Chain

Each record includes the SHA-256 hash of the previous record. The head hash is published hourly to an external witness (Upstash KV with a TTL guard). Any gap or mismatch triggers an alert in the Discord operations channel.

Retention & Pruning

Hot storage retains 90 days of full records in Upstash KV. Older records are compacted into daily summary blocks and moved to cold storage. The integrity chain is never pruned — head hashes remain verifiable indefinitely.