The log server

claubase-log puts signature chain links and root certificates into one append-only log and publishes signed checkpoints of it. It is not trusted: its checks keep an honest server consistent, and clients verify everything it serves. It serves only checkpoints that a witness has cosigned, so it needs one to run.

Anyone who can reach the server, its administrator included, can read every name, device key and membership. There are no accounts. Restricting network access keeps outsiders out and hides nothing from the operator.

No production witness runs and the code has had no outside security review. Use it for testing only.

Start one with a test root

Download claubase-log and check it the same way as the root tool, naming it claubase-log. Build the witness programs omniwitness and generate_keys. Then make a test root and stay in that directory with all of them on your PATH.

Make the log key, have three holders certify it, and create the store:

KEY=$(claubase-log keygen --out log.key)

claubase-root statement log-key --root TEST-root.root-def \
  --origin log.example.test/claubase --generation 1 --key "$KEY" --out log.stmt
for i in 1 2 3; do
  claubase-root sign --root TEST-root.root-def --key test-holder-$i.root-key \
    --out l$i.sig log.stmt
done
claubase-root assemble --root TEST-root.root-def --out log.cert log.stmt l1.sig l2.sig l3.sig

# the root fingerprint you were given, in a file
claubase-root show TEST-root.root-def | sed -n 's/^Fingerprint: //p' > root.fp

CONFIG="--db log.db --key log.key --root TEST-root.root-def \
  --fingerprint @root.fp --log-name log.example.test/claubase"
claubase-log init $CONFIG --cert log.cert

# a test witness: its key, and the one log it knows
generate_keys --origin=witness.example.test/claubase \
  --out_priv=witness.key --out_pub=witness.vkey
{ echo 'Logs:'
  claubase-log witness-config --log-name log.example.test/claubase \
    --generation 1 --public-key "$KEY"
} > logs.yaml

In zsh, write ${=CONFIG} instead of $CONFIG, or use sh. Start the witness in a second terminal, in the same directory:

omniwitness --listen=127.0.0.1:8081 --metrics_listen= --db_file=state.db \
  --private_key_path=witness.key --additional_logs=logs.yaml

Then start the server in the first one:

claubase-log serve $CONFIG --witness @witness.vkey \
  --witness-url http://127.0.0.1:8081

The server listens on 127.0.0.1:8080 unless you pass --listen. Once the witness has answered, curl http://127.0.0.1:8080/checkpoint shows the newest cosigned checkpoint; until then it answers 503. TLS is for a proxy in front. Running both on one machine is for testing only.

Publish a certificate

If you made alice.cert on the root tool page, this sends it to the server and succeeds only once a witnessed checkpoint records it:

claubase-log publish --url http://127.0.0.1:8080 --root TEST-root.root-def \
  --fingerprint @root.fp --log-name log.example.test/claubase \
  --state client.state --witness @witness.vkey --name alice=alice.cert

Let a member in

With the server and witness above running, a root holder makes the setup file. Download claubase first. Plain http is accepted only with a test root; otherwise the server address must be https.

claubase setup make --root TEST-root.root-def --server http://127.0.0.1:8080 \
  --log-name log.example.test/claubase --log-generation 1 \
  --witness @witness.vkey --contact 'TEST contact' --out claubase.setup

It prints the setup sheet. Hand the file and the sheet to the member separately, the sheet in person. The member sets up and asks for a name:

claubase init --setup claubase.setup      # type the setup fingerprint from the sheet
claubase name request mira --out mira.request

The holders check in person that the key in mira.request is the one on the member's screen, then certify it. Copy that key in place of KEY:

claubase-root statement name --root TEST-root.root-def --name mira --generation 1 \
  --key KEY --out mira.stmt
for i in 1 2 3; do
  claubase-root sign --root TEST-root.root-def --key test-holder-$i.root-key \
    --out m$i.sig mira.stmt
done
claubase-root assemble --root TEST-root.root-def --out mira.cert mira.stmt m1.sig m2.sig m3.sig

The member runs claubase enrol --cert mira.cert, which also puts the certificate in the log. To try a member and the holders on one machine, add --home DIR or set CLAUBASE_HOME so test files stay apart.

Looking after it

What it serves

RequestReturns
GET /checkpointThe newest cosigned checkpoint
GET /tile/…Hash tiles and entry bundles (tlog-tiles)
GET /chain/name/generationA name's signature chain
GET /cert/…Certificates as written
GET /rotations/afterRoot rotations after a sequence number
POST /appendAdds writes in one transaction, or says which are stale

Limits per request: 1 MiB and 256 writes.