Rotation lifecycle: verify host-key blast radius (consumer completeness + post-activate provisioning check) #9
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 trust a completed host identity rotation, the workflow must enumerate every consumer and verify that provisioning still works before stale consumers are discovered later.
Part of the "Host-key rotation lifecycle & safety" arc.
Context
nexus-host-key's consumer set is implicit: it re-keys the consumers it hardcodes (agenix secrets, VMauthorized_keys, the Forgejo identity checks) and silently omits others.activateverifies VM SSH reachability, Forgejo auth, and agenix decrypt with the new key — but nothing verifies that provisioning, the highest-stakes consumer of the host key, still works. So a rotation can report success while leaving the fleet unprovisionable, and the failure only surfaces the next time someone runsprovision-vm-from-host. (The installer ISO is one such omitted consumer — see the sibling issue.)The high-level gap
Host-key rotation has no blast-radius verification. Two consequences:
~/.ssh/hostfall out of rotation silently.Ask
~/.ssh/hostas an explicit, reviewed set — agenix-encrypted secrets, VMauthorized_keys,known_hosts_vms, the Forgejo SSH identity, and the installer ISO — so adding a new consumer forces a conscious update to the rotation path instead of a silent omission.activateend-to-end check that a provision would succeed with the new key. Cheapest form: assert the installer ISO authorizes the currentsecrets.lib.identity.hostPublicKeys. Most thorough: a provision smoke test against a throwaway VM. Fail the rotation loudly if a consumer is stale.Notes
Distinct from the general hardening of
forge-ssh-key/vm-ssh-host-key— this is aboutnexus-host-key's own consumer completeness and end-to-end verification. The consumer list and smoke test reference deployment values (ISO path, deploy flake, VM names) supplied by operator config.Concrete instance that motivated this: allod/nexus#8