From a05ed3f03f382700d84681a83e04a87912253385 Mon Sep 17 00:00:00 2001 From: Xue He Yan Date: Sun, 1 Dec 2024 20:43:23 +0800 Subject: [PATCH] Fix SCRAM-SHA-256 support in kafka_bridge_config_generator.sh (#948) update for sasl.mechanism generation with auth scram-sha-256 Signed-off-by: Xue He Yan --- bin/docker/kafka_bridge_config_generator.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/docker/kafka_bridge_config_generator.sh b/bin/docker/kafka_bridge_config_generator.sh index 2492e66d..0ee64e42 100755 --- a/bin/docker/kafka_bridge_config_generator.sh +++ b/bin/docker/kafka_bridge_config_generator.sh @@ -47,6 +47,10 @@ if [ -n "$KAFKA_BRIDGE_SASL_MECHANISM" ]; then PASSWORD=$(cat /opt/strimzi/bridge-password/$KAFKA_BRIDGE_SASL_PASSWORD_FILE) SASL_MECHANISM="PLAIN" JAAS_CONFIG="org.apache.kafka.common.security.plain.PlainLoginModule required username=\"${KAFKA_BRIDGE_SASL_USERNAME}\" password=\"${PASSWORD}\";" + elif [ "x$KAFKA_BRIDGE_SASL_MECHANISM" = "xscram-sha-256" ]; then + PASSWORD=$(cat /opt/strimzi/bridge-password/$KAFKA_BRIDGE_SASL_PASSWORD_FILE) + SASL_MECHANISM="SCRAM-SHA-256" + JAAS_CONFIG="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"${KAFKA_BRIDGE_SASL_USERNAME}\" password=\"${PASSWORD}\";" elif [ "x$KAFKA_BRIDGE_SASL_MECHANISM" = "xscram-sha-512" ]; then PASSWORD=$(cat /opt/strimzi/bridge-password/$KAFKA_BRIDGE_SASL_PASSWORD_FILE) SASL_MECHANISM="SCRAM-SHA-512" @@ -173,4 +177,4 @@ EOF cat <