kalyan kumar kalvagadda created SENTRY-2411:
-----------------------------------------------
Summary: SHOW GRANT ON authorozable does no display any user
privileges on a authorizable
Key: SENTRY-2411
URL: https://issues.apache.org/jira/browse/SENTRY-2411
Project: Sentry
Issue Type: Improvement
Affects Versions: 2.1.0
Reporter: kalyan kumar kalvagadda
Assignee: kalyan kumar kalvagadda
Fix For: 2.2.0
{noformat}
> show grant on table all_db.user1_t;
INFO : Compiling
command(queryId=hive_20180919101818_e47a63b4-c005-4afa-a775-0c6420d0283f): show
grant on table all_db.user1_t
INFO : Semantic Analysis Completed
INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:database,
type:string, comment:from deserializer), FieldSchema(name:table, type:string,
comment:from deserializer), FieldSchema(name:partition, type:string,
comment:from deserializer), FieldSchema(name:column, type:string, comment:from
deserializer), FieldSchema(name:principal_name, type:string, comment:from
deserializer), FieldSchema(name:principal_type, type:string, comment:from
deserializer), FieldSchema(name:privilege, type:string, comment:from
deserializer), FieldSchema(name:grant_option, type:boolean, comment:from
deserializer), FieldSchema(name:grant_time, type:bigint, comment:from
deserializer), FieldSchema(name:grantor, type:string, comment:from
deserializer)], properties:null)
INFO : Completed compiling
command(queryId=hive_20180919101818_e47a63b4-c005-4afa-a775-0c6420d0283f); Time
taken: 0.064 seconds
INFO : Executing
command(queryId=hive_20180919101818_e47a63b4-c005-4afa-a775-0c6420d0283f): show
grant on table all_db.user1_t
INFO : Starting task [Stage-0:DDL] in serial mode
INFO : Completed executing
command(queryId=hive_20180919101818_e47a63b4-c005-4afa-a775-0c6420d0283f); Time
taken: 0.009 seconds
INFO : OK
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------+----------+--+
| database | table | partition | column | principal_name | principal_type
| privilege | grant_option | grant_time | grantor |
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------+----------+--+
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------+----------+--+
{noformat}
However, if I use the 'show grant user', then it shows me the user has
privileges on the table.
{noformat}
> show grant user user1;
INFO : Compiling
command(queryId=hive_20180919101818_e86e01e4-3c29-4d7b-a161-450e16eb049c): show
grant user user1
INFO : Semantic Analysis Completed
INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:database,
type:string, comment:from deserializer), FieldSchema(name:table, type:string,
comment:from deserializer), FieldSchema(name:partition, type:string,
comment:from deserializer), FieldSchema(name:column, type:string, comment:from
deserializer), FieldSchema(name:principal_name, type:string, comment:from
deserializer), FieldSchema(name:principal_type, type:string, comment:from
deserializer), FieldSchema(name:privilege, type:string, comment:from
deserializer), FieldSchema(name:grant_option, type:boolean, comment:from
deserializer), FieldSchema(name:grant_time, type:bigint, comment:from
deserializer), FieldSchema(name:grantor, type:string, comment:from
deserializer)], properties:null)
INFO : Completed compiling
command(queryId=hive_20180919101818_e86e01e4-3c29-4d7b-a161-450e16eb049c); Time
taken: 0.061 seconds
INFO : Executing
command(queryId=hive_20180919101818_e86e01e4-3c29-4d7b-a161-450e16eb049c): show
grant user user1
INFO : Starting task [Stage-0:DDL] in serial mode
INFO : Completed executing
command(queryId=hive_20180919101818_e86e01e4-3c29-4d7b-a161-450e16eb049c); Time
taken: 0.006 seconds
INFO : OK
+-----------+----------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
| database | table | partition | column | principal_name |
principal_type | privilege | grant_option | grant_time | grantor |
+-----------+----------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
| all_db | user1_t | | | user1 | USER
| owner | false | 1537377445287000 | -- |
+-----------+----------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)