summaryrefslogtreecommitdiffstats
path: root/policy-endpoints
diff options
context:
space:
mode:
Diffstat (limited to 'policy-endpoints')
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineDmaapTopicSink.java2
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineUebTopicSink.java3
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/impl/CambriaPublisherWrapper.java11
3 files changed, 11 insertions, 5 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineDmaapTopicSink.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineDmaapTopicSink.java
index 2ad8bb34..c630a165 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineDmaapTopicSink.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineDmaapTopicSink.java
@@ -104,7 +104,7 @@ public class InlineDmaapTopicSink extends InlineBusTopicSink implements DmaapTop
public void init() {
if (allNullOrEmpty(this.environment, this.aftEnvironment, this.latitude, this.longitude, this.partner)) {
this.publisher = new CambriaPublisherWrapper(this.servers, this.topic, this.apiKey, this.apiSecret,
- this.userName, this.password, this.useHttps);
+ this.userName, this.password, this.useHttps, this.allowSelfSignedCerts);
} else {
this.publisher = new DmaapDmePublisherWrapper(this.servers, this.topic, this.userName, this.password,
this.environment, this.aftEnvironment, this.partner, this.latitude, this.longitude,
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineUebTopicSink.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineUebTopicSink.java
index 24cf6073..34dd4e74 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineUebTopicSink.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineUebTopicSink.java
@@ -64,7 +64,8 @@ public class InlineUebTopicSink extends InlineBusTopicSink implements UebTopicSi
public void init() {
this.publisher =
- new CambriaPublisherWrapper(this.servers, this.topic, this.apiKey, this.apiSecret, this.useHttps);
+ new CambriaPublisherWrapper(this.servers, this.topic, this.apiKey, this.apiSecret,
+ null, null, this.useHttps, this.allowSelfSignedCerts);
logger.info("{}: UEB SINK created", this);
}
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/impl/CambriaPublisherWrapper.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/impl/CambriaPublisherWrapper.java
index ab5868ab..7902d4be 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/impl/CambriaPublisherWrapper.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/impl/CambriaPublisherWrapper.java
@@ -20,6 +20,7 @@
package org.onap.policy.common.endpoints.event.comm.bus.internal.impl;
+import com.att.nsa.apiClient.http.HttpClient.ConnectionType;
import com.att.nsa.cambria.client.CambriaBatchingPublisher;
import com.att.nsa.cambria.client.CambriaClientBuilders;
import com.att.nsa.cambria.client.CambriaClientBuilders.PublisherBuilder;
@@ -48,11 +49,11 @@ public class CambriaPublisherWrapper implements BusPublisher {
public CambriaPublisherWrapper(List<String> servers, String topic, String apiKey, String apiSecret,
boolean useHttps) {
- this(servers, topic, apiKey, apiSecret, null, null, useHttps);
+ this(servers, topic, apiKey, apiSecret, null, null, useHttps, false);
}
public CambriaPublisherWrapper(List<String> servers, String topic, String apiKey, String apiSecret, String username,
- String password, boolean useHttps) {
+ String password, boolean useHttps, boolean selfSignedCerts) {
PublisherBuilder builder = new CambriaClientBuilders.PublisherBuilder();
@@ -62,7 +63,11 @@ public class CambriaPublisherWrapper implements BusPublisher {
builder.withSocketTimeout(30000);
if (useHttps) {
- builder.usingHttps();
+ if (selfSignedCerts) {
+ builder.withConnectionType(ConnectionType.HTTPS_NO_VALIDATION);
+ } else {
+ builder.withConnectionType(ConnectionType.HTTPS);
+ }
}