From 6fe240de452d6266aeeadc25cc992c37db5a2eeb Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Fri, 11 Apr 2025 10:42:45 -0500 Subject: [PATCH] remove whitespaces then check for empty string as password --- salt/kafka/etc/jaas.conf.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/kafka/etc/jaas.conf.jinja b/salt/kafka/etc/jaas.conf.jinja index effb88319..e12367cd9 100644 --- a/salt/kafka/etc/jaas.conf.jinja +++ b/salt/kafka/etc/jaas.conf.jinja @@ -3,7 +3,7 @@ {%- set valid_users = [] -%} {%- for item, user in KAFKA_EXTERNAL_USERS.items() -%} -{% if 'password' in user and user.password is not none and user.password != "" -%} +{% if 'password' in user and user.password is not none and user.password.strip() != "" -%} {% do valid_users.append('user_' ~ user.username ~ '="' ~ user.password ~ '"') -%} {% endif -%} {%- endfor -%}