- 1、本文档共6页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
hivesenrty权限命令(beeline)
Column-level AuthorizationThe following command grants a role the?SELECT?privilege on a column:GRANT SELECT(column_name) ON TABLE table_name TO ROLE role_name;The following command can be used to revoke the?SELECT?privilege on a column:REVOKE SELECT(column_name) ON TABLE table_name FROM ROLE role_name;Any new columns added to a table will be inaccessible by default, until explicitly granted access.Actions allowed for users with SELECT privilege on a column:Users whose roles have been granted the?SELECT?privilege on columns only, can perform operations which explicitly refer to those columns. Some examples are:SELECT column_name FROM TABLE table_name;In this case, Sentry will first check to see if the user has the required privileges to access the table. It will then further check to see whether the user has the?SELECTprivilege to access the column(s).SELECT COUNT(column_name) FROM TABLE table_name;Users are also allowed to use the?COUNT?function to return the number of values in the column.SELECT column_name FROM TABLE table_name WHERE column_name operator GROUP BY column_name; The above command will work as long as you refer only to columns to which you already have access.To list the column(s) to which the current user has?SELECT?access:SHOW COLUMNS;Exceptions:If a user has?SELECT?access to all columns in a table, the following command will work. Note that this is an exception, not the norm. In all other cases,?SELECT?on all columns does?not?allow you to perform table-level operations.SELECT * FROM TABLE table_name;The?DESCRIBE?table command differs from the others, in that it does not filter out columns for which the user does not have?SELECT?access.DESCRIBE (table_name);Limitations:Column-level privileges can only be applied to tables and partitions, not views.HDFS-Sentry Sync:?With HDFS-Sentry sync enabled, even if a user has been granted access to all columns of a table, they will not have access to the corresponding HDFS data files. This is because Sentry do
文档评论(0)