Fang-Yu Rao has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23815 )
Change subject: IMPALA-14085: Implement GRANT/REVOKE ROLE TO/FROM a user ...................................................................... IMPALA-14085: Implement GRANT/REVOKE ROLE TO/FROM a user As a follow-up to IMPALA-10211, this patch adds the support for the following role-related statements. 1. GRANT ROLE <role_name> TO USER <user_name>. 2. REVOKE ROLE <role_name> FROM USER <user_name>. 3. SHOW ROLE GRANT USER <user_name>. Testing: - Extended the test file grant_revoke.test to additionally cover the scenario in which the grantee/revokee is a user. - Added an end-to-end test to briefly verify the statements SHOW ROLE GRANT USER <user_name> and SHOW CURRENT ROLES are working as expected. Change-Id: Ie5a16aeb4bbf8637ad326a1ec3d5fce1b196d73f Reviewed-on: http://gerrit.cloudera.org:8080/23815 Tested-by: Impala Public Jenkins <[email protected]> Reviewed-by: Fang-Yu Rao <[email protected]> --- M common/thrift/Frontend.thrift M common/thrift/JniCatalog.thrift M fe/src/main/cup/sql-parser.cup M fe/src/main/java/org/apache/impala/analysis/GrantRevokeRoleStmt.java M fe/src/main/java/org/apache/impala/analysis/ShowRolesStmt.java M fe/src/main/java/org/apache/impala/authorization/AuthorizationManager.java M fe/src/main/java/org/apache/impala/authorization/NoopAuthorizationFactory.java M fe/src/main/java/org/apache/impala/authorization/ranger/RangerCatalogdAuthorizationManager.java M fe/src/main/java/org/apache/impala/authorization/ranger/RangerImpaladAuthorizationManager.java M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java M fe/src/main/java/org/apache/impala/util/CatalogOpUtil.java M fe/src/test/java/org/apache/impala/util/CatalogOpUtilTest.java M testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test M tests/authorization/test_ranger.py 14 files changed, 386 insertions(+), 196 deletions(-) Approvals: Impala Public Jenkins: Verified Fang-Yu Rao: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/23815 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie5a16aeb4bbf8637ad326a1ec3d5fce1b196d73f Gerrit-Change-Number: 23815 Gerrit-PatchSet: 11 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
