https certs with aaf+pdpd containers compatibility 47/61147/2
authorJorge Hernandez <jh1730@att.com>
Fri, 17 Aug 2018 21:40:58 +0000 (16:40 -0500)
committerJim Hahn <jrh3@att.com>
Mon, 20 Aug 2018 15:50:01 +0000 (11:50 -0400)
Updated license date (jrh3).

Change-Id: I1bc244da64f4a1e683f8c6a1be53157474f46ee9
Issue-ID: POLICY-1026
Signed-off-by: Jorge Hernandez <jh1730@att.com>
config/policy-engine.properties [new file with mode: 0644]
config/policy-keystore [new file with mode: 0644]
config/policy-truststore [new file with mode: 0644]
packages/base/src/files/etc/ssl/ca-aaf.crt [new file with mode: 0644]
packages/base/src/files/etc/ssl/policy-keystore
packages/base/src/files/etc/ssl/policy-truststore [new file with mode: 0644]
packages/docker/src/main/docker/do-start.sh
packages/docker/src/main/docker/docker-install.sh
packages/install/src/files/base.conf
policy-management/src/main/server/config/policy-engine.properties
policy-management/src/main/server/config/system.properties

diff --git a/config/policy-engine.properties b/config/policy-engine.properties
new file mode 100644 (file)
index 0000000..56c2a67
--- /dev/null
@@ -0,0 +1,38 @@
+###
+# ============LICENSE_START=======================================================
+# policy-management
+# ================================================================================
+# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+# Policy Engine Configuration
+
+# Configuration Channel Settings: PDPD_CONFIGURATION
+
+http.server.services=CONFIG,SECURED-CONFIG
+http.server.services.CONFIG.host=0.0.0.0
+http.server.services.CONFIG.port=9696
+http.server.services.CONFIG.restPackages=org.onap.policy.drools.server.restful
+http.server.services.CONFIG.managed=false
+http.server.services.CONFIG.swagger=true
+http.server.services.CONFIG.https=false
+
+http.server.services.SECURED-CONFIG.host=0.0.0.0
+http.server.services.SECURED-CONFIG.port=9697
+http.server.services.SECURED-CONFIG.restPackages=org.onap.policy.drools.server.restful
+http.server.services.SECURED-CONFIG.managed=false
+http.server.services.SECURED-CONFIG.swagger=true
+http.server.services.SECURED-CONFIG.https=true
diff --git a/config/policy-keystore b/config/policy-keystore
new file mode 100644 (file)
index 0000000..b92217c
Binary files /dev/null and b/config/policy-keystore differ
diff --git a/config/policy-truststore b/config/policy-truststore
new file mode 100644 (file)
index 0000000..8834ac2
Binary files /dev/null and b/config/policy-truststore differ
diff --git a/packages/base/src/files/etc/ssl/ca-aaf.crt b/packages/base/src/files/etc/ssl/ca-aaf.crt
new file mode 100644 (file)
index 0000000..e9a50d7
--- /dev/null
@@ -0,0 +1,31 @@
+-----BEGIN CERTIFICATE-----
+MIIFPjCCAyagAwIBAgIJAJ6u7cCnzrWdMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV
+BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA0MDUx
+NDE1MjhaFw0zODAzMzExNDE1MjhaMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQK
+DARPTkFQMQswCQYDVQQGEwJVUzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
+ggIBAMA5pkgRs7NhGG4ew5JouhyYakgYUyFaG121+/h8qbSdt0hVQv56+EA41Yq7
+XGie7RYDQK9NmAFF3gruE+6X7wvJiChp+Cyd7sFMnb65uWhxEdxWTM2BJFrgfzUn
+H8ZCxgaCo3XH4PzlKRy2LQQJEJECwl/RZmRCXijMt5e9h8XoZY/fKkKcZZUsWNCM
+pTo266wjvA9MXLmdgReRj0+vrCjrNqy+htwJDztoiHWiYPqT6o8EvGcgjNqjlZx7
+NUNf8MfLDByqKF6+wRbHv1GKjn3/Vijd45Fv8riyRYROiFanvbV6jIfBk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ABqfjK49o/tsAp+c5LoNlYllKhnetO3QAdraHwdmC36BhoghzR1jpX751A
+cZn2VH3Q4XKyp01cJNCJIrua+A+bx6zh3RyW6zIIkbRCbET+UD+4mr8WIcSE3mtR
+ZVlnhUDO4z9//WKMVzwS9Rh8/kuszrGFI1KQozXCHLrce3YP6RYZfOed79LXaRwX
+dYY=
+-----END CERTIFICATE-----
index c389096..b92217c 100644 (file)
Binary files a/packages/base/src/files/etc/ssl/policy-keystore and b/packages/base/src/files/etc/ssl/policy-keystore differ
diff --git a/packages/base/src/files/etc/ssl/policy-truststore b/packages/base/src/files/etc/ssl/policy-truststore
new file mode 100644 (file)
index 0000000..8834ac2
Binary files /dev/null and b/packages/base/src/files/etc/ssl/policy-truststore differ
index fa4cd6a..0a55069 100644 (file)
@@ -56,9 +56,14 @@ else
 
        . /opt/app/policy/etc/profile.d/env.sh
 
+       # override the policy keystore and truststore if present
+
        if [[ -f config/policy-keystore ]]; then
-           # install policy keystore if present
-           cp config/policy-keystore ${POLICY_HOME}/etc/ssl
+           cp -f config/policy-keystore ${POLICY_HOME}/etc/ssl
+       fi
+
+       if [[ -f config/policy-truststore ]]; then
+           cp -f config/policy-trustore ${POLICY_HOME}/etc/ssl
        fi
 
        if [[ -f config/drools-tweaks.sh ]] ; then
index c17cba2..9856020 100644 (file)
@@ -154,6 +154,7 @@ function configure_component() {
        SED_LINE+=" -e 's!\${{POLICY_USER}}!${POLICY_USER}!g' "
        SED_LINE+=" -e 's!\${{POLICY_GROUP}}!${POLICY_GROUP}!g' "
        SED_LINE+=" -e 's!\${{KEYSTORE_PASSWD}}!${KEYSTORE_PASSWD}!g' "
+       SED_LINE+=" -e 's!\${{TRUSTSTORE_PASSWD}}!${TRUSTSTORE_PASSWD}!g' "
        SED_LINE+=" -e 's!\${{JAVA_HOME}}!${JAVA_HOME}!g' "
                
        while read line || [ -n "${line}" ]; do
@@ -245,11 +246,17 @@ function configure_keystore() {
                set -x
        fi
 
-    local DEFAULT_KEYSTORE_PASSWORD="Pol1cy_0nap"
+    local DEFAULT_TRUSTSTORE_PASSWORD='Pol1cy_0nap'
+    local DEFAULT_KEYSTORE_PASSWORD='Pol1cy_0nap'
+
+       if [[ -n ${TRUSTSTORE_PASSWD} ]]; then
+           keytool -storepasswd -storepass "${DEFAULT_TRUSTSTORE_PASSWORD}" -keystore "${POLICY_HOME}/etc/ssl/policy-truststore" -new "${TRUSTSTORE_PASSWD}"
+           keytool -list -keystore "${POLICY_HOME}/etc/ssl/policy-truststore" -storepass "${TRUSTSTORE_PASSWD}"
+       fi
 
        if [[ -n ${KEYSTORE_PASSWD} ]]; then
-           keytool -storepasswd -storepass ${DEFAULT_KEYSTORE_PASSWORD} -keystore ${POLICY_HOME}/etc/ssl/policy-keystore -new ${KEYSTORE_PASSWD}
-           keytool -list -keystore ${POLICY_HOME}/etc/ssl/policy-keystore -storepass ${KEYSTORE_PASSWD}
+           keytool -storepasswd -storepass "${DEFAULT_KEYSTORE_PASSWORD}" -keystore "${POLICY_HOME}/etc/ssl/policy-keystore" -new "${KEYSTORE_PASSWD}"
+           keytool -list -keystore "${POLICY_HOME}/etc/ssl/policy-keystore" -storepass "${KEYSTORE_PASSWD}"
        fi
 }
 
index f1a37d0..0c44093 100644 (file)
@@ -24,6 +24,8 @@ POLICY_HOME=/opt/app/policy
 POLICY_LOGS=/opt/app/policy/logs
 JAVA_HOME=/opt/jdk1.8.0_77
 M2_HOME=/opt/app/policy/3rdparty/apache-maven-3.3.1
+KEYSTORE_PASSWD=Pol1cy_0nap
+TRUSTSTORE_PASSWD=Pol1cy_0nap
 
 # Telemetry credentials
 
index 70a5dcc..c89b95b 100644 (file)
@@ -2,7 +2,7 @@
 # ============LICENSE_START=======================================================
 # policy-management
 # ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -37,7 +37,11 @@ ueb.sink.topics.${{PDPD_CONFIGURATION_TOPIC}}.apiSecret=${{PDPD_CONFIGURATION_AP
 ueb.sink.topics.${{PDPD_CONFIGURATION_TOPIC}}.partitionKey=${{PDPD_CONFIGURATION_PARTITION_KEY}}
 ueb.sink.topics.${{PDPD_CONFIGURATION_TOPIC}}.managed=false
 
-http.server.services=CONFIG
+# temporary configuration to support an http and https server,
+# to support the incremental phase out of http.
+
+http.server.services=CONFIG,SECURED-CONFIG
+
 http.server.services.CONFIG.host=${{ENGINE_MANAGEMENT_HOST}}
 http.server.services.CONFIG.port=${{ENGINE_MANAGEMENT_PORT}}
 http.server.services.CONFIG.userName=${{ENGINE_MANAGEMENT_USER}}
@@ -45,3 +49,12 @@ http.server.services.CONFIG.password=${{ENGINE_MANAGEMENT_PASSWORD}}
 http.server.services.CONFIG.restPackages=org.onap.policy.drools.server.restful
 http.server.services.CONFIG.managed=false
 http.server.services.CONFIG.swagger=true
+
+http.server.services.SECURED-CONFIG.host=${{ENGINE_MANAGEMENT_HOST}}
+http.server.services.SECURED-CONFIG.port=9697
+http.server.services.SECURED-CONFIG.userName=${{ENGINE_MANAGEMENT_USER}}
+http.server.services.SECURED-CONFIG.password=${{ENGINE_MANAGEMENT_PASSWORD}}
+http.server.services.SECURED-CONFIG.restPackages=org.onap.policy.drools.server.restful
+http.server.services.SECURED-CONFIG.managed=false
+http.server.services.SECURED-CONFIG.swagger=true
+http.server.services.SECURED-CONFIG.https=true
index 7f92c87..5c024e1 100644 (file)
@@ -1,8 +1,8 @@
 ###
 # ============LICENSE_START=======================================================
-# policy-management
+# ONAP
 # ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -28,8 +28,11 @@ com.sun.management.jmxremote.ssl=false
 
 # certs
 
-javax.net.ssl.trustStore=${{POLICY_HOME}}/etc/ssl/policy-keystore
-javax.net.ssl.trustStorePassword=${{KEYSTORE_PASSWD}}
+javax.net.ssl.trustStore=${{POLICY_HOME}}/etc/ssl/policy-truststore
+javax.net.ssl.trustStorePassword=${{TRUSTSTORE_PASSWD}}
+
+javax.net.ssl.keyStore=${{POLICY_HOME}}/etc/ssl/policy-keystore
+javax.net.ssl.keyStorePassword=${{KEYSTORE_PASSWD}}
 
 # standard logging