allod secret: print refresh-local-auth as the next step and gate on it being installed #210
No reviewers
Labels
No labels
blocked
bug
decision
duplicate
enhancement
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/tools!210
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/refresh-local-auth-migrate"
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?
Nothing changes on any machine until the deployment moves its
allod-toolspin. On the host, after that:allod secret rotateprintsrefresh-local-auth --group <alias>as the operator's next step for a group withlocal_auth_refreshentries, naming the script nexus now ships under that name (allod/nexus PR 55, allod/nexus#55), instead of the retiredrotate-token refresh-local-auth; andallod secret migrateno longer refuses a credential that feeds a local auth refresh, provided it is acredential-store-urlcontainer andrefresh-local-authis on PATH, so a host still running the old nexus gets a refusal rather than a migrated entry the old refresh would then reject. Everything else aboutrotate,migrate,create,declare, andrekeyis identical. Proof is the tagged and untagged test suites with three new migrate tests, plus two cold reviews by models that did not write it. Advance this pin no earlier than the nexus pin that carries the new script, ideally in the same lock bump. If it is wrong, revert and move the pin back; nothing here writes a file until an operator runs a command.What changes
cmd/allod/secret_rotate.go: the printed deploy step for a group withlocal_auth_refreshentries isrefresh-local-auth --group <alias>in both the live and dry-run wording, and a group with such entries is refused before the value is read, on a dry run too, unlessrefresh-local-authresolves on PATH, so a host whose nexus pin predates allod/nexus#52 cannot land a rotation it cannot finish; comments updated.cmd/allod/secret_migrate.go: the blanket refusal of alocal_auth_refreshsource is replaced by two checks, both before any decrypt: the source must be acredential-store-urlcontainer (an rclone stanza can never render a netrc line), andrefresh-local-authmust resolve on PATH, with a refusal naming that the host's nexus pin predates allod/nexus#52 otherwise. The format check for the two containers moves ahead of the local-auth check so the more general refusal is reported first.refresh-local-authon PATH (golden registry bytes, ciphertext untouched, and the migrated group passesvalidateGroupMetadata), is refused with nothing decrypted when it is absent from a PATH built without it, and an rclone-stanza source is refused naming its format.docs/allod-secret.md: the printed step, the migrate refusal list, and the sentence that saidrotate-tokenkeeps rotating legacy entries (it no longer exists; a plain legacy entry becomes new-shape by a registry edit androtaterefuses it until then).Risk
R2: a printed string and a refusal replaced by two narrower refusals, all before the plaintext is opened; main paths tested; rollback is a revert. The one behavioural widening, migrating a local-auth source, produces the exact shape nexus's
refresh-local-authand the archetypes check both accept, which the new golden test asserts throughvalidateGroupMetadata.Validation
Run by the overseer in the worktree on the committed tree (
16b53ed, two commits):nix develop -c gofmt -l .nix develop -c go vet ./...nix develop -c go test ./...ok forge.anarch.diy/allod/tools/internal/gitremote 0.125snix develop -c go test -tags site ./...ok forge.anarch.diy/allod/tools/internal/gitremote 0.127snix develop -c go test -tags secret ./...ok forge.anarch.diy/allod/tools/internal/gitremote 0.119snix develop -c go test -tags site,secret ./...ok forge.anarch.diy/allod/tools/internal/gitremote 0.120sgit diff --checkCold reviews, each reading a
.git-free snapshot and the diff against master, both from the GPT family because the change was authored by a Claude model:gpt-5.5at effort high through codex on the first commit found one medium (rotateprintedrefresh-local-authas the next step without checking it exists, so a live run could land a rotation the operator could not finish) and one low (a refusal string still saidrotate-tokenstill rotates a plain legacy entry); both were verified against the source and fixed in the second commit with tests.gpt-5.6-terraat thinking high through pi read the final tree and reported no findings, confirming the gate runs before the value is read and on a dry run and that its test fails with the gate removed. A firstgpt-5.6-terrapass on the first commit also reported no findings.Not run: a live
migrateorrotateon the host.Refs allod/nexus#52
Refs allod/tools#197