credential-inventory: add the pending rotation state #19
No reviewers
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!19
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/secret-pending-state"
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 check now accepts a fifth rotation state,
pending, for a credential whose non-secret entries have been declared but whose encrypted file the host has not produced yet. In that state the check requires the file to be absent; in every other state it still requires the file present, exactly as before. Nothing changes for any running machine: no entry in this template is pending, and the state is not consumed by any module. What proves it: the checks pass unchanged on this branch, and two sabotage copies confirmed the new rule fails the right way (a pending entry with a file present is refused with a message naming the entry, and a pending entry with no file passes). If it is wrong, revert this commit; nothing depends on it yet.Refs allod/tools#182. This is the first of three landings for that issue: the state must exist here before the
allod secret createcommand in tools can flip it, and before an agent's PR can declare a credential in it.Risk
R2. The change adds a value to an enum and a branch to a shell check. The worst credible failure after validation is a pending entry that some consumer module tries to read as an active one: today no module reads
rotation_statefor agenix consumers, and a deploy that pins a pending entry fails at build time on the missing file, which is the existing behavior for any missing secret.Validation
nix flake checkon this branch: all checks passed.pendingentry with asecrets.nixline and no.agefile passescredential-inventory..agefile present fails withERROR: secrets/sabotage-pending.age exists but sabotage-pending is pending; land it with 'allod secret create sabotage-pending' or set rotation_state to active.activewithout a file is unchanged and was not re-run.