Skip to content

feat(authz): prevent non-owners from managing owner memberships#2776

Merged
migmartri merged 3 commits into
chainloop-dev:mainfrom
migmartri:migmartri/admin-role-guard
Feb 24, 2026
Merged

feat(authz): prevent non-owners from managing owner memberships#2776
migmartri merged 3 commits into
chainloop-dev:mainfrom
migmartri:migmartri/admin-role-guard

Conversation

@migmartri

Copy link
Copy Markdown
Member

Summary

  • Add a new PolicyOrganizationManageOwners authorization policy granted exclusively to the owner role
  • Guard DeleteOther and UpdateRole in the membership use case so only owners can promote/demote/remove owner memberships
  • Pass the caller's authorization role from the service layer into the use case methods

Closes #2775

Closes chainloop-dev#2775

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Return 403 Forbidden instead of 400 Bad Request when a non-owner
attempts to manage owner memberships, and update test assertions
accordingly.

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>

@matiasinsaurralde matiasinsaurralde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Feb 24, 2026

Copy link
Copy Markdown

@cubic-dev-ai review

@migmartri I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@migmartri migmartri merged commit 2a39893 into chainloop-dev:main Feb 24, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent non-owner members from managing owner-level memberships

2 participants