ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject incubator-ranger git commit: RANGER-452 : Ranger KMS config folder changes
Date Wed, 06 May 2015 04:34:00 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master 8a9b57ed5 -> 9a2aefb72


RANGER-452 : Ranger KMS config folder changes

Signed-off-by: Velmurugan Periasamy <vel@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/9a2aefb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/9a2aefb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/9a2aefb7

Branch: refs/heads/master
Commit: 9a2aefb7281934b52a5050d0cbbc2119c17f3210
Parents: 8a9b57e
Author: Gautam Borad <gborad@gmail.com>
Authored: Mon May 4 20:32:35 2015 +0530
Committer: Velmurugan Periasamy <vel@apache.org>
Committed: Wed May 6 00:33:32 2015 -0400

----------------------------------------------------------------------
 kms/config/kms-webapp/core-site.xml             |  29 ----
 kms/config/kms-webapp/hdfs-site.xml             |  16 ---
 kms/config/kms-webapp/kms-acls.xml              | 135 -------------------
 kms/config/kms-webapp/kms-env.sh                |  49 -------
 kms/scripts/ranger-kms                          |   8 +-
 kms/scripts/setup.sh                            |  38 +++++-
 .../hadoop/crypto/key/SampleKeyProvider.java    |  91 -------------
 .../crypto/key/SampleKeyProviderFactory.java    |  42 ------
 .../hadoop/crypto/key/kms/server/KMSACLs.java   |   2 +-
 .../crypto/key/kms/server/KMSConfiguration.java |   2 +-
 .../hadoop/crypto/key/kms/server/MiniKMS.java   |   9 +-
 plugin-kms/scripts/enable-kms-plugin.sh         |   1 +
 src/main/assembly/kms.xml                       |  14 +-
 13 files changed, 46 insertions(+), 390 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/config/kms-webapp/core-site.xml
----------------------------------------------------------------------
diff --git a/kms/config/kms-webapp/core-site.xml b/kms/config/kms-webapp/core-site.xml
deleted file mode 100644
index f14e0a1..0000000
--- a/kms/config/kms-webapp/core-site.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-  Licensed 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. See accompanying LICENSE file.
--->
-
-<!-- Put site-specific property overrides in this file. -->
-
-<configuration>
-	<property>
-		<name>hadoop.security.authorization</name>
-		<value>false</value>
-	</property>
-	<property>
-		<name>hadoop.security.authentication</name>
-		<value>simple</value>
-	</property>
-	<property><name>hadoop.security.auth_to_local</name><value>DEFAULT</value></property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/config/kms-webapp/hdfs-site.xml
----------------------------------------------------------------------
diff --git a/kms/config/kms-webapp/hdfs-site.xml b/kms/config/kms-webapp/hdfs-site.xml
deleted file mode 100644
index 66b53b5..0000000
--- a/kms/config/kms-webapp/hdfs-site.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed 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. See accompanying LICENSE file.
--->
-<configuration>
-</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/config/kms-webapp/kms-acls.xml
----------------------------------------------------------------------
diff --git a/kms/config/kms-webapp/kms-acls.xml b/kms/config/kms-webapp/kms-acls.xml
deleted file mode 100644
index 1d5b649..0000000
--- a/kms/config/kms-webapp/kms-acls.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed 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.
--->
-<configuration>
-
-  <!-- This file is hot-reloaded when it changes -->
-
-  <!-- KMS ACLs -->
-
-  <property>
-    <name>hadoop.kms.acl.CREATE</name>
-    <value>*</value>
-    <description>
-      ACL for create-key operations.
-      If the user is not in the GET ACL, the key material is not returned
-      as part of the response.
-    </description>
-  </property>
-
-  <property>
-    <name>hadoop.kms.acl.DELETE</name>
-    <value>*</value>
-    <description>
-      ACL for delete-key operations.
-    </description>
-  </property>
-
-  <property>
-    <name>hadoop.kms.acl.ROLLOVER</name>
-    <value>*</value>
-    <description>
-      ACL for rollover-key operations.
-      If the user does is not in the GET ACL, the key material is not returned
-      as part of the response.
-    </description>
-  </property>
-
-  <property>
-    <name>hadoop.kms.acl.GET</name>
-    <value>*</value>
-    <description>
-      ACL for get-key-version and get-current-key operations.
-    </description>
-  </property>
-
-  <property>
-    <name>hadoop.kms.acl.GET_KEYS</name>
-    <value>*</value>
-    <description>
-      ACL for get-keys operations.
-    </description>
-  </property>
-
-  <property>
-    <name>hadoop.kms.acl.GET_METADATA</name>
-    <value>*</value>
-    <description>
-      ACL for get-key-metadata and get-keys-metadata operations.
-    </description>
-  </property>
-
-  <property>
-    <name>hadoop.kms.acl.SET_KEY_MATERIAL</name>
-    <value>*</value>
-    <description>
-      Complementary ACL for CREATE and ROLLOVER operations to allow the client
-      to provide the key material when creating or rolling a key.
-    </description>
-  </property>
-
-  <property>
-    <name>hadoop.kms.acl.GENERATE_EEK</name>
-    <value>*</value>
-    <description>
-      ACL for generateEncryptedKey CryptoExtension operations.
-    </description>
-  </property>
-
-  <property>
-    <name>hadoop.kms.acl.DECRYPT_EEK</name>
-    <value>*</value>
-    <description>
-      ACL for decryptEncryptedKey CryptoExtension operations.
-    </description>
-  </property>
-
-  <property>
-    <name>default.key.acl.MANAGEMENT</name>
-    <value>*</value>
-    <description>
-      default ACL for MANAGEMENT operations for all key acls that are not
-      explicitly defined.
-    </description>
-  </property>
-
-  <property>
-    <name>default.key.acl.GENERATE_EEK</name>
-    <value>*</value>
-    <description>
-      default ACL for GENERATE_EEK operations for all key acls that are not
-      explicitly defined.
-    </description>
-  </property>
-
-  <property>
-    <name>default.key.acl.DECRYPT_EEK</name>
-    <value>*</value>
-    <description>
-      default ACL for DECRYPT_EEK operations for all key acls that are not
-      explicitly defined.
-    </description>
-  </property>
-
-  <property>
-    <name>default.key.acl.READ</name>
-    <value>*</value>
-    <description>
-      default ACL for READ operations for all key acls that are not
-      explicitly defined.
-    </description>
-  </property>
-
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/config/kms-webapp/kms-env.sh
----------------------------------------------------------------------
diff --git a/kms/config/kms-webapp/kms-env.sh b/kms/config/kms-webapp/kms-env.sh
deleted file mode 100644
index 88a2b86..0000000
--- a/kms/config/kms-webapp/kms-env.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-#
-# Licensed 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. See accompanying LICENSE file.
-#
-
-# Set kms specific environment variables here.
-
-# Settings for the Embedded Tomcat that runs KMS
-# Java System properties for KMS should be specified in this variable
-#
-# export CATALINA_OPTS=
-
-# KMS logs directory
-#
-# export KMS_LOG=${KMS_HOME}/logs
-
-# KMS temporary directory
-#
-# export KMS_TEMP=${KMS_HOME}/temp
-
-# The HTTP port used by KMS
-#
-# export KMS_HTTP_PORT=16000
-
-# The Admin port used by KMS
-#
-# export KMS_ADMIN_PORT=`expr ${KMS_HTTP_PORT} + 1`
-
-# The maximum number of Tomcat handler threads
-#
-# export KMS_MAX_THREADS=1000
-
-# The location of the SSL keystore if using SSL
-#
-# export KMS_SSL_KEYSTORE_FILE=${HOME}/.keystore
-
-# The password of the SSL keystore if using SSL
-#
-# export KMS_SSL_KEYSTORE_PASS=password

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/scripts/ranger-kms
----------------------------------------------------------------------
diff --git a/kms/scripts/ranger-kms b/kms/scripts/ranger-kms
index 461a0c4..cb31860 100755
--- a/kms/scripts/ranger-kms
+++ b/kms/scripts/ranger-kms
@@ -27,12 +27,12 @@ realScriptPath=`readlink -f $0`
 realScriptDir=`dirname $realScriptPath`
 RANGER_KMS_DIR=`(cd $realScriptDir; pwd)`
 RANGER_KMS_EWS_DIR=${RANGER_KMS_DIR}/ews
-RANGER_KMS_EWS_CONF_DIR="${RANGER_KMS_EWS_DIR}/conf"
-RANGER_KMS_EWS_LIB_DIR="${RANGER_KMS_EWS_DIR}/lib"
+RANGER_KMS_EWS_CONF_DIR="${RANGER_KMS_EWS_DIR}/webapp/WEB-INF/classes/conf"
+RANGER_KMS_EWS_LIB_DIR="${RANGER_KMS_EWS_DIR}/webapp/WEB-INF/classes/lib"
 
 JAVA_OPTS=" ${JAVA_OPTS} -XX:MaxPermSize=256m -Xmx1024m -Xms1024m "
 
-for custom_env_script in `find ${RANGER_KMS_DIR}/ews/conf/ -name "ranger-kms-env*"`; do
+for custom_env_script in `find ${RANGER_KMS_DIR}/ews/webapp/WEB-INF/classes/conf/ -name "ranger-kms-env*"`;
do
         if [ -f $custom_env_script ]; then
                 . $custom_env_script
         fi
@@ -70,7 +70,7 @@ then
 	mkdir -p ${TOMCAT_LOG_DIR}
 fi
 
-KMS_CONF_DIR=${RANGER_KMS_EWS_DIR}/webapp/config/
+KMS_CONF_DIR=${RANGER_KMS_EWS_DIR}/webapp/WEB-INF/classes/conf
 
 JAVA_OPTS="${JAVA_OPTS} -Dcatalina.base=${RANGER_KMS_EWS_DIR} -Dkms.config.dir=${KMS_CONF_DIR}
-Dkms.log.dir=${TOMCAT_LOG_DIR} -cp ${RANGER_KMS_EWS_CONF_DIR}:${RANGER_KMS_EWS_LIB_DIR}/*:${RANGER_KMS_EWS_DIR}/webapp/lib/*:${JAVA_HOME}/lib/*
"
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/scripts/setup.sh
----------------------------------------------------------------------
diff --git a/kms/scripts/setup.sh b/kms/scripts/setup.sh
index 229ff33..63237d5 100755
--- a/kms/scripts/setup.sh
+++ b/kms/scripts/setup.sh
@@ -22,6 +22,9 @@
 PROPFILE=$PWD/install.properties
 propertyValue=''
 
+CONF_FILE=$PWD/ews/webapp/WEB-INF/classes/conf
+ETC_CONF_FILE=/etc/ranger/kms/conf
+
 if [ ! -f ${PROPFILE} ]
 then
 	echo "$PROPFILE file not found....!!";
@@ -159,6 +162,27 @@ init_variables(){
 	getPropertyFromFile 'db_root_password' $PROPFILE db_user
 	getPropertyFromFile 'db_user' $PROPFILE db_user
 	getPropertyFromFile 'db_password' $PROPFILE db_password
+	
+	#if [ -L ${CONF_FILE} ]
+   #     then
+   #             log "Deleting conf symlink"
+   #             rm -f ${CONF_FILE}
+   #     fi
+
+   #     if [ -f ${ETC_CONF_FILE} ]
+   #     then
+   #             log "Deleting /etc/ranger/kms/conf file"
+   #             rm -f ${ETC_CONF_FILE}
+   #     fi
+
+   #     if [ ! -d  ${ETC_CONF_FILE} ]
+   #     then
+   #             log "Creating /etc/ranger/kms/conf dir"
+   #             mkdir -p ${ETC_CONF_FILE}
+   #     fi
+
+   #     log "Create link of conf -> /etc/ranger/kms/conf"
+   #     ln -sf ${ETC_CONF_FILE} ${CONF_FILE}	
 }
 
 
@@ -301,7 +325,7 @@ update_properties() {
 	#chmod a+rx ${WEBAPP_ROOT}/WEB-INF/classes/conf/java_home.sh
 
 
-	to_file=$app_home/config/dbks-site.xml
+	to_file=$PWD/ews/webapp/WEB-INF/classes/conf/dbks-site.xml
 	if test -f $to_file; then
 		log "[I] $to_file file found"
 	else
@@ -471,12 +495,12 @@ setup_install_files(){
 
 	log "[I] Setting up installation files and directory";
 
-	#if [ ! -d ${WEBAPP_ROOT}/WEB-INF/classes/conf ]; then
-	#    log "[I] Copying ${WEBAPP_ROOT}/WEB-INF/classes/conf.dist ${WEBAPP_ROOT}/WEB-INF/classes/conf"
-	#    mkdir -p ${WEBAPP_ROOT}/WEB-INF/classes/conf
-	#    cp ${WEBAPP_ROOT}/WEB-INF/classes/conf.dist/* ${WEBAPP_ROOT}/WEB-INF/classes/conf
-	#	chown -R ${unix_user} ${WEBAPP_ROOT}/WEB-INF/classes/conf
-	#fi
+	if [ ! -d ${WEBAPP_ROOT}/WEB-INF/classes/conf ]; then
+	    log "[I] Copying ${WEBAPP_ROOT}/WEB-INF/classes/conf.dist ${WEBAPP_ROOT}/WEB-INF/classes/conf"
+	    mkdir -p ${WEBAPP_ROOT}/WEB-INF/classes/conf
+	fi
+	cp ${WEBAPP_ROOT}/WEB-INF/classes/conf.dist/* ${WEBAPP_ROOT}/WEB-INF/classes/conf
+        chown -R ${unix_user} ${WEBAPP_ROOT}/WEB-INF/classes/conf
 
 	if [ ! -d ${WEBAPP_ROOT}/WEB-INF/classes/lib ]; then
 	    log "[I] Creating ${WEBAPP_ROOT}/WEB-INF/classes/lib"

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/src/main/java/org/apache/hadoop/crypto/key/SampleKeyProvider.java
----------------------------------------------------------------------
diff --git a/kms/src/main/java/org/apache/hadoop/crypto/key/SampleKeyProvider.java b/kms/src/main/java/org/apache/hadoop/crypto/key/SampleKeyProvider.java
deleted file mode 100644
index 260b186..0000000
--- a/kms/src/main/java/org/apache/hadoop/crypto/key/SampleKeyProvider.java
+++ /dev/null
@@ -1,91 +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.
- */
-
-package org.apache.hadoop.crypto.key;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.hadoop.conf.Configuration;
-
-
-public class SampleKeyProvider extends KeyProvider {
-	
-	public SampleKeyProvider(Configuration conf) {
-		super(conf);
-		// TODO Auto-generated constructor stub
-	}
-
-	@Override
-	public KeyVersion getKeyVersion(String versionName) throws IOException {
-		KeyVersion version = null ;
-		// TODO Auto-generated method stub
-		return version ;
-	}
-
-	@Override
-	public List<String> getKeys() throws IOException {
-		List<String> keys = null ;
-		// TODO Auto-generated method stub
-		return keys;
-	}
-
-	@Override
-	public List<KeyVersion> getKeyVersions(String name) throws IOException {
-		List<KeyVersion> keys = null ;
-		// TODO Auto-generated method stub
-		return keys;
-	}
-
-	@Override
-	public Metadata getMetadata(String name) throws IOException {
-		Metadata metadata = null ;
-		// TODO Auto-generated method stub
-		return metadata ;
-	}
-
-	@Override
-	public KeyVersion createKey(String name, byte[] material, Options options)
-			throws IOException {
-		KeyVersion version = null ;
-		// TODO Auto-generated method stub
-		return version;
-	}
-
-	@Override
-	public void deleteKey(String name) throws IOException {
-		// TODO Auto-generated method stub
-	}
-
-	@Override
-	public KeyVersion rollNewVersion(String name, byte[] material)
-			throws IOException {
-		KeyVersion version = null ;
-		// TODO Auto-generated method stub
-		return version;
-	}
-
-	@Override
-	public void flush() throws IOException {
-		// TODO Auto-generated method stub
-		
-	}
-	
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/src/main/java/org/apache/hadoop/crypto/key/SampleKeyProviderFactory.java
----------------------------------------------------------------------
diff --git a/kms/src/main/java/org/apache/hadoop/crypto/key/SampleKeyProviderFactory.java
b/kms/src/main/java/org/apache/hadoop/crypto/key/SampleKeyProviderFactory.java
deleted file mode 100644
index 6fc43c3..0000000
--- a/kms/src/main/java/org/apache/hadoop/crypto/key/SampleKeyProviderFactory.java
+++ /dev/null
@@ -1,42 +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.
- */
-
-package org.apache.hadoop.crypto.key;
-
-import java.io.IOException;
-import java.net.URI;
-
-import org.apache.hadoop.conf.Configuration;
-
-public class SampleKeyProviderFactory extends KeyProviderFactory {
-
-	private static final String SAMPLE_KEY_PROVIDER_SCHEMA_NAME = "sample" ;
-	
-	@Override
-	public KeyProvider createProvider(URI aURI, Configuration aConf) throws IOException {
-		KeyProvider keyprovider = null ;
-		if (aURI != null) {
-			if (aURI.getScheme().equalsIgnoreCase(SAMPLE_KEY_PROVIDER_SCHEMA_NAME)) {
-				keyprovider = new SampleKeyProvider(aConf) ;
-			}
-		}
-		return keyprovider ;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSACLs.java
----------------------------------------------------------------------
diff --git a/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSACLs.java b/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSACLs.java
index 92d3470..dc09709 100755
--- a/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSACLs.java
+++ b/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSACLs.java
@@ -39,7 +39,7 @@ import java.util.regex.Pattern;
 
 /**
  * Provides access to the <code>AccessControlList</code>s used by KMS,
- * hot-reloading them if the <code>kms-acls.xml</code> file where the ACLs
+ * hot-reloading them if the <code>dbks-site.xml</code> file where the ACLs
  * are defined has been updated.
  */
 @InterfaceAudience.Private

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSConfiguration.java
----------------------------------------------------------------------
diff --git a/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSConfiguration.java
b/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSConfiguration.java
old mode 100644
new mode 100755
index cc5c202..f4f9d3e
--- a/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSConfiguration.java
+++ b/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSConfiguration.java
@@ -100,7 +100,7 @@ public class KMSConfiguration {
   }
 
   public static Configuration getKMSConf() {
-    return getConfiguration(true, "core-site.xml", KMS_SITE_XML);
+    return getConfiguration(true, KMS_SITE_XML);
   }
 
   public static Configuration getACLsConf() {

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/MiniKMS.java
----------------------------------------------------------------------
diff --git a/kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/MiniKMS.java b/kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/MiniKMS.java
old mode 100644
new mode 100755
index 4f802cc..7080e14
--- a/kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/MiniKMS.java
+++ b/kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/MiniKMS.java
@@ -158,7 +158,7 @@ public class MiniKMS {
   public void start() throws Exception {
     ClassLoader cl = Thread.currentThread().getContextClassLoader();
     System.setProperty(KMSConfiguration.KMS_CONFIG_DIR, kmsConfDir);
-    File aclsFile = new File(kmsConfDir, "kms-acls.xml");
+    File aclsFile = new File(kmsConfDir, "dbks-site.xml");
     if (!aclsFile.exists()) {
       InputStream is = cl.getResourceAsStream("mini-kms-acls-default.xml");
       OutputStream os = new FileOutputStream(aclsFile);
@@ -166,13 +166,6 @@ public class MiniKMS {
       is.close();
       os.close();
     }
-    File coreFile = new File(kmsConfDir, "core-site.xml");
-    if (!coreFile.exists()) {
-      Configuration core = new Configuration();
-      Writer writer = new FileWriter(coreFile);
-      core.writeXml(writer);
-      writer.close();
-    }
     File kmsFile = new File(kmsConfDir, "kms-site.xml");
     if (!kmsFile.exists()) {
       Configuration kms = new Configuration(false);

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/plugin-kms/scripts/enable-kms-plugin.sh
----------------------------------------------------------------------
diff --git a/plugin-kms/scripts/enable-kms-plugin.sh b/plugin-kms/scripts/enable-kms-plugin.sh
old mode 100644
new mode 100755
index 70d03a3..53187f7
--- a/plugin-kms/scripts/enable-kms-plugin.sh
+++ b/plugin-kms/scripts/enable-kms-plugin.sh
@@ -135,6 +135,7 @@ fi
 # TEST - END
 #
 HCOMPONENT_INSTALL_DIR=`(cd ${hdir} ; pwd)`
+HCOMPONENT_INSTALL_DIR=${HCOMPONENT_INSTALL_DIR}/webapp/WEB-INF/classes
 HCOMPONENT_LIB_DIR=${HCOMPONENT_INSTALL_DIR}/lib
 if [ "${HCOMPONENT_NAME}" = "knox" ]
 then

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9a2aefb7/src/main/assembly/kms.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/kms.xml b/src/main/assembly/kms.xml
old mode 100644
new mode 100755
index 13cf384..87d8ea3
--- a/src/main/assembly/kms.xml
+++ b/src/main/assembly/kms.xml
@@ -123,13 +123,13 @@
     <moduleSet>
      <binaries>
         <includeDependencies>false</includeDependencies>
-        <outputDirectory>/ews/lib</outputDirectory>
+        <outputDirectory>/ews/webapp/WEB-INF/classes/lib</outputDirectory>
         <unpack>false</unpack>
         <directoryMode>755</directoryMode>
         <fileMode>644</fileMode>
         <dependencySets>
             <dependencySet>
-                <outputDirectory>/ews/lib</outputDirectory>
+                <outputDirectory>/ews/webapp/WEB-INF/classes/lib</outputDirectory>
                 <includes>
                     <include>org.apache.tomcat.embed:tomcat-embed*</include>
                     <include>org.eclipse.jdt.core.compiler:ecj:jar:P20140317-1600</include>
@@ -214,7 +214,7 @@
                     </includes>
             </dependencySet>
         </dependencySets>
-        <outputDirectory>/ews/lib</outputDirectory>
+        <outputDirectory>/ews/webapp/WEB-INF/classes/lib</outputDirectory>
      </binaries>
      <includes>
 		<include>org.apache.ranger:ranger_solrj</include>
@@ -274,11 +274,11 @@
    </moduleSets>
 
   <fileSets>
-	<fileSet>
+	<!-- <fileSet>
 		<outputDirectory>/ews/webapp/WEB-INF/classes/conf.dist</outputDirectory>
 		<directory>kms/config/webserver</directory>
 		<fileMode>700</fileMode>
-	</fileSet>
+	</fileSet> -->
 	<fileSet>
 		<outputDirectory>/db</outputDirectory>
 		<directoryMode>755</directoryMode>
@@ -301,13 +301,13 @@
 		<fileMode>544</fileMode>
 	</fileSet>
 	<fileSet>
-		<outputDirectory>/ews/webapp/config</outputDirectory>
+		<outputDirectory>/ews/webapp/WEB-INF/classes/conf.dist</outputDirectory>
 		<directoryMode>0700</directoryMode>
 		<directory>kms/config/kms-webapp</directory>
 		<fileMode>0700</fileMode>
   	</fileSet>	
   	<fileSet>
-		<outputDirectory>/ews/conf</outputDirectory>
+		<outputDirectory>/ews/webapp/WEB-INF/classes/conf.dist</outputDirectory>
 		<directoryMode>0700</directoryMode>
 		<directory>kms/config/webserver</directory>
 		<fileMode>0700</fileMode>


Mime
View raw message