[SDC CLIENT] Allow HTTP 63/126163/3
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Thu, 9 Dec 2021 08:08:08 +0000 (09:08 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Thu, 9 Dec 2021 21:26:49 +0000 (21:26 +0000)
By default, SDC client is using only https, which can be problematic
when used on top of service mesh for example.
Let's override isUseHttpsWithSDC in order to allow use of http thanks to
a configuration variable.

Issue-ID: OOM-2258
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: Ifb8cb7cbf2881d3f2b2d131f1b0a44db6da3200e

northbound/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java

index 4efc29b..82b86e2 100644 (file)
@@ -56,6 +56,7 @@ public class SdncUebConfiguration implements IConfiguration{
        private String sdncPasswd = null;
        private String asdcApiBaseUrl = null;
        private String asdcApiNamespace = null;
+       private String asdcUseHttps = null;
        private List<String> msgBusAddress = null;
 
        private SdncArtifactMap artifactMap = SdncArtifactMap.getInstance();
@@ -129,6 +130,8 @@ public class SdncUebConfiguration implements IConfiguration{
                environmentName = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.environment-name");
                password = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.password");
                user = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.user");
+               asdcUseHttps = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.use-https", "true");
+
 
                sdncUser = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.sdnc-user");
                sdncPasswd = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.sdnc-passwd");
@@ -309,6 +312,11 @@ public class SdncUebConfiguration implements IConfiguration{
                return false;
        }
 
+       @Override
+    public Boolean isUseHttpsWithSDC() {
+        return Boolean.parseBoolean(asdcUseHttps);
+    }
+
     @Override
     public List<String> getMsgBusAddress() {
         return msgBusAddress;