impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Huaisi Xu (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-trunk) IMPALA-3711: Remove unnecessary privilege checks in getDbsMetadata()
Date Thu, 30 Jun 2016 18:29:01 GMT
Hello Dimitris Tsirogiannis,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/3371

to look at the new patch set (#14).

Change subject: IMPALA-3711: Remove unnecessary privilege checks in getDbsMetadata()
......................................................................

IMPALA-3711: Remove unnecessary privilege checks in getDbsMetadata()

Previously all code paths using getDbsMetadata() sufferred
unnecessary privilege checks:
1. Impala checked privilege of all databases, tables before
applying user provided JDBC pattern filters.
2. Impala passed a null pattern to getDbsMetadata() when
user did not provide one. However, null pattern is treated
as "%", which matches everything thereby causing unnecessary
privilege checks for catalog objects that are not in the
result set.

This patch modifies the behavior of getDbsMetadata() to
avoid retrieving and checking for privileges of catalog
entities that are of no interest to the user.

Change-Id: I17d8c5b9fb12483e4b01b819fba48b6849311a14
---
M fe/src/main/java/com/cloudera/impala/catalog/Catalog.java
M fe/src/main/java/com/cloudera/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/com/cloudera/impala/catalog/Db.java
M fe/src/main/java/com/cloudera/impala/service/Frontend.java
M fe/src/main/java/com/cloudera/impala/service/JniCatalog.java
M fe/src/main/java/com/cloudera/impala/service/JniFrontend.java
M fe/src/main/java/com/cloudera/impala/service/MetadataOp.java
M fe/src/main/java/com/cloudera/impala/util/PatternMatcher.java
M fe/src/test/java/com/cloudera/impala/analysis/AuthorizationTest.java
M fe/src/test/java/com/cloudera/impala/testutil/BlockIdGenerator.java
M fe/src/test/java/com/cloudera/impala/testutil/ImpaladTestCatalog.java
M testdata/workloads/functional-query/queries/QueryTest/show.test
12 files changed, 377 insertions(+), 119 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/71/3371/14
-- 
To view, visit http://gerrit.cloudera.org:8080/3371
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I17d8c5b9fb12483e4b01b819fba48b6849311a14
Gerrit-PatchSet: 14
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Huaisi Xu <hxu@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Huaisi Xu <hxu@cloudera.com>

Mime
View raw message