The witness

The log server publishes signed checkpoints: the size of its log and a hash over everything in it. One client alone catches a server that goes back in time, but not a server that tells two people two different stories, or one that hides a recent reset or revocation. The witness is for those.

It cosigns a checkpoint only if that checkpoint is consistent with the last one it cosigned, and records when. Clients accept only cosigned checkpoints, and the age of the cosignature decides what they will believe.

The checks are built and tested against the real witness software. No production witness runs yet. The code has had no outside security review. Do not protect real secrets with it.

Who runs it

A trusted person who does not administer the server. If one person ran both, they could cosign two histories and nobody would notice. The witness sees checkpoints only: no plaintext and no member keys.

Set it up

The witness is not part of claubase. It is omniwitness from the transparency-dev/witness repository, which has no release tags. claubase is tested with commit 4cdf746c17b260dd9c8446b1b57fa274f8d01fed. Build it with Go, and have sqlite3 installed for removing old logs.

# in a checkout of transparency-dev/witness at that commit
go build ./cmd/omniwitness ./cmd/generate_keys
  1. On a machine the server operator does not control, make the witness key. The name has no spaces or +:
    generate_keys --origin=witness.example.test/claubase \
      --out_priv=witness.key --out_pub=witness.vkey
  2. Give witness.vkey, one line, to clients by a route the server does not control: it belongs next to the root fingerprint. Give the operator the same line and the address of your witness. witness.key never leaves your machine.
  3. Add the log, as below, and start:
    omniwitness --listen=:8080 --metrics_listen= --db_file=state.db \
      --private_key_path=witness.key --additional_logs=logs.yaml
  4. Keep it reachable by the log server and back up state.db. Never start a witness with an empty state.db for a log that already has entries. It cosigns whatever it is shown first, a rolled-back log included. Computers that saw the newer log pause, but new computers accept the old one without any warning.

A server that reports “the witness cosigned another history”, or a refused submission in your own log, is an incident. Tell the root holders and your security contact.

Add a log

Each log generation is a separate log to the witness, named name/generation. Add one only after checking the root's certificate for its key yourself.

  1. Get the log key certificate, the root definition and the root fingerprint from the root holders, not from the server operator.
  2. Run claubase-root verify on the certificate. Check the log name and generation, and copy the key it prints.
  3. Print the entry, then put it under Logs: in logs.yaml and restart omniwitness:
    claubase-log witness-config --log-name NAME --generation N --public-key HEX

omniwitness stores an entry the first time it sees it and never updates or deletes it from the file. A wrong entry has to be changed in state.db.

Change the log key

Keep this order. If the witness knows the new generation while the server is still on the old one, the server takes its own store for an old copy and refuses to serve.

  1. The root holders certify the key of the next generation.
  2. The operator runs claubase-log transition and restarts the server with the new key. It answers “unavailable”, because the witness does not know the new generation yet.
  3. You check the certificate and add the new generation. Within seconds the server serves again.
  4. You disable the old generation within 1 hour. Until you do, anyone holding its last checkpoint can have you cosign it again, and a newcomer would not see later resets and revocations.

Deleting the entry from logs.yaml does nothing. Disable it in the database, with no restart, then delete it from the file too. A submission for it is then answered 404.

sqlite3 state.db "UPDATE logs SET disabled = 1 WHERE origin = 'NAME/N'"

Setup files made afterwards should name the new generation as the minimum, so that newcomers refuse older ones.

While the witness is down

The server keeps serving the last cosigned checkpoint. New appends are stored but nobody sees them, revocations included, until the witness is back. Clients go by the age of the last cosignature. A company can set these limits within the ranges shown; a user can only tighten them.

Older thanDefault and rangeA client
current1 hour (10 min to 24 h)Calls nothing current, and refuses names it has never seen, and resets
warn4 hours (1 h to 24 h)Warns that the witness is unreachable
refuse24 hours (4 h to 72 h)Also refuses added keys, log key changes and root rotations

At any age, names a client already accepted keep working and revocations are applied.

Clients assume their clock is within 5 minutes of the witness's, so keep yours synchronised. A client whose clock was seen to go backwards takes no new trust until the clock passes where it was.

What this does not give