REST Gateway:客戶端安全操作配置

2018-04-20 11:16 更新

用于安全操作的客戶端配置-REST Gateway

將以下內容添加到每個REST網關的hbase-site.xml文件中:

<property>
  <name>hbase.rest.keytab.file</name>
  <value>$KEYTAB</value>
</property>
<property>
  <name>hbase.rest.kerberos.principal</name>
  <value>$USER/_HOST@HADOOP.LOCALDOMAIN</value>
</property>

分別為$ USER和$ KEYTAB替換適當?shù)膽{證和密鑰表。

REST網關將使用提供的憑證對HBase進行身份驗證。

為了使用REST API主體與HBase進行交互,還需要將hbase.rest.kerberos.principal添加到該acl表中。例如,要賦予REST API主體、rest_server、管理訪問權限,像以下的命令就足夠了:

grant 'rest_server', 'RWCA'

HBase REST網關支持SPNEGO HTTP身份驗證,以便客戶端訪問網關。要為客戶端訪問啟用REST網關Kerberos身份驗證,請將以下內容添加到每個REST網關的hbase-site.xml文件中:

<property>
  <name>hbase.rest.support.proxyuser</name>
  <value>true</value>
</property>
<property>
  <name>hbase.rest.authentication.type</name>
  <value>kerberos</value>
</property>
<property>
  <name>hbase.rest.authentication.kerberos.principal</name>
  <value>HTTP/_HOST@HADOOP.LOCALDOMAIN</value>
</property>
<property>
  <name>hbase.rest.authentication.kerberos.keytab</name>
  <value>$KEYTAB</value>
</property>
<!-- Add these if you need to configure a different DNS interface from the default -->
<property>
  <name>hbase.rest.dns.interface</name>
  <value>default</value>
</property>
<property>
  <name>hbase.rest.dns.nameserver</name>
  <value>default</value>
</property>

用$ KEYTAB替代HTTP的keytab 。

HBase REST網關支持不同的'hbase.rest.authentication.type':simple、kerberos。您也可以通過實現(xiàn)Hadoop AuthenticationHandler來實現(xiàn)自定義身份驗證,然后將完整的類名稱指定為'hbase.rest.authentication.type'值。

以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號