Return-Path: X-Original-To: apmail-ranger-commits-archive@www.apache.org Delivered-To: apmail-ranger-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F4C117A04 for ; Fri, 5 Jun 2015 01:59:05 +0000 (UTC) Received: (qmail 14796 invoked by uid 500); 5 Jun 2015 01:59:05 -0000 Delivered-To: apmail-ranger-commits-archive@ranger.apache.org Received: (qmail 14770 invoked by uid 500); 5 Jun 2015 01:59:05 -0000 Mailing-List: contact commits-help@ranger.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ranger.incubator.apache.org Delivered-To: mailing list commits@ranger.incubator.apache.org Received: (qmail 14760 invoked by uid 99); 5 Jun 2015 01:59:05 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2015 01:59:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D87A4CB8E8 for ; Fri, 5 Jun 2015 01:59:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.77 X-Spam-Level: * X-Spam-Status: No, score=1.77 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Z01Y1RvwfZdu for ; Fri, 5 Jun 2015 01:59:04 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id CB21342AD6 for ; Fri, 5 Jun 2015 01:59:03 +0000 (UTC) Received: (qmail 14737 invoked by uid 99); 5 Jun 2015 01:59:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2015 01:59:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 454FEE1083; Fri, 5 Jun 2015 01:59:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: madhan@apache.org To: commits@ranger.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-ranger git commit: RANGER-530: Access-type 'all' should imply rest of the permissions in Hive Date: Fri, 5 Jun 2015 01:59:03 +0000 (UTC) Repository: incubator-ranger Updated Branches: refs/heads/master 89c524da9 -> 016f0f6fd RANGER-530: Access-type 'all' should imply rest of the permissions in Hive Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/016f0f6f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/016f0f6f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/016f0f6f Branch: refs/heads/master Commit: 016f0f6fd4132a4843f69354b6a4d413ff9c289e Parents: 89c524d Author: Madhan Neethiraj Authored: Thu Jun 4 17:35:54 2015 -0700 Committer: Madhan Neethiraj Committed: Thu Jun 4 17:36:03 2015 -0700 ---------------------------------------------------------------------- .../resources/service-defs/ranger-servicedef-hive.json | 12 +++++++++++- .../hive/authorizer/RangerHiveAuthorizer.java | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/016f0f6f/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json ---------------------------------------------------------------------- diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json index b01a1d8..2c48298 100644 --- a/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json +++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json @@ -131,7 +131,17 @@ { "itemId": 8, "name": "all", - "label": "All" + "label": "All", + "impliedGrants": + [ + "select", + "update", + "create", + "drop", + "alter", + "index", + "lock" + ] } ], http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/016f0f6f/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java ---------------------------------------------------------------------- diff --git a/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java b/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java index ad73682..1df1af4 100644 --- a/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java +++ b/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java @@ -312,6 +312,9 @@ public class RangerHiveAuthorizer extends RangerHiveAuthorizerBase { List colRequests = new ArrayList(); String[] columns = StringUtils.split(resource.getColumn(), COLUMN_SEP); + + // in case of multiple columns, original request is not sent to the plugin; hence service-def will not be set + resource.setServiceDef(hivePlugin.getServiceDef()); for(String column : columns) { if (column != null) {