-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check KAFKA_LISTENER_SECURITY_PROTOCOL_MAP for SSL #352
base: master
Are you sure you want to change the base?
Conversation
The current approach adds SSL configuration if the advertised listeners includes the string `SSL://`. But in a configuration such as ``` KAFKA_ADVERTISED_LISTENERS: CLIENTS://mykafka.host:9093 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CLIENTS:SSL ``` The ssl configuration is not added, even though the protocol `CLIENTS` does map to `SSL` Tweaking this configuration script so that it looks in both `KAFKA_ADVERTISED_LISTENERS` and `KAFKA_LISTENER_SECURITY_PROTOCOL_MAP` for usage of SSL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks for the fix.
@@ -84,7 +84,9 @@ then | |||
fi | |||
|
|||
# Set if ADVERTISED_LISTENERS has SSL:// or SASL_SSL:// endpoints. | |||
if [[ -n "${KAFKA_ADVERTISED_LISTENERS-}" ]] && [[ $KAFKA_ADVERTISED_LISTENERS == *"SSL://"* ]] | |||
# Or if the LISTENER_SECURITY_PROTOCOL_MAP includes SSL | |||
if ([[ -n "${KAFKA_ADVERTISED_LISTENERS-}" ]] && [[ $KAFKA_ADVERTISED_LISTENERS == *"SSL://"* ]]) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work with lower case, for example Sasl_ssl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Is that something that people would do? I don't think the current code covers that case either.
The current approach adds SSL configuration if the advertised listeners includes the string
SSL://
.But in a configuration such as
The ssl configuration is not added, even though the protocol
CLIENTS
does map toSSL
Tweaking this configuration script so that it looks in both
KAFKA_ADVERTISED_LISTENERS
andKAFKA_LISTENER_SECURITY_PROTOCOL_MAP
for usage of SSL.