Derive the agent token and forge key entries so a forge-less fork carries no placeholder #40
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/secrets#40
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?
The credential inventory hard-codes the
agent-pr-tokenentry andsecrets.nixhard-codes its recipient line, so a fork in which no dev VM has forge access (forgeAccess = false, whichdevIdentitiesalready honours by handing the VM no token) still has to carry a token ciphertext to keepcredential-inventorygreen. The same goes for the forge git key lines, which are spelled out per file rather than derived fromforge-ssh-keys.json.Proposal: derive both from the data that already decides them. The token entry and its recipient line exist only while some dev VM has forge access; the forge-key recipient lines come from the registry; the VM host-key lines come from
machine-host-keys.jsonplus the hypervisor's own name. The template's evaluated output is unchanged. A forge-less fork then setsforgeAccess = false, emptiesforge-ssh-keys.json, deletes the two ciphertexts and the forge public key, and its checks pass with no placeholder secret anywhere.Also makes
forgeAccessexplicit in the template identity, since a flag that is only ever defaulted is invisible to a fork.Found during the public install walk.
Landed on master in commit
07b0b1c: the agent token entry and its recipients are derived from lib/forge-access-vms.nix, forge-key and host-key recipient lines come from the registries, and the template identity says forgeAccess = true explicitly. Verified against the files on master today; closing as completed.