Skip to content

docs(secrets): credential helper only supplies DOCKER_TOKEN - #4701

Merged
aheritier merged 1 commit into
mainfrom
docs/secrets-credential-helper
Oct 22, 2026
Merged

aheritier merged 1 commit into
mainfrom
docs/secrets-credential-helper

Conversation

@aheritier

@aheritier aheritier commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The secrets guide described credential_helper as a general secret source that receives the variable name as its last argument. The code does neither:

  • CredentialHelperProvider.Get returns nothing for any name other than DOCKER_TOKEN (pkg/environment/credential_helper.go).
  • The command runs with its configured args only; no variable name is appended.

Following the old example (op read op://Personal/docker-agent) to load provider API keys silently does nothing.

Changes

  • Credential Helper section: scope it to DOCKER_TOKEN, point other secrets to the remaining sources, fix the example and the invocation description.
  • Overview: state that op:// resolution is independent of the helper and works for every variable, API keys included.
  • Credential Helper: an IMPORTANT callout pointing API-key users to op:// references, since an op helper example reads as "this is how to load keys from 1Password".
  • Source table and "Choosing a Method" table: same scope.
  • 1Password References: tip on keeping op:// values out of the shell (Docker Agent env file or token_key), since tools such as Claude Code and Codex read the same variables and do not resolve op://.

References

Topic Link
Credential helper provider pkg/environment/credential_helper.go
User config type pkg/userconfig/userconfig.go (CredentialHelper)
Default source chain pkg/environment/default.go
1Password op read 1Password CLI: op read
token_key Model configuration

@aheritier
aheritier requested a review from a team as a code owner October 22, 2026 11:39
Copilot AI balanced review requested due to automatic review settings October 22, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused documentation changes match existing behavior, with no unresolved issues identified.

No open issues 🎉

What changed in this PR

This documentation-only update aligns the secrets guide with the credential helper’s existing behavior.

Changes:

  • Clarifies that credential helpers supply only DOCKER_TOKEN and receive no appended arguments.
  • Corrects the 1Password helper example and scopes both comparison tables accordingly.
  • Adds guidance for keeping op:// references separate from variables used by other tools.
File Description
docs/​guides/​secrets/​index.md Corrects credential helper documentation and adds 1Password reference guidance.

Review effort: Balanced

The guide said the helper gets the variable name appended and serves any
secret. CredentialHelperProvider only answers DOCKER_TOKEN and runs the
command as configured. Fix the section, table rows and example.

Spell out that op:// resolution is independent of the helper and applies
to every variable, API keys included, and add a tip on keeping op://
references out of the shell so tools like Claude Code and Codex do not
read them.

Signed-off-by: Arnaud Héritier <aheritier@apache.org>
@aheritier aheritier added area/docs Documentation changes kind/docs Documentation-only changes labels Oct 22, 2026
@aheritier
aheritier added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 53b180d Oct 22, 2026
23 of 43 checks passed
@aheritier
aheritier deleted the docs/secrets-credential-helper branch October 22, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation changes kind/docs Documentation-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants