Make the Forge token registry follow the forgeAccess flag #12
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
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#12
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?
Keep the Forge token registry in step with the Forge opt-out flag, so flipping one boolean does not leave a stale entry that fails a check pointing somewhere else.
forgejo-token-groups.jsonis hand-written and declares a per-machine HTTPS token target plus a local-auth-refresh entry. It is not derived fromforgeAccess. Flip an existing machine toforgeAccess = falseand its identity stops generating that secret while the registry still declares the target, so the framework'scredential-profilescheck fails with a message naming the registry and the generated secret — and never mentioning the flag the operator just changed. One fact, whether this machine has Forge access, lives in two places that nothing keeps in step, whicharchitecture.mdprinciple 8 forbids.A machine born opted out passes today only because nobody added it to the registry. The migration case is the one that breaks, and it is the case a deployment actually hits.
Two ways to close it
forgeAccessinflake.nix, so the JSON stops carrying the fact at all. Preferred if the registry's other consumers can take a generated value.forgeTokenFilehas neither aforgejo-token-groups.jsontarget nor alocal_auth_refreshentry, with a diagnostic that names the flag.The agent-token side needs nothing: it appears in
credentials.nixbut has no registry entry, so there is nothing to drift.Scope
In scope: the registry-to-flag relationship and its check. Out of scope: the
forgeAccessmechanism, and how recipient sets are chosen.Found while reviewing the opt-out completion in allod/archetypes#17. It predates that work — the original
forgeAccesschange introduced it — but the opt-out is only now complete enough for a deployment to use, which makes this the moment it starts to matter.