fix(rbac): use principal impersonation for region/flavor/image access#384
Merged
fix(rbac): use principal impersonation for region/flavor/image access#384
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #384 +/- ##
========================================
- Coverage 4.50% 4.50% -0.01%
========================================
Files 59 59
Lines 5751 5754 +3
========================================
Hits 259 259
- Misses 5454 5457 +3
Partials 38 38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The region service removed its FilterRegions handler-level hack that manually filtered regions by checking Security.Organizations against the principal's OrganizationID. It now relies on RBAC-driven filtering when the request carries an impersonation signal (X-Impersonate header). Kubernetes holds global region-read permissions as a system account, so without impersonation the region service would return all regions rather than only those accessible to the calling user. Add NewImpersonateContext to the regions, flavors and images proxy handler methods so that outbound calls to region carry the user's identity and region's RBAC middleware correctly scopes the results. Bumps identity and region to pick up the impersonation implementation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5c437f0 to
ed7dc49
Compare
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.
The region service removed its FilterRegions handler-level hack that
manually filtered regions by checking Security.Organizations against the
principal's OrganizationID. It now relies on RBAC-driven filtering when
the request carries an impersonation signal (X-Impersonate header).
Kubernetes holds global region-read permissions as a system account, so
without impersonation the region service would return all regions rather
than only those accessible to the calling user.
Add NewImpersonateContext to the regions, flavors and images proxy
handler methods so that outbound calls to region carry the user's
identity and region's RBAC middleware correctly scopes the results.
Bumps identity and region to pick up the impersonation implementation.
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com