Hive的許可權

2021-10-03 04:41:18 字數 1424 閱讀 5808

基於儲存的授權 - 可以對metastore中的元資料進行保護,但是沒有提供更加細粒度的訪問控制(例如:列級別、行級別)。

2、sql standards based authorization in hiveserver2

基於sql標準的hive授權 - 完全相容sql的授權模型,推薦使用該模式。

3、default hive authorization (legacy mode)

hive預設授權 - 設計目的僅僅只是為了防止使用者產生誤操作,而不是防止惡意使用者訪問未經授權的資料。

預設包含另種角色:public、admin

使用限制:

1、啟用當前認證方式之後,dfs, add, delete, compile, and reset等命令被禁用。

2、通過set命令設定hive configuration的方式被限制某些使用者使用。

(可通過修改配置檔案hive-site.xml中hive.security.authorization.sqlstd.confwhitelist進行配置)

3、新增、刪除函式以及巨集的操作,僅為具有admin的使用者開放。

4、使用者自定義函式(開放支援永久的自定義函式),可通過具有admin角色的使用者建立,其他使用者都可以使用。

5、transform功能被禁用。

hive.security.authorization.enabled

true

hive.server2.enable.doas

false

hive.users.in.admin.role

root

hive.security.authorization.manager

org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.sqlstdhiveauthorize***ctory

hive.security.authenticator.manager

org.apache.hadoop.hive.ql.security.sessionstateuserauthenticator

服務端啟動hiveserver2;客戶端通過beeline進行連線

角色的新增、刪除、檢視、設定:

hive表級許可權控制 Hive許可權管理

一.storage based authorization in the metastore server 基於儲存的授權,可以對metastore中的元資料進行保護,但是沒有提供更加細粒度的訪問控制 例如 列級別 行級別等 啟用當前認證方式後,dfs,add,delete,compile,rese...

hive許可權問題

1.給某個使用者授權 grant select on database ffcs cheny to user ffcs cheny 2.ddlstatement createdatabasestatement switchdatabasestatement dropdatabasestatement...

Hive許可權管理

角色的新增 刪除 檢視 設定 create role role name 建立角色 drop role role name 刪除角色 set role role name all none 設定角色 show current roles 檢視當前具有的角色 show roles 檢視所有存在的角色 ...