千家信息网

【总结】HUE集成Sentry,通过HUE界面管理Sentry权限

发表于:2024-10-08 作者:千家信息网编辑
千家信息网最后更新 2024年10月08日,将Sentry集成到HUE中能够有许多好处:1、通过HUE界面,创建role2、在HUE的Sentry管理界面,可以Grant privileges给用户3、在Hue中创建与Sentry中role同名
千家信息网最后更新 2024年10月08日【总结】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配置文件中

  sentry.service.admin.group  hive,impala,hue

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=localhosthostname=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



0