DaletGuard supports civilians affected by armed conflict through Families Beyond War. All sides, no political affiliation. About our humanitarian work

Evidence Audit Trail With a Verifiable Hash Chain

An evidence audit trail is only useful if you can show that nobody has quietly changed it after the fact. DaletAlert builds its trail as a SHA-256 hash chain for each tenant, so every audit row carries the previous hash. The database also refuses to update or to delete those rows, even when the request comes from a code bug. You can verify the chain on demand, and a worker also checks it again on a fixed schedule for you. This page explains each layer of the evidence audit trail, and then states plainly what the hash chain cannot prove.

Illustration of folder, lock, eye for evidence audit trail
Key takeaway

The evidence audit trail in DaletAlert is a per-tenant SHA-256 chain that the database will not let anyone edit. You can verify it on demand, and a signed anchor log records chain tips outside the database. The anchor cannot prove truncation, so the storage under it must be write-once.

Why do so many people doubt an evidence audit trail today?

Why is a log that an admin can edit not a proof?

Many systems keep an audit table that an administrator can update. However, if anyone can fix a row, nobody can prove that no row was fixed. A credible evidence audit trail has to make quiet edits visible, not just discouraged.

Why must a log keep each read, not just each edit?

Most teams log each change but ignore reads. Yet an examiner may ask who looked at a sensitive case, and when. As a result, an evidence audit trail that skips reads leaves out half the story.

Why does a file drift from its hash, and why care?

For example, a narrative may cite a document that was later replaced. Without a stored hash, nobody can say whether today's file is the one the analyst saw. So the evidence audit trail needs a fingerprint for every attachment, and a stored hash gives it one.

Why doubt a claim that runs ahead of the proof?

Some vendors say their logs are court ready and stop at that. Instead, a careful buyer asks what the hash chain detects, what it misses and what the storage must do. This page answers those three questions for DaletAlert.

A diagram of three stacked layers, from the first at the top: Hash chain, Audit anchor, Court bundle.

How is the trail of records built inside of DaletAlert?

Why does each tenant get its own chain of rows?

Every audited action in the evidence audit trail writes a row. Each row holds a sequence number, a previous hash and a record hash. Specifically, the record hash is SHA-256 over the row content and the previous hash. Because each tenant has its own sequence, one tenant's hash chain never mixes with another.

Currently, the write format is hash version two. A tenant that has moved to version two cannot go back to version one. Thus, that rule stops a downgrade from hiding a chain break.

How does the database keep each row as it was?

First, a database trigger blocks every update and every delete on audit rows. However, it does not block truncation. Also, row-level security is forced on tenant tables.

Therefore, the evidence audit trail does not depend on the app code being correct. Even a bug in the API cannot rewrite a past row without tripping the trigger.

Why are reads and the denied reads logged as well?

Viewing a record and listing records both write events in the evidence audit trail.

Denied reads are written to the evidence audit trail as well. A small piece of middleware flushes denial events after the request ends. As a result, a refused request still leaves a row. Your reviewers can then see who tried to open a case and was turned away.

DaletAlert audit trail with a hash chain screen
Also, the evidence audit trail of one case and its hash chain check.

What are the five steps that each audit row goes through?

Five steps from an audit event through hashing and chaining to verification and an external anchor
Each audit row carries a hash of the previous row. Verification and an external anchor sit on top.

First, each action adds an audit row. Next, the row is hashed together with the hash of the row before it.

The rows form one sequence per tenant. Then verification walks that sequence. Finally, the audit anchor writes the latest chain tip to storage outside the database.

In fact, the last box matters most. An anchor is only worth having if the storage beneath it cannot be rewritten, as the sections below explain.

How can you verify the chain, and how often does it run?

How do you run a check of the chain when needed?

First, the verify-chain endpoint walks the whole hash chain for your tenant in batches. It recomputes each hash and compares it with the stored value. A mismatch names the sequence number where the chain breaks. So your team knows where to look first.

How do the checks on a schedule run in the worker?

Also, you do not have to remember to run each check by hand. The worker verifies new rows incrementally on every cycle. It also runs a full re-walk on its own cadence, in bounded steps that can resume. So a long chain does not block other work.

Why is a check that was skipped not a clean check?

In production, the worker checks the anchor storage before it starts its automation loop. If anchoring is skipped because of missing settings, that result never counts as a clean full check. In short, a skipped check cannot pose as a passed one.

