Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB1F7C624 for ; Thu, 4 Jul 2013 05:28:03 +0000 (UTC) Received: (qmail 25129 invoked by uid 500); 4 Jul 2013 05:28:01 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 24717 invoked by uid 500); 4 Jul 2013 05:28:00 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 24704 invoked by uid 99); 4 Jul 2013 05:27:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jul 2013 05:27:59 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sotsuka@yahoo-corp.jp designates 203.141.54.184 as permitted sender) Received: from [203.141.54.184] (HELO ob01.ci.bbt.yahoo.co.jp) (203.141.54.184) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jul 2013 05:27:54 +0000 Received: from YJWEXHT01.yjoffice.local (yjwexht01.yjoffice.local [172.19.19.7]) by ob01.ci.bbt.yahoo.co.jp (8.14.4/8.14.4) with ESMTP id r645RWVE012203 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Thu, 4 Jul 2013 14:27:32 +0900 Received: from YJWEXMBX05.yjoffice.local ([169.254.5.231]) by YJWEXHT01.yjoffice.local ([172.19.19.7]) with mapi id 14.02.0318.004; Thu, 4 Jul 2013 14:27:31 +0900 From: Shunichi Otsuka To: "user@hive.apache.org" Subject: metastore security issue Thread-Topic: metastore security issue Thread-Index: Ac54dy3N67640f+0QXuaLzpiWjsupg== Date: Thu, 4 Jul 2013 05:27:31 +0000 Message-ID: <73A5A934D9A2CB47B7D540D34E5544A528BE3A7C@yjwexmbx05.yjoffice.local> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.26.46.108] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org I am trying to setup hive securely doing authorization at the metastore. Ho= wever there is a problem. I have relied on hive JIRA HIVE-3705 to decide the configuration which were= set as below: javax.jdo.option.ConnectionURL jdbc javax.jdo.option.ConnectionDriverName java.database.jdbc.mysql javax.jdo.option.ConnectionUserName hive javax.jdo.option.ConnectionPassword userpass hive.metastore.execute.setugi true hive.metastore.uris thrift://thriftserver.exa= mple.com:9083 hive.metastore.sasl.enabled true hive.metastore.kerberos.keytab.file /etc/grid-keytabs/hive.ke= ytab hive.metastore.kerberos.principal hive/thriftserver.example= .com@example.com hive.security.metastore.authorization.enabled true hive.security.metastore.authenticator.manager org.apache.hadoop.hive.ql= .security.HadoopDefaultMetastoreAuthenticator hive.security.metastore.authorization.manager org.apache.hadoop.hive.ql= .security.authorization.DefaultHiveMetastoreAuthorizationProvider hive.security.authorization.enabled false However this does authorize an unauthorized user to drop a table or databas= e from the metastore as below: alice> create database db1 location '/user/alice/warehouse/db1.db'; [The permission of db1.db is drwx------ alice:users] However, bob> drop database db1; OK This should not happen, so why is it happening? Is my setting wrong or is i= t that the code has not covered this case? If it is that it has not been implemented yet, what measures have you taken= to avoid malicious users from dropping other users' database/tables? Java version is 1.6.0_33 hive version is 0.11 Thanks