-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Kafka SaslOptions #8
Conversation
#[test] | ||
fn test_sasl_options() { | ||
let mut options = KafkaConnectOptions::default(); | ||
options.set_security_protocol(SecurityProtocol::SaslSsl); | ||
options.set_sasl_options( | ||
SaslOptions::new(SaslMechanism::Plain) | ||
.username("uu") | ||
.password("pp"), | ||
); | ||
let mut client_config = ClientConfig::new(); | ||
options.make_client_config(&mut client_config); | ||
assert_eq!(client_config.get("security.protocol"), Some("SASL_SSL")); | ||
assert_eq!(client_config.get("sasl.mechanism"), Some("PLAIN")); | ||
assert_eq!(client_config.get("sasl.username"), Some("uu")); | ||
assert_eq!(client_config.get("sasl.password"), Some("pp")); | ||
} |
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.
Example
Does this work for you? @hgzimmerman |
As far as my limited understanding of SASL goes, it looks good. My example had an additional I think if that proves to be necessary, its best followed up on separately with a |
Thanks. Actually the "bootstrap.servers" key is set for every connection with the values coming from
|
No, my connection profile was just copied nearly verbatim from confluentinc/librdkafka#4119 (comment) and I wasn't aware that the config option was already set elsewhere in sea-streamer-kafka. I believe that the url I was using works anyways. This is good news to me, in that I get to remove some redundant code and config values. |
Cool! I am going to make a patch release this week end, including this and your previous PR to redis. |
Fixes #5