apachesentry:semanticexception没有有效的特权此查询需要特权

rjzwgtxy  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(305)

我有一个不安全的集群(cdh5.4),由于我想为更多的用户提供对数据的访问,我想打开sentry,到目前为止没有kerberos(在成功启动sentry之后)。因为其他人可能需要 Impala ,所以我决定在第一阶段把它放在Hive里。
我采取的步骤:1)我设置了两个用户:hive和tuser
图瑟-群测试Hive-群Hive,Zookeeper
分组试验

indexer.access, about.access, beeswax.access, filebrowser.access, hbase.write, hbase.access, help.access, impala.access, jobbrowser.access, 
jobsub.access, metastore.write, metastore.access, oozie.dashboard_jobs_access, oozie.access, pig.access, proxy.access, rdbms.access, 
search.access, security.impersonate, security.access, spark.access, sqoop.access, useradmin.access_view:useradmin:edit_user, useradmin.access, zookeeper.access

群Hive

beeswax.access

组配置单元的角色为admin(第一个具有未锁定的锁):

SERVER
server=server1 action=ALL
SERVER
server=server1 action=ALL

组测试的角色是neco

SERVER
server=server1 action=ALL
URI
server=server1 hdfs://...:8020/user/hive/warehouse action=ALL
DATABASE
server=server1 db=default action=ALL

此外,用户配置单元位于sentry.service.admin.group和sentry.service.allow.connect两个集合中。
2) 我打开了sentry-in配置单元,将sentry服务从“none”检查为sentry-site.xml插入的sentry-in配置单元服务高级配置片段(safety valve) <property> <name>sentry.hive.testing.mode</name><value>true</value></property> +重新启动哨兵
结果:用户配置单元可以访问配置单元中的任何内容。这正是我所期待的。
用户tuser无法访问配置单元中的任何内容: Error while compiling statement: FAILED: SemanticException No valid privileges Required privileges for this query: Server=server1->Db=*->Table=+->action=insert;Server=server1->Db=*->Table=+->action=select; 我错过了什么?

wsewodh2

wsewodh21#

最后,有人告诉我哪里不对:hue组必须与namenode的linux上的组相同(因为hdfs org.apache.hadoop.security.shellbasedunixgroupsmapping被选中)。对于impala,所有具有impala守护进程的节点都必须具有相同的组。
但是,我将从ldap中超越组(option org.apache.hadoop.security.ldapgroupsmapping)。

相关问题