hadoop - Apache Sentry:SemanticException无有效特权此查询所需的特权

标签 hadoop cloudera apache-sentry

我有不安全的群集(CDH 5.4),并且由于我想向更多用户提供数据访问权限,所以我想打开Sentry,到目前为止,该服务器没有Kerberos(在成功启动Sentry之后才出现)。
由于目前其他人可能需要Impala,因此我决定在第一阶段将其设置在Hive中。

我已采取的步骤:
1)我设置了2个用户:hive和tuser

tuser-小组测试
hive -小组 hive ,动物园管理员

小组测试

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

组配置单元具有管理员角色(第一个具有解锁锁定的角色):
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

此外,用户配置单元位于sendry.service.admin.group和sentry.service.allow.connect中。

2)我已经打开了哨兵
-在Hive中,将哨兵服务从“无”更改为“哨兵”
-在Hive Service高级配置代码段(安全阀)中,已为sentry-site.xml插入了<property> <name>sentry.hive.testing.mode</name><value>true</value></property>+重新启动哨兵

结果:
用户配置单元可以访问配置单元中的任何内容。那就是我所期望的。

用户tuser无法访问Hive中的任何内容: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;
我想念什么?

最佳答案

最终,我被告知出了什么问题:Hue组必须与Namenode的linux上的组相同(检查HDFS org.apache.hadoop.security.ShellBasedUnixGroupsMapping)。对于Impala,具有Impala守护程序的所有节点都必须具有相同的组。

但是,我将从LDAP(选项org.apache.hadoop.security.LdapGroupsMapping)中取代组。

关于hadoop - Apache Sentry:SemanticException无有效特权此查询所需的特权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35938297/

相关文章:

hadoop - 如何让我的 hdfs docker 客户端运行?

hadoop - hadoop作业实际处理时间

linux - 在生产环境中永远运行 Spark Streaming

Eclipse Map and Reduce 插件和 Hadoop 教程

security - 如何在 apache ranger 和 sentry 之间进行选择

Hadoop 名称节点格式失败

hadoop - Hive 宏未返回预期结果

hadoop - 将一个MapReduce的输出用作另一个MapReduce的输入时出错

apache-spark - 带哨兵的 spark sql 的权限

hadoop - 为LDAP用户调用时,Impala Shell挂起