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

2018-04-18 10:53 更新

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

將以下內(nèi)容添加到每個(gè)Thrift網(wǎng)關(guān)的hbase-site.xml文件中:

<property>
  <name>hbase.thrift.keytab.file</name>
  <value>/etc/hbase/conf/hbase.keytab</value>
</property>
<property>
  <name>hbase.thrift.kerberos.principal</name>
  <value>$USER/_HOST@HADOOP.LOCALDOMAIN</value>
  <!-- TODO: This may need to be  HTTP/_HOST@<REALM> and _HOST may not work.
   You may have  to put the concrete full hostname.
   -->
</property>
<!-- Add these if you need to configure a different DNS interface from the default -->
<property>
  <name>hbase.thrift.dns.interface</name>
  <value>default</value>
</property>
<property>
  <name>hbase.thrift.dns.nameserver</name>
  <value>default</value>
</property>

分別替換“$ USER”和“$ KEYTAB”的相應(yīng)憑證和密鑰表。

為了使用Thrift API主體與HBase進(jìn)行交互,還需要將hbase.thrift.kerberos.principal添加到該acl表中。例如,要賦予Thrift API主體,thrift_server,管理訪問權(quán)限(administrative access),可以使用如下的命令:

grant 'thrift_server', 'RWCA'

Thrift網(wǎng)關(guān)將使用提供的憑證向HBase進(jìn)行身份驗(yàn)證。Thrift網(wǎng)關(guān)本身不會(huì)執(zhí)行任何身份驗(yàn)證。所有通過Thrift網(wǎng)關(guān)訪問的客戶端都將使用Thrift網(wǎng)關(guān)的憑證并擁有其權(quán)限。

以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)