acr-cli icon indicating copy to clipboard operation
acr-cli copied to clipboard

Fix: Support ABAC-enabled registries

Open balcsida opened this issue 1 year ago • 4 comments

Summary

  • Removed wildcard repository scopes (repository:*:*) that are incompatible with ABAC-enabled registries
  • Implemented repository-specific token scoping for all repository operations
  • Maintained catalog access with registry:catalog:* scope only

Changes

  • Modified initial authentication to only request registry:catalog:* scope
  • Updated token refresh to use repository-specific scopes (repository:<name>:*) for each operation
  • Added helper functions refreshTokenForRepository and refreshTokenForCatalog for cleaner scope management
  • Updated all repository operation methods to request appropriate scopes

Test Plan

  • [x] Run existing unit tests (go test ./internal/api/...)
  • [x] Run command tests (go test ./cmd/acr/...)
  • [x] Build binary successfully (go build)
  • [x] Manual testing with ABAC-enabled registry
  • [x] Manual testing with regular (non-ABAC) registry
  • [ ] Verify acr purge command works with identity having full data plane permissions

Fixes #501

balcsida avatar Aug 26 '25 08:08 balcsida

Hi Team,

@balcsida thank you for working on this. My team encountered this blocker 3 months ago while implementing ACR tasks on an ABAC-enabled repo. I previously discussed this with @johnsonshi via email, and I appreciate the quick response in logging the issue.

As our team is eager to utilize this feature, could you provide an estimate on when this PR might be merged?

Thanks again for the hard work on this fix!🙏🏽

vipin-vd avatar Nov 20 '25 08:11 vipin-vd

Hi @vipin-vd, our engineer @lizMSFT is currently out of office and will be back in 2 weeks. I'll coordinate with @lizMSFT once she is back from vacation. FYI @feynmanzhou and @huanwu

johnsonshi avatar Nov 20 '25 09:11 johnsonshi

Hi @balcsida , @vipin-vd , we will plan a new release of v0.18 for acr-cli once this PR along with @lizMSFT 's enhancement are merged.

FeynmanZhou avatar Nov 21 '25 03:11 FeynmanZhou

what is the ETA for the fix?

Satheeshkumar433 avatar Jan 08 '26 21:01 Satheeshkumar433

Duplicate of #577

balcsida avatar Mar 03 '26 19:03 balcsida