How the Hash Chain Works
Each new event’s hash is computed from three inputs: the previous event’s hash, the canonical payload of the current event, and the current timestamp in milliseconds.Canonical Payload
The canonical payload is a deterministic JSON serialisation of the core event fields:Worker-enriched fields —
country, city, ip_address, and the chain fields themselves (chain_seq, hash, prev_hash) — are deliberately excluded from the canonical payload. This ensures the hash is stable regardless of how AuditRails enriches the event after ingestion.Genesis Event
The very first event in a tenant’s chain uses 64 zero characters (0000...0000) as its previous_hash. Every subsequent event’s hash depends on all events before it, forming an unbroken chain from the first record ever written.
Tenant Isolation
Each tenant maintains a completely independent chain. There is no cross-tenant dependency, so a verification run for your organisation only checks your own events.Why Tamper Detection Works
The chain’s security comes from the one-way nature of SHA-256:
A valid chain is cryptographic proof that every event exists exactly as it was written, in the correct order, with no gaps.
Verify via the Dashboard
You can inspect individual events and navigate the chain directly in the UI.1
Open the Logs view
Navigate to Dashboard → Logs and locate the event you want to inspect.
2
Click the event
The event detail panel opens. Scroll down to the Chain section.
3
Navigate the chain
The panel displays the current event’s
hash and chain_seq, along with links to the previous and next events in the chain. Each linked event shows its own hash so you can visually confirm they match.Verify via the API
The/v1/events/verify endpoint checks a range of events and returns a single pass/fail result with full diagnostics.
Endpoint
Query Parameters
Response Fields
Examples
Healthy Response
Broken Chain Response
For Auditors: Independent Verification
If you are conducting an external audit, you can verify AuditRails logs without relying on the platform’s own verification output.1
Run verification for the audit period
Call
GET /v1/events/verify with from_seq and to_seq set to cover the audit period. Confirm the response contains "valid": true.2
Export the log CSV
From Dashboard → Logs, apply a date filter for the audit period and export to CSV. The export includes
chain_seq and hash columns for every event.3
Recompute hashes independently
Using the canonical payload formula and the exported data, recompute each event’s hash and compare it to the
hash column in the CSV. Any discrepancy indicates tampering.The canonical payload is always the JSON of: log_id, tenant_id, action, actor_id, resource, metadata — in that key order, with no extra whitespace.4
Document your findings
Record the
first_seq, last_seq, checked, and valid values from the API response as part of your audit evidence package. A valid: true result covering the full audit period satisfies hash-chain integrity requirements for SOC 2, HIPAA, ISO 27001 A.8.15, DORA Art.6, and FedRAMP AU-9.