From 0bcfde8903ba3f1fb99fcab3bf39f7f4e6ccbe1e Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Tue, 21 Apr 2020 08:37:07 +0200 Subject: [PATCH] Added support for https The backend listens to port 8434 for https. Port 8080 is still open for http In this commit, the backend uses http://policy-agent-container:8081 towards the policy agent. Using https://policy-agent-container:8433 is tested. Change-Id: I2c09d888a55ca156c33b12a83f27b7131478caf8 Issue-ID: NONRTRIC-195 Signed-off-by: PatrikBuhr --- webapp-backend/pom.xml | 19 +- .../controlpanel/ControlPanelApplication.java | 3 +- .../config/TomcatWebServerConfiguration.java | 46 +++++ .../policyagentapi/PolicyAgentApiImpl.java | 103 ++++------ .../controlpanel/util/AsyncRestClient.java | 174 ++++++++++++++++ .../src/main/resources/application.properties | 9 +- webapp-backend/src/main/resources/keystore.jks | Bin 0 -> 2647 bytes .../controller/AbstractControllerTest.java | 29 +-- .../controller/PortalRestCentralServiceTest.java | 75 ++----- .../policyagentapi/PolicyAgentApiImplTest.java | 220 +++++++++------------ .../controlpanel/util/AsyncRestClientTest.java | 122 ++++++++++++ 11 files changed, 515 insertions(+), 285 deletions(-) create mode 100644 webapp-backend/src/main/java/org/oransc/portal/nonrtric/controlpanel/config/TomcatWebServerConfiguration.java create mode 100644 webapp-backend/src/main/java/org/oransc/portal/nonrtric/controlpanel/util/AsyncRestClient.java create mode 100644 webapp-backend/src/main/resources/keystore.jks create mode 100644 webapp-backend/src/test/java/org/oransc/portal/nonrtric/controlpanel/util/AsyncRestClientTest.java diff --git a/webapp-backend/pom.xml b/webapp-backend/pom.xml index be9a13e..8b6599d 100644 --- a/webapp-backend/pom.xml +++ b/webapp-backend/pom.xml @@ -1,8 +1,5 @@ -