Skip to content

docs(state-key): the mode is fixed at install and read from the volume on every boot - #52

Merged
Bugs5382 merged 1 commit into
mainfrom
docs/297-state-key-mode-fixed
Sep 30, 2026
Merged

Bugs5382 merged 1 commit into
mainfrom
docs/297-state-key-mode-fixed

Conversation

@Bugs5382

Copy link
Copy Markdown
Contributor

What and why

Companion to CryptOS-PKI/cryptos-node#305. A node now reads its state-key mode from the state partition's LUKS2 header on every boot after the first. Before, it fell back to the image's build-time default and couldn't unlock its disk when the config had picked another mode. The mode is fixed at install, and a config apply that names a different state_key.mode is refused with FailedPrecondition.

  • concepts/tpm-sealed-keys.md: the "Match state_key.mode to the image" caution described the bug. It becomes "The mode is fixed at install", covering where the mode is read and what happens on a change. nodeid can also be chosen with state_key.mode on any image.
  • reference/machine-config.md, state_key: the field row says the mode is fixed at install. The prose says later boots read it from the LUKS2 header, so it survives reboots and upgrades to an image with a different STATEKEY. The error table gains the refusal message.
  • reference/machine-config.md, apply outcomes: state key moves from "reboot needed" to a new "refused" line.

Refs CryptOS-PKI/cryptos-node#297

Merge together with CryptOS-PKI/cryptos-node#305.

Verification

  • Build succeeds
  • Documentation updated (if behavior or API changed)

How this was verified

npm run build passes locally with no broken links or anchors. Every statement and the quoted error text were checked against the code change in CryptOS-PKI/cryptos-node#305 (config.StateKey.CheckSealed, sealedStateKey) and its tests.


Before merging: add a closing comment summarizing what was actually done in this PR
(not just the checked boxes).

@Bugs5382 Bugs5382 self-assigned this Sep 30, 2026
@Bugs5382
Bugs5382 marked this pull request as ready for review September 30, 2026 16:08
@github-actions github-actions Bot added the documentation Documentation only (docs). label Sep 30, 2026
…e on every boot

Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
@Bugs5382
Bugs5382 force-pushed the docs/297-state-key-mode-fixed branch from 4aebd3d to 142d1ba Compare September 30, 2026 16:29
@Bugs5382

Copy link
Copy Markdown
Contributor Author

Merging for the v0.1.0 test run: CI green and mergeable at merge time.

@Bugs5382
Bugs5382 merged commit a918981 into main Sep 30, 2026
8 checks passed
@Bugs5382
Bugs5382 deleted the docs/297-state-key-mode-fixed branch September 30, 2026 16:40
@Bugs5382 Bugs5382 added this to the v0.1.0 milestone Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation only (docs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant