-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add Apache Ranger authorizer plugin #22675
Conversation
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
4 similar comments
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
This is my first PR in Trino. Looking for help with the failures:
|
@mneethiraj thanks for sending this PR. I am not sure how it compares to the linked PR from @dprophet but overall we would like to get a Ranger plugin merged. In terms of other issues:
|
@mosabua - thank you for the response.
PR #13297 was created about 2 years back, built with Trino version 391-SNAPSHOT. Ranger plugin in this PR builds with the current version - 453-SNAPSHOT, updated for changes in authorization interface since then. Also, this PR builds with the most recent Apache Ranger version - 2.4.0.
|
It would be amazing to get this merged. Haveing to patch docker images to add the plugin in really slows our ability to keep up with upgrades |
Excellent @mneethiraj .. maybe @dprophet and his team can help with the review so we can get this over the finish line easier. |
I guess we need to enhance the helm chart to support the Ranger config. Additionally that config should be documented in the trino website |
Docs should be part of this PR. Helm chart for running Ranger is a separate topic and potentially out of scope for the Trino chart. Relevant config for this plugin in the Helm chart might be possible with the existing chart or could be added after this is merge. |
@mosabua - documentation on configuring Trino to use Ranger plugin is included in this PR, at |
The docs should really be user visible .. so you need to add a md file in https://github.com/trinodb/trino/tree/master/docs/src/main/sphinx/security and hook it in https://github.com/trinodb/trino/blob/master/docs/src/main/sphinx/security.md#access-control Once you moved the content from the readme and updated it I can review |
Whilst an official ranger helm chart would be wonderful somewhere it's not really a trino problem. I was specifically referring to enhancing the trino helm chart to support config for this plugin. Makeing the most used configurations configurable via the values files. Some of the config for this plugin is xml which is a bit inconsistent / incongruent with all other trino config. |
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.
Hi @mneethiraj ,
I'm so happy to see that ranger-trino plugin will be up-to-date now.
I just tried to test this plugin with ranger 2.4.0, but I'm always getting the same error, access deny. Audit:
{
"repoType": 203,
"repo": "trino",
"reqUser": "trino",
"evtTime": "2024-07-29 15:11:48.142",
"access": "SetUser",
"resource": "trino",
"resType": "trinouser",
"action": "impersonate",
"result": 0,
"agent": "trino",
"policy": 24,
"enforcer": "ranger-acl",
"agentHost": "trino-coordinator-662b97674b-9bxst",
"logType": "RangerAudit",
"id": "f6914203-d6ba-4103-a601-84ae4ae978fa-7",
"seq_num": 15,
"event_count": 1,
"event_dur_ms": 0,
"tags": [],
"cluster_name": ""
}
How did you get it working? Could you please share with us how to test it?
plugin/trino-ranger/src/main/resources/conf-docker/access-control.properties
Outdated
Show resolved
Hide resolved
Merged updates from upstream/master. |
grant/revoke/deny methods updates are done as well. |
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 think it looks good to me. Thank you!
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.
Looks good. A bunch of hopefully last comments.
plugin/trino-apache-ranger/src/main/java/io/trino/plugin/ranger/RangerSystemAccessControl.java
Outdated
Show resolved
Hide resolved
plugin/trino-apache-ranger/src/main/java/io/trino/plugin/ranger/RangerSystemAccessControl.java
Outdated
Show resolved
Hide resolved
plugin/trino-apache-ranger/src/main/java/io/trino/plugin/ranger/RangerSystemAccessControl.java
Outdated
Show resolved
Hide resolved
plugin/trino-apache-ranger/src/main/java/io/trino/plugin/ranger/RangerSystemAccessControl.java
Outdated
Show resolved
Hide resolved
testing/trino-product-tests/src/main/java/io/trino/tests/product/ranger/TestApacheRanger.java
Show resolved
Hide resolved
testing/trino-product-tests/src/main/java/io/trino/tests/product/ranger/TestApacheRanger.java
Outdated
Show resolved
Hide resolved
|
@kokosing @ksobolew @mneethiraj .. is this ready now after a rebase? From my view it looks good to go. |
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.
Thank you all for huge effort! I think it is an important milestone for Ranger and Trino. Great work!
Please rebase as there were plenty of commits recently and a release. It would be nice to make sure the whole CI is passing. Also please squash commits, and make sure that all the co-authors who contributed code here are mentioned in the commit message. My impression says it was a crowd effort :) |
Co-authored-by: lozbrown <[email protected]> Co-authored-by: Grzegorz Kokosiński <[email protected]>
merged commits from latest upstream/master. |
Done. The most recent run has whole CI passing.
Done. This PR includes contributions from @lozbrown and @kokosing; both have been listed as |
Thank you! 🎉 👏 ❤️ |
Congrats @mneethiraj 👏 🎉 ❤️ |
❤️ |
Congratulations @mneethiraj and everyone involved .. I am looking forward to see this shipped in Trino 466. Also note that I might get a blog post about this going .. and at a minimum it will be part of the updates in the keynote for Trino Summit. |
My sincere thanks to @kokosing, @ksobolew, @mosabua for the most rigorous review I have been through! Without your time, effort and guidance, this PR wouldn't have gotten here. Special thanks to @kokosing for your patience, detailed comments and suggestions; I learned a lot through our interactions. @lozbrown - thank you for owning the documentation part of this PR, even before I could ask for help. Trino community has built an amazing level of infrastructure to keep the bar very high for commits. Kudos to everyone here! Looking forward to continued engagement with Trino community. There is a lot to do..but for now, let me relish my first commit:-) |
Description
Added Apache Ranger authorizer plugin to authorize data access in Trino using Apache Ranger policies. Earlier version of this plugin is in Apache Ranger git repo. The plugin has been updated for the changes in SystemAccessControl interface in Trino master branch.
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: