Skip to content

Commit

Permalink
Fix SCRAM-SHA-256 support in kafka_bridge_config_generator.sh (#948)
Browse files Browse the repository at this point in the history
update for sasl.mechanism generation with auth scram-sha-256

Signed-off-by: Xue He Yan <[email protected]>
  • Loading branch information
yanxuehe authored Dec 1, 2024
1 parent ae1faa1 commit a05ed3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/docker/kafka_bridge_config_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -173,4 +177,4 @@ EOF

cat <<EOF
$PROPERTIES
EOF
EOF

0 comments on commit a05ed3f

Please sign in to comment.