-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: Denial by default to all resources when no permissions set #5663
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: jyejare <jyejare@redhat.com> filter only for named patterns No matching permissions are handled
59af5bb to
1d1bfb0
Compare
Signed-off-by: jyejare <jyejare@redhat.com>
| if not resource_type_permissions: | ||
| # No permissions exist for this resource type - should raise error | ||
| message = f"No permissions defined to manage {actions} on {type(resource)}/{resource.name}." | ||
| logger.exception(f"**PERMISSION NOT GRANTED**: {message}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be logger.error() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah thats error with exception :)
| if not filter_only: | ||
| raise FeastPermissionError("No permissions defined - access denied") | ||
| return [] | ||
| raise FeastPermissionError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait, am i correct in understanding that if no permissions are enabled we'll raise the permission error for everyone? is this forcing the functionality to everyone then?
What this PR does / why we need it:
We observed Inconsistent permission response behavior across Feature Store API routes.
Which issue(s) this PR fixes:
Inconsistent permission response behavior across Feature Store API routes. RHOAIENG-35929
Misc