Skip to content
All posts
Security
29 September 20263 min read

An activity log is not an audit trail

Anyone can write rows to a table. The question is what those rows are worth on the day somebody has a reason to doubt them.

By the OpsPilot team

Every platform has an activity log. It records that a user did a thing at a time, and for most purposes that is fine — it answers questions when everybody is acting in good faith and nobody is arguing.

An audit trail is a different object. It has to be worth something precisely when somebody is arguing.

The failure mode

A client disputes an invoice and claims nobody ever connected to their server on the night in question. You open the log. It says a session ran at 23:14. Good.

Then their lawyer asks the question that matters: could that row have been written, edited, or deleted after the fact by anyone with database access?

For an ordinary activity table, the honest answer is yes. Rows are rows. Someone with the right credentials can change one and nothing about the table will look different afterwards. The log is evidence of what happened only to the extent that everyone agrees it was not tampered with — which is exactly the thing in dispute.

Hash chaining, briefly

Each entry carries a hash computed over its own contents and the hash of the entry before it. The entries form a chain, and every entry's hash depends on every entry that came before.

Change the content of an old row and its hash no longer matches what the next row recorded. The break is detectable, and it is detectable at the exact point where the edit happened. You cannot quietly alter history; you can only visibly break it.

Why chaining alone is not sufficient

An attacker with enough access does not have to edit one row. They can recompute the whole chain from the point of the edit forward, and the result is internally consistent — a perfectly valid chain telling a different story.

The fix is to put the chain's head somewhere the attacker does not control. Periodically, the current head hash is written off the machine. Now a recomputed chain disagrees with an anchor recorded elsewhere, at a known time, and the disagreement is the finding.

Chaining makes tampering visible. Anchoring makes it visible to someone other than the person tampering.

For teams without a SIEM

The textbook answer is to ship audit events to a SIEM, where they live outside the application's blast radius. That is the right answer for organisations that have one.

Most small and mid-sized service providers do not, and telling them to buy one is not advice, it is a deferral. The anchoring approach gives the same tamper-evidence property with nothing to procure: the chain head is recorded off-box on a schedule, and a verification pass re-derives the chain and compares.

What to ask a vendor

  • Can an administrator edit or delete an audit entry? What happens if they do?
  • If someone recomputes the log, what disagrees with them?
  • Is the record attributable to a person, or only to a shared account?
  • Can you produce it, as a sequence, for a date range, without engineering help?

If the answers are vague, what you have is an activity log. That may be all you need — but it is worth knowing which one you have before the day you need the other.

See it on your own clients

Twenty minutes, on your data — bring a client list and a job you'd normally struggle to bill.

Book a demo

Related