diff options
author | Jerry Flood <jflood@att.com> | 2019-04-17 13:01:55 -0400 |
---|---|---|
committer | Jerry Flood <jflood@att.com> | 2019-04-17 13:13:39 -0400 |
commit | 17e160784612a0faa782eb7069be91532b4dfabc (patch) | |
tree | b61bcbd6074db32c5c1eee5d4e5cac2170ee6703 | |
parent | 58871ba77f801f4794fed5573feefc3004cc55e9 (diff) |
Update container startup for SSL
Issue-ID: OPTFRA-391
Change-Id: I6cbc831511b6378c6660ab37ab3ec8062ac07359
Signed-off-by: Jerry Flood <jflood@att.com>
5 files changed, 65 insertions, 16 deletions
diff --git a/cmso-optimizer/src/main/docker/extra-files/startService.sh b/cmso-optimizer/src/main/docker/extra-files/startService.sh index 0549dfd..7cbed3d 100644 --- a/cmso-optimizer/src/main/docker/extra-files/startService.sh +++ b/cmso-optimizer/src/main/docker/extra-files/startService.sh @@ -4,24 +4,24 @@ AUTHENTICATION=${AUTHENTICATION:-proprietary-auth} VM_ARGS="${VM_ARGS} -Dserver.local.startpath=${RESOURCES_HOME}" -if [ "${JAVA_TRUSTSTORE}" != ''] +if [ "${JAVA_TRUSTSTORE}" != '' ] then - VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStore=${JAVA_TRUSTSTORE}" + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStore=${JAVA_TRUSTSTORE}" fi -if [ "${JAVA_TRUSTSTORE_PASSWORD}" != ''] +if [ "${JAVA_TRUSTSTORE_PASSWORD}" != '' ] then - VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStorePassword=${JAVA_TRUSTSTORE_PASSWORD}" + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStorePassword=${JAVA_TRUSTSTORE_PASSWORD}" fi if [ "${SSL_KEYSTORE}" != '' ] then - VM_ARGS="${VM_ARGS} -Dserver.ssl.key-store=${SSL_KEYSTORE}" + VM_ARGS="${VM_ARGS} -Dserver.ssl.key-store=${SSL_KEYSTORE}" fi if [ "${SSL_KEYSTORE_PASSWORD}" != '' ] then - VM_ARGS="${VM_ARGS} -Dserver.ssl.key-password=${SSL_KEYSTORE_PASSWORD}" + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.keyStorePassword=${SSL_KEYSTORE_PASSWORD}" fi echo "VM_ARGS="${VM_ARGS} diff --git a/cmso-service/src/main/docker/extra-files/startService.sh b/cmso-service/src/main/docker/extra-files/startService.sh index d040bd9..7cbed3d 100644 --- a/cmso-service/src/main/docker/extra-files/startService.sh +++ b/cmso-service/src/main/docker/extra-files/startService.sh @@ -1,10 +1,28 @@ #!/bin/sh AUTHENTICATION=${AUTHENTICATION:-proprietary-auth} -JAVA_TRUSTSTORE=${JAVA_TRUSTSTORE:-etc/config/truststoreONAPall.jks} VM_ARGS="${VM_ARGS} -Dserver.local.startpath=${RESOURCES_HOME}" -VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStore==${JAVA_TRUSTSTORE}" + +if [ "${JAVA_TRUSTSTORE}" != '' ] +then + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStore=${JAVA_TRUSTSTORE}" +fi + +if [ "${JAVA_TRUSTSTORE_PASSWORD}" != '' ] +then + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStorePassword=${JAVA_TRUSTSTORE_PASSWORD}" +fi + +if [ "${SSL_KEYSTORE}" != '' ] +then + VM_ARGS="${VM_ARGS} -Dserver.ssl.key-store=${SSL_KEYSTORE}" +fi + +if [ "${SSL_KEYSTORE_PASSWORD}" != '' ] +then + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.keyStorePassword=${SSL_KEYSTORE_PASSWORD}" +fi echo "VM_ARGS="${VM_ARGS} diff --git a/cmso-service/src/main/docker/extra-files/startService.sh.bak b/cmso-service/src/main/docker/extra-files/startService.sh.bak deleted file mode 100644 index dbd111f..0000000 --- a/cmso-service/src/main/docker/extra-files/startService.sh.bak +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -echo "VM_ARGS="${VM_ARGS} - -java -Djava.security.egd=file:/dev/./urandom ${VM_ARGS} -Xms256m -Xmx1024m -jar ./app.jar diff --git a/cmso-ticketmgt/src/main/docker/extra-files/startService.sh b/cmso-ticketmgt/src/main/docker/extra-files/startService.sh index d040bd9..7cbed3d 100644 --- a/cmso-ticketmgt/src/main/docker/extra-files/startService.sh +++ b/cmso-ticketmgt/src/main/docker/extra-files/startService.sh @@ -1,10 +1,28 @@ #!/bin/sh AUTHENTICATION=${AUTHENTICATION:-proprietary-auth} -JAVA_TRUSTSTORE=${JAVA_TRUSTSTORE:-etc/config/truststoreONAPall.jks} VM_ARGS="${VM_ARGS} -Dserver.local.startpath=${RESOURCES_HOME}" -VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStore==${JAVA_TRUSTSTORE}" + +if [ "${JAVA_TRUSTSTORE}" != '' ] +then + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStore=${JAVA_TRUSTSTORE}" +fi + +if [ "${JAVA_TRUSTSTORE_PASSWORD}" != '' ] +then + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStorePassword=${JAVA_TRUSTSTORE_PASSWORD}" +fi + +if [ "${SSL_KEYSTORE}" != '' ] +then + VM_ARGS="${VM_ARGS} -Dserver.ssl.key-store=${SSL_KEYSTORE}" +fi + +if [ "${SSL_KEYSTORE_PASSWORD}" != '' ] +then + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.keyStorePassword=${SSL_KEYSTORE_PASSWORD}" +fi echo "VM_ARGS="${VM_ARGS} diff --git a/cmso-topology/src/main/docker/extra-files/startService.sh b/cmso-topology/src/main/docker/extra-files/startService.sh index 6efd912..7cbed3d 100644 --- a/cmso-topology/src/main/docker/extra-files/startService.sh +++ b/cmso-topology/src/main/docker/extra-files/startService.sh @@ -1,11 +1,28 @@ #!/bin/sh AUTHENTICATION=${AUTHENTICATION:-proprietary-auth} -JAVA_TRUSTSTORE=${JAVA_TRUSTSTORE:-etc/config/truststoreONAPall.jks} VM_ARGS="${VM_ARGS} -Dserver.local.startpath=${RESOURCES_HOME}" -VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStore==${JAVA_TRUSTSTORE}" +if [ "${JAVA_TRUSTSTORE}" != '' ] +then + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStore=${JAVA_TRUSTSTORE}" +fi + +if [ "${JAVA_TRUSTSTORE_PASSWORD}" != '' ] +then + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStorePassword=${JAVA_TRUSTSTORE_PASSWORD}" +fi + +if [ "${SSL_KEYSTORE}" != '' ] +then + VM_ARGS="${VM_ARGS} -Dserver.ssl.key-store=${SSL_KEYSTORE}" +fi + +if [ "${SSL_KEYSTORE_PASSWORD}" != '' ] +then + VM_ARGS="${VM_ARGS} -Djavax.net.ssl.keyStorePassword=${SSL_KEYSTORE_PASSWORD}" +fi echo "VM_ARGS="${VM_ARGS} |