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 67A3C200CC9 for ; Mon, 17 Jul 2017 22:27:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 662F41635C4; Mon, 17 Jul 2017 20:27:21 +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 AD5FD163500 for ; Mon, 17 Jul 2017 22:27:20 +0200 (CEST) Received: (qmail 29163 invoked by uid 500); 17 Jul 2017 20:27:19 -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 29152 invoked by uid 99); 17 Jul 2017 20:27:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jul 2017 20:27:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 234741806BA for ; Mon, 17 Jul 2017 20:27:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BpzKzfQN7tVr for ; Mon, 17 Jul 2017 20:27:16 +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 952125F2A9 for ; Mon, 17 Jul 2017 20:27:16 +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 v6HKRF3l006378; Mon, 17 Jul 2017 20:27:15 GMT Message-Id: <201707172027.v6HKRF3l006378@ip-10-146-233-104.ec2.internal> Date: Mon, 17 Jul 2017 20:27:15 +0000 From: "anujphadke (Code Review)" To: anujphadke , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Michael Brown , Bharath Vissapragada , Matthew Jacobs 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: 280fb02ca9212cc240773112d434a5994ea4f135 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: Mon, 17 Jul 2017 20:27:21 -0000 anujphadke has uploaded a new patch set (#4). Change subject: IMPALA-5582: Store sentry privileges in lower case ...................................................................... IMPALA-5582: Store sentry privileges in lower case Privileges granted 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, 145 insertions(+), 71 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/32/7332/4 -- 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: 4 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