aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/kafka/KafkaCommonConfig.java10
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/be/config/DistributionEngineConfiguration.java5
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java2
3 files changed, 13 insertions, 4 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/kafka/KafkaCommonConfig.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/kafka/KafkaCommonConfig.java
index 06c36e4add..bf65c52874 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/kafka/KafkaCommonConfig.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/kafka/KafkaCommonConfig.java
@@ -68,9 +68,13 @@ public class KafkaCommonConfig {
props.put(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, deConfiguration.getKafkaBootStrapServers());
if("SSL".equals(securityProtocolConfig)) {
- log.error("Kafka over SSL has not been implemented yet");
- }
- else{
+ props.put(SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG, deConfiguration.getSSLConfig().getKeystorePath());
+ props.put(SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG, deConfiguration.getSSLConfig().getKeystorePass());
+ props.put(SslConfigs.SSL_KEY_PASSWORD_CONFIG, deConfiguration.getSSLConfig().getKeyManagerPassword());
+ props.put(SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG, "");
+ props.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, deConfiguration.getSSLConfig().getTruststorePath());
+ props.put(SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG, deConfiguration.getSSLConfig().getTruststorePass());
+ } else {
props.put(SaslConfigs.SASL_JAAS_CONFIG, getKafkaSaslJaasConfig());
props.put(SaslConfigs.SASL_MECHANISM, "SCRAM-SHA-512");
}
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/config/DistributionEngineConfiguration.java b/common-app-api/src/main/java/org/openecomp/sdc/be/config/DistributionEngineConfiguration.java
index 205588adab..b56708efb9 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/be/config/DistributionEngineConfiguration.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/be/config/DistributionEngineConfiguration.java
@@ -24,6 +24,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import org.onap.config.api.JettySSLUtils;
import org.openecomp.sdc.common.api.BasicConfiguration;
import org.openecomp.sdc.common.http.config.ExternalServiceConfig;
@@ -459,4 +460,8 @@ public class DistributionEngineConfiguration extends BasicConfiguration {
return "ArtifactTypesConfig [info=" + info + ", lifecycle=" + lifecycle + "]";
}
}
+
+ public JettySSLUtils.JettySslConfig getSSLConfig() {
+ return JettySSLUtils.getSSLConfig();
+ }
}
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java
index cd6705dfdf..8a33c3eb40 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/be/config/DistributionEngineConfigurationTest.java
@@ -41,7 +41,7 @@ public class DistributionEngineConfigurationTest {
public void validateBean() {
assertThat(DistributionEngineConfiguration.class, allOf(
hasValidBeanConstructor(),
- hasValidGettersAndSettersExcluding("environments")
+ hasValidGettersAndSettersExcluding("environments", "SSLConfig")
));
}