Records and audit

Plan approvals, push verdicts and protected branch movements are all kept as signed records. Records are only appended, and editing or deleting a past entry shows up in verification.

The chain

#
Record
What it holds
1
Plan approval
Who approved which version
2
Baseline case run
Case results before approval
3
Push intake
The commit received
4
Verdict
Inside, outside or unknown, with grounds
5
Confirmation
The confirmation, when there was one
6
Branch movement
The old and new commits
7
Test after landing
Test results on the landed code
The server signs each record (Ed25519) and each holds the hash of the one before. Editing one in the middle breaks all that follow. The chain tips are also written to a file outside the database.
The records one landed change leaves. In the eGovFrame run, 44 such signatures were verified independently.

Each system has one chain. Every record holds the hash of the one before it, so editing a record in the middle breaks every hash after it. The server signs each record with a key kept outside the database, and on a schedule (by default every 10 records or 30 seconds) writes the chain tips to a file on a different path from the database. Replacing the whole database shows up because it no longer matches the copy outside.

Branch movements

  • Each time OurDoc moves the protected branch, a signed movement record binds the old and new commits, the verdict and the plan approval. For each movement, the service can be asked to check that binding again.
  • When the protected branch moves without going through OurDoc, the move is detected and recorded. An administrator can accept it as an exception, with a reason and a signature. Exceptions can be counted and listed separately.

Verifying the record

ourdoc admin verify-ledger --anchor-file ledger-anchors.jsonl --trusted-key <public key>

It checks every chain and signature. It does not stop at the first error, it reports every mismatch, and its exit code tells integrity errors, connection failures and input errors apart.

Limit. Records written after the last export cannot be compared with the copy outside. The result reports how many there are. A shorter export interval keeps that tail small.
The record screen an auditor sees: integrity, the comparison with the outside copy, and the records of the plan approval and both pushes.
The record screen an auditor sees: integrity, the comparison with the outside copy, and the records of the plan approval and both pushes.