Remove legacy credential-format compatibility after migration #26
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#26
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?
Remove the legacy credential shape (
formatplus structuredverify.type) from every public consumer once an executable witness shows no registry still carries it, so the value-template contract of allod/secrets#23 is the only shape left and the one-shot migration code goes with it.Primary goals:
formatand that thelocal_auth_refreshsource has moved to the new contract; a hand inventory or a passing deployment-health command is not sufficient.credential-registrycheck in allod/secrets stops acceptingformatand structured verification, and its legacy positive fixture and legacy sabotage witnesses go with it, while the new-contract coverage stays.allod secret migrate, its legacy translation table, theformatand target-leveluserfields in the registry structs, and the "run migrate first" refusals increateandrotateare removed from allod/tools.local_auth_refreshsource predicate accepts only the template shape; the legacycredential-store-urlbranch is removed.formatfield anywhere in a registry is a check failure afterwards.Trigger and decision criterion
Start when the witness passes on the composed deployment: no registry entry carries
format, and the refresh path that allod/nexus#52 decides no longer requires the legacy shape. Until both hold, the transition union stays in place and this issue waits.Removal scope
In allod/secrets, remove legacy acceptance from the
credential-registrycheck and delete the legacy fixtures while keeping one sabotage witness per remaining validator. In allod/tools, deletesecret_migrate.go, the legacy verify translation, theformatanduserregistry fields, and the legacy refusal paths, and update the docs and tests that describe them. In allod/archetypes, remove the legacy branch of thelocal_auth_refreshsource predicate and its legacy fixture. Delete documentation and tests made obsolete by these paths, and keep a check that makes a reintroducedformatfield fail.Related work
rotate-tokenis not retired here; allod/nexus#52 owns that and decides thelocal_auth_refreshtransition. This cleanup follows the private migration handoff filed with allod/secrets#23; renaming the registry stays with allod/secrets#22.Scope
In scope: cross-repository removal of legacy validation, fixtures, migration code, refusal paths, the legacy predicate branch, and obsolete documentation and tests after the witness passes. Out of scope: the private registry migration itself, live deployment or revocation, and the
rotate-tokenretirement in allod/nexus#52.Audit of this issue's goals against master today, prompted by a question about handing it to an agent. Four of the five are done, and one of the four landed in a deliberately different form from what this issue specifies.
lib.forgejoTokenGroupsis wrapped invalidateCredentialRegistry(secrets/flake.nix:215,:141), which throws, so a registry carryingformatcannot be read at all rather than merely failing a check. The private registry is not in this workspace and cannot be witnessed from here.legacy-new-mix,migrating,legacy-formatandlegacy-verifyfixtures are gone;credential-registryrefusesformatatflake.nix:67and:113, and requires a one-lineverifyat:42and:107.secret_migrate.gois gone, no command mentionsmigrate, and the target-leveluserfield is gone. Theformatfield on the registry struct was kept on purpose.isCredentialStoreUrlSource(flake.nix:797) is!(credential ? format) && isCredentialStoreUrlTemplate credential. The allod/nexus consumer followed in allod/nexus#56.secrets/flake.nix:113, pinned by theformat-fieldandformat-field-non-string-namesabotage fixtures at:342and:357.The one item worth stopping on before anyone implements this. This issue asks to remove "the
formatand target-leveluserfields in the registry structs" from allod/tools. Theuserfield went.Formatis still onregistryCredentialatcmd/allod/secret.go:199, and it is there deliberately: Go'sjson.Unmarshalsilently ignores a field the struct does not declare, so without it a strayformatentry would decode as absent and reach every command as if the registry were clean.firstCredentialCarryingFormatat:726is the one place that notices and refuses by name, wired into the registry decode at:714. Deleting the field as written here would not tidy up a legacy remnant, it would remove a working refusal and restore silent acceptance.This issue also overlaps heavily with allod/secrets#27, which covered the same removal from the public check and the private validator and was closed on 13 September when PR 28 merged. The two were filed a day apart by different authors and describe substantially the same work.
Suggested disposition: close this as settled by allod/secrets#27 and PR 28, or narrow it to the single genuinely open question, which is whether the private registry has an executable witness that no entry carries
format. That question cannot be answered or implemented from this workspace, so it belongs in a handoff rather than in a bundle of public implementation work.duplicate of #27