Support Docker credential helpers for CLI registry access

未关闭
#450 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
56/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
docker, go

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Go
星标
60
派生
2
平均合并
6 小时 41 分钟
30 天内合并 PR
67

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/brewlet 的其他 Issue

查看 microsoft/brewlet 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。