Hello Vihang Karajgaonkar, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14121
to look at the new patch set (#3).
Change subject: WIP IMPALA-8851 : Do not throw authorization exception in drop
if exists queries
......................................................................
WIP IMPALA-8851 : Do not throw authorization exception in drop if exists queries
Note: this is the continuation of work by Vihang Karajgaonkar. This
is work in progress, as many tests are still failing.
In case a user issues drop query with "if exists" clause and if the
object does not exists currently Impala throws a authorization
exception saying that the user does not have permission to issue
a drop on that non-existent object. This happens because when the
object is dropped all the associated privileges for that object are
also dropped. However this is inconsistent.
Even a user which has permissions to list the tables or databases
will get this authorization exception.
This patch adds a change in this behavior so that users do not get
authorization exception if they have enough privileges to know whether
the table exists (aka list objects of the given type). A user who does
not have privileges still will receive the authorization exception as
expected.
Testing:
1. Added a new test case in the sentry tests which confirms that the
authorization exception is not thrown when a drop if exists query is
issued on a object which does not exist
Change-Id: Iba068935e5da92d71e16e2321afdb8e7b781086a
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/DropDbStmt.java
M fe/src/main/java/org/apache/impala/analysis/DropFunctionStmt.java
M fe/src/main/java/org/apache/impala/analysis/DropTableOrViewStmt.java
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java
M testdata/workloads/functional-query/queries/QueryTest/create-database.test
M tests/authorization/test_owner_privileges.py
M tests/common/sentry_cache_test_suite.py
10 files changed, 226 insertions(+), 40 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/21/14121/3
--
To view, visit http://gerrit.cloudera.org:8080/14121
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iba068935e5da92d71e16e2321afdb8e7b781086a
Gerrit-Change-Number: 14121
Gerrit-PatchSet: 3
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Vihang Karajgaonkar <[email protected]>