You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Wenzhe Zhou (Code Review)" <ge...@cloudera.org> on 2020/02/10 23:53:28 UTC

[Impala-ASF-CR] IMPALA-7002: Throw AuthorizationException when user accesses non-existent table/database in CTE without required privileges.

Wenzhe Zhou has uploaded a new patch set (#8). ( 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 table/database in impala-shell
     without privilege, verified that it results in
     AuthorizationException.
   - ran CTE with non-existent table/database in impala-shell
     with the whole server privilege, verified that it results
     in AnalysisException.
 - Added CTE test cases for non-existent table/database in
   AuthorizationStmtTest.
 - Passed all FE tests.
 - Passed all exhaustive tests.

Change-Id: Ia6b657a7147a136198a9a97a679c9131ee814577
---
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, 32 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/23/15123/8
-- 
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: newpatchset
Gerrit-Change-Id: Ia6b657a7147a136198a9a97a679c9131ee814577
Gerrit-Change-Number: 15123
Gerrit-PatchSet: 8
Gerrit-Owner: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Reviewer: Bikramjeet Vig <bi...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>