From: David Stilwell Date: Wed, 10 Apr 2019 17:30:26 +0000 (+0000) Subject: Merge "Add https support for SDNC container" X-Git-Tag: 1.5.1~45 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=a33c6ad87b758ad4d4700b4b394b3c756db58966;hp=9e1fedca46f1df1059a2b7bb927d94b911f27c68;p=sdnc%2Foam.git Merge "Add https support for SDNC container" Former-commit-id: 23230f76a423b77c0088a86872a328efcd49785c --- diff --git a/installation/sdnc/pom.xml b/installation/sdnc/pom.xml index 422360be..b051d560 100644 --- a/installation/sdnc/pom.xml +++ b/installation/sdnc/pom.xml @@ -23,6 +23,9 @@ ${maven.build.timestamp} 1.5.1-SNAPSHOT 0.4.2-STAGING-latest + org.onap.sdnc.p12 + + 8443 ${https_proxy} deploy true diff --git a/installation/sdnc/src/main/docker/Dockerfile b/installation/sdnc/src/main/docker/Dockerfile index 315d023a..d4892260 100755 --- a/installation/sdnc/src/main/docker/Dockerfile +++ b/installation/sdnc/src/main/docker/Dockerfile @@ -11,6 +11,9 @@ ENV SDNC_STORE_DIR /opt/onap/sdnc/data/stores ENV SSL_CERTS_DIR /etc/ssl/certs ENV JAVA_SECURITY_DIR $SSL_CERTS_DIR/java ENV SDNC_NORTHBOUND_REPO mvn:org.onap.sdnc.northbound/sdnc-northbound-all/${sdnc.northbound.version}/xml/features +ENV SDNC_KEYSTORE ${sdnc.keystore} +ENV SDNC_KEYPASS ${sdnc.keypass} +ENV SDNC_SECUREPORT ${sdnc.secureport} USER root @@ -39,6 +42,16 @@ COPY truststoreONAPall.jks $SDNC_STORE_DIR RUN keytool -importkeystore -srckeystore $JAVA_SECURITY_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore $JAVA_SECURITY_DIR/cacerts -deststorepass changeit +# Secure with TLS +RUN echo org.osgi.service.http.secure.enabled=true >> $ODL_HOME/etc/custom.properties +RUN echo org.osgi.service.http.secure.port=$SDNC_SECUREPORT >> $ODL_HOME/etc/custom.properties +RUN echo org.ops4j.pax.web.ssl.keystore=$SDNC_STORE_DIR/$SDNC_KEYSTORE >> $ODL_HOME/etc/custom.properties +RUN echo org.ops4j.pax.web.ssl.password=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties +RUN echo org.ops4j.pax.web.ssl.keypassword=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties + + + + RUN chown -R odl /opt USER odl diff --git a/installation/sdnc/src/main/docker/standalone.Dockerfile b/installation/sdnc/src/main/docker/standalone.Dockerfile index f271ca01..b062361a 100755 --- a/installation/sdnc/src/main/docker/standalone.Dockerfile +++ b/installation/sdnc/src/main/docker/standalone.Dockerfile @@ -11,6 +11,9 @@ ENV SDNC_STORE_DIR /opt/onap/sdnc/data/stores ENV SSL_CERTS_DIR /etc/ssl/certs ENV JAVA_SECURITY_DIR $SSL_CERTS_DIR/java ENV SDNC_NORTHBOUND_REPO mvn:org.onap.sdnc.northbound/sdnc-northbound-all/${sdnc.northbound.version}/xml/features +ENV SDNC_KEYSTORE ${sdnc.keystore} +ENV SDNC_KEYPASS ${sdnc.keypass} +ENV SDNC_SECUREPORT ${sdnc.secureport} USER root @@ -35,6 +38,14 @@ COPY truststoreONAPall.jks $SDNC_STORE_DIR RUN keytool -importkeystore -srckeystore $JAVA_SECURITY_DIR/truststoreONAPall.jks -srcstorepass changeit -destkeystore $JAVA_SECURITY_DIR/cacerts -deststorepass changeit +# Secure with TLS +RUN echo org.osgi.service.http.secure.enabled=true >> $ODL_HOME/etc/custom.properties +RUN echo org.osgi.service.http.secure.port=$SDNC_SECUREPORT >> $ODL_HOME/etc/custom.properties +RUN echo org.ops4j.pax.web.ssl.keystore=$SDNC_STORE_DIR/$SDNC_KEYSTORE >> $ODL_HOME/etc/custom.properties +RUN echo org.ops4j.pax.web.ssl.password=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties +RUN echo org.ops4j.pax.web.ssl.keypassword=$SDNC_KEYPASS >> $ODL_HOME/etc/custom.properties + + RUN chown -R odl /opt USER odl diff --git a/installation/src/main/stores/keystore.sdnc.p12 b/installation/src/main/stores/keystore.sdnc.p12 new file mode 100644 index 00000000..8fb4e2cd Binary files /dev/null and b/installation/src/main/stores/keystore.sdnc.p12 differ