Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/11531 )

Change subject: IMPALA-7503: SHOW GRANT USER not showing all privileges.
......................................................................

IMPALA-7503: SHOW GRANT USER not showing all privileges.

This patch fixes the SHOW GRANT USER statement to show all privileges
granted to a user, either directly via object ownership, or granted
through a role via a group the user belongs to. The output for SHOW
GRANT USER will have two additional columns for privilege name and
privilege type so the user can know where the privilege comes from.

Truncated sample showing two columns that are different from role:
+----------------+----------------+--------+----------+-...
| principal_type | principal_name | scope  | database | ...
+----------------+----------------+--------+----------+-...
| USER           | foo            | table  | foo_db   | ...
| ROLE           | foo_role       | server |          | ...
+----------------+----------------+--------+----------+-...

Testing:
- Create new custom cluster test with custom group mapping.
- Ran FE and custom cluster tests.

Change-Id: Ie9f6c88f5569e1c414ceb8a86e7b013eaa3ecde1
Reviewed-on: http://gerrit.cloudera.org:8080/11531
Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/analysis/ShowGrantPrincipalStmt.java
M fe/src/main/java/org/apache/impala/catalog/AuthorizationPolicy.java
M fe/src/main/java/org/apache/impala/service/JniFrontend.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
A fe/src/test/java/org/apache/impala/service/CustomClusterGroupMapper.java
A 
fe/src/test/java/org/apache/impala/service/CustomClusterResourceAuthorizationProvider.java
M fe/src/test/resources/sentry-site_no_oo.xml.template
M fe/src/test/resources/sentry-site_oo.xml.template
M fe/src/test/resources/sentry-site_oo_nogrant.xml.template
M testdata/bin/run-sentry-service.sh
A testdata/workloads/functional-query/queries/QueryTest/show_grant_user.test
M tests/authorization/test_grant_revoke.py
M tests/authorization/test_owner_privileges.py
A tests/authorization/test_show_grant_user.py
M tests/common/sentry_cache_test_suite.py
15 files changed, 1,400 insertions(+), 177 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/11531
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9f6c88f5569e1c414ceb8a86e7b013eaa3ecde1
Gerrit-Change-Number: 11531
Gerrit-PatchSet: 11
Gerrit-Owner: Adam Holley <ahol...@cloudera.com>
Gerrit-Reviewer: Adam Holley <ahol...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fwij...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>

Reply via email to