From e740b7c33217f8564849c523a3607c53bab6e3a8 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 14 Mar 2023 17:20:20 +0000 Subject: Update for SNI Chcecking SNI checking is now supported in Jersey Issue-ID: POLICY-4474 Change-Id: I6afc2d577493485f151887180ef152303c456f3a Signed-off-by: liamfallon --- .../plugins/event/carrier/restrequestor/RestRequestorTest.java | 4 ++-- .../event/carrier/restserver/ApexRestServerConsumer.java | 10 ++++++++-- .../restserver/RestServerCarrierTechnologyParameters.java | 3 ++- 3 files changed, 12 insertions(+), 5 deletions(-) (limited to 'plugins/plugins-event/plugins-event-carrier') diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorTest.java index 40e900413..a7795a1b1 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorTest.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorTest.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019-2020 Nordix Foundation. + * Modifications Copyright (C) 2019-2020,2023 Nordix Foundation. * Modifications Copyright (C) 2021 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -68,7 +68,7 @@ public class RestRequestorTest { */ @BeforeClass public static void setUp() throws Exception { - server = HttpServletServerFactoryInstance.getServerFactory().build(null, false, null, PORT, + server = HttpServletServerFactoryInstance.getServerFactory().build(null, false, null, PORT, false, "/TestRESTRequestor", false, false); server.addServletClass(null, SupportRestRequestorEndpoint.class.getName()); diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java index ad3d77bf1..8ed2504d9 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019-2020 Nordix Foundation. + * Modifications Copyright (C) 2019-2020,2023 Nordix Foundation. * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -133,7 +133,13 @@ public class ApexRestServerConsumer extends ApexPluginsEventConsumer { restConsumerProperties.getName(), restConsumerProperties.isHttps(), restConsumerProperties.getHost(), - restConsumerProperties.getPort(), null, true, false); + restConsumerProperties.getPort(), + restConsumerProperties.isSniHostCheck(), + null, + true, + false + ); + if (restConsumerProperties.isAaf()) { server.addFilterClass(null, ApexRestServerAafFilter.class.getName()); } diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java index bf24d2260..a77ec17a1 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019,2023 Nordix Foundation. * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -72,6 +72,7 @@ public class RestServerCarrierTechnologyParameters extends CarrierTechnologyPara private String userName; private String password; private boolean https; + private boolean sniHostCheck; private boolean aaf; // @formatter:on -- cgit 1.2.3-korg