diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/policy-distribution-docker/src/main/docker/Dockerfile | 5 | ||||
-rw-r--r-- | packages/policy-distribution-docker/src/main/docker/policy-dist.sh | 7 | ||||
-rw-r--r-- | packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json | 3 | ||||
-rw-r--r-- | packages/policy-distribution-tarball/src/main/resources/etc/ssl/policy-keystore | bin | 0 -> 4311 bytes | |||
-rw-r--r-- | packages/policy-distribution-tarball/src/main/resources/etc/ssl/policy-truststore | bin | 0 -> 124180 bytes |
5 files changed, 11 insertions, 4 deletions
diff --git a/packages/policy-distribution-docker/src/main/docker/Dockerfile b/packages/policy-distribution-docker/src/main/docker/Dockerfile index e1349775..3168d72b 100644 --- a/packages/policy-distribution-docker/src/main/docker/Dockerfile +++ b/packages/policy-distribution-docker/src/main/docker/Dockerfile @@ -28,8 +28,8 @@ RUN \ RUN groupadd policy RUN useradd --create-home --shell /bin/bash -g policy policy -RUN mkdir -p ${POLICY_DISTRIBUTION_HOME} ${POLICY_LOGS} && \ - chown policy:policy ${POLICY_HOME} ${POLICY_DISTRIBUTION_HOME} ${POLICY_LOGS} +RUN mkdir -p ${POLICY_DISTRIBUTION_HOME} ${POLICY_LOGS} ${POLICY_HOME}/etc/ssl && \ + chown -R policy:policy ${POLICY_HOME} ${POLICY_DISTRIBUTION_HOME} ${POLICY_LOGS} RUN mkdir /packages COPY /maven/* /packages @@ -39,6 +39,7 @@ RUN rm /packages/policy-distribution.tar.gz WORKDIR ${POLICY_DISTRIBUTION_HOME} COPY policy-dist.sh bin/. RUN chown -R policy:policy * && chmod +x bin/*.sh +RUN cp ${POLICY_DISTRIBUTION_HOME}/etc/ssl/* ${POLICY_HOME}/etc/ssl && chown policy:policy ${POLICY_HOME}/etc/ssl/* USER policy WORKDIR ${POLICY_DISTRIBUTION_HOME}/bin diff --git a/packages/policy-distribution-docker/src/main/docker/policy-dist.sh b/packages/policy-distribution-docker/src/main/docker/policy-dist.sh index ebb6b8d2..91d7290d 100644 --- a/packages/policy-distribution-docker/src/main/docker/policy-dist.sh +++ b/packages/policy-distribution-docker/src/main/docker/policy-dist.sh @@ -21,6 +21,11 @@ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ POLICY_DISTRIBUTION_HOME=/opt/app/policy/distribution +KEYSTORE="${POLICY_HOME}/etc/ssl/policy-keystore" +KEYSTORE_PASSWD="Pol1cy_0nap" +TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore" +TRUSTSTORE_PASSWD="Pol1cy_0nap" + if [ "$#" -eq 1 ]; then CONFIG_FILE=$1 @@ -35,4 +40,4 @@ fi echo "Policy distribution config file: $CONFIG_FILE" -$JAVA_HOME/bin/java -cp "$POLICY_DISTRIBUTION_HOME/etc:$POLICY_DISTRIBUTION_HOME/lib/*" org.onap.policy.distribution.main.startstop.Main -c $CONFIG_FILE +$JAVA_HOME/bin/java -cp "$POLICY_DISTRIBUTION_HOME/etc:$POLICY_DISTRIBUTION_HOME/lib/*" -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStore="$TRUSTSTORE_PASSWD" org.onap.policy.distribution.main.startstop.Main -c $CONFIG_FILE diff --git a/packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json b/packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json index 455b77a4..1703512f 100644 --- a/packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json +++ b/packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json @@ -4,7 +4,8 @@ "host":"0.0.0.0", "port":6969, "userName":"healthcheck", - "password":"zb!XztG34" + "password":"zb!XztG34", + "https":true }, "receptionHandlerParameters":{ "SDCReceptionHandler":{ diff --git a/packages/policy-distribution-tarball/src/main/resources/etc/ssl/policy-keystore b/packages/policy-distribution-tarball/src/main/resources/etc/ssl/policy-keystore Binary files differnew file mode 100644 index 00000000..7d2b1ecc --- /dev/null +++ b/packages/policy-distribution-tarball/src/main/resources/etc/ssl/policy-keystore diff --git a/packages/policy-distribution-tarball/src/main/resources/etc/ssl/policy-truststore b/packages/policy-distribution-tarball/src/main/resources/etc/ssl/policy-truststore Binary files differnew file mode 100644 index 00000000..8834ac25 --- /dev/null +++ b/packages/policy-distribution-tarball/src/main/resources/etc/ssl/policy-truststore |