Impala Public Jenkins has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/15123 )
Change subject: IMPALA-7002: Throw AuthorizationException when user accesses
non-existent table/database in CTE without required privileges.
......................................................................
IMPALA-7002: Throw AuthorizationException when user accesses
non-existent table/database in CTE without required privileges.
Currently if a user without required privileges tries to access a
non-existent database or table, then impala returns an analysis
exception instead of authorization exception. This happens because
during analysis of the with clause, the authorization request does
not get registered due to analysis exception being thrown before it.
This patch makes sure that those requests get registered regardless.
Testing:
- Manual test:
- ran CTE with non-existent database/table in impala-shell
without required privilege, verified that it results in
AuthorizationException.
- ran CTE with non-existent database/table in impala-shell
with the required privilege, verified that it results
in AnalysisException.
- Added CTE test cases for non-existent database/table/column
in AuthorizationStmtTest.
- Passed all FE tests.
- Passed all core tests.
Change-Id: Ia6b657a7147a136198a9a97a679c9131ee814577
Reviewed-on: http://gerrit.cloudera.org:8080/15123
Reviewed-by: Bikramjeet Vig <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M fe/src/main/java/org/apache/impala/analysis/WithClause.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
2 files changed, 41 insertions(+), 16 deletions(-)
Approvals:
Bikramjeet Vig: Looks good to me, approved
Impala Public Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/15123
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6b657a7147a136198a9a97a679c9131ee814577
Gerrit-Change-Number: 15123
Gerrit-PatchSet: 14
Gerrit-Owner: Wenzhe Zhou <[email protected]>
Gerrit-Reviewer: Bikramjeet Vig <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>