capsule trust: a signed kernel refuses an unsigned capsule; the intermediate is the anchor (#139)

capsule_sig_refused(), the one decision at v4's boot and v3's three
births: INVALID always; MISSING and NO_ROOT_KEY on a signed build
(CAPSULE_SIGNED_BUILD, set exactly when the Makefiles sign). A
developer build warns and boots. test_capsule_sig, built both ways,
did not build without it; 4 checks each way now. nightly.sh
capsule-trust, a nightly step: signed, v4:centre.4th left unsigned
(test only), amd64 must refuse it -- CI's, as ruled, since only CI has
the key. No root check, as ruled; the step-4 trust model (blobs signed
by their authors, MANIFEST.md hashes, contributors' intermediates,
snakeoil) recorded as given. FABRIC-3 XLIX. Gates pass, POST 992/992.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-20 22:37:25 +00:00
parent 5425d52cb1
commit 9db364f7c7
20 changed files with 1750 additions and 11 deletions
+13
View File
@@ -175,3 +175,16 @@ So:
sake.
- It is touched only to keep the gates that still run it green: the docs stage's dictionary check
(`v4/tools/mkdictionary.py`) and `make -C v4 test`. Ruled "Keep the boot.c change", for that reason.
## Capsules, keys and trust (Captain Bob, 2026-11-20)
- **Never a throwaway CA or key**, for a test or anything else: "No throwaway. I never would want that,
it's a stupid idea." What needs a real signature is shown in CI, with the real key (#139, ruling 4).
- **The root CA's private key is on the CI server**, `/var/lib/starshipos-ca/root/`, beside its
certificate. Never mount or copy that directory anywhere. The root's public certificate is in the tree,
`ci/pki/starshipos-root-ca.pem`.
- **Capsules are becoming trains:** the v4 runtime engine (a `.f18a`) towing named blobs as rolling stock.
Each blob is signed by its author and hashed, and the capsule's `MANIFEST.md` holds each blob's hash.
Bona fide contributors get their own intermediate certificate under the StarshipOS root; casual users get
a snakeoil one, told apart by the chain to the root. For ADR step 4
(`docs/v4.0.0/plans/2026-11-20-capsule-trust.md`).