REST Gateway模擬配置

默認情況下,REST Gateway(REST網關)不支持模擬。它代表客戶端訪問HBase。對於HBase服務器,所有請求都來自REST網關用戶,實際用戶不詳。您可以打開模擬支持。通過模擬,REST網關用戶是代理用戶。HBase服務器知道每個請求的實際/真實用戶,因此它可以應用適當的授權。

要打開REST網關模擬,我們需要配置HBase服務器(主服務器和區域服務器)以允許代理用戶;配置REST網關以啟用模擬。

要允許代理用戶,請將以下內容添加到每個HBase服務器的hbase-site.xml文件中:

<code>

<

property

>

<

name

>hadoop.security.authorization

name

>

<

value

>true

value

>

property

>

<

property

>

<

name

>hadoop.proxyuser.$USER.groups

name

>

<

value

>$GROUPS

value

>

property

>

<

property

>

<

name

>hadoop.proxyuser.$USER.hosts

name

>

<

value

>$GROUPS

value

>

property

>/<code>

將REST網關代理用戶替換為$ USER,並將允許的組列表替換為$ GROUPS。

要啟用REST網關模擬,請將以下內容添加到每個REST網關的hbase-site.xml文件中:

<code>

<

property

>

<

name

>hbase.rest.authentication.type

name

>

<

value

>kerberos

value

>

property

>

<

property

>

<

name

>hbase.rest.authentication.kerberos.principal

name

>

<

value

>HTTP/[email protected]

value

>

property

>

<

property

>

<

name

>hbase.rest.authentication.kerberos.keytab

name

>

<

value

>$KEYTAB

value

>

property

>/<code>

用$ KEYTAB替代HTTP的keytab 。


分享到:


相關文章: