Skip to content

refactor(no-ticket): pass resolved credentials through credential-helper plumbing - #336

Draft
cloudsmith-iduffy wants to merge 1 commit into
masterfrom
credential-plumbing
Draft

refactor(no-ticket): pass resolved credentials through credential-helper plumbing#336
cloudsmith-iduffy wants to merge 1 commit into
masterfrom
credential-plumbing

Conversation

@cloudsmith-iduffy

@cloudsmith-iduffy cloudsmith-iduffy commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Description

Stack 1/4 — base of the credential-helper work. Reviews independently of the rest.

Pure refactor, no behaviour change. The credential-helper plumbing passed an
api_key string alongside an auth_type string, which meant every layer had to
keep the pair in sync and any new credential source had to thread two more
arguments through. This passes the resolved CredentialResult itself instead, so
the object carries its own auth scheme (X-Api-Key vs Authorization: Bearer)
to the point of use.

Touches the Docker helper and the shared custom_domains/common helpers. The
three PRs above this one build on it.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Other (please describe)

Additional Notes

Test suite: 561 passed, 40 skipped at this commit.

…per plumbing

The credential-helper plumbing flattened opts.credential into loose
api_key/auth_type strings, threaded the pair through every signature,
then rebuilt a CredentialResult (with a fabricated source_name) just to
hand it to initialise_api. The getattr fallback guarding auth_type could
never fire: it is a declared dataclass field with a default.

Pass the CredentialResult itself instead. The object carries its own
auth scheme end to end, so a bearer credential's custom-domain lookup
now goes out as Authorization: Bearer rather than being re-derived at
the bottom of the stack.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudsmith-iduffy cloudsmith-iduffy changed the title credential plumbing refactor(no-ticket): pass resolved credentials through credential-helper plumbing Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant