Hermes Wiki
Developer/RecordsAudit/ImmutableWORM/Fundamentals/worm-storage-and-immutability-guarantees

WORM Storage and Immutability Guarantees

Concept

Write-Once-Read-Many (WORM) storage guarantees that once a record is written, it cannot be modified or deleted — either for a defined retention window or permanently — regardless of who is asking, including the system's own administrators. That last clause is what separates WORM from ordinary "we don't have a delete button in the UI" soft protection: a genuine WORM guarantee has to survive a request from someone with full production access, because the whole point is to produce evidence that holds up when the person you'd normally trust is exactly who a regulator or auditor is asking you to distrust (a rogue insider deleting evidence of fraud, or ransomware with admin credentials encrypting backups).

Three mechanisms deliver this in practice, at increasing levels of rigor. Object-storage WORM is the most common: AWS S3 Object Lock and Azure Immutable Blob Storage attach a retention policy directly to an object version at the storage layer, independent of any application code. Append-only application-level tables enforce immutability in the schema/permissions layer instead — a table with INSERT-only grants and no UPDATE/DELETE privileges for any application role, often combined with hash-chaining each row to the previous one so tampering (even via a direct database connection) is detectable even if not physically prevented. Ledger/blockchain-backed storage goes further, distributing the tamper-evidence across multiple parties or nodes so no single operator — not even the system owner — can rewrite history; this is real overkill for most compliance needs and mostly shows up where multiple mutually-distrusting organizations need to agree on a shared record.

S3 Object Lock specifically ships two retention modes that get conflated more often than they should. Governance mode locks objects from ordinary users but leaves a bypass path: anyone holding the s3:BypassGovernanceRetention IAM permission can still delete or alter the object and shorten its retention. Compliance mode locks the object from everyone, full stop — not even the AWS account root user can shorten the retention period or delete the object before it expires. Cohasset Associates has assessed S3 Object Lock's compliance mode against SEC Rule 17a-4(f), FINRA Rule 4511, and CFTC Regulation 1.31, which is why compliance mode (not governance mode) is what regulated-industry retention actually cites.

Tradeoffs

Mechanism Tamper resistance Engineering cost Regulatory standing
Object storage — Governance mode High against ordinary users, but privileged roles can still bypass it Low — a retention config, no app changes Weak for hard compliance mandates — the bypass path itself fails "provably un-alterable by anyone"
Object storage — Compliance mode Highest practical guarantee — no bypass exists, including account root Low, but the lock is one-way: retention can only be extended, never shortened, so misconfiguration is expensive to fix Explicitly assessed against SEC 17a-4(f)/FINRA 4511/CFTC 1.31
Append-only DB table + hash chaining Detects tampering after the fact (chain breaks); doesn't physically prevent a superuser with raw DB access from rewriting rows and re-chaining Moderate — schema, permission, and chaining logic all live in your own code Depends entirely on your own audit's acceptance of detection vs. prevention
Ledger/blockchain-backed Highest — no single party, including the system owner, can rewrite unilaterally High — new infra class, operational complexity, usually multi-party coordination Rarely required outside multi-org shared-record scenarios

When to use / when not to

  • Use compliance-mode object storage (or an equivalent) for records with an explicit legal retention mandate where "provably un-alterable, including by our own staff" is the actual bar — financial ledgers, regulated audit trails, records under SEC/FINRA/CFTC-style retention rules.
  • Governance mode is the right choice when you want immutability as a safety rail against accidental or unauthorized deletion, but still need a documented emergency-override path (e.g., correcting a genuine data-entry error before anything is legally finalized) — that's a real, legitimate use case, not a lesser version of compliance mode.
  • Don't reach for WORM on data whose normal operation requires legitimate correction — operational records with a real update workflow belong in mutable storage with their own audit trail of changes, not forced into a WORM shape that fights the workflow.
  • Don't default to blockchain/ledger infrastructure for single-organization audit trails; it solves a multi-party trust problem you likely don't have, at a cost you don't need to pay.

Common pitfall

Turning on governance mode and treating it as equivalent to compliance mode, because both block "everyday" deletion in testing. The gap only shows up when an audit specifically asks "can any actor, including your own privileged administrators, alter or delete this record before its retention expires" — and the honest answer for governance mode is yes, because s3:BypassGovernanceRetention exists precisely to allow it. A retention scheme picked by testing "does the delete button still work" rather than by reading what the applicable regulation actually requires (17a-4(f) explicitly requires the compliance-mode-equivalent guarantee) fails exactly the audit it was built for.

Engineering Lens

The design-review question that actually matters isn't "did we enable Object Lock" — it's "if asked to prove this specific record could not have been altered by anyone, including our own ops team, with root credentials, during an incident, can we show that guarantee held." That's a mode choice (governance vs. compliance), a retention-duration choice, and an IAM-boundary choice made together, not a checkbox left at whatever the SDK defaults to. It's also worth stating explicitly in the design doc which mechanism (storage-layer lock vs. application-level append-only enforcement) is actually doing the guaranteeing, since "we have an audit log" and "we have a WORM-guaranteed audit log" are different claims with very different failure modes under a real incident.

Sources

Hermes Wiki