From 169dd4b89bb02a4a644b748a07a0294a324715cb Mon Sep 17 00:00:00 2001 From: jhh Date: Mon, 15 Jun 2020 09:35:55 -0500 Subject: get cert store passwords from env Issue-ID: POLICY-2575 Signed-off-by: jhh Change-Id: If1bc0bb344e0e07bba0988c9a6caa143eb54b9d1 --- packages/policy-pap-docker/src/main/docker/policy-pap.sh | 6 ++---- .../src/main/resources/papsetup/config/pap/bin/policy-pap.sh | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/policy-pap-docker/src/main/docker/policy-pap.sh b/packages/policy-pap-docker/src/main/docker/policy-pap.sh index d6058001..0dba845f 100644 --- a/packages/policy-pap-docker/src/main/docker/policy-pap.sh +++ b/packages/policy-pap-docker/src/main/docker/policy-pap.sh @@ -2,7 +2,7 @@ # # ============LICENSE_START======================================================= # Copyright (C) 2019-2020 Nordix Foundation. -# Modifications Copyright (C) 2019 AT&T Intellectual Property. +# Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,9 +22,7 @@ JAVA_HOME=/usr/lib/jvm/java-11-openjdk/ KEYSTORE="${POLICY_HOME}/etc/ssl/policy-keystore" -KEYSTORE_PASSWD="Pol1cy_0nap" TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore" -TRUSTSTORE_PASSWD="Pol1cy_0nap" if [ "$#" -ge 1 ]; then @@ -55,4 +53,4 @@ if [[ -f "${POLICY_HOME}"/etc/mounted/logback.xml ]]; then cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/ fi -$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" -Dlogback.configurationFile=$POLICY_HOME/etc/logback.xml -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" org.onap.policy.pap.main.startstop.Main -c $CONFIG_FILE +$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" -Dlogback.configurationFile=$POLICY_HOME/etc/logback.xml -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD:-Pol1cy_0nap}" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}" org.onap.policy.pap.main.startstop.Main -c $CONFIG_FILE diff --git a/testsuites/stability/src/main/resources/papsetup/config/pap/bin/policy-pap.sh b/testsuites/stability/src/main/resources/papsetup/config/pap/bin/policy-pap.sh index 40c0fa2b..e5cc5a91 100644 --- a/testsuites/stability/src/main/resources/papsetup/config/pap/bin/policy-pap.sh +++ b/testsuites/stability/src/main/resources/papsetup/config/pap/bin/policy-pap.sh @@ -2,7 +2,7 @@ # # ============LICENSE_START======================================================= # Copyright (C) 2019-2020 Nordix Foundation. -# Modifications Copyright (C) 2019 AT&T Intellectual Property. +# Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,10 +23,7 @@ JAVA_HOME=/usr/lib/jvm/java-11-openjdk/ POLICY_PAP_HOME=/opt/app/policy/pap KEYSTORE="${POLICY_HOME}/etc/ssl/policy-keystore" -KEYSTORE_PASSWD="Pol1cy_0nap" TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore" -TRUSTSTORE_PASSWD="Pol1cy_0nap" - if [ "$#" -ge 1 ]; then CONFIG_FILE=$1 @@ -41,4 +38,4 @@ fi echo "Policy pap config file: $CONFIG_FILE" -$JAVA_HOME/bin/java -cp "$POLICY_PAP_HOME/etc:$POLICY_PAP_HOME/lib/*" -Dlogback.configurationFile=$POLICY_PAP_HOME/etc/logback.xml -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" -Dcom.sun.management.jmxremote.rmi.port=9090 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=false -Djava.rmi.server.hostname=$PAP_HOST org.onap.policy.pap.main.startstop.Main -c $CONFIG_FILE +$JAVA_HOME/bin/java -cp "$POLICY_PAP_HOME/etc:$POLICY_PAP_HOME/lib/*" -Dlogback.configurationFile=$POLICY_PAP_HOME/etc/logback.xml -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD:-Pol1cy_0nap}" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}" -Dcom.sun.management.jmxremote.rmi.port=9090 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=false -Djava.rmi.server.hostname=$PAP_HOST org.onap.policy.pap.main.startstop.Main -c $CONFIG_FILE -- cgit 1.2.3-korg