From 8f2110fa99cda5a17fe62a3916fba2c3c5925c48 Mon Sep 17 00:00:00 2001 From: LiZi Date: Mon, 12 Mar 2018 04:40:46 -0400 Subject: [PATCH] Change the http REST API to https. Change-Id: I25365752a881bdda65130ddaabec6305ee31705d Issue-ID: AAI-851 Signed-off-by: LiZi --- .../org/onap/aai/esr/externalservice/msb/MsbHelper.java | 3 ++- standalone/src/main/assembly/bin/run.sh | 7 +++++++ standalone/src/main/assembly/conf/aaiesr.keystore | Bin 0 -> 1386 bytes standalone/src/main/assembly/conf/extsys.yml | 8 ++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 standalone/src/main/assembly/conf/aaiesr.keystore diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/msb/MsbHelper.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/msb/MsbHelper.java index 41c9d91..77cbba6 100644 --- a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/msb/MsbHelper.java +++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/msb/MsbHelper.java @@ -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. @@ -50,6 +50,7 @@ public class MsbHelper { msinfo.setUrl("/api/aai-esr-server/v1"); msinfo.setProtocol("REST"); msinfo.setVisualRange("0|1"); + msinfo.setEnable_ssl(true); Set nodes = new HashSet<>(); Node node1 = new Node(); diff --git a/standalone/src/main/assembly/bin/run.sh b/standalone/src/main/assembly/bin/run.sh index 9c25410..7d93765 100644 --- a/standalone/src/main/assembly/bin/run.sh +++ b/standalone/src/main/assembly/bin/run.sh @@ -32,5 +32,12 @@ echo @JAVA_OPTS@ $JAVA_OPTS 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" diff --git a/standalone/src/main/assembly/conf/aaiesr.keystore b/standalone/src/main/assembly/conf/aaiesr.keystore new file mode 100644 index 0000000000000000000000000000000000000000..bf5d34f7b6737b7bce262cd26d8d11aa5326135c GIT binary patch literal 1386 zcmezO_TO6u1_mY|W&~rl#Kg?h;vyh7NzyKm4=ANvarxQ`@ysn)$_9^4%3V);2+pD548rq$`!Q}Ha-UV%Dy;*aQ@XEhQKe~`< z$E;E}iKWh(pPyyBHnG|koKQI@-WC43{%)?Vno+_$_Z`CD_rA`LTBGQbVIO+a%xlWT zf|$tu{y&~+wWWurbp<4;J&vBUV@25w=VN6CH&u&*L>~B;^*FH@efWJjYN_C^^Dn2X zHlGMw9KEA*{x#S8k!hkj-v7Orm6>mAJD+1bvA#{`Le%yJ$~XFDn3}H1-}tJUV)y*} zy){Y6k5un@E`Dh^Wm&~b(UnCFatw3-n`DK}`EjVh_DjmC-eiex;Uu@9#0c&o4H<{=1&zY!t)#X&tRE^_e2$Dw`XftiDDU z-UtX!?2wzQBk25Qnds+9J7aggoRuYXO?dm6=NnS*>qZ`CTd`~Z$Jp?vxz;@U-QBd; zr2YISd0kp6=IE<%nMASjXuhpV9d(zUUWiLrCm%fH^bq3@=4W_;y+ z92NLY>RGZudBnx_!E;^uPd)kkc~;f8(j?n$k^Yard)Fwm`O2m0hCR|eIrl4@;Ns)+ z74MyQ_Nd7VZ&Uvr8(Q~aX0MNia)h|ck4vJHcYDi;>;5kEu8Lk-d#fVs#=Fe_JlEMm zoYQ;kUe8$MtX-b)CD86up22}V|Nd=QHt*N$St5JdF1-EwXlvJd@uh2BtoA%toUFZN z-p5N9?6ztJw_RxcY*{o_?&0tJc15RYpO^E*)^slI{$Ca(`?PzW{dEQR-28;hxqIBp z3=5`9u&JN6u7@84a0vzZ9?C1hq z=mOm60?aT0137VCLkk0ALn8wV15;!3C@|N|&;ZJ%n>!lkBZmMmUo$uMG8i;=GBq|b zwC`%XG;jM3(^Wo=nrkOy$}xyG-RD&O zUM41!@88oFchV^}i0@LH{NtO(7LIe8->W<2C~2yk>z6%V-X41 zws4hp+yS2Jd^+dkTQg4X(D3d+_5m;snSoA^Ec{Omx< zOP*k<-fPLM6>l`dvsq8ih_Y9c_v=BY9!wDy=MMk>g)@KEUPHrXg6`qyV`R;`DM#b&oDKjc;p9%2)Hwsw!H88A5IXI(b%Y25a1!aq79Jr%%$0gbH f?^hRA_XH+;Z(hB$!)a%ye>}@_sj1+r+>1~EX!tHz literal 0 HcmV?d00001 diff --git a/standalone/src/main/assembly/conf/extsys.yml b/standalone/src/main/assembly/conf/extsys.yml index 41faea9..44b9b98 100644 --- a/standalone/src/main/assembly/conf/extsys.yml +++ b/standalone/src/main/assembly/conf/extsys.yml @@ -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. @@ -36,8 +36,12 @@ server: applicationContextPath: / adminContextPath: /admin connector: - type: http + type: https port: 9518 + keyStorePath: /home/esr/conf/aaiesr.keystore + keyStorePassword: aaiesr + validateCerts: false + validatePeers: false # Logging settings. logging: -- 2.16.6