cuba_archivo
Append, verify, and tail events in a tamper-evident audit log using SHA-256 hash chains.
Instructions
Tamper-evident audit log (v0.9, CFR-21 Part 11 inspired). Append-only with SHA-256 hash chain — every row's current_hash commits to the previous row's, the action and the canonical payload. UPDATE/DELETE blocked at the PostgreSQL trigger level (only cuba_admin role can bypass). Use 'verify' to walk the chain and detect tampering, 'tail' to read recent events, 'append' to add a new event.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Limit for verify/tail (default 10000 / 20) | |
| action | Yes | Audit operation | |
| payload | No | Arbitrary JSON payload (for append) | |
| event_action | No | Event type (for append) |