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

Roles PR #90

Merged
merged 61 commits into from
Jan 29, 2019
Merged

Roles PR #90

merged 61 commits into from
Jan 29, 2019

Conversation

sopel39
Copy link
Member

@sopel39 sopel39 commented Jan 28, 2019

Extracted from: prestodb/presto#11645

@cla-bot
Copy link

cla-bot bot commented Jan 28, 2019

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to [email protected]. If you are contributing on behalf of someone else (e.g., your employer), the individual CLA may not be sufficient and your employer may need the Corporate CLA signed.

@sopel39
Copy link
Member Author

sopel39 commented Jan 28, 2019

@martint @electrum please take a look at the PR and commits structure if they are fine with CLA

@cla-bot
Copy link

cla-bot bot commented Jan 28, 2019

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to [email protected]. If you are contributing on behalf of someone else (e.g., your employer), the individual CLA may not be sufficient and your employer may need the Corporate CLA signed.

@sopel39
Copy link
Member Author

sopel39 commented Jan 28, 2019

For future reference this code was initially created by @arhimondr @cawallin @anusudarsan while at TD and massaged a lot by @kokosing, @sopel39, @anusudarsan, @findepi during many PR incarnations to prestodb

Andrii Rosa and others added 24 commits January 29, 2019 12:00
Leverage newly introduced method for recursive role grants traversal

Extracted-From: prestodb/presto#10904
Identity must hold all the selected roles for all the catalogs.
ConnectorIdentity holds only the role selected for some particular catalog.

Extracted-From: prestodb/presto#10904
For SHOW ROLES, issue the query:
select role_name as "Role" from catalog.information_schema.roles;

Extracted-From: prestodb/presto#10904
Andrii Rosa and others added 19 commits January 29, 2019 12:00
Verify that role set with `SET ROLE` is considering during the access check.

Extracted-From: prestodb/presto#10904
Previously when SqlStandardAccessControl was checking if given role is
enabled, it listed all role grants and check if that role is is among
all listed role grants.
Now it list all role grants until it finds that role.

Extracted-From: prestodb/presto#10904
That way roles are enumerated lazily.

Extracted-From: prestodb/presto#10904
This way table privileges are enumerated lazily.

Extracted-From: prestodb/presto#10904
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.

Extracted-From: prestodb/presto#10904
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.

Extracted-From: prestodb/presto#10904
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.

Extracted-From: prestodb/presto#10904
@cla-bot
Copy link

cla-bot bot commented Jan 29, 2019

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to [email protected]. If you are contributing on behalf of someone else (e.g., your employer), the individual CLA may not be sufficient and your employer may need the Corporate CLA signed.

@sopel39
Copy link
Member Author

sopel39 commented Jan 29, 2019

Our internal infra passed

@sopel39 sopel39 merged commit f958f81 into trinodb:master Jan 29, 2019
@sopel39 sopel39 deleted the epic/roles/7 branch January 29, 2019 12:26
@tooptoop4
Copy link
Contributor

gentle ping for prestodb merge

@@ -11,6 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Copy link
Contributor

Choose a reason for hiding this comment

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

unrelated change

Copy link
Contributor

@wenleix wenleix left a comment

Choose a reason for hiding this comment

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

[removed]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants