【總結】HUE集成Sentry,通過HUE界面管理Sentry權限

將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-cdh5.9.0-compile/hue/desktop/conf/hue.ini
###########################################################################
# Settings for the Sentry lib
###########################################################################
[libsentry]
# Hostname or IP of server.
## hostname=localhost
hostname=10.10.16.102
# 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-cdh5.9.0-compile/hue/build/env/bin/supervisor &


sentry --command service  -conffile /etc/sentry/conf/sentry-site.xml



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章