ACR task support for ABAC registries

Đang mở
#611 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
azure, go
Lĩnh vực
cli, cloud, security

Hướng nghiên cứu

Không xác định file hoặc test nào. Bắt đầu bằng cách tái hiện purge từ một ACR task bằng cả hai dạng identity và các vai trò ABAC được liệt kê, sau đó so sánh kết quả 401 metadata_read với hành vi ủy quyền của task và ACR. Được xem là hoàn tất khi có câu trả lời được maintainer xác nhận về việc hỗ trợ và tính khả dụng, cùng với một follow-up được xác định rõ phạm vi nếu cần thay đổi code hoặc tài liệu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

What is the problem you're trying to solve

I am trying to purge from an ACR task on an ABAC-enabled registry. I have tried using system assigned and user assigned identities. The identities have role assignments for roles:

  • Container Registry Repository Catalog Lister
  • Container Registry Repository Contributor

I have not added any ABAC conditions for these role assignments.

The task is configured to use the identity.

System assigned identity

  "credentials": {
    "customRegistries": null,
    "sourceRegistry": {
      "identity": "[system]",
      "loginMode": null
    }
  },

User assigned identity

  "credentials": {
    "customRegistries": null,
    "sourceRegistry": {
      "identity": "cb6aba75-73d1-4142-9c98-0c2fc1595a5c",
      "loginMode": null
    }
  },

When the task runs it appears to log in to the registry OK, but fails to read repository metadata.

2026/04/09 12:42:20 Alias support enabled for version >= 1.1.0, please see https://aka.ms/acr/tasks/task-aliases for more information.
2026/04/09 12:42:21 Creating Docker network: acb_default_network, driver: 'bridge'
2026/04/09 12:42:21 Successfully set up Docker network: acb_default_network
2026/04/09 12:42:21 Setting up Docker configuration...
2026/04/09 12:42:21 Successfully set up Docker configuration
2026/04/09 12:42:21 Logging in to registry: myregistry.azurecr.io
2026/04/09 12:42:22 Successfully logged into myregistry.azurecr.io
2026/04/09 12:42:22 Executing step ID: acb_step_0. Timeout(sec): 3600, Working directory: '', Network: 'acb_default_network'
2026/04/09 12:42:22 Launching container with name: acb_step_0
Deleting tags for repository: 1234/test
Error: failed to purge tags: acr.BaseClient#GetAcrTags: Failure responding to request: StatusCode=401 -- Original Error: autorest/azure: Service returned an error. Status=401 Code="Unknown" Message="Unknown service error" Details=[{"errors":[{"code":"UNAUTHORIZED","detail":[{"Action":"metadata_read","Name":"1234/test","Type":"repository"}],"message":"authentication required, visit https://aka.ms/acr/authorization for more information."}]}]
Failed to complete purge: failed to purge tags: acr.BaseClient#GetAcrTags: Failure responding to request: StatusCode=401 -- Original Error: autorest/azure: Service returned an error. Status=401 Code="Unknown" Message="Unknown service error" Details=[{"errors":[{"code":"UNAUTHORIZED","detail":[{"Action":"metadata_read","Name":"1234/test","Type":"repository"}],"message":"authentication required, visit https://aka.ms/acr/authorization for more information."}]}]

Number of deleted tags: 0
Number of deleted manifests: 0
2026/04/09 12:42:22 Container failed during run: acb_step_0. No retries remaining.
failed to run step ID: acb_step_0: exit status 1

Run ID: cg10 failed after 4s. Error: failed during run, err: exit status 1

Describe the solution you'd like

Can we please have some clarity on whether this works or not? I have seen reports online that it does not work. I have seen PRs merged in the past month that might fix it. I'm not sure if these changes are available in ACR tasks yet.

Additional context

I have contacted Azure support, but no solutions provided.

Ngôn ngữ chính
Go
Star
72
Fork
53
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
19

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/acr-cli

Tất cả issue của Azure/acr-cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.