用于安全操作的客户端配置:Thrift Gateway

将以下内容添加到每个Thrift网关的hbase-site.xml文件中:

<code><property>
<name>hbase.thrift.keytab.file/<name>
<value>/etc/hbase/conf/hbase.keytab/<value>
/<property>
<property>
<name>hbase.thrift.kerberos.principal/<name>
<value>$USER/[email protected]/<value>

/<property>

<property>
<name>hbase.thrift.dns.interface/<name>
<value>default/<value> /<property> <property>
<name>hbase.thrift.dns.nameserver/<name>
<value>default/<value>
/<property>/<code>

分别替换“$ USER”和“$ KEYTAB”的相应凭证和密钥表。

为了使用Thrift API主体与HBase进行交互,还需要将hbase.thrift.kerberos.principal添加到该acl表中。例如,要赋予Thrift API主体,thrift_server,管理访问权限(administrative access),可以使用如下的命令:

<code>grant 'thrift_server', 'RWCA'/<code>

Thrift网关将使用提供的凭证向HBase进行身份验证。Thrift网关本身不会执行任何身份验证。所有通过Thrift网关访问的客户端都将使用Thrift网关的凭证并拥有其权限。


分享到:


相關文章: