为什么80%的码农都做不了架构师?>>>   

介绍

hadoop生态里面常用的安全认证无非两种kerberos和ldap,kerberos的繁琐已经领教过了,ldap还好在生产中也用过,看来hive+ldap+sentry用起来应该比较顺手一些。hive+sentry的配置见Sentry Service for Hive Without kerberos。ldap的部署见openldap+phpldapadmin

LDAP配置

/etc/openldap/slapd.conf

include       /etc/openldap/schema/corba.schema
include     /etc/openldap/schema/core.schema
include     /etc/openldap/schema/cosine.schema
include     /etc/openldap/schema/duaconf.schema
include     /etc/openldap/schema/dyngroup.schema
include     /etc/openldap/schema/inetorgperson.schema
include     /etc/openldap/schema/java.schema
include     /etc/openldap/schema/misc.schema
include     /etc/openldap/schema/nis.schema
include     /etc/openldap/schema/openldap.schema
include     /etc/openldap/schema/ppolicy.schema
include     /etc/openldap/schema/collective.schemaallow bind_v2pidfile      /var/run/openldap/slapd.pid
argsfile    /var/run/openldap/slapd.argsTLSCACertificatePath /etc/openldap/certs
TLSCertificateFile "\"OpenLDAP Server\""
TLSCertificateKeyFile /etc/openldap/certs/passworddatabase config
access to *by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manageby * nonedatabase monitor
access to *by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" readby dn.exact="cn=Manager,dc=my-domain,dc=com" readby * nonedatabase  bdb
suffix      "dc=bdbigdata,dc=com"
checkpoint  1024 15
rootdn      "cn=Manager,dc=bdbigdata,dc=com"
rootpw      bigdatadirectory    /var/lib/ldap
loglevel        296
index objectClass                       eq,pres
index ou,cn,mail,surname,givenname      eq,pres,sub
index uidNumber,gidNumber,loginShell    eq,pres
index uid,memberUid                     eq,pres,sub
index nisMapName,nisMapEntry            eq,pres,sub

hive配置

/etc/hive/conf/hive-site.xml

​
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration><property><name>javax.jdo.option.ConnectionURL</name><value>jdbc:oracle:thin:@192.168.1.6:1521/BDODS</value></property><property><name>javax.jdo.option.ConnectionDriverName</name><value>oracle.jdbc.driver.OracleDriver</value></property><property><name>javax.jdo.option.ConnectionUserName</name><value>hive</value></property><property><name>javax.jdo.option.ConnectionPassword</name><value>H222</value></property><property><name>datanucleus.readOnlyDatastore</name><value>false</value></property><property> <name>datanucleus.fixedDatastore</name><value>false</value> </property><property><name>datanucleus.autoCreateSchema</name><value>true</value></property><property><name>datanucleus.autoCreateTables</name><value>true</value></property><property><name>datanucleus.autoCreateColumns</name><value>true</value></property><property><name>mapreduce.framework.name</name><value>yarn</value></property><property><name>yarn.resourcemanager.resource-tracker.address</name><value>hadoop2-148:23125,hadoop2-149:23125</value></property><property><name>hive.auto.convert.join</name><value>true</value></property><property><name>hive.metastore.schema.verification</name><value>false</value></property><property><name>hive.metastore.warehouse.dir</name><value>/user/hive/warehouse</value></property><property><name>hive.warehouse.subdir.inherit.perms</name><value>true</value></property><property><name>hive.metastore.uris</name><value>thrift://Server:9083</value></property><property><name>hive.metastore.client.socket.timeout</name><value>36000</value></property><property><name>hive.zookeeper.quorum</name><value>hadoop2-152:2181,hadoop2-153:2181,hadoop2-154:2181,hadoop2-181:2181,hadoop2-182:2181</value></property><property><name>hive.server2.thrift.port</name><value>10000</value></property><property><name>hive.server2.thrift.bind.host</name><value>0.0.0.0</value></property><property><name>hive.server2.thrift.min.worker.threads</name><value>20</value></property><property><name>hive.server2.thrift.max.worker.threads</name><value>100</value></property><property>  <name>hive.metastore.authorization.storage.checks</name>  <value>true</value>  </property>  <property><name>dfs.client.read.shortcircuit</name><value>true</value></property><property><name>dfs.domain.socket.path</name><value>/var/lib/hadoop-hdfs/dn_socket</value></property><property><name>hive.querylog.location</name><value>/var/log/hive/</value></property><property><name>hive.exec.compress.intermediate</name><value>true</value></property><property><name>hive.exec.compress.output</name><value>true</value></property><property><name>mapred.output.compression.codec</name><value>org.apache.hadoop.io.compress.SnappyCodec</value></property><property><name>hive.exec.parallel</name><value>true</value></property><property><name>hive.exec.parallel.thread.number</name><value>16</value></property><property><name>hive.mapred.mode</name><value>strict</value></property><property><name>hive.exec.dynamic.partition.mode</name><value>strict</value></property><property><name>hive.exec.max.dynamic.partitions</name><value>300000</value></property><property><name>hive.exec.max.dynamic.partitions.pernode</name><value>1000</value></property><!-- Hbase config--><property><name>hbase.zookeeper.quorum</name><value>hadoop2-152:2181,hadoop2-153:2181,hadoop2-154:2181,hadoop2-181:2181,hadoop2-182:2181</value></property><!-- Sentry Hiveserver2 config--><property> <name>hive.sentry.conf.url</name>  <value>file:///etc/hive/conf/sentry-site.xml</value> </property> <property><name>hive.server2.session.hook</name><value>org.apache.sentry.binding.hive.HiveAuthzBindingSessionHook</value></property><property><name>hive.security.authorization.task.factory</name><value>org.apache.sentry.binding.hive.SentryHiveAuthorizationTaskFactoryImpl</value></property><!-- Sentry hivemeastore config --><property><name>hive.metastore.filter.hook</name><value>org.apache.sentry.binding.metastore.SentryMetaStoreFilterHook</value></property><property>  <name>hive.metastore.pre.event.listeners</name>  <value>org.apache.sentry.binding.metastore.MetastoreAuthzBinding</value>  </property><property><name>hive.metastore.event.listeners</name>  <value>org.apache.sentry.binding.metastore.SentryMetastorePostEventListener</value>  </property><!-- OpenLDAP --><property><name>hive.server2.authentication</name><value>LDAP</value></property><property><name>hive.server2.authentication.ldap.url</name><value>ldap://10.205.54.14</value></property><property><name>hive.server2.authentication.ldap.baseDN</name><value>ou=People,dc=bdbigdata,dc=com</value></property>
</configuration>​

ps:注意openladp的配置

PHPladpadmin

$servers = new Datastore();
$servers->newServer('ldap_pla');
$servers->setValue('server','name','Bigdata LDAP Server');
$servers->setValue('server','host','10.205.54.14');
$servers->setValue('server','port',389);
$servers->setValue('server','base',array('dc=bdbigdata,dc=com'));
$servers->setValue('login','auth_type','session');
$servers->setValue('login','bind_id','cn=Manager,dc=bdbigdata,dc=com');
$servers->setValue('login','bind_pass','bigdata');
$servers->setValue('server','tls',false);

设置LDAP

通过phpldapadmin添加修改用户更方便一些

Hive验证

通过hive用户登录,输入错误密码

通过hive登录,输入正确密码(密码为在phpladpadmin中设置的密码)

转载于:https://my.oschina.net/guol/blog/887932

Hive+LDAP+Sentry相关推荐

  1. Hue、Hive、Sentry、Airflow、Oozie

    本篇博文主要讲解的是Hue这个开源软件.通过阅读本博客,可以从宏观的角度了解Hue这个应用. 本文介绍了什么是Hue,Hue的架构,Hue的特点,在Hue上面使用Hive的优点,在Hue上浏览文件和数 ...

  2. hive 集成sentry

    2019独角兽企业重金招聘Python工程师标准>>> 环境 apache-hive-2.3.3-bin apache-sentry-2.1.0-bin 1 2 sentry是目前最 ...

  3. ldap + sentry架构的相关结论的验证

    文章目录 一.环境 二.非ldap下 1. 验证1:kerberos的认证.sentry的授权不关心用户的来源(ldap,linux),是独立于linxu和ldap的,可以不在linux创建对应用户. ...

  4. hive整合sentry,impala,hue之后权限管理操作

    7.Hive授权参考(开启sentry之后,对用户授权用不了,只能针对用户组,grant role testrole to user xxxxxxx; ) 7.1:角色创建和删除 create rol ...

  5. Apache Sentry架构介绍

    2019独角兽企业重金招聘Python工程师标准>>> cdh版本的hadoop在对数据安全上的处理通常采用Kerberos+Sentry的结构. kerberos主要负责平台用户的 ...

  6. 什么是 Apache Sentry , Apache Sentry 介绍

    Apache Sentry是Hadoop中的一个基于角色的细粒度授权组件.Sentry可以在Hadoop集群上对通过身份认证的用户和应用程序控制数据访问权限.Sentry开箱即用的支持Hive,Hiv ...

  7. CDH Sentry介绍

    1. 介绍 Apache Sentry是Cloudera公司发布的一个Hadoop开源组件,截止目前还是Apache的孵化项目,它提供了细粒度级.基于角色的授权以及多租户的管理模式.Sentry当前可 ...

  8. 【总结】Apache Sentry 服务简介

    Sentry是一个RPC服务,将认证元数据信息存储在关系型数据库,并提供RPC接口检索和操作权限.利用Kerveros支持安全访问.Sentry Service通过后台数据库存储提供认证元数据信息,不 ...

  9. Apache Sentry详细讲解

    Sentry 简介 Apache Sentry是Cloudera公司发布的一个Hadoop开源组件,2016年3月从Incubator毕业,成为Apache顶级项目. Sentry是一个基于角色的粒度 ...

最新文章

  1. 如何(以及为什么需要)创建一个好的验证集
  2. centos 6.1_64位系统 双网卡邦定
  3. Lazada2022新开店入驻流程及费用
  4. 20144303 20145239 实验三
  5. Linux 命令之 apt-get -- APT 软件包管理工具
  6. JavaScript异步编程【上】 -- 同步和异步、事件循环(EventLoop)、微任务和宏任务、回调函数
  7. java盒图_《》——8幅图图解Java机制
  8. ubuntu linux 使用常见问题
  9. Python3.x建立服务器自动监测端口数据,客户端测试服务器
  10. Linux查找树莓派ip地址,让树莓派“说”出自己的IP地址
  11. 吸烟首先危害是会引起火灾,电子烟较好
  12. Ubuntu 18.04 安装驱动
  13. android实现按键找图功能,从零学起之安卓篇《按键精灵安卓版找图找色应用汇总介绍》更新20140603 _ 教程中心 - 按键精灵论坛...
  14. 信息系统项目管理师必背核心考点(四十八)合同类型的选择
  15. 身份证件号码有效性校验
  16. 顺丰同城快递预下单接口
  17. PDF怎么编辑注释? 5 个免费好用的 PDF 注释器
  18. 耗时五个月的项目实训——影行App
  19. cdn投资骗收租_为研究直播的投资点,才意识到CDN对内容分发的基础性意义。迟到3年才看到这一点,错过20倍的网宿科技...
  20. java斗地主发牌代码_java代码实现斗地主发牌功能

热门文章

  1. TinkPHP内核仿每推推51领啦试客系统源码
  2. 表格列求和_Excel表格的基本操作,包含制作一个表格10方面的知识
  3. 仿麦站网模板源码|织梦dedecms虚拟商品下载站模板源码
  4. JeewxBoot微信管家平台源码v1.3
  5. 关于Socket通信服务的心跳包(转) -感觉系统
  6. MySQL入门 (五) : CRUD 与资料维护
  7. HTML5: 利用SVG动画动态绘制文字轮廓边框线条
  8. 跟着8张思维导图学习javascript
  9. Objective-C 2.0 with Cocoa Foundation--- 4,继承
  10. 斗地主AI算法——第十四章の主动出牌(3)