將以下內容添加到每個REST網關的hbase-site.xml文件中:
<code><
property
><
name
>hbase.rest.keytab.filename
><
value
>$KEYTABvalue
>property
><
property
><
name
>hbase.rest.kerberos.principalname
><
value
>$USER/[email protected]value
>property
>/<code>
分別為$ USER和$ KEYTAB替換適當的憑證和密鑰表。
REST網關將使用提供的憑證對HBase進行身份驗證。
為了使用REST API主體與HBase進行交互,還需要將hbase.rest.kerberos.principal添加到該acl表中。例如,要賦予REST API主體、rest_server、管理訪問權限,像以下的命令就足夠了:
<code>grant
'rest_server'
,'RWCA'
/<code>
HBase REST網關支持SPNEGO HTTP身份驗證,以便客戶端訪問網關。要為客戶端訪問啟用REST網關Kerberos身份驗證,請將以下內容添加到每個REST網關的hbase-site.xml文件中:
<code><
property
><
name
>hbase.rest.support.proxyusername
><
value
>truevalue
>property
><
property
><
name
>hbase.rest.authentication.typename
><
value
>kerberosvalue
>property
><
property
><
name
>hbase.rest.authentication.kerberos.principalname
><
value
>HTTP/[email protected]value
>property
><
property
><
name
>hbase.rest.authentication.kerberos.keytabname
><
value
>$KEYTABvalue
>property
><
property
><
name
>hbase.rest.dns.interfacename
><
value
>defaultvalue
>property
><
property
><
name
>hbase.rest.dns.nameservername
><
value
>defaultvalue
>property
>/<code>
用$ KEYTAB替代HTTP的keytab 。
HBase REST網關支持不同的'hbase.rest.authentication.type':simple、kerberos。您也可以通過實現Hadoop AuthenticationHandler來實現自定義身份驗證,然後將完整的類名稱指定為'hbase.rest.authentication.type'值。
關鍵字: authentication hbase 身份驗證