英文:
How to prevent Apache Hive from connecting directly to jdbc bypassing Zookeeper
问题
Apache Hive通过Apache Ranger进行保护已配置。
连接通过zookeeper quorum进行,例如:
jdbc:hive2://d01.test.local:2181,d02.test.local:2181,d03.test.local:2181/;service Discovery Mode=zooKeeper;zooKeeperNamespace=hiveserver2
用户可以通过指定直接连接到主机来连接到Hive2,例如:
jdbc:hive2://d01.test.local:10000
但在Hive服务名称的策略设置中,只能有一个(文件ranger-hive-security.xml)。
那么如何保护Hive免受这种直接连接的影响呢?
如果策略通过zookeeper配置,则直接连接不受保护,并且审计不起作用。
英文:
Apache Hive protection via Apache Ranger is configured
The connection goes through the zookeeper quorum, for example:
jdbc:hive2://d01.test.local:2181,d 02.test.local:2181,d 03.test.local:2181/;service Discovery Mode=zooKeeper;zooKeeperNamespace=hiveserver2
Users have the ability to connect to Hive2 by specifying a direct connection to the host, for example:
jdbc:hive2://d01.test.local:10000
But in the policy setting for Have Service Name there can be only one (file ranger-hive-security.xml )
How then to protect hive from such a direct connection?
If the policy is configured via zookeeper then the direct connection is not secured and the audit does not work
答案1
得分: 1
Zookeeper quorum is for service high availability, it coordinates all the HS2 instances (from the specified hosts) in your cluster to work together.
As far as I know, specifying the property hive.zookeeper.quorum
does not help Ranger to enforce each HS2 host with only one plugin.
To achieve what you desire, I think you can go for such configuration;
- Install Ranger Hive plugin on each node where you have HS2.
- Create one service/repository to specify with
REPOSITORY_NAME
ininstall.properties
. - Configure each Hive plugin to use the same service/repository.
- Restart your HS2s.
- Create/modify/delete your policies under the service/repository (
REPOSITORY_NAME
).
In this way, any policy you create/delete/modify under your service will affect all the HS2 nodes as they share the same repo.
英文:
Zookeeper quorum is for service high availability, it coordinates all the HS2 instances (from the specified hosts) in your cluster to work together.
As far as I know, specifying the property hive.zookeeper.quorum
does not help Ranger to enforce each HS2 host with only one plugin.
To achieve what you desire, I think you can go for such configuration;
- Install Ranger Hive plugin on each node where you have HS2.
- Create one service/repository to specify with
REPOSITORY_NAME
ininstall.properties
. - Configure each Hive plugin to use same service/repository.
- Restart your HS2s.
- Create/modify/delete your policies under the service/repository (
REPOSITORY_NAME
).
In this way, any policy you create/delete/modify under your service will affect all the HS2 nodes as they share same repo.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论