Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 853E710120 for ; Wed, 2 Apr 2014 23:18:44 +0000 (UTC) Received: (qmail 51376 invoked by uid 500); 2 Apr 2014 23:18:44 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 51359 invoked by uid 500); 2 Apr 2014 23:18:43 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 51352 invoked by uid 99); 2 Apr 2014 23:18:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2014 23:18:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8D399926C11; Wed, 2 Apr 2014 23:18:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yusaku@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: Revert "AMBARI-5289 HiveServer2 default security configuration changes (dsen)" Date: Wed, 2 Apr 2014 23:18:43 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 59278a95f -> ddf5ce89e Revert "AMBARI-5289 HiveServer2 default security configuration changes (dsen)" This reverts commit 85ecb9a48fb95d0910a4e1a10dedfbd6a0c2518b. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ddf5ce89 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ddf5ce89 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ddf5ce89 Branch: refs/heads/trunk Commit: ddf5ce89e1eabfb933ec1b80f72700884982cbda Parents: 59278a9 Author: Yusaku Sako Authored: Wed Apr 2 16:17:49 2014 -0700 Committer: Yusaku Sako Committed: Wed Apr 2 16:17:49 2014 -0700 ---------------------------------------------------------------------- .../HIVE/package/files/startHiveserver2.sh | 22 +++++++++++++++ .../2.0.6/services/HIVE/package/scripts/hive.py | 2 +- .../services/HIVE/package/scripts/params.py | 5 +--- .../package/templates/startHiveserver2.sh.j2 | 28 -------------------- .../services/HIVE/configuration/hive-site.xml | 11 +++----- .../stacks/2.0.6/HIVE/test_hive_server.py | 4 +-- 6 files changed, 29 insertions(+), 43 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ddf5ce89/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/files/startHiveserver2.sh ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/files/startHiveserver2.sh b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/files/startHiveserver2.sh new file mode 100644 index 0000000..fa90c2f --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/files/startHiveserver2.sh @@ -0,0 +1,22 @@ +# +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# +HIVE_CONF_DIR=$4 /usr/lib/hive/bin/hiveserver2 -hiveconf hive.metastore.uris=' ' > $1 2> $2 & +echo $!|cat>$3 http://git-wip-us.apache.org/repos/asf/ambari/blob/ddf5ce89/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py index 5430efd..0990530 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py @@ -81,7 +81,7 @@ def hive(name=None): elif name == 'hiveserver2': File(params.start_hiveserver2_path, mode=0755, - content=Template(format('{start_hiveserver2_script}')) + content=StaticFile('startHiveserver2.sh') ) if name != "client": http://git-wip-us.apache.org/repos/asf/ambari/blob/ddf5ce89/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py index df9c683..52ba5c5 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py @@ -74,7 +74,7 @@ hive_pid = status_params.hive_pid hive_database_name = config['configurations']['global']['hive_database_name'] #Starting hiveserver2 -start_hiveserver2_script = 'startHiveserver2.sh.j2' +start_hiveserver2_script = 'startHiveserver2.sh' hadoop_home = '/usr' @@ -172,9 +172,6 @@ tez_user = config['configurations']['global']['tez_user'] hive_exec_jar_path = '/usr/lib/hive/lib/hive-exec.jar' hive_exec_hdfs_path = default('/configurations/hive-site/hive.jar.directory', '/apps/hive/install') -# Hive security -hive_authorization_enabled = config['configurations']['hive-site']['hive.security.authorization.enabled'] - import functools #create partial functions with common arguments for every HdfsDirectory call #to create hdfs directory we need to call params.HdfsDirectory in code http://git-wip-us.apache.org/repos/asf/ambari/blob/ddf5ce89/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 deleted file mode 100644 index a2bc26e..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/templates/startHiveserver2.sh.j2 +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# - -# HiveServer 2 -hiveconf options -if [ {{hive_authorization_enabled}} == True ]; then - export HIVE_SERVER2_OPTS=" -hiveconf hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator " -fi - -HIVE_CONF_DIR=$4 /usr/lib/hive/bin/hiveserver2 $HIVE_SERVER2_OPTS > $1 2> $2 & -echo $!|cat>$3 http://git-wip-us.apache.org/repos/asf/ambari/blob/ddf5ce89/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml index eecfaf5..2d8a86d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml @@ -108,13 +108,13 @@ limitations under the License. hive.security.authorization.enabled - true + false enable or disable the hive client authorization hive.security.authorization.manager - org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory + org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider the hive client authorization manager class name. The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider. @@ -133,7 +133,7 @@ limitations under the License. hive.server2.enable.doAs - false + true Impersonate the connected user. By default HiveServer2 performs the query processing as the user who submitted the query. But if the parameter is set to false, the query will run as the user that the hiveserver2 process runs as. @@ -480,10 +480,5 @@ limitations under the License. Number of aborted transactions involving a particular table or partition before major compaction is initiated. - - hive.users.in.admin.role - - If user is specified as value of this config, that user has superuser privileges in DB - http://git-wip-us.apache.org/repos/asf/ambari/blob/ddf5ce89/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py index e1e3716..57e6bb8 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py @@ -279,7 +279,7 @@ class TestHiveServer(RMFTestCase): not_if = '[ -f DBConnectionVerification.jar]', ) self.assertResourceCalled('File', '/tmp/start_hiveserver2_script', - content = Template('startHiveserver2.sh.j2'), + content = StaticFile('startHiveserver2.sh'), mode = 0755, ) self.assertResourceCalled('Directory', '/var/run/hive', @@ -372,7 +372,7 @@ class TestHiveServer(RMFTestCase): not_if = '[ -f DBConnectionVerification.jar]', ) self.assertResourceCalled('File', '/tmp/start_hiveserver2_script', - content = Template('startHiveserver2.sh.j2'), + content = StaticFile('startHiveserver2.sh'), mode = 0755, ) self.assertResourceCalled('Directory', '/var/run/hive',