Support Docker credential helpers for CLI registry access

Open
#450 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, go

Research direction

Start by tracing the CLI paths for brewlet push and runtime-image resolution, then find where explicit registry credentials are selected and forwarded. Review the existing registry authentication tests and add isolated Docker configuration and test helpers for per-registry and default helpers, precedence, origin isolation, anonymous access, and helper failures. Done means CLI registry operations use the configured credentials while preserving existing authentication behavior and the documented trust boundaries.

Written by the indexing model from the issue text.

Description

Problem

Brewlet's CLI requires explicit registry credentials even when the user has already configured Docker credential helpers. For example, pushing an application to Google Artifact Registry returned a 403 until an access token was passed through BREWLET_REGISTRY_USERNAME and BREWLET_REGISTRY_PASSWORD, despite a configured gcloud Docker credential helper.

Proposed enhancement

Use Docker's credential configuration for local CLI registry operations, including brewlet push and runtime-image resolution. Honor DOCKER_CONFIG and the default Docker configuration location, including per-registry credHelpers and the default credsStore. Consider Docker's inline auths entries as well.

  • Give explicit Brewlet credentials precedence for the applicable registry; preserve existing validation and conflict errors for --registry-auth and environment credentials.
  • Resolve credentials separately for each registry and preserve Brewlet's origin-bound credential forwarding. Do not send one registry's credentials to another.
  • Keep this limited to local CLI access; do not extend Docker configuration or helper execution to the dashboard, kubelet, or node provisioner. Those have separate trust and authentication paths.
  • Allow anonymous access when no credentials are configured, and surface configured helper failures rather than silently ignoring them.
  • Document configuration, precedence, and the fact that credential helpers execute binaries found on PATH.

Acceptance criteria

  • A configured registry credential helper can authenticate a CLI push without manually exporting an access token.
  • Tests cover per-registry and default helpers, explicit credential precedence, origin isolation, anonymous access, and helper failures using isolated Docker configuration and test helpers.
  • Existing explicitly configured registry authentication continues to work.
Dominant language
Go
Stars
60
Forks
2
Avg merge
6h 41m
Merged PRs (30d)
67

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/brewlet

All issues in microsoft/brewlet

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.