Handle RBAC propagation when an already-granted permission is denied
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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- azure, go
- Lĩnh vực
- authorization, cloud, security
Hướng nghiên cứu
Bắt đầu với TestTerraformACIWithInitialPermissions và lần theo các luồng phân tích lỗi cấp quyền, loại bỏ trùng lặp quyền và cập nhật vai trò mà nó thực thi. Sử dụng các tiêu chí chấp nhận để xác định khi nào hoàn tất: xử lý đúng các biến thể chữ hoa chữ thường và các hành động hỗn hợp, giới hạn số lần thử lại việc truyền bá mà không làm thay đổi vai trò, đồng thời bổ sung độ bao phủ kiểm thử đơn vị cho đầu vào tiếp tục, việc lọc và các timeout.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
MPF can receive an Azure AuthorizationFailed response for an action already present in the service principal's newly assigned custom role while Azure RBAC assignment or role-definition changes are still propagating.
MPF currently treats the response as a newly discovered permission, appends it to the result, updates the role, and increments the discovery iteration. Permission action strings are also compared and deduplicated case-sensitively, so variants such as:
Microsoft.Resources/subscriptions/resourcegroups/read
Microsoft.Resources/subscriptions/resourceGroups/read
can be returned as two permissions even though Azure RBAC action names are case-insensitive.
Evidence
TestTerraformACIWithInitialPermissions supplies all nine expected permissions initially but intermittently completes with one discovery iteration and ten raw permissions:
- 33682617228 — AzureRM 5.3.0
- 34059711895 — AzureRM 5.4.0
- 34404410581 — AzureRM 5.4.0
- 34529691278 — AzureRM 5.5.0
The initial custom role includes Microsoft.Resources/subscriptions/resourcegroups/read. After the five-second post-assignment wait, AzureRM can receive a 403 for Microsoft.Resources/subscriptions/resourceGroups/read. MPF records the differently cased action as new, updates the role, waits again, and succeeds.
Passing runs with the same provider versions demonstrate that the trigger is intermittent RBAC propagation rather than a new provider permission. The behavior predates Go 1.27.
Related to #231, which tracks eventual consistency after role detachment. This issue focuses on propagation after initial assignment and subsequent role updates.
Proposed behavior
- Treat Azure RBAC action names as case-insensitive across result deduplication, role membership checks, invalid-action filtering, and resume-from-file inputs.
- Define and preserve a stable canonical spelling in user-facing results.
- When parsing authorization failures, split actions into already-granted and genuinely missing sets using case-insensitive comparisons.
- Retry without role mutation or discovery-iteration increment only when all parsed actions are already granted at the relevant assignment scope.
- If any parsed action is genuinely missing, add only those actions and continue normal discovery.
- Account for wildcard actions,
NotActions, deny assignments, and assignment scope so persistent denials are not misclassified as propagation lag. - Use bounded backoff with a separate propagation-retry counter and return an explicit timeout error.
- Apply the behavior after initial role assignment and subsequent role-definition updates.
- Avoid mutating caller-provided permission slice backing arrays while building updated roles.
Acceptance criteria
- Casing variants of one Azure action appear once in MPF results and resume files.
- A temporary denial for an already-granted action does not mutate the role or increment the discovery count.
- Mixed authorization errors still add genuinely missing permissions.
- Scope, wildcard,
NotActions, and persistent-denial cases do not silently retry as propagation lag. - Retries are bounded, separately accounted for, and timeout failures are explicit.
- Unit tests cover casing variants, eventual success, mixed actions, resume input, invalid-action filtering, and timeout behavior.
- Existing genuine permission discovery remains unchanged.
A separate test-only PR will stabilize Terraform E2E assertions while this product behavior is designed and implemented. The E2E tolerance will remain visible in logs so this issue can track whether propagation lag continues occurring.
- Ngôn ngữ chính
- Go
- Star
- 66
- Fork
- 11
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/mpf
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
CreateUpdateCustomRole returns nil after exhausting its retry budget, reporting success when the role was never updatedCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
govulncheck: vulnerabilities detected on mainCó thể đã có người làm @maniSbindra đã nhận 6 ngày trước. Đang mởgovulncheck
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 40/100
Azure/mpf#345 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
E2E Tests: Intermittent TestTerraformModuleTest failures due to stale RBAC permissions from previous testCó thể đã có người làm @maniSbindra đã nhận 234 ngày trước. Đang mởbug
Azure/mpf#231 · 6 bình luận · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add optional flag which does not destroy the resources created including the custom role definitionCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởenhancement terraform
Azure/mpf#84 · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Chained slog With calls discard previously bound attributesCó thể đã có người làm @yuefdev đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[scanner] TestAgentNowLineStates hard-fails instead of degrading when node is off PATHCó thể đã có người làm @arteeh đã nhận hôm nay. Đang mởagent/scanner ci help wanted kind/test
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
hivecommons/hive#12924 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Gentleman-Programming/engram#1940 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: go-workers help wanted tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[exporter/splunkhec] Oversized metric event causes subsequent valid metrics to be droppedCó thể đã có người làm @harshkoli1255 đã nhận hôm nay. Đang mởbug exporter/splunkhec needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
open-telemetry/opentelemetry-collector-contrib#52142 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày