[
https://issues.apache.org/jira/browse/SENTRY-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matyas Orhidi updated SENTRY-1465:
----------------------------------
Description:
Steps to reproduce the issue:
{code}
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> create table temp.a (b int);
...
INFO : OK
No rows affected (0.163 seconds)
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> truncate table temp.a;
Error: Error while compiling statement: FAILED: SemanticException No valid
privileges
User admin does not have privileges for TRUNCATETABLE
The required privileges: Server=server1->Db=default->Table=temp->action=*;
(state=42000,code=40000)
{code}
The user has no privileges in the default database:
{code}
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show current roles;
+---------------+--+
| role |
+---------------+--+
| analyst_role |
+---------------+--+
{code}
{code}
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show grant role analyst_role;
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
| database | table | partition | column | principal_name | principal_type
| privilege | grant_option | grant_time | grantor |
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
| temp | | | | analyst_role | ROLE
| * | false | 1473206055358000 | -- |
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
{code}
was:
Steps to reproduce the issue:
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> create table temp.a (b int);
INFO : Compiling
command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe):
create table temp.a (b int)
INFO : Semantic Analysis Completed
INFO : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
INFO : Completed compiling
command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe); Time
taken: 0.097 seconds
INFO : Executing
command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe):
create table temp.a (b int)
INFO : Starting task [Stage-0:DDL] in serial mode
INFO : Completed executing
command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe); Time
taken: 0.051 seconds
INFO : OK
No rows affected (0.163 seconds)
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> truncate table temp.a;
Error: Error while compiling statement: FAILED: SemanticException No valid
privileges
User admin does not have privileges for TRUNCATETABLE
The required privileges: Server=server1->Db=default->Table=temp->action=*;
(state=42000,code=40000)
The user has no privileges in the default database:
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show current roles;
+---------------+--+
| role |
+---------------+--+
| analyst_role |
+---------------+--+
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show grant role analyst_role;
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
| database | table | partition | column | principal_name | principal_type
| privilege | grant_option | grant_time | grantor |
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
| temp | | | | analyst_role | ROLE
| * | false | 1473206055358000 | -- |
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
> TRUNCATE table is not working with qualified table names from beeline
> ---------------------------------------------------------------------
>
> Key: SENTRY-1465
> URL: https://issues.apache.org/jira/browse/SENTRY-1465
> Project: Sentry
> Issue Type: Bug
> Affects Versions: 1.5.1
> Reporter: Matyas Orhidi
>
> Steps to reproduce the issue:
> {code}
> 0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> create table temp.a (b int);
> ...
> INFO : OK
> No rows affected (0.163 seconds)
> 0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> truncate table temp.a;
> Error: Error while compiling statement: FAILED: SemanticException No valid
> privileges
> User admin does not have privileges for TRUNCATETABLE
> The required privileges: Server=server1->Db=default->Table=temp->action=*;
> (state=42000,code=40000)
> {code}
> The user has no privileges in the default database:
> {code}
> 0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show current roles;
> +---------------+--+
> | role |
> +---------------+--+
> | analyst_role |
> +---------------+--+
> {code}
> {code}
> 0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show grant role analyst_role;
> +-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
> | database | table | partition | column | principal_name |
> principal_type | privilege | grant_option | grant_time | grantor |
> +-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
> | temp | | | | analyst_role | ROLE
> | * | false | 1473206055358000 | -- |
> +-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)