feat(trust): generate a roster leaf in the dev trust set #22

Merged
troed merged 2 commits from feat/trust-roster-leaf into devel 2026-10-17 18:16:49 +02:00
Owner

feat(trust): generate a roster leaf in the dev trust set

What this is

Part of the fleet app-tier TLS change (design and plan in the starfleet
docs repo: 2026-10-17-app-tier-tls-design.md / …-plan.md). roster joins
crew as a TLS-required service, so it needs its own leaf from the fleet CA —
identical in shape to the existing computer and crew leaves.

This is the trust-material prerequisite; the roster transport change is a
sibling branch.

Change

  • tools/starfleet_trust.py: DEV_FILES gains roster.pem / roster.key,
    PRIVATE_KEY_FILES gains roster.key, and LEAVES gains
    ("roster", "starfleet-roster"). generate() already iterates LEAVES, so
    emitting the files needs nothing further.
  • host/tests/test_starfleet_trust.py: the pinned DEV_FILES assertion was
    extended, a new test asserts the roster membership, and the two tests that had
    hardcoded leaf and key lists now iterate st.LEAVES and
    st.PRIVATE_KEY_FILES — so the roster leaf is covered by the verify-chain and
    the 0600-permission assertions, and the next leaf addition needs no test edit.

Verification

cd $HOME/dev/starfleet/communicator-esp32
python3 -m pytest host/tests/ -q

81 passed for the trust suites; the change touches only
tools/starfleet_trust.py and its test. A full host/tests/ run needs
websockets and numpy, which the sandbox python lacks — run the full suite
where those are installed (CI). A manual check confirmed roster.pem is signed
by the CA, carries CN=starfleet-roster, and its key is mode 0600.

Note for the operator

Adding entries to DEV_FILES makes any existing shared .dev-trust/
incomplete — a partial set is deliberately never "dev" — so the next
ensure() regenerates it with a new CA, which means a flashed dev device
must be reflashed. The design's "a new leaf does not re-key the CA" is not true
in practice; this is recorded in the app-tier TLS runbook.

Deferred

  • The repo's trust docs do not enumerate the dev-set files, so there is nothing
    to update there (verified by grep).
# feat(trust): generate a `roster` leaf in the dev trust set ## What this is Part of the fleet **app-tier TLS** change (design and plan in the `starfleet` docs repo: `2026-10-17-app-tier-tls-design.md` / `…-plan.md`). `roster` joins `crew` as a TLS-required service, so it needs its own leaf from the fleet CA — identical in shape to the existing `computer` and `crew` leaves. This is the trust-material prerequisite; the `roster` transport change is a sibling branch. ## Change - `tools/starfleet_trust.py`: `DEV_FILES` gains `roster.pem` / `roster.key`, `PRIVATE_KEY_FILES` gains `roster.key`, and `LEAVES` gains `("roster", "starfleet-roster")`. `generate()` already iterates `LEAVES`, so emitting the files needs nothing further. - `host/tests/test_starfleet_trust.py`: the pinned `DEV_FILES` assertion was extended, a new test asserts the roster membership, and the two tests that had hardcoded leaf and key lists now **iterate** `st.LEAVES` and `st.PRIVATE_KEY_FILES` — so the roster leaf is covered by the verify-chain and the 0600-permission assertions, and the next leaf addition needs no test edit. ## Verification ```bash cd $HOME/dev/starfleet/communicator-esp32 python3 -m pytest host/tests/ -q ``` **81 passed** for the trust suites; the change touches only `tools/starfleet_trust.py` and its test. A full `host/tests/` run needs `websockets` and `numpy`, which the sandbox python lacks — run the full suite where those are installed (CI). A manual check confirmed `roster.pem` is signed by the CA, carries `CN=starfleet-roster`, and its key is mode 0600. ## Note for the operator Adding entries to `DEV_FILES` makes any existing shared `.dev-trust/` incomplete — a partial set is deliberately never "dev" — so the next `ensure()` regenerates it with a **new CA**, which means a flashed dev device must be reflashed. The design's "a new leaf does not re-key the CA" is not true in practice; this is recorded in the app-tier TLS runbook. ## Deferred - The repo's trust docs do not enumerate the dev-set files, so there is nothing to update there (verified by grep).
The verify-chain test iterated ("server.pem", "crew.pem") and the 0600
mode test iterated ("ca.key", "server.key", "crew.key", "signing.key"),
so the new roster leaf was silently uncovered by both. Iterate
st.LEAVES and st.PRIVATE_KEY_FILES so the checks are self-maintaining.
troed merged commit cfe6b07da8 into devel 2026-10-17 18:16:49 +02:00
troed deleted branch feat/trust-roster-leaf 2026-10-17 18:16:49 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starfleet/communicator-esp32!22
No description provided.