Removing an organization member leaves the member's PATs and their policies behind
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- authentication, authorization
Hướng nghiên cứu
Start in core/membership/org.go at cascadeRemovePrincipal and trace how RemoveOrganizationMember deletes the member’s organization policies. Compare that flow with the existing user-deletion path through userpat.Service.Delete, which marks a PAT deleted and removes its policies. The issue is done when removing a member also deletes that user’s PATs scoped to the organization and their policies, without affecting service users.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
RemoveOrganizationMember deletes the member's own policies for the organization, but it does not touch the personal access tokens (PATs) the member created for that organization, nor the policies those PATs hold. PAT policies carry the PAT id as principal, so the principal filter in the removal cascade (core/membership/org.go, cascadeRemovePrincipal) never sees them.
Why it matters
- The PAT grants nothing while the owner is out of the organization.
resource.Service.CheckAuthzchecks the PAT's own scope and then the owner's permission, and both must pass. - The organization's token list (
SearchOrganizationPATs) still shows the PAT with its role, as if it worked. - When the owner is added back, the old PAT works again at once, within whatever the owner's new role allows. Nobody re-issued or re-approved it.
- The PAT row and its policy rows stay behind for a user who is no longer a member.
Verified locally
- A member creates a PAT scoped to the organization with the viewer role. The PAT passes
CheckResourcePermission. - An owner removes the member with
RemoveOrganizationMember. The PAT now fails the check andGetOrganizationreturns permission denied, but its policy row is still live and the token list still shows the PAT with the viewer role. - The member is added back. The PAT passes the check again immediately.
Proposed fix
Run the PAT delete cascade for the member's PATs in that organization as part of the removal: list the user's PATs for the organization and, for each, call the same per-PAT delete that user deletion already uses (userpat.Service.Delete: mark the PAT deleted, then remove its policies). Only user principals are affected, since service users have no PATs.
- Ngôn ngữ chính
- Go
- Star
- 343
- Fork
- 48
- Merge trung bình
- 2 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 57
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- 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 raystack/frontier
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của raystack/frontier
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
aws/amazon-ecs-agent#5177 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
release-followup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/rocketmq-dashboard#7292 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[Bug]: Deleting an MCP proxy leaves its API keys in the gateway's memory and in the policy engineĐang mởAspect/API Aspect/Other Severity/Minor Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
wso2/api-platform#3852 ·
Maintainer thường phản hồi trong vòng 1 ngày