Why are the stored files hashed a second time too?

In addition, the worker re-hashes stored attachments and compares them with the hash recorded at upload. A file that changed on disk shows up as a failed check. So the evidence audit trail gets a second line of detection that does not rely on the audit table alone.

What does the signed anchor add on top of the hash chain?

What does the anchor write for each of the chains?

The audit anchor extends the evidence audit trail with a signed, append-only log. For each tenant chain, it records the chain tip, the sequence number, the previous anchor hash and a check time. Each entry of the audit anchor carries an Ed25519 signature. Notably, the anchor log lives on an external volume, not in the database.

An anchor entry lets you show that a chain tip existed at a given time. For example, if someone with database access rebuilt a whole chain later, the anchored tip would not match.

DaletAlert webhook delivery screen
For example, the webhook delivery screen of DaletAlert.

What can the anchor not prove, and what is on you?

The runbook is direct about the audit anchor limits. Hash links detect changes to lines that remain. However, they cannot prove that the last line was deleted, or that the whole file was cut short.

Therefore, the storage must prevent deletion and truncation.

The runbook asks for append-only or write-once storage and retention of at least 20 years. It also asks for immutable snapshots kept outside the Docker host's failure domain. Those duties are yours to carry. DaletAlert does not provide that storage.

Why must the signing key not rotate in its place?

The audit anchor format has no key identifier. As a result, the report signing key is fixed for the life of an anchor log. Changing it in place makes every earlier entry unverifiable. Key rotation would need a new anchor format, and that format does not exist yet.

What does prod need before the app will start up?

First, production start requires the signing key as strict base64 for one 32-byte seed. It also needs an absolute anchor path and a pre-provisioned external volume. Also, the deploy script refuses to proceed without that volume. Development can skip the audit anchor, which is fine for a sandbox but wrong for an implementation.

How are files that you attach kept safe in the record?

How are files hashed and, if it is set, encrypted?

First, each attachment stores a SHA-256 hash when it is uploaded. On download, the product compares the hashes in constant time. If you configure an encryption key ring, new attachments are encrypted with Fernet. Each row then records whether it is encrypted.

However, with no key configured, files pass through unencrypted. That is a deliberate fallback for development, so check your key ring before an implementation. Also, limits apply: 20 MB per file, 50 MB for video and five attachments per evidence item.

Why is a file you pull kept as a withdrawn row?

In this tool, nobody can truly delete an attachment. A withdrawn file stays in the list as a withdrawn row with its hash. Thus, reviewers can see that a file existed and was pulled. A permanent evidence audit trail needs that visible gap.

Illustration for Evidence Audit Trail With a Verifiable Hash Chain

Why is each evidence record kept for good in it?

Evidence records are permanent in this product.

An older retention date field still exists. However, it no longer hides or disposes of anything. If your record policy needs disposal after a set period, raise that early. The security governance page lists other limits that affect an implementation.

How do redaction, scans for personal data and exports work?

Why does a redaction change the view, not the row?

Evidence redaction changes only what a person sees on screen. Meanwhile, the stored record stays untouched. The decision is made for each evidence row, and it fails closed. If the alert, subject, organization or policy is missing, the check refuses to guess.

How does the scan for personal data work in it?

A scan checks evidence free text with fixed patterns. They look for ID numbers, card numbers, passport numbers, email addresses, phone numbers and IBANs.

Each finding is either open or dismissed. Also, a worker sweep resumes where it stopped. Patterns will miss some personal data and flag some harmless text. So treat the scan as a prompt for review.

What formats can you export, and is each one safe?

You can export the evidence audit trail and its records in four formats, listed below.

  • A CSV file, with guards on risky cells.
  • A JSON file for your own tools.
  • An XML file for systems that need it.
  • A court bundle, signed and packed as a PDF and a ZIP. CSV exports guard against formula injection. They neutralize cells that start with an equals sign, plus, minus, at sign, tab or carriage return. Meanwhile, the court bundle is a background job that produces a PDF, a ZIP and an Ed25519 signature.

Notably, regulator disclosure mode for a court bundle needs a senior compliance role and an explicit acknowledgement. The same sealing idea protects case reports, as the sealed report workflow shows.

How do the four endpoints help you explain a result later?

Four endpoints help you explain a result from the evidence audit trail later. For example, one serves the method text, and one explains a case score. Similarly, one keeps versioned parameter sets for scoring, and one verifies the hash chain.

Treat them, like the court bundle, as aids for your own reviewers in the evidence audit trail. However, they do not claim that a court will admit the output. Instead, your counsel decides that question. Also, scores remain decision aids that a person weighs.

DaletAlert SAR filing with four-eyes approval screen
For example, a SAR draft passes four-eyes review before the report is sealed.

How might an officer show who changed a past disposition?

Each step adds a row to the chain. A reviewer asks why a restricted disposition was approved last quarter. So your officer opens the case and reads the audit rows in order.

First, the rows show the proposal, the approver's identity and the rationale text. Next, another row shows a read by a user who lacked access, and the denial was recorded.

Then the officer runs verify-chain and gets a clean result. Finally, she exports a court bundle for the file and notes that the anchor volume is write-once.

Of course, the evidence audit trail did not make the decision right, and neither did the court bundle. It showed the reviewer how the decision was made. The investigation workbench is where that disposition was proposed.

Where does the trail help a reviewer most in daily work?

Why do edits to an old row become plain to see?

Because each hash covers the one before, changing an old row breaks every later link in the hash chain. First, the database trigger stops the edit. If someone gets around it, a check of the evidence audit trail finds the break and names the row.

Why are reads part of the record you can show?

With the evidence audit trail, you can say who opened a sensitive case, not only who changed it. In particular, that helps with insider-risk reviews. It also helps when a reviewer samples closed cases in independent QA review and wants the full story.

How does each file stay tied to the hash it got?

In the evidence audit trail, attachments keep their hash from upload onward. As a result, a reviewer can tell whether the file in the case is the file that was attached. That is useful when an ownership structure review cites a registry extract in the evidence audit trail.

How do plain limits help you plan from day one?

The runbook states what the audit anchor cannot prove. So you can plan storage, snapshots and key custody before you begin. Indeed, a stated limit in the evidence audit trail is easier to manage than a hidden one.

What are the limits of the trail, and how do you plan?

DaletAlert case page screen
For example, the case page screen of DaletAlert.

Why is a cut tail not found by the chain alone?

The hash chain detects changes to the lines that remain. However, without write-once storage under the audit anchor, a cut tail can go unnoticed. Therefore, choose storage with that limit in mind.

Does the trail prove that a court will admit it?

The product cites evidence-handling standards as design goals for the court bundle. However, those are not compliance claims of any kind. You still need your own legal review for any court or regulator use.

Does the trail take the place of your key habits?

You run the stack, so the evidence audit trail is only as safe as your own operations. Also, you own backups, the signing key, the anchor volume and the encryption key ring. A hosted vendor would carry some of that work, and larger vendors are stronger on that point. Read the filing and sealing page for the report signing key that sealing shares.

How can you check the chain on your own data in a test?

First, start a small implementation and pick one tenant with a few real cases. Next, run verify-chain, look at the anchor log and export one court bundle from the evidence audit trail. Then ask your storage team whether the audit anchor volume is write-once. Finally, book a meeting and bring the person who owns your record-retention policy.

Questions and answers on this topic from the product team

Can I verify the audit chain myself?

Yes, an authorized user can call the verify-chain endpoint, which walks the whole chain for a tenant in batches. The worker also checks new rows on a schedule and runs a bounded full re-walk. A failed check names the sequence number where the chain breaks.

What does the audit anchor not prove?

The anchor log records signed chain tips outside the database, but it cannot prove that the last line was deleted. Hash links only detect changes to lines that remain. So you need write-once storage under the anchor and a signing key that never rotates in place.

Are attachments encrypted at rest?

Only when you configure an encryption key ring, and then new attachments are encrypted with Fernet. With no key, attachments pass through unencrypted. Either way, the SHA-256 hash is stored at upload and checked on download.

Can evidence be deleted?

Evidence is permanent in the product, and attachments support soft delete only. So a withdrawn file stays visible as a withdrawn row. If your policy requires disposal, plan for it outside this record before you start.

Does the court bundle prove admissibility?

No, the court bundle is an export job that produces a PDF and a ZIP with an Ed25519 signature. It is a handy package that anyone can verify. Whether a court or regulator accepts it is a legal question for your counsel.

See how DaletAlert fits the providers your team uses today

Book a short meeting for a walkthrough with your own providers in mind, or join an in-person class to learn the method first.