Host keys and identities are not checked against the inventory machine list #43
Labels
No labels
blocked
bug
decision
duplicate
enhancement
handoff
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/secrets#43
Loading…
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?
A host-key entry for a machine that does not exist, or a machine with no host-key entry, is accepted silently in both directions — so the mistake that stops a provision is invisible until the hypervisor tries it.
Primary goals:
machine-host-keys.jsonentry, and every entry names a machine that exists, each its own named refusal.Current state and specifics
flake.nixreadsinventory.lib.machines, andchecks/hypervisor-recipient-coverage.nixis the only check that reads real machines. It verifies recipient coverage for machines already present in both places; it never asserts the two sets are equal. Everything else derives frommachine-host-keys.json's own attribute names, so the file is self-consistent whatever it contains.Measured while adding the
forgemachine (allod/secrets#42): the full gate passed withforgepresent in the inventory and absent from this repository, and would equally pass with an entry here for a machine no inventory declares.The failure this allows is not local.
allod/archetypesmachineConfigurationsasserts identity keys equal machine keys, so a missing identity surfaces there asmachines keys must exactly match identity keys— one repository's omission reported as another repository's error, at lock-bump time, with nothing naming the file to edit. A missing host key is quieter still: evaluation succeeds and provisioning fails on the machine.Both halves of the slice-3 work hit this. The identity half was caught only because a lock bump was attempted; nothing would have caught a host-key entry left out.
Scope
In: the two refusals and their sabotage fixtures, in this repository, against the consumed inventory. Out: the hypervisor's own key, which is not a registry machine (
nexus-host-key.jsonis its own source); and anything that would make this repository validate inventory's internal shape, which inventory already owns.