Hive Meta Store impersonation access#14464
Hive Meta Store impersonation access#14464BlueStalker wants to merge 1 commit intoprestodb:masterfrom
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. |
arhimondr
left a comment
There was a problem hiding this comment.
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.
| <version>1.3.5-4</version> | ||
| </dependency> | ||
|
|
||
| <dependency> |
There was a problem hiding this comment.
We don't use ApacheCommons in Presto. Please use Guava instead.
|
|
||
| ``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.
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.
MetastoreHiveStatisticsProvider#getPartitionsStatistics, it gets the paritition stats.
| 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.
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: