HiverServer2支持远程多客户端的并发和认证,支持通过JDBC、Beeline等连接操作,是一个比较方便并且安全的方式。
但是自己的开发集群上面为了方便开发都是做了不做权限监控的设定,即设定
<property>
<name>hive.security.authorization.enabled</name>
<value>false</value>
<description>enable or disable the Hive client authorization</description>
</property>
这样在使用hiveserver2连接的时候无论你输不输入用户名密码,都会正常进入,并且能进行各种操作。
但是这个明显是不安全的,毕竟正常情况下,如何设定需要校验用户登录呢,修改hive-site.xml中代码:
<property>
<name>hive.security.authorization.enabled</name>
<value>false</value>
<description>enable or disable the Hive client authorization</description>
</property>
<property>
<name>hive.server2.thrift.client.user</name>
<value>用户名</value>
<description>Username to use against thrift client</description>
</property>
<property>