Skip to content

refactor: replace chrismellard/docker-credential-acr-env with inline ACR auth#686

Draft
skevetter wants to merge 2 commits intomainfrom
sk/dep-replace-acr-env
Draft

refactor: replace chrismellard/docker-credential-acr-env with inline ACR auth#686
skevetter wants to merge 2 commits intomainfrom
sk/dep-replace-acr-env

Conversation

@skevetter
Copy link
Copy Markdown
Owner

Summary

chrismellard/docker-credential-acr-env (and its heavy transitive dependency Azure/azure-sdk-for-go) was used in pkg/image/auth.go to provide Azure Container Registry credentials. Replaces it with an inline implementation using go-autorest/adal, which is already in the module graph.

The inline implementation supports the same 3 auth methods as the original: client credentials, federated OIDC JWT, and MSI (managed service identity).

Changes

  • New file pkg/image/acr.go: inline ACR credential helper with client credentials, federated token, and MSI support
  • pkg/image/auth.go: removed chrismellard import, calls newACRCredentialsHelper() from new file
  • go.mod / go.sum: chrismellard/docker-credential-acr-env and Azure/azure-sdk-for-go removed; go-autorest/adal and go-autorest/autorest/azure/auth promoted from indirect to direct
  • docs/pages/licenses/devpod.mdx: removed chrismellard entry

…ACR auth

Replace the external dependency with an inline implementation that
directly uses go-autorest/adal (already in the module graph) and a
simple HTTP POST to the registry's /oauth2/exchange endpoint. This
removes both chrismellard/docker-credential-acr-env and the heavy
Azure/azure-sdk-for-go transitive dependency.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 56263fd2-876a-4209-a38c-5715cdb9b2c9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sk/dep-replace-acr-env

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

The client credentials path was using cc.Resource (from AZURE_AD_RESOURCE
env var) instead of the resource parameter passed to the function,
creating an inconsistency with the federated and MSI paths. Use the
resource parameter uniformly across all three auth methods.
@github-actions github-actions bot added the size/l label Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant