Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(authz): support namespaces filtering #3692

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Conversation

erka
Copy link
Collaborator

@erka erka commented Dec 8, 2024

This PR enables the ListNamespaces API call, which is critical for the UI functionality. By default, the API will return all namespaces in the response. To ensure the response includes only the namespaces a user is permitted to access, the policy should specify a viewable_namespaces array containing the appropriate namespace strings.

closes #3688

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

Attention: Patch coverage is 84.33735% with 13 lines in your changes missing coverage. Please review.

Project coverage is 64.63%. Comparing base (866ba43) to head (a237959).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/server/authz/engine/rego/engine.go 72.97% 7 Missing and 3 partials ⚠️
internal/server/authz/engine/bundle/engine.go 82.35% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3692      +/-   ##
==========================================
+ Coverage   64.55%   64.63%   +0.08%     
==========================================
  Files         170      170              
  Lines       17163    17233      +70     
==========================================
+ Hits        11079    11139      +60     
- Misses       5393     5399       +6     
- Partials      691      695       +4     
Flag Coverage Δ
unittests 64.63% <84.33%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erka erka force-pushed the rd/authz-allow-list-namespaces branch 3 times, most recently from 71147f8 to 0be5ef0 Compare December 9, 2024 19:04
@erka erka force-pushed the rd/authz-allow-list-namespaces branch 11 times, most recently from 88bda5e to f4434fd Compare December 16, 2024 21:57
@erka erka marked this pull request as ready for review December 16, 2024 22:21
@erka erka requested a review from a team as a code owner December 16, 2024 22:21
@erka erka force-pushed the rd/authz-allow-list-namespaces branch from f4434fd to 1700fd3 Compare December 17, 2024 16:19
@erka erka requested a review from markphelps December 18, 2024 16:39
@erka erka force-pushed the rd/authz-allow-list-namespaces branch from 1700fd3 to a237959 Compare December 18, 2024 19:17
Signed-off-by: Roman Dmytrenko <[email protected]>
Copy link
Collaborator

@markphelps markphelps left a comment

Choose a reason for hiding this comment

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

ty!

@erka erka merged commit ea9a266 into main Dec 18, 2024
39 checks passed
@erka erka deleted the rd/authz-allow-list-namespaces branch December 18, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs docs Requires documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Authz: UI is unusable without granting read rights to default namespace
2 participants