-
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
Support role management #7898
Closed
Closed
Support role management #7898
Conversation
This file contains 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
arhimondr
force-pushed
the
support_role_management
branch
3 times, most recently
from
April 25, 2017 21:13
5744956
to
0ce6e29
Compare
arhimondr
force-pushed
the
support_role_management
branch
from
April 27, 2017 18:47
0ce6e29
to
8f35e71
Compare
arhimondr
force-pushed
the
support_role_management
branch
from
May 16, 2017 15:21
8f35e71
to
08b367a
Compare
arhimondr
force-pushed
the
support_role_management
branch
2 times, most recently
from
May 31, 2017 20:13
24eaa60
to
31de171
Compare
arhimondr
force-pushed
the
support_role_management
branch
from
June 12, 2017 15:08
31de171
to
bf1739f
Compare
amrutagokhale
force-pushed
the
support_role_management
branch
from
June 27, 2017 20:01
bf1739f
to
73a38b1
Compare
arhimondr
force-pushed
the
support_role_management
branch
from
July 28, 2017 21:36
73a38b1
to
77c464d
Compare
arhimondr
force-pushed
the
support_role_management
branch
from
August 25, 2017 15:55
77c464d
to
b9dca17
Compare
Instead of creating the entire TPCH table set it is enough to create one small table, such as nation. After closing a query executor reference must be nullified to prevent memory leaks.
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.
Instead of select * from information_schema.roles, SHOW CURRENT ROLES rewrites to select * from information_schema.enabled_roles. All users can see what roles they're currently using, so no need for access control checks.
Currently the only database permission we support is OWNERSHIP. Instead of creating that permission, and checking if it is granted it is more readable to just call `isDatabaseOwner` directly.
Admin user has all the available permissions for all the entities implicitly. So it may be considered as a database and table "owner" for all tables and databases. Also it has all the SELECT, INSERT, DELETE permissions implicitly.
hasGrantOptionForPrivilege cannot be used in security checks for createView because it doesn't consider the session role.
Verify that role set with `SET ROLE` is considering during the access check.
arhimondr
force-pushed
the
support_role_management
branch
from
August 28, 2017 17:36
b9dca17
to
8f09296
Compare
Superseded by #9366 |
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.
This PR enables roles management through Presto.
It covers all the syntax explained here: Teradata#494
Although the PR is enormous - it can be reviewed and merged partially.
CREATE/DROP/LIST ROLES
- commits throughIntroduce CREATE ROLE and DROP ROLE statements
toImplement Create/Drop/List roles in Hive connector
GRANT/REVOKE ROLES
- commits throughIntroduce GRANT/REVOKE roles statements
toPrepare metastore interface to accept ROLE for GRANT/REVOKE
SET ROLE
- commits throughIntroduce SET ROLE statement
toAccept ROLE in GRANT/REVOKE Privileges statements
SHOW ROLES
,SHOW CURRENT ROLES
,SHOW ROLE GRANTS
shortcuts - commits throughAdd SHOW ROLES to the parser
toAccess control for SHOW ROLE GRANTS and SHOW CURRENT ROLES
Consider role set with
SET ROLE
when checking permissions - commits throughRemove redundant checkDatabasePermission methods
toMore product tests for SET ROLE
Roles management documentation -
Document role management