refresh-local-auth: accept only a template as the local auth refresh source #56
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/nexus#56
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?
Bring
refresh-local-auth's source-credential predicate up to the same template-only standard as the archetypes check andallod secret rotate, now that no registry can hold aformatentry.Primary goals:
is_credential_store_url_sourceaccepts only avalue.templatethat renders one credential-store line; the branch that acceptsformat = "credential-store-url"with novaluegoes.format— an entry carryingformatat all is refused as "not a credential-store URL source", matching what archetypes andallod secretnow do, and thesabotage.both-shapescase pins it under a name that no longer implies two shapes exist.legacy.gitfixture group,legacy_source_installs_bundle_and_is_idempotent, and the legacy half ofnew_shape_source_installs_the_same_bundlego; the idempotence and bundle-contents assertions they carried are kept on thenew.gitgroup.Current state and specifics
scripts/refresh-local-auth:136-138still acceptsformat == "credential-store-url"with novalueas a validlocal_auth_refreshsource, beside the template shape at lines 139-147. The comment atscripts/refresh-local-auth:110-115says this mirrorsisCredentialStoreUrlSourcein allod/archetypes andisCredentialStoreURLSourcein allod/tools character for character; since allod/archetypes PR 77 and allod/tools PR 213 landed, both of those accept only the template shape and refuse any entry carryingformat, so the claim is false and the script is the one consumer that still admits the retired shape.The shape is unreachable from a registry that passes its checks: the secrets flake's
credential-registrycheck refuses any credential carryingformat(allod/secrets PR 28), the archetypescredential-profilescheck refuses it as a refresh source, andallod secretrefuses it at registry decode time. The private registry migrated its lastcredential-store-urlentry through the now-deletedallod secret migrate, so no deployment holds one either.tests/refresh-local-auth.sh:145-175builds alegacy.gitgroup in the old shape (format, targetkind, structuredverify, the retired group fields) besidenew.gitin the current one.tests/refresh-local-auth.sh:385runs the refresh fromlegacy.gitand checks the bundle installs and is idempotent;tests/refresh-local-auth.sh:439runs both groups with the same plaintext and asserts byte-identical bundles and modes, which was the migration-safety witness and has no remaining subject.tests/refresh-local-auth.sh:251(sabotage.both-shapes) addsformatto a new-shape entry and expects the refusal; that is the one legacy-related case to keep.Default: narrow the jq predicate to
has("format") | notand the template branch, keep the refusal message text, and move the idempotence assertions ontonew.git. Validation:tests/refresh-local-auth.shgreen, andnix flake checkin allod/nexus.Scope
In: the predicate, its comment, and the test script's fixtures and cases in allod/nexus. Out: the netrc bundle format and destinations, which are unchanged; the deployment's private validator, which has its own handoff issue under allod/secrets#27.
Refs allod/secrets#27, allod/nexus#52.