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,
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);
}
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;
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();
builder.withSocketTimeout(30000);
if (useHttps) {
- builder.usingHttps();
+ if (selfSignedCerts) {
+ builder.withConnectionType(ConnectionType.HTTPS_NO_VALIDATION);
+ } else {
+ builder.withConnectionType(ConnectionType.HTTPS);
+ }
}