Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-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 7A74710E16 for ; Mon, 9 Dec 2013 22:46:08 +0000 (UTC) Received: (qmail 1435 invoked by uid 500); 9 Dec 2013 22:46:07 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 1375 invoked by uid 500); 9 Dec 2013 22:46:07 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 1366 invoked by uid 500); 9 Dec 2013 22:46:07 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 1363 invoked by uid 99); 9 Dec 2013 22:46:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 22:46:07 +0000 Date: Mon, 9 Dec 2013 22:46:07 +0000 (UTC) From: "Sushanth Sowmyan (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-5989) Hive metastore authorization check is not threadsafe 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/HIVE-5989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sushanth Sowmyan updated HIVE-5989: ----------------------------------- Description: Metastore-side authorization has a couple of pretty important threadsafety bugs in it: a) The HiveMetastoreAuthenticated instantiated by the AuthorizationPreEventListener is static. This is a premature optimization and incorrect, as it will result in Authenticator implementations that store state potentially giving an incorrect result, and this bug very much exists with the DefaultMetastoreAuthenticator. b) It assumes HMSHandler.getHiveConf() is itself going to be thread-safe, which it is not. HMSHandler.getConf() is the appropriate thread-safe equivalent. The effect of this bug is that if there are two users that are concurrently running jobs on the metastore, we might : a) Allow a user to do something they didn't have permission to, because the other person did. (Security hole) b) Disallow a user from doing something they should have permission to (More common - annoying and can cause job failures) was: Metastore-side authorization has a couple of pretty important threadsafety bugs in it: a) The HiveMetastoreAuthenticated instantiated by the AuthorizationPreEventListener is static. This is a premature optimization and incorrect, as it will result in Authenticator implementations that store state potentially giving an incorrect result, and this bug very much exists with the DefaultMetastoreAuthenticator. b) It assumes HMSHandler.getHiveConf() is itself going to be thread-safe, which it is not. HMSHandler.getConf() is the appropriate thread-safe equivalent. > Hive metastore authorization check is not threadsafe > ---------------------------------------------------- > > Key: HIVE-5989 > URL: https://issues.apache.org/jira/browse/HIVE-5989 > Project: Hive > Issue Type: Bug > Components: Metastore, Security > Affects Versions: 0.11.0 > Reporter: Sushanth Sowmyan > Assignee: Sushanth Sowmyan > Priority: Critical > Attachments: HIVE-5989.patch, SleepyAP.patch > > > Metastore-side authorization has a couple of pretty important threadsafety bugs in it: > a) The HiveMetastoreAuthenticated instantiated by the AuthorizationPreEventListener is static. This is a premature optimization and incorrect, as it will result in Authenticator implementations that store state potentially giving an incorrect result, and this bug very much exists with the DefaultMetastoreAuthenticator. > b) It assumes HMSHandler.getHiveConf() is itself going to be thread-safe, which it is not. HMSHandler.getConf() is the appropriate thread-safe equivalent. > The effect of this bug is that if there are two users that are concurrently running jobs on the metastore, we might : > a) Allow a user to do something they didn't have permission to, because the other person did. (Security hole) > b) Disallow a user from doing something they should have permission to (More common - annoying and can cause job failures) -- This message was sent by Atlassian JIRA (v6.1.4#6159)