Let credential_helper supply API keys and other secrets, not only DOCKER_TOKEN
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with pkg/environment/credential_helper.go, then trace how credential_helper is configured and how secrets are resolved for providers and MCP tokens. The issue leaves key design choices open, including opt-in names, how names reach the command, and whether helpers can coexist. Done means preserving existing DOCKER_TOKEN behavior while supporting the agreed secret lookup flow, fallback, caching, and doctor reporting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Overview
Let credential_helper (in ~/.config/cagent/config.yaml) supply provider API keys and MCP tokens, not only DOCKER_TOKEN.
Motivation
"Credential helper" reads as the generic way to plug a secret store into docker-agent (as with git and Docker credential helpers), and the secrets guide described it that way until #4701. In the code it has only ever answered DOCKER_TOKEN (pkg/environment/credential_helper.go).
1Password users are covered by op:// references, which work in every source. Users of other stores (HashiCorp Vault, Bitwarden, pass, a corporate secrets daemon) have no equivalent. The macOS Keychain and pass sources were removed, so a generic helper would also be their natural replacement.
Use cases
# ~/.config/cagent/config.yaml
credential_helper:
command: vault-get # prints the secret for the name it receives
variables: [ANTHROPIC_API_KEY, OPENAI_API_KEY, GITHUB_PERSONAL_ACCESS_TOKEN]
Proposed solution
Backward compatibility is the constraint. Existing helpers ignore their input and print the Docker token. Calling them for ANTHROPIC_API_KEY would send the Docker token as an API key. So serving other names must be opt-in:
- New optional
variableslist (or"*"). Without it, behavior is unchanged:DOCKER_TOKENonly. - The requested name is passed to the command, as the final argument and/or a
DOCKER_AGENT_SECRET_NAMEenv var (to decide). - Empty output or a non-zero exit means "not found": the chain falls through to the next source (Docker Desktop).
- Cache results per process: the helper is spawned at most once per name, as the
op://resolver does. op://output is still resolved, since the helper sits inside the 1Password wrapper.docker agent doctorreportscredential-helperas the source.
Open questions:
- Explicit list vs
"*":"*"spawns the helper for every unresolved lookup (MCP${VAR}expansion, doctor checks), so an explicit list may be the safer default. - Name passing: argument, env var, or a
{name}placeholder inargs(e.g.args: ["kv", "get", "secret/{name}"]). - Keep one
credential_helperblock, or add a separate one (e.g.secret_helper) so the Docker-token helper and an API-key helper can coexist?
Alternatives
op://references: 1Password only.- Generating
~/.config/cagent/.envfrom the store: works, but writes plain-text secrets to disk. - Shell wrappers exporting variables before
docker agent run: leaks keys into the shell environment that other tools read (see #4702).
Related issues
- #4701: docs now state the helper only supplies
DOCKER_TOKEN. - #4702:
DOCKER_AGENT_-prefixed secret variables.
- Lingua principale
- Go
- Stelle
- 4.6k
- Fork
- 522
- Merge medio
- 10h 33m
- PR unite (30g)
- 231
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di docker/docker-agent
-
Error when trying to run sandbox example?Forse già presa @dgageot l’ha presa 2 giorni fa. Apertaarea/cli
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
docker/docker-agent#4672 · 1 commento · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
pkg/hooks tests fail with a misleading assertion when jq is not installedForse già presa @dwin-gharibi l’ha presa 59 giorni fa. Apertaarea/testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
docker/docker-agent#4052 ·
I maintainer di solito rispondono entro 1 giorno
-
`remove_directory` and `create_directory` hide work they already did when a later path failsForse già presa @dwin-gharibi l’ha presa 77 giorni fa. Apertaarea/tools
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
docker/docker-agent#3933 ·
I maintainer di solito rispondono entro 1 giorno
-
`edit_file` silently edits the first match when `oldText` occurs more than onceForse già presa @dwin-gharibi l’ha presa 77 giorni fa. Apertaarea/tools
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
docker/docker-agent#3929 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Read DOCKER_AGENT_ENV_-prefixed secret variables before the plain namesForse già presa @aheritier l’ha presa oggi. Apertaarea/cli area/config area/security kind/feat
docker/docker-agent#4702 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di docker/docker-agent
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
kind/engineering pulumi/pulumi-terraform Task Workflow Failure
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
pulumi/pulumi-terraform#1261 ·
I maintainer di solito rispondono entro 1 giorno
-
Controllers integration tests fail when port 8080 is in useForse già presa @noahnut l’ha presa oggi. Apertaarea/cluster-autoscaler kind/bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
kubernetes-sigs/cluster-autoscaler#236 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
MCP: `tasks_bulk_update` always fails with "Need at least one field" — the `fields` projection argument is stripped from non-read tools tooForse già presa @tink-bot l’ha presa oggi. Apertaagent-processed area/api-v2 integration/inbound
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
go-vikunja/vikunja#4235 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
google/osv-scalibr#2503 ·
I maintainer di solito rispondono entro 1 giorno