From: Lott, Christopher (cl778h) Date: Mon, 21 Oct 2019 18:18:40 +0000 (-0400) Subject: Make constructor robust to missing caasingress.insecure property X-Git-Tag: R2~4 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F1188%2F1;p=portal%2Fric-dashboard.git Make constructor robust to missing caasingress.insecure property Change-Id: I8da48188f5a0b0f8695f150f2f769fd4f94354df Signed-off-by: Lott, Christopher (cl778h) --- diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 42d6364d..3f9f86e8 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -31,6 +31,7 @@ Version 1.2.4, 21 Oct 2019 * Set global style for page titles * Align page titles to top left,decrease font size * Update EPSDK-FW to version 2.6 +* Make constructor robust to missing caasingress.insecure property Version 1.2.3, 4 Oct 2019 ------------------------- diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/CaasIngressConfiguration.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/CaasIngressConfiguration.java index 397a5dc8..21dd91be 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/CaasIngressConfiguration.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/CaasIngressConfiguration.java @@ -50,20 +50,21 @@ public class CaasIngressConfiguration { @Autowired public CaasIngressConfiguration( // - @Value("${caasingress.insecure}") final Boolean insecureFlag, // @Value("${caasingress.aux.url.prefix}") final String auxUrlPrefix, // @Value("${caasingress.aux.url.suffix}") final String auxUrlSuffix, // @Value("${caasingress.plt.url.prefix}") final String pltUrlPrefix, - @Value("${caasingress.plt.url.suffix}") final String pltUrlSuffix) + @Value("${caasingress.plt.url.suffix}") final String pltUrlSuffix, + @Value("${caasingress.insecure}") final Boolean insecureFlag) // throws KeyManagementException, NoSuchAlgorithmException { logger.debug("ctor caasingress aux prefix '{}' suffix '{}'", auxUrlPrefix, auxUrlSuffix); logger.debug("ctor caasingress plt prefix '{}' suffix '{}'", pltUrlPrefix, pltUrlSuffix); + logger.debug("ctor caasingress insecure flag {}", insecureFlag); caasIngressAuxUrl = new DefaultUriBuilderFactory(auxUrlPrefix.trim()).builder().path(auxUrlSuffix.trim()) .build().normalize().toString(); caasIngressPltUrl = new DefaultUriBuilderFactory(pltUrlPrefix.trim()).builder().path(pltUrlSuffix.trim()) .build().normalize().toString(); logger.info("Configuring CAAS-Ingress URLs: aux {}, plt {}", caasIngressAuxUrl, caasIngressPltUrl); - if (insecureFlag) { + if (insecureFlag != null && insecureFlag) { logger.warn("ctor: insecure flag set, disabling SSL checks"); HttpsURLConnectionUtils.turnOffSslChecking(); }