You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Fredy Wijaya (JIRA)" <ji...@apache.org> on 2018/10/11 20:29:00 UTC

[jira] [Updated] (IMPALA-7701) Grant option always shows as NULL in SHOW GRANT ROLE/USER for any HS2 clients

     [ https://issues.apache.org/jira/browse/IMPALA-7701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fredy Wijaya updated IMPALA-7701:
---------------------------------
    Description: 
In Impala shell:
{noformat}
[localhost:21000] default> show grant user test_user;
Query: show grant user test_user
+----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| principal_type | principal_name | scope    | database | table | column | uri | privilege | grant_option | create_time                   |
+----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| USER           | test_user      | database | foo      |       |        |     | owner     | true         | Thu, Oct 11 2018 11:48:57.186 |
| ROLE           | admin          | server   |          |       |        |     | all       | false        | Thu, Oct 11 2018 11:48:48.203 |
+----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
Fetched 2 row(s) in 0.13s
[localhost:21000] default> show grant role admin;
Query: show grant role admin
+--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| scope  | database | table | column | uri | privilege | grant_option | create_time                   |
+--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| server |          |       |        |     | all       | false        | Thu, Oct 11 2018 11:48:48.203 |
+--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
Fetched 1 row(s) in 0.01s
{noformat}

Using Impyla (HS2 client):
{noformat}
>>> from impala.dbapi import connect
>>> conn = connect(host='localhost', port=21050)
>>> cursor = conn.cursor()
>>> cursor.execute('show grant role test_user')
>>> cursor.execute('show grant user fwijaya')
>>> print(cursor.fetchall())
[('USER', 'test_user', 'database', 'foo', '', '', '', 'owner', None, 'Thu, Oct 11 2018 11:48:57.186'), ('ROLE', 'admin', 'server', '', '', '', '', 'all', None, 'Thu, Oct 11 2018 11:48:48.203')]
>>> print(cursor.fetchall())
[('server', '', '', '', '', 'all', None, 'Thu, Oct 11 2018 11:48:48.203')]
{noformat}

  was:
In Impala shell:
{noformat}
[localhost:21000] default> show grant user test_user;
Query: show grant user test_user
+----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| principal_type | principal_name | scope    | database | table | column | uri | privilege | grant_option | create_time                   |
+----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| USER           | test_user        | database | foo      |       |        |     | owner     | true         | Thu, Oct 11 2018 11:48:57.186 |
| ROLE           | admin          | server   |          |       |        |     | all       | false        | Thu, Oct 11 2018 11:48:48.203 |
+----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
Fetched 2 row(s) in 0.13s
[localhost:21000] default> show grant role admin;
Query: show grant role admin
+--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| scope  | database | table | column | uri | privilege | grant_option | create_time                   |
+--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
| server |          |       |        |     | all       | false        | Thu, Oct 11 2018 11:48:48.203 |
+--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
Fetched 1 row(s) in 0.01s
{noformat}

Using Impyla (HS2 client):
{noformat}
>>> from impala.dbapi import connect
>>> conn = connect(host='localhost', port=21050)
>>> cursor = conn.cursor()
>>> cursor.execute('show grant role test_user')
>>> cursor.execute('show grant user fwijaya')
>>> print(cursor.fetchall())
[('USER', 'test_user', 'database', 'foo', '', '', '', 'owner', None, 'Thu, Oct 11 2018 11:48:57.186'), ('ROLE', 'admin', 'server', '', '', '', '', 'all', None, 'Thu, Oct 11 2018 11:48:48.203')]
>>> print(cursor.fetchall())
[('server', '', '', '', '', 'all', None, 'Thu, Oct 11 2018 11:48:48.203')]
{noformat}


> Grant option always shows as NULL in SHOW GRANT ROLE/USER for any HS2 clients
> -----------------------------------------------------------------------------
>
>                 Key: IMPALA-7701
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7701
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 3.0, Impala 2.12.0
>            Reporter: Fredy Wijaya
>            Assignee: Fredy Wijaya
>            Priority: Major
>
> In Impala shell:
> {noformat}
> [localhost:21000] default> show grant user test_user;
> Query: show grant user test_user
> +----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
> | principal_type | principal_name | scope    | database | table | column | uri | privilege | grant_option | create_time                   |
> +----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
> | USER           | test_user      | database | foo      |       |        |     | owner     | true         | Thu, Oct 11 2018 11:48:57.186 |
> | ROLE           | admin          | server   |          |       |        |     | all       | false        | Thu, Oct 11 2018 11:48:48.203 |
> +----------------+----------------+----------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
> Fetched 2 row(s) in 0.13s
> [localhost:21000] default> show grant role admin;
> Query: show grant role admin
> +--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
> | scope  | database | table | column | uri | privilege | grant_option | create_time                   |
> +--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
> | server |          |       |        |     | all       | false        | Thu, Oct 11 2018 11:48:48.203 |
> +--------+----------+-------+--------+-----+-----------+--------------+-------------------------------+
> Fetched 1 row(s) in 0.01s
> {noformat}
> Using Impyla (HS2 client):
> {noformat}
> >>> from impala.dbapi import connect
> >>> conn = connect(host='localhost', port=21050)
> >>> cursor = conn.cursor()
> >>> cursor.execute('show grant role test_user')
> >>> cursor.execute('show grant user fwijaya')
> >>> print(cursor.fetchall())
> [('USER', 'test_user', 'database', 'foo', '', '', '', 'owner', None, 'Thu, Oct 11 2018 11:48:57.186'), ('ROLE', 'admin', 'server', '', '', '', '', 'all', None, 'Thu, Oct 11 2018 11:48:48.203')]
> >>> print(cursor.fetchall())
> [('server', '', '', '', '', 'all', None, 'Thu, Oct 11 2018 11:48:48.203')]
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org