-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Support role management (v5) #11645
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
Support role management (v5) #11645
Conversation
Leverage newly introduced method for recursive role grants traversal
Identity must hold all the selected roles for all the catalogs. ConnectorIdentity holds only the role selected for some particular catalog.
| | CALL qualifiedName '(' (callArgument (',' callArgument)*)? ')' #call | ||
| | CREATE ROLE name=identifier | ||
| (WITH ADMIN grantor)? | ||
| (IN catalog=identifier)? #createRole |
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.
I thought we agreed that the IN extension should not be supported. ROLE manipulations should be allowed only within the session catalog.
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.
I thought we agreed to merge this as it is and fix it later. Would you accept a fix on top of this? Instead of doing rebase one more time?
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.
I missed that part
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.
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.
We decided to leave that functionality out since it's not clear exactly how it should work and there's an easy workaround.
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.
Sounds good. Would you accept a fix on top of this? Instead of doing rebase one more time?
75ecb25 to
8ba37e2
Compare
For SHOW ROLES, issue the query: select role_name as "Role" from catalog.information_schema.roles;
That way roles are enumerated lazily.
This way table privileges are enumerated lazily.
Currently Presto shows that the owner of a table has ALL privileges, even after some privileges are revoked. This commit fixes this issue by listing only privileges actually present in the metastore.
Presto currently lists only privilges of the tables owned by the current user, even after the admin role is set. This commit fixes this and lists all privileges for admins.
When tables of the same name exist across different schemas, Presto lists privileges of the table from all schemas instead of the single schema mentioned in the SHOW GRANTS query. This commit fixes the issue.
8ba37e2 to
4c93a9b
Compare
|
It's green, so maybe merge it? |
918eb71 to
26f9a22
Compare
The roles set during a CLI session were not being set and thus SHOW CURRENT ROLES returned incorrect results.
26f9a22 to
b431446
Compare
Thanks for doing this |
|
@arhimondr is it ok to land with it? |
|
@kokosing said there was some unnoticed problem during rebase, when the source branch of this PR was created. |
|
gentle ping |
|
I will take a look; @arhimondr do you wanna chime in? |
|
Yeah, i was going to. I think we should just merge it.
…On Fri, Feb 22, 2019 at 6:31 PM James Sun ***@***.***> wrote:
I will take a look; @arhimondr <https://github.com/arhimondr> do you
wanna chime in?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11645 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFUBrELWW7yeERX1SIaKL3r6-xbdyuQOks5vQKgOgaJpZM4XKdNy>
.
|
Supersedes #11475
FYI: @martint @arhimondr