Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 58328200CCA for ; Wed, 19 Jul 2017 23:40:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 56954169F6E; Wed, 19 Jul 2017 21:40:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9C415169F6C for ; Wed, 19 Jul 2017 23:40:01 +0200 (CEST) Received: (qmail 72428 invoked by uid 500); 19 Jul 2017 21:40:00 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 72417 invoked by uid 99); 19 Jul 2017 21:40:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2017 21:40:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 0F5F5C0350 for ; Wed, 19 Jul 2017 21:40:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7oKLkH4MK5tH for ; Wed, 19 Jul 2017 21:39:59 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 097F85F56A for ; Wed, 19 Jul 2017 21:39:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v6JLdwYZ024354; Wed, 19 Jul 2017 21:39:58 GMT Message-Id: <201707192139.v6JLdwYZ024354@ip-10-146-233-104.ec2.internal> Date: Wed, 19 Jul 2017 21:39:57 +0000 From: "anujphadke (Code Review)" To: anujphadke , Bharath Vissapragada , Matthew Jacobs , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Michael Brown Reply-To: aphadke@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5582=3A_Store_sentry_privileges_in_lower_case=0A?= X-Gerrit-Change-Id: Ide3dfa601fcf77f5acc6adce9bea443aea600901 X-Gerrit-ChangeURL: X-Gerrit-Commit: b9506ab3fe5c060ce9744fc2cbd288156c7b66da In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Wed, 19 Jul 2017 21:40:02 -0000 Hello Bharath Vissapragada, Matthew Jacobs, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/7332 to look at the new patch set (#8). Change subject: IMPALA-5582: Store sentry privileges in lower case ...................................................................... IMPALA-5582: Store sentry privileges in lower case Privileges granted to a role assigned to a db/table whose name contains upper case characters can disappear after a few seconds. A privilege is inserted into the catalogObjectCache using a key that uses the db/table name. The key gets converted to a lower case before inserting. Privilege name returned by sentryProxy is always lower case, which might not match the privilegeName built in the catalog. This triggers an update of the catalog object followed by a removal of the old object. Since they both use the same key in lower case it ends up deleting the newly updated object. This change also adds a new catalogd startup option (sentry_catalog_polling_frequency) to configure the frequency at which catalogd polls the sentry service to update any policy changes. The default value is 60 seconds. Test: Added a test which adds select privileges to 3 tables and dbs specified in lower case, upper case and mixed case. The test verifies that the privileges on the 3 tables do not disappear on a sentry update. Change-Id: Ide3dfa601fcf77f5acc6adce9bea443aea600901 --- M be/src/catalog/catalog.cc M be/src/util/backend-gflag-util.cc M common/thrift/BackendGflags.thrift M fe/src/main/java/org/apache/impala/catalog/AuthorizationPolicy.java M fe/src/main/java/org/apache/impala/catalog/RolePrivilege.java M fe/src/main/java/org/apache/impala/service/BackendConfig.java M fe/src/main/java/org/apache/impala/util/SentryProxy.java M testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test M tests/authorization/test_grant_revoke.py 9 files changed, 187 insertions(+), 93 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/32/7332/8 -- To view, visit http://gerrit.cloudera.org:8080/7332 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ide3dfa601fcf77f5acc6adce9bea443aea600901 Gerrit-PatchSet: 8 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: anujphadke Gerrit-Reviewer: Bharath Vissapragada Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Michael Brown Gerrit-Reviewer: anujphadke