W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
將以下內(nèi)容添加到每個(gè)REST網(wǎng)關(guān)的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替換適當(dāng)?shù)膽{證和密鑰表。
REST網(wǎng)關(guān)將使用提供的憑證對(duì)HBase進(jìn)行身份驗(yàn)證。
為了使用REST API主體與HBase進(jìn)行交互,還需要將hbase.rest.kerberos.principal添加到該acl表中。例如,要賦予REST API主體、rest_server、管理訪問(wèn)權(quán)限,像以下的命令就足夠了:
grant 'rest_server', 'RWCA'
HBase REST網(wǎng)關(guān)支持SPNEGO HTTP身份驗(yàn)證,以便客戶端訪問(wèn)網(wǎng)關(guān)。要為客戶端訪問(wèn)啟用REST網(wǎng)關(guān)Kerberos身份驗(yàn)證,請(qǐng)將以下內(nèi)容添加到每個(gè)REST網(wǎng)關(guān)的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網(wǎng)關(guān)支持不同的'hbase.rest.authentication.type':simple、kerberos。您也可以通過(guò)實(shí)現(xiàn)Hadoop AuthenticationHandler來(lái)實(shí)現(xiàn)自定義身份驗(yàn)證,然后將完整的類名稱指定為'hbase.rest.authentication.type'值。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: