Skip to content

Commit

Permalink
feat(kafka-setup): add options for sasl_plaintext (datahub-project#5385)
Browse files Browse the repository at this point in the history
allow sasl_plaintext options using environment variables
  • Loading branch information
abiwill authored and PiotrSierkin-Ki committed Jul 26, 2022
1 parent 14f6b48 commit 3cc9313
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker/kafka-setup/kafka-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ CONNECTION_PROPERTIES_PATH=/tmp/connection.properties
echo "bootstrap.servers=$KAFKA_BOOTSTRAP_SERVER" > $CONNECTION_PROPERTIES_PATH
echo "security.protocol=$KAFKA_PROPERTIES_SECURITY_PROTOCOL" >> $CONNECTION_PROPERTIES_PATH

## Add support for SASL_PLAINTEXT
if [[ $KAFKA_PROPERTIES_SECURITY_PROTOCOL == "SASL_PLAINTEXT" ]]; then
echo "sasl.jaas.config=$KAFKA_PROPERTIES_SASL_JAAS_CONFIG" >> $CONNECTION_PROPERTIES_PATH
echo "sasl.kerberos.service.name=$KAFKA_PROPERTIES_SASL_KERBEROS_SERVICE_NAME" >> $CONNECTION_PROPERTIES_PATH
fi

if [[ $KAFKA_PROPERTIES_SECURITY_PROTOCOL == "SSL" ]]; then
if [[ -n $KAFKA_PROPERTIES_SSL_KEYSTORE_LOCATION ]]; then
echo "ssl.keystore.location=$KAFKA_PROPERTIES_SSL_KEYSTORE_LOCATION" >> $CONNECTION_PROPERTIES_PATH
Expand Down

0 comments on commit 3cc9313

Please sign in to comment.