feat(ENG-13681): add credential-helper generic command - #338
Draft
cloudsmith-iduffy wants to merge 1 commit into
Draft
feat(ENG-13681): add credential-helper generic command#338cloudsmith-iduffy wants to merge 1 commit into
cloudsmith-iduffy wants to merge 1 commit into
Conversation
Emits a resolved credential as a versioned JSON document on stdout, so tools that cannot import the CLI can still authenticate through the full provider chain (API key, credentials.ini, system keyring, OIDC). The command takes no arguments. A Cloudsmith token is organisation-wide, so the host it will be used against cannot change which credential resolves; asking which hosts are Cloudsmith is a separate question, answered by `credential-helper domains` (added next). The document is serialised in one step and a single broad except guards the protocol boundary, so a caller invoking this as a subprocess can never see a partial document or a traceback. Refusals exit non-zero with a human-readable line on stderr and nothing on stdout. The CLI wiring tests resolve the credential from --api-key, so the chain never reads a developer's real credentials.ini or keyring. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stack 3/4. Base: #337.
Adds
cloudsmith credential-helper generic, which resolves a credential throughthe full provider chain (API key,
credentials.ini, system keyring, OIDC) andemits it as a versioned JSON document —
{"version": 1, "username": "token", "password": "<token>"}— for tools thatshell out to the CLI rather than importing it.
It takes no arguments: a Cloudsmith token is organisation-wide, so the host it
will be used against does not change which credential resolves. Errors exit
non-zero with a message on stderr and never emit a partial document.
Independent of the custom-domain work below it in the stack; it sits here only
to keep the stack linear.
Type of Change
Additional Notes
Test suite: 659 passed, 40 skipped at this commit.