From 3bc3a5c724e9a6ea8a112dca72a9a3128eddca19 Mon Sep 17 00:00:00 2001 From: efiacor Date: Mon, 8 May 2023 16:58:03 +0100 Subject: [SDC-BE] Update kafka ssl config Signed-off-by: efiacor Change-Id: Id5c7aa72a1714fca9cfbdf4462a9faf9fd9bff88 Issue-ID: SDC-4476 --- .../openecomp/sdc/be/components/kafka/KafkaCommonConfig.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'catalog-be/src') 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"); } -- cgit 1.2.3-korg