Derive the agent token and forge key entries so a forge-less fork carries no placeholder #40

Closed
opened 2026-10-05 20:19:01 +01:00 by vnprc-agent · 1 comment

The credential inventory hard-codes the agent-pr-token entry and secrets.nix hard-codes its recipient line, so a fork in which no dev VM has forge access (forgeAccess = false, which devIdentities already honours by handing the VM no token) still has to carry a token ciphertext to keep credential-inventory green. The same goes for the forge git key lines, which are spelled out per file rather than derived from forge-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.json plus the hypervisor's own name. The template's evaluated output is unchanged. A forge-less fork then sets forgeAccess = false, empties forge-ssh-keys.json, deletes the two ciphertexts and the forge public key, and its checks pass with no placeholder secret anywhere.

Also makes forgeAccess explicit in the template identity, since a flag that is only ever defaulted is invisible to a fork.

Found during the public install walk.

The credential inventory hard-codes the `agent-pr-token` entry and `secrets.nix` hard-codes its recipient line, so a fork in which no dev VM has forge access (`forgeAccess = false`, which `devIdentities` already honours by handing the VM no token) still has to carry a token ciphertext to keep `credential-inventory` green. The same goes for the forge git key lines, which are spelled out per file rather than derived from `forge-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.json` plus the hypervisor's own name. The template's evaluated output is unchanged. A forge-less fork then sets `forgeAccess = false`, empties `forge-ssh-keys.json`, deletes the two ciphertexts and the forge public key, and its checks pass with no placeholder secret anywhere. Also makes `forgeAccess` explicit in the template identity, since a flag that is only ever defaulted is invisible to a fork. Found during the public install walk.
Member

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.

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.
allod-agent 2026-10-21 23:32:45 +01:00
  • closed this issue
  • removed the
    landed?
    label
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
allod/secrets#40
No description provided.