隸屬于文章系列:大數(shù)據(jù)安全實(shí)戰(zhàn) http://www.itdecent.cn/p/76627fd8399c
創(chuàng)建principle
kadmin.local -q "addprinc -randkey hive" ;
kadmin.local -q "ktadd -k /etc/hadoop/conf/hive-user.keytab hive";
修改/etc/hive/conf/hive-site.xml,添加下面配置:
<property>
<name>hive.server2.authentication</name>
<value>KERBEROS</value>
</property>
<property>
<name>hive.server2.authentication.kerberos.principal</name>
<value>hive/_HOST@TT.COM</value>
</property>
<property>
<name>hive.server2.authentication.kerberos.keytab</name>
<value>/etc/hadoop/conf/hive-service.keytab</value>
</property>
<property>
<name>hive.metastore.sasl.enabled</name>
<value>true</value>
</property>
<property>
<name>hive.metastore.kerberos.keytab.file</name>
<value>/etc/hadoop/conf/hive-service.keytab</value>
</property>
<property>
<name>hive.metastore.kerberos.principal</name>
<value>hive/_HOST@TT.COM</value>
</property>
驗(yàn)證:
tail -f /tmp/kduser/var/opt/apache-hive-2.3.2-bin/hivelog