-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Added catalog and schema level access checks in USE statement #23882
Conversation
|
What happens if the user tries to query Presto, but they set the default catalog to something they don't have permission for? For example, if they load up the Presto CLI with the |
@tdcmeehan , The moment the user runs a query involving the restricted catalog, Presto will attempt to access it, triggering a permissions check. If permissions are lacking, Presto immediately returns an error, something like In the below example user "newuser" is restricted to catalog "tpcds" |
The commit message needs to be reworked. Perhaps just use the PR title as the commit message, but use the present tense and imperative mood. |
I have updated the commit message. Please check |
FYI I started seeing actions failures in Details
@annmegha could you investigate? |
Strangely, it seems this test wasn't even executed until after the merge. I've opened the revert at #23965. |
Added catalog and schema level access checks when a user tries USE statement
Motivation and Context
A user with any role who has not been granted access to a specific catalog or schema is still able to execute the USE command. The expected behavior is that such users should receive an "Access Denied" error when attempting to access a catalog or schema for which they lack permission.
Refer : #23881
Test Plan
Added the related testcases to the code change
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.