将Sentry集成到HUE中能够有许多好处:
1、通过HUE界面,创建role
2、在HUE的Sentry管理界面,可以Grant privileges给用户
3、在Hue中创建与Sentry中role同名的group
4、将role赋予一个user
5、保证HUE用户,在所有节点上的group与HUE中的group相同
HUE集成Sentry操作
1、将登录HUE管理用户和权限的用户所属组添加到sentry-site.xml配置文件中
<property>
<name>sentry.service.admin.group</name>
<value>hive,impala,hue</value>
</property>
2、配置hue.ini
[root@gateway2 ~]# vim /usr/local/hue-3.9.0-cdh6.9.0-compile/hue/desktop/conf/hue.ini
###########################################################################
# Settings for the Sentry lib
###########################################################################
[libsentry]
# Hostname or IP of server.
## hostname=localhost
hostname=10.10.10.10
# Port the sentry service is running on.
port=8038
# Sentry configuration directory, where sentry-site.xml is located.
sentry_conf_dir=/usr/local/sentry/conf
3、拷贝sentry-site.xml文件到hue.ini配置文件中sentry_conf_dir变量指定的目录下,
如果sentry服务部署在其他服务器上,也将文件拷贝到hue所在服务器下
[root@gateway2 ~]# ll /usr/local/sentry/conf
-rw-r--r-- 1 root root 2220 11月 21 2016 sentry-site.xml
4、重启HUE服务和Sentry服务
nohup /usr/local/hue-3.9.0-cdh6.9.0-compile/hue/build/env/bin/supervisor &
sentry --command service -conffile /etc/sentry/conf/sentry-site.xml
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。