# OAID-4 — Transparency Log and Witnessing

Version 0.2.2-draft · Part of the AllowedBy specification set

## 1. Purpose

Every document a node signs is committed to an append-only Merkle log. Other nodes witness the log's checkpoints so the node cannot present different histories to different parties. Operators and their monitors check the log for documents issued in their name. The public log reveals that something was issued and when, not to whom or for what. No consensus protocol and no blockchain are involved.

The log follows C2SP `tlog-checkpoint`, `tlog-cosignature`, `tlog-witness` and `tlog-tiles` verbatim. This document only states what is specific to AllowedBy.

## 2. Structure

One log per node, a Merkle tree as in RFC 6962 §2.1, append-only, indices from 0. Each entry is a 32-byte **commitment**:

`commitment = SHA-256(salt ‖ document)`

where `salt` is 32 random bytes chosen per document and `document` is the UTF-8 JWS compact serialization. The full document and its salt are never in the public log; the node returns them, with the document, to the parties (the human's home node wallet, the operator, the audience) and to monitors the operator authorises (§9).

## 3. Logged documents and the log promise

Logged: `oaid-node+jwt` (every new statement), `oaid-passport+jwt`, `oaid-human+jwt`, `aby-grant+jwt` (every revision and child), `aby-revoke+jwt`, `oaid-vouch+jwt`, `aby-authority-policy+jwt`, `amh-approval+jwt`.

Every logged document contains `log: { "idx": n }`, the leaf index the node assigns in the issuing transaction before signing (OAID-1 §4.2). The node MUST append the document's commitment at exactly that index. A node that signs a promise it does not keep has signed proof of its own misbehaviour.

Documents that are public by nature (node statements, vouches) are served with their salt at `GET {log}/documents/{idx}` to anyone. Other documents are served there only to parties and authorised monitors, authenticated as in OAID-2 §5.

## 4. Checkpoints

A checkpoint is a C2SP `tlog-checkpoint` signed note: origin line `log.origin` from the node statement, tree size, base64 root hash, signed with the node's `checkpoint` key under the signed-note key name `log.origin`. Cosignatures (key name = the witness node's name) are appended as further signature lines per C2SP `tlog-cosignature`.

The node MUST publish a new checkpoint at least every 10 s while the tree grows, and at least hourly otherwise, at `{log}/checkpoint`.

## 5. Tiles and proofs

The tree is served as C2SP `tlog-tiles` (`{log}/tile/…`, `{log}/tile/entries/…`): static, immutable, cacheable resources. Inclusion and consistency proofs (RFC 6962 §2.1.1, §2.1.2) are computed by clients from tiles; nodes need no proof endpoints. Services are not required to check inclusion at request time; monitors and auditors are.

## 6. Witnessing

A **witness** is a node that, for another node's log, follows C2SP `tlog-witness`: it receives a checkpoint and a consistency proof at `POST {witness}/add-checkpoint`, verifies the signature against the `checkpoint` key delegated in the origin node's statement, verifies consistency with the last checkpoint it cosigned, and only then returns a `tlog-cosignature` signed with its `witness` key.

A witness MUST refuse a checkpoint inconsistent with one it previously cosigned (a different root at the same size, or a consistency proof that fails), with the HTTP status of C2SP `tlog-witness`, and MUST publish both at `GET {witness}/conflicts`. A node caught forking is removed from trust lists by their owners; this specification imposes no automatic penalty.

The origin node MUST collect cosignatures within 10 minutes (OAID-2 §7). Nodes SHOULD witness at least 3 other nodes and SHOULD choose witnesses under different operators and jurisdictions. A service's trust list determines which witnesses count (OAID-5 §3, `witnesses_min`).

## 7. Resolution

`did:oaid:<node>:<id>` resolves by `GET {passports}/{pid}`, `GET {approvals}/{aid}/grant` or `GET {log}/documents/{idx}`, subject to §3 access. Resolution is for audit, not for request-time verification.

## 8. Erasure

To erase a document (legal erasure request or end of retention) the node deletes the document and its salt and logs an `aby-revoke+jwt` with reason `redacted` and target `log_idx` set to that index. The commitment stays, so proofs remain valid; without the salt it reveals nothing and is not personal data (OAID-1 §10).

## 9. Monitors

A monitor fetches a log continuously. Operators SHOULD run or authorise a monitor for their operator id; the node gives it every document and salt issued for that operator. A monitor SHOULD:

- check every log promise it sees: the leaf at `log.idx` equals `SHA-256(salt ‖ document)`;
- verify consistency between successive checkpoints and compare the node's checkpoints with those obtained from witnesses directly, to detect split views;
- treat a broken log promise or a failed proof as a finding to publish, not as a request-time error code;
- alert on documents it did not expect, on revoked keys (`revoked_keys`) still signing, and on an approval page bundle that does not match `page_hash` (OAID-2 §3).

## 10. Optional anchoring

Any party MAY publish a cosigned checkpoint to an external timestamping service or a public blockchain. Nothing in this specification depends on it, and verifiers MUST NOT require it.

## Change log

Every change to this document adds a row here and increments its version (README, Versioning).

| Version | Date | Change |
|---|---|---|
| 0.2.2-draft | 2026-10-27 | Checkpoint and cosignature key names; witness refusal statuses; monitor findings are not error codes (CHANGES §16). |
| 0.2.1-draft | 2026-10-27 | C2SP tlog-tiles, checkpoints and witnessing aligned; monitor duties (CHANGES §15). |
| 0.2.0-draft | 2026-10-27 | Log leaves are salted commitments; every document carries its `log.idx` promise; erasure (CHANGES §10). |
