fix(controlplane): authorize GroupService/ListProjects at the service layer - #3293
Closed
matiasinsaurralde wants to merge 1 commit into
Closed
fix(controlplane): authorize GroupService/ListProjects at the service layer#3293matiasinsaurralde wants to merge 1 commit into
matiasinsaurralde wants to merge 1 commit into
Conversation
… layer
ListProjects was the only group sub-resource handler that resolved results without
a service-layer permission check, relying solely on the visibleProjects row filter.
That filter returns nil ("RBAC not applied") for a legacy RoleViewer and for
org-scoped API tokens, and the data layer treats nil as "no filter", so those
callers received the full group->project attachment map that the design restricts
to org admins/maintainers.
Add the same userHasPermissionOnGroupMembershipsWithPolicy guard the sibling
handlers use (PolicyGroupListMemberships) before resolving projects, matching the
ListMembers fix.
Chainloop-Trace-Sessions: ebb05958-d85c-4d2e-9f65-5cd74dac91ee
Signed-off-by: Matías Insaurralde <matias@chainloop.dev>
Contributor
AI Session AnalysisMissing AI Coding SessionsWe detected commits in this PR that were AI-assisted, but the matching Chainloop Trace session(s) could not be found in Chainloop. Please make sure the AI coding session evidence has been sent by the Chainloop CLI, or add the Learn more about Chainloop Trace. Powered by Chainloop and Chainloop Trace |
matiasinsaurralde
marked this pull request as ready for review
July 16, 2026 23:54
Member
|
Current behaviour is fine: All users can list groups, and they can also see which of their projects are attached to those groups. User membership is hidden though. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes PFM-6695
Summary
GroupService/ListProjectswas the only group sub-resource handler that resolved results without a service-layer permission check, relying solely on thevisibleProjectsrow filter. That filter returnsnil("RBAC not applied") for legacyRoleViewerusers and for org-scoped API tokens, and the data layer treatsnilas "no filter" — so those callers received the full group→project attachment map that the design restricts to org admins/maintainers.This change adds the same
PolicyGroupListMembershipsguard the sibling handlers already use before resolving projects, matching the earlierListMembersfix.