Return-Path: X-Original-To: apmail-hadoop-common-dev-archive@www.apache.org Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F8A0C1CE for ; Thu, 20 Nov 2014 06:30:36 +0000 (UTC) Received: (qmail 40993 invoked by uid 500); 20 Nov 2014 06:30:34 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 40907 invoked by uid 500); 20 Nov 2014 06:30:34 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 40725 invoked by uid 99); 20 Nov 2014 06:30:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2014 06:30:34 +0000 Date: Thu, 20 Nov 2014 06:30:34 +0000 (UTC) From: "Dian Fu (JIRA)" To: common-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HADOOP-11322) key based ACL check in KMS always check KeyOpType.MANAGEMENT even actual KeyOpType is not MANAGEMENT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Dian Fu created HADOOP-11322: -------------------------------- Summary: key based ACL check in KMS always check KeyOpType.MANAGEMENT even actual KeyOpType is not MANAGEMENT Key: HADOOP-11322 URL: https://issues.apache.org/jira/browse/HADOOP-11322 Project: Hadoop Common Issue Type: Bug Components: security Reporter: Dian Fu Assignee: Dian Fu In the method checkAccess of class KeyAuthorizationKeyProvider, there is following code: {code} private void checkAccess(String aclName, UserGroupInformation ugi, KeyOpType opType) throws AuthorizationException { Preconditions.checkNotNull(aclName, "Key ACL name cannot be null"); Preconditions.checkNotNull(ugi, "UserGroupInformation cannot be null"); if (acls.isACLPresent(aclName, KeyOpType.MANAGEMENT) && (acls.hasAccessToKey(aclName, ugi, opType) || acls.hasAccessToKey(aclName, ugi, KeyOpType.ALL))) { return; } ... } {code} Seems that {code} acls.isACLPresent(aclName, KeyOpType.MANAGEMENT) {code} should be replaced with {code} acls.isACLPresent(aclName, opType) {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)