fix(authz): close DeleteMembership authorization bypass#3245
Conversation
Add explicit ServerOperationsMap entries so DeleteMembership no longer inherits the empty OrganizationService/Delete policy via regex prefix match. Signed-off-by: Matías Insaurralde <matias@chainloop.dev>
There was a problem hiding this comment.
1 issue found across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
migmartri
left a comment
There was a problem hiding this comment.
Are you sure that there is no check at the service level for this?
Mirror TestViewerDeniedDeleteMembership to cover the UpdateMembership deny path through the authz middleware. Signed-off-by: Matías Insaurralde <matias@chainloop.dev>
AI Session Analysis
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | app/controlplane/pkg/authz/middleware/middleware_test.go |
+16 / -0 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-74ffb9 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-74ffb9 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-74ffb9 |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-74ffb9 |
- |
Powered by Chainloop and Chainloop Trace
The service handler calls straight into the biz layer with no caller-authz check, and the only biz check (
There's also a demo on the ticket. |
…inloop-dev#3245)" This reverts commit e7ebb3e. Assisted-by: Claude Code Signed-off-by: Jose I. Paris <jiparis@chainloop.dev> Chainloop-Trace-Sessions: af6e1c77-67e9-454c-8a56-5220930f328c
Closes PFM-6498
Summary
ServerOperationsMapentries forOrganizationService/DeleteMembershipandUpdateMembership, requiring org admin/owner membership-management policies.PolicyOrganizationMembershipsDeleteandPolicyOrganizationMembershipsUpdateand grant them toRoleAdminandRoleOwner.OrganizationService/Deletepolicy.