summaryrefslogtreecommitdiffstats
path: root/packages/policy-xacmlpdp-docker/src/main
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2020-08-03 15:42:52 -0500
committerjhh <jorge.hernandez-herrero@att.com>2020-08-03 15:47:11 -0500
commitf7022d2d986f4ea2750dd84e621ed02803173b6a (patch)
tree2a2ebc42bcec71b40c26384c0d140866060e125c /packages/policy-xacmlpdp-docker/src/main
parent560409a37a75a2131f164f0e4ef0e5d017471e3e (diff)
environment variables to support cert. store paths
Issue-ID: POLICY-2615 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I8360ee5f3bf30c0ea00b58a1f891ef46e9ea9f00
Diffstat (limited to 'packages/policy-xacmlpdp-docker/src/main')
-rw-r--r--packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh b/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh
index a607f685..a4257c38 100644
--- a/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh
+++ b/packages/policy-xacmlpdp-docker/src/main/docker/policy-pdpx.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -xv
+#!/bin/bash -x
#
# ============LICENSE_START=======================================================
# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
@@ -19,9 +19,12 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
#
+
JAVA_HOME=/usr/lib/jvm/java-11-openjdk/
-KEYSTORE="${POLICY_HOME}/etc/ssl/policy-keystore"
-TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore"
+KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}"
+TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
+KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
+TRUSTSTORE_PASSWD="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}"
if [ "$#" -ge 1 ]; then
CONFIG_FILE=$1
@@ -36,17 +39,17 @@ fi
if [[ -f "${POLICY_HOME}"/etc/mounted/policy-truststore ]]; then
echo "overriding policy-truststore"
- cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}"
+ cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}"
fi
if [[ -f "${POLICY_HOME}"/etc/mounted/policy-keystore ]]; then
echo "overriding policy-keystore"
- cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
+ cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
fi
if [[ -f "${POLICY_HOME}"/etc/mounted/xacml.properties ]]; then
echo "overriding xacml.properties in guards application"
- cp -f "${POLICY_HOME}"/etc/mounted/xacml.properties "${POLICY_HOME}"/apps/guard/
+ cp -f "${POLICY_HOME}"/etc/mounted/xacml.properties "${POLICY_HOME}"/apps/guard/
fi
if [[ -f "${POLICY_HOME}"/etc/mounted/logback.xml ]]; then
@@ -59,4 +62,4 @@ fi
echo "Policy Xacml PDP config file: $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.pdpx.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}" -Djavax.net.ssl.trustStore="${TRUSTSTORE}" -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" org.onap.policy.pdpx.main.startstop.Main -c "${CONFIG_FILE}"