Repository navigation
feat: minisign release signing for herdr manifests (#102) - #103
Conversation
A minisign-sign service signs the BLAKE2b-512 digest of a release file as a prehashed minisign signature. Its trusted comment must start with the service's prefix, so one key signs only one product's releases. GET on the same route exports the minisign public key. keyring minisign-keygen makes the key inside the store without showing it. Every call is audited with role, time, digest and trusted comment.
|
Level 3 exact-head review: approved, 0 findings, at |
Decision: Tests Run
Raw runtime output was retained in local Gitmoot state and is not posted here. |
Closes #102. Owner request via herdr-app (2026-10-28): keep the herdr release signing key in the keyring, not on GitHub or an agent box.
What it does
A new sign-only auth,
minisign-sign. The caller sends the BLAKE2b-512 digest of the release file (b2sum) and a trusted comment; the keyring returns a standard prehashed minisign.minisig. The file never leaves the caller and the key never leaves the keyring.POST /_keyring/minisign/<service>{"blake2b512_hex", "trusted_comment"}→{"minisig", "key_id", "public_key"}.GETon the same route →{"key_id", "public_key", "public_key_file"}for embedding in the herdr binary.keyring minisign-keygen --store FILE NAMEgenerates the key inside the store (never shown) and prints the public key. It refuses an existing name.Answers to the issue's open questions
herdr-preview), be longer than it, and be ≤256 bytes of printable ASCII on one line. Unknown body fields are refused. Only prehashed (ED) signatures are made./_keyring/sign/.Verification
gofmt -l .empty;go vet ./...;go test -race ./...all pass (Go 1.24.13, offline).keyring serve+keyring relayon loopback, throwaway key): the official minisign 0.12 binary (release tarball verified against the author's published key) verifies the relay-issued signature, also with-H(prehash required); a tampered manifest and a forged trusted comment are both refused; relay refusals 400/400/403; audit log has role/time/digest/comment and no key.test-check prove: inconclusive for all new tests (old_code_build_failed): this is a new feature, so the old code lacks the API and the tests cannot compile against it. Not a regression fix; no red-on-old claim.Not done here
Deploying to the Mac, generating the production key and granting herdr-app's role are separate, owner-approved steps after merge.