From dev-return-25888-apmail-ranger-dev-archive=ranger.apache.org@ranger.apache.org Mon Jul 6 06:48:03 2020 Return-Path: X-Original-To: apmail-ranger-dev-archive@www.apache.org Delivered-To: apmail-ranger-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 54F76198D3 for ; Mon, 6 Jul 2020 06:48:03 +0000 (UTC) Received: (qmail 13917 invoked by uid 500); 6 Jul 2020 06:48:02 -0000 Delivered-To: apmail-ranger-dev-archive@ranger.apache.org Received: (qmail 13889 invoked by uid 500); 6 Jul 2020 06:48:02 -0000 Mailing-List: contact dev-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 dev@ranger.apache.org Received: (qmail 13877 invoked by uid 99); 6 Jul 2020 06:48:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jul 2020 06:48:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C1EE740F62 for ; Mon, 6 Jul 2020 06:48:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 4C2FD780AA2 for ; Mon, 6 Jul 2020 06:48:00 +0000 (UTC) Date: Mon, 6 Jul 2020 06:48:00 +0000 (UTC) From: "Jiayi Liu (Jira)" To: dev@ranger.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (RANGER-2896) show grant not display grant_time in hive plugin MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/RANGER-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jiayi Liu updated RANGER-2896: ------------------------------ Description: show grant can not display grant_time, because [RANGER-836|https://issues.apache.org/jira/browse/RANGER-836] pruned the content of policy download. When using show grant, grant_time will always be 0. In RangerHiveAuthorizer.createHivePrivilegeInfo function, it gets creationDate from policy.getCreateTime(). {code:java} if (accessTypes.contains(aclName.toLowerCase()) && (users.contains(hivePrincipal.getName()) || groups.contains(hivePrincipal.getName()))) { creationDate = (policy.getCreateTime() == null) ? creationDate : (int) (policy.getCreateTime().getTime()/1000); delegateAdmin = (policyItem.getDelegateAdmin() == null) ? delegateAdmin : policyItem.getDelegateAdmin().booleanValue(); } {code} was: show grant can not display grant_time, because [RANGER-836|https://issues.apache.org/jira/browse/RANGER-836] pruned the content of policy download. When using show grant, grant_time will always be 0. > show grant not display grant_time in hive plugin > ------------------------------------------------ > > Key: RANGER-2896 > URL: https://issues.apache.org/jira/browse/RANGER-2896 > Project: Ranger > Issue Type: Improvement > Components: plugins > Affects Versions: 2.0.0 > Reporter: Jiayi Liu > Priority: Major > Fix For: 2.1.0 > > Attachments: 0001-RANGER-2896.patch > > > show grant can not display grant_time, because [RANGER-836|https://issues.apache.org/jira/browse/RANGER-836] pruned the content of policy download. > When using show grant, grant_time will always be 0. > In RangerHiveAuthorizer.createHivePrivilegeInfo function, it gets creationDate from policy.getCreateTime(). > {code:java} > if (accessTypes.contains(aclName.toLowerCase()) && (users.contains(hivePrincipal.getName()) > || groups.contains(hivePrincipal.getName()))) { > creationDate = (policy.getCreateTime() == null) ? creationDate : (int) (policy.getCreateTime().getTime()/1000); > delegateAdmin = (policyItem.getDelegateAdmin() == null) ? delegateAdmin : policyItem.getDelegateAdmin().booleanValue(); > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)