From d3e1728b11f11d3979f04be1773e338416090d77 Mon Sep 17 00:00:00 2001 From: Michael Arrastia Date: Thu, 8 Nov 2018 16:57:56 +0000 Subject: Update FProxy to separate truststore and keystore * Create default truststore, fproxy_truststore. * Require TRUST_STORE_PASSWORD system parameter on application start. * Harden parameter checks in FProxyApplication PostConstruct. * Rationalise properties in RestTemplateConfig. * Update unit tests to handle trust store. * Correct spring dependency in pom. Change-Id: I0254e5d27ff76bbd7a44b961169d7fe47761d3f9 Issue-ID: AAF-614 Signed-off-by: Michael Arrastia --- .../java/org/onap/aaf/cadi/sidecar/fproxy/test/FProxyIT.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sidecar/fproxy/src/test/java/org/onap/aaf/cadi/sidecar/fproxy/test/FProxyIT.java') diff --git a/sidecar/fproxy/src/test/java/org/onap/aaf/cadi/sidecar/fproxy/test/FProxyIT.java b/sidecar/fproxy/src/test/java/org/onap/aaf/cadi/sidecar/fproxy/test/FProxyIT.java index 308eb26..dae0e55 100644 --- a/sidecar/fproxy/src/test/java/org/onap/aaf/cadi/sidecar/fproxy/test/FProxyIT.java +++ b/sidecar/fproxy/src/test/java/org/onap/aaf/cadi/sidecar/fproxy/test/FProxyIT.java @@ -20,23 +20,26 @@ package org.onap.aaf.cadi.sidecar.fproxy.test; import static org.assertj.core.api.Assertions.assertThat; - import org.eclipse.jetty.util.security.Password; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.aaf.cadi.sidecar.fproxy.service.ForwardingProxyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; +import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest +@TestPropertySource(properties = {"TRUST_STORE_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10", + "KEY_STORE_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10"}) public class FProxyIT { static { System.setProperty("server.ssl.key-store-password", Password.deobfuscate("OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10")); + System.setProperty("server.ssl.trust-store-password", + Password.deobfuscate("OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10")); } @Autowired -- cgit 1.2.3-korg