用於安全操作的客戶端配置: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網關的憑證並擁有其權限。


分享到:


相關文章: