Change the http REST API to https. 41/35141/3
authorLiZi <li.zi30@zte.com.cn>
Mon, 12 Mar 2018 08:40:46 +0000 (04:40 -0400)
committerLiZi <li.zi30@zte.com.cn>
Mon, 12 Mar 2018 09:24:59 +0000 (05:24 -0400)
Change-Id: I25365752a881bdda65130ddaabec6305ee31705d
Issue-ID: AAI-851
Signed-off-by: LiZi <li.zi30@zte.com.cn>
esr-mgr/src/main/java/org/onap/aai/esr/externalservice/msb/MsbHelper.java
standalone/src/main/assembly/bin/run.sh
standalone/src/main/assembly/conf/aaiesr.keystore [new file with mode: 0644]
standalone/src/main/assembly/conf/extsys.yml

index 41c9d91..77cbba6 100644 (file)
@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright 2017 ZTE Corporation.
+ * Copyright 2017-2018 ZTE Corporation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -50,6 +50,7 @@ public class MsbHelper {
         msinfo.setUrl("/api/aai-esr-server/v1");
         msinfo.setProtocol("REST");
         msinfo.setVisualRange("0|1");
         msinfo.setUrl("/api/aai-esr-server/v1");
         msinfo.setProtocol("REST");
         msinfo.setVisualRange("0|1");
+        msinfo.setEnable_ssl(true);
 
         Set<Node> nodes = new HashSet<>();
         Node node1 = new Node();
 
         Set<Node> nodes = new HashSet<>();
         Node node1 = new Node();
index 9c25410..7d93765 100644 (file)
@@ -32,5 +32,12 @@ echo @JAVA_OPTS@ $JAVA_OPTS
 class_path="$main_path/:$main_path/esr-service.jar"
 echo @class_path@ $class_path
 
 class_path="$main_path/:$main_path/esr-service.jar"
 echo @class_path@ $class_path
 
+KEY_PATH="$main_path/conf/aaiesr.keystore"
+KEY_PASSWORD="aaiesr"
+
+#HTTPS Configurations
+sed -i "s|keyStorePath:.*|keyStorePath: $KEY_PATH|" "$main_path/conf/extsys.yml"
+sed -i "s|keyStorePassword:.*|keyStorePassword: $KEY_PASSWORD|" "$main_path/conf/extsys.yml"
+
 "$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.aai.esr.ExtsysApp server "$main_path/conf/extsys.yml"
 
 "$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.aai.esr.ExtsysApp server "$main_path/conf/extsys.yml"
 
diff --git a/standalone/src/main/assembly/conf/aaiesr.keystore b/standalone/src/main/assembly/conf/aaiesr.keystore
new file mode 100644 (file)
index 0000000..bf5d34f
Binary files /dev/null and b/standalone/src/main/assembly/conf/aaiesr.keystore differ
index 41faea9..44b9b98 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# Copyright 2016-2017 ZTE Corporation.
+# Copyright 2016-2018 ZTE Corporation.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -36,8 +36,12 @@ server:
   applicationContextPath: /
   adminContextPath: /admin
   connector:
   applicationContextPath: /
   adminContextPath: /admin
   connector:
-    type: http
+    type: https
     port: 9518
     port: 9518
+    keyStorePath: /home/esr/conf/aaiesr.keystore
+    keyStorePassword: aaiesr
+    validateCerts: false
+    validatePeers: false
 
 # Logging settings.
 logging:
 
 # Logging settings.
 logging: