nexus-host-key: rotation must re-key the installer ISO (silent provisioning break) #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story: So that I can rotate the host identity without silently breaking future provisioning, the rotation workflow must either refresh the installer image or stop with exact rebuild steps before it reports success.
Part of the "Host-key rotation lifecycle & safety" arc.
Context
nexus-host-keyrotates the host SSH/age identity at~/.ssh/host. The custom installer ISO (nixosConfigurations.installer) bakes the host pubkey into the installer's rootauthorized_keys—users.users.root.openssh.authorizedKeys.keys = secrets.lib.identity.hostPublicKeys— andprovision-vm-from-hostSSHes into the freshly-booted installer asrootwith-i ~/.ssh/host(AGE_IDENTITY).The gap
nexus-host-keystage/activate/retirere-key the consumers they know about — agenix secrets (dual-recipient then new-only), VMauthorized_keys, and the Forgejo identity checks — but they never rebuild the installer ISO, nor flag that it must be rebuilt. So after a rotation the ISO in the operator's ISO directory still authorizes the pre-rotation pubkey, and everyprovision-vm-from-host --replace <vm>fails at thenixos-anywherestep withPermission denied (publickey)/kex_exchange_identification: Connection reset by peer— potentially long after the rotation, with no hint that the stale ISO is the cause.Ask
Make the installer ISO a first-class consumer of the host key in the rotation lifecycle. On
activate(and/orretire),nexus-host-keyshould either:new-vmreads, ornix build <deploy>#nixosConfigurations.installer.config.system.build.isoImagecommand and the copy-into-the-ISO-directory step — so a rotation cannot silently leave provisioning broken.Notes
The ISO directory and the deploy-flake ref are operator/deployment values; the script change should be parameterized on them (env/config) rather than hardcoding a path. A post-
activateend-to-end check would catch this whole class of break at rotation time — tracked in the sibling blast-radius issue.Systemic follow-up (blast-radius verification that would catch this at rotation time): allod/nexus#9