-
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
Hive Meta Store impersonation access #14464
Conversation
This commits squash the original commits from PR prestodb#13699 which includes the follow commits: HMS impersonation access refactoring to use HMS Authentication Module add Config for multiple hms instances Update HMS memory settings address review comments
@arhimondr This comes from #13699 and let's make another round of code reviews. Thanks. Also, FYI, @zhenxiao |
@BlueStalker Thank you, will start reviewing it soon. |
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.
Just skimmed through. Some high level comments.
I don't see any changes to the CachingHiveMetastore
. How is this supposed to work?
Let's assume the first call to getTable
is done by user Alice
that is authorized to get the table. The response is cached by the CachingHiveMetastore
. Then the user Bob
calls getTable
, and the table information is returned from the CachingHiveMetastore
without any security checks. This is a potential security risk.
@@ -1450,6 +1450,12 @@ | |||
<version>1.3.5-4</version> | |||
</dependency> | |||
|
|||
<dependency> |
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 don't use ApacheCommons
in Presto. Please use Guava instead.
@@ -131,6 +131,8 @@ Property Name Description | |||
to the Hive metastore service. | |||
|
|||
``hive.metastore.client.keytab`` Hive metastore client keytab location. | |||
``hive.metastore.impersonation.enabled`` Enable metastore end-user impersonation. | |||
``hive.metastore.impersonation.user`` Default impersonation user when communicating with Hive Metastore |
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.
In what cases we fallback to the default user? It feels like if impersonation is enabled we should never contact the metastore with "default".
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.
MetastoreHiveStatisticsProvider#getPartitionsStatistics, it gets the paritition stats.
@@ -7,6 +7,11 @@ set -euo pipefail -x | |||
cleanup_docker_containers | |||
start_docker_containers | |||
|
|||
# restart HMS to pickup memory settings | |||
exec_in_hadoop_master_container cp /etc/hadoop/conf/hive-env.sh /etc/hive/conf/hive-env.sh |
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.
These changes should go directly to the docker containers. Here is the repository: https://github.com/prestodb/docker-images
Hi, Andrii, Sorry for late reply.
|
@BlueStalker The global metastore cache can be enabled with https://github.com/prestodb/presto/blob/master/presto-hive-metastore/src/main/java/com/facebook/presto/hive/MetastoreClientConfig.java#L35. Also It doesn't feel right to wrap with |
This pull request has been automatically marked as stale because it has not had recent activity. If you'd still like this PR merged, please comment on the task, make sure you've addressed reviewer comments, and rebase on the latest master. Thank you for your contributions! |
This commits squash the original commits from PR
#13699
which includes the follow commits:
HMS impersonation access
refactoring to use HMS Authentication Module
add Config for multiple hms instances
Update HMS memory settings
address review comments
If release note is NOT required, use: