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 B99D8200D2E for ; Tue, 17 Oct 2017 01:54:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B825C160BE9; Mon, 16 Oct 2017 23:54:48 +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 09C441609EF for ; Tue, 17 Oct 2017 01:54:47 +0200 (CEST) Received: (qmail 29771 invoked by uid 500); 16 Oct 2017 23:54:47 -0000 Mailing-List: contact commits-help@ranger.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ranger.apache.org Delivered-To: mailing list commits@ranger.apache.org Received: (qmail 29762 invoked by uid 99); 16 Oct 2017 23:54:47 -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; Mon, 16 Oct 2017 23:54:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4DAEDDFA25; Mon, 16 Oct 2017 23:54:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: abhay@apache.org To: commits@ranger.apache.org Message-Id: <9774f40f97c2485097beb01b0048cbf8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ranger git commit: RANGER-1841: Audit log record for 'use dbName' hive command contains large number of tags Date: Mon, 16 Oct 2017 23:54:45 +0000 (UTC) archived-at: Mon, 16 Oct 2017 23:54:48 -0000 Repository: ranger Updated Branches: refs/heads/master a2e896da0 -> c3fbdae9f RANGER-1841: Audit log record for 'use dbName' hive command contains large number of tags Project: http://git-wip-us.apache.org/repos/asf/ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/c3fbdae9 Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/c3fbdae9 Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/c3fbdae9 Branch: refs/heads/master Commit: c3fbdae9faf4e53816e9cc7b965f8a5aa59cf1e6 Parents: a2e896d Author: Abhay Kulkarni Authored: Mon Oct 16 16:33:52 2017 -0700 Committer: Abhay Kulkarni Committed: Mon Oct 16 16:37:20 2017 -0700 ---------------------------------------------------------------------- .../authorization/hive/authorizer/RangerHiveAuditHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ranger/blob/c3fbdae9/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuditHandler.java ---------------------------------------------------------------------- diff --git a/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuditHandler.java b/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuditHandler.java index 24a71fa..89bc0d8 100644 --- a/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuditHandler.java +++ b/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuditHandler.java @@ -58,8 +58,8 @@ public class RangerHiveAuditHandler extends RangerDefaultAuditHandler { RangerHiveAccessRequest hiveAccessRequest = (RangerHiveAccessRequest) request; RangerHiveResource hiveResource = (RangerHiveResource) resource; - if (hiveAccessRequest.getHiveAccessType() == HiveAccessType.USE && hiveResource.getObjectType() == HiveObjectType.DATABASE && StringUtils.isBlank(hiveResource.getDatabase())) { - // this should happen only for SHOWDATABASES + if (hiveAccessRequest.getHiveAccessType() == HiveAccessType.USE && hiveResource.getObjectType() == HiveObjectType.DATABASE) { + // this should happen only for SHOWDATABASES and USE commands auditEvent.setTags(null); } }