-
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
base: master
Are you sure you want to change the base?
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 cla@trino.io. 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 cla@trino.io. 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 cla@trino.io. 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 cla@trino.io. 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 cla@trino.io. 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 cla@trino.io. 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 latest upstream/master. |
testing/trino-product-tests/src/main/java/io/trino/tests/product/ranger/TestRanger.java
Outdated
Show resolved
Hide resolved
``` | ||
|
||
|
||
To combine Ranger access control with file-based or other access control systems, create the file |
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.
@mosabua This section could be reused between access control systems documentations. It is quite generic. Or maybe it should not be documented in this place, but maybe on some higher level. WDYT?
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.
Agreed .. but we can do that in a follow up PR. I think we need a new page similar to authentication types but for multiple access control systems.
I will take this on.
plugin/trino-apache-ranger/src/main/java/io/trino/plugin/ranger/RangerConfig.java
Outdated
Show resolved
Hide resolved
...s/docker/trino-product-tests/conf/environment/multinode-apache-ranger/ranger-trino-audit.xml
Show resolved
Hide resolved
...ocker/trino-product-tests/conf/environment/multinode-apache-ranger/ranger-trino-security.xml
Outdated
Show resolved
Hide resolved
testing/trino-product-tests/src/main/java/io/trino/tests/product/ranger/TestApacheRanger.java
Outdated
Show resolved
Hide resolved
...t-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/SuiteRanger.java
Outdated
Show resolved
Hide resolved
...t-tests-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/SuiteRanger.java
Outdated
Show resolved
Hide resolved
Props to everyone working on this PR. What a huge and great effort. I know the community is looking forward to this shipping soon. It looks like its getting really close. |
@kokosing - I updated TestApacheRanger with addition of query execution by CI error suggests
|
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.
Have added comments to various docs above, mostly stuff i worked out when trying to update helm chart changes
Merged updates from latest upstream/master. |
@kokosing - this issue was resolved after merging the latest from upstream/master branch. |
<property> | ||
<name>xasecure.policymgr.clientssl.truststore.credential.file</name> | ||
<value></value> | ||
<description>Path to credential file for the truststore; the credential should be in alias sslTrustStore</description> |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
@lozbrown - supporting this Trino way of handling secrets will require enhancements in Apache Ranger library. I suggest tracking this in Apache Ranger community, and update the plugin once a Apache Ranger release includes the enhancements. This shouldn't be blocker for this PR.
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.
@mneethiraj I'm very eager to see merged soon too...I watched the contributor call this morning hoping this would have come up but alas no. I agree that at this point I'd rather see it merged as is.
Getting that secret file into the pod without exposing the secret in source control, will be a pain in the proverbial but we'll work it out.
Is there any way not to need that if we're only using 1 way SSL and the ca certs in trust store are not secrets?
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.
While I have not looked at the code, I am good with the docs to be merged as they stand. I will follow up with a separate PR to clean them all up. I believe we should get this in as soon as the code is ready.
``` | ||
|
||
|
||
To combine Ranger access control with file-based or other access control systems, create the file |
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.
Agreed .. but we can do that in a follow up PR. I think we need a new page similar to authentication types but for multiple access control systems.
I will take this on.
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 see plenty of comments are not yet addressed. @mneethiraj please ping me when it is ready to another round of review
plugin/trino-apache-ranger/src/main/java/io/trino/plugin/ranger/RangerConfig.java
Outdated
Show resolved
Hide resolved
plugin/trino-apache-ranger/src/main/java/io/trino/plugin/ranger/RangerConfig.java
Outdated
Show resolved
Hide resolved
@kokosing - except for removing the implementation of grant/revoke/deny methods, all other comments are addressed. |
Co-authored-by: lozbrown <lozbrown@users.noreply.github.com> Co-authored-by: Grzegorz Kokosiński <grzegorz@starburstdata.com>
Merged updates from upstream/master. |
grant/revoke/deny methods updates are done as well. |
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: