隶属于文章系列:大数据安全实战 https://www.jianshu.com/p/76627fd8399c
创建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>
验证:
tail -f /tmp/kduser/var/opt/apache-hive-2.3.2-bin/hivelog
网友评论