-
Notifications
You must be signed in to change notification settings - Fork 659
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
Go wrapper for rd_kafka_sasl_set_credentials #879
Go wrapper for rd_kafka_sasl_set_credentials #879
Conversation
…/confluent-kafka-go into jvisser-sasl_set_credentials
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.
some minor docstring comments.
This method also needs to be added to the admin client in admin.go
Please also add a line to the CHANGELOG
close-reopened tro trigger CI |
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.
We would need at least a dry test for this, just to make sure the API doesn't crash.
I recommend adding a call to the end of TestProducerAPIs() with a call to SetSaslCredentials():
https://github.com/confluentinc/confluent-kafka-go/blob/master/kafka/producer_test.go#L182
CHANGELOG.md
Outdated
|
||
* Added SetSaslCredentials. This new method (on the Producer, Consumer, and | ||
AdminClient) allows modifying the stored SASL PLAIN/SCRAM credentials that | ||
will be used for subsequent (new) connections to a broker. |
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.
nit: weird indent, align with previous line.
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.
Done and done
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.
LGTM, thanks Jos!
* Go wrapper for rd_kafka_sasl_set_credentials * Fixes after code review * Fixes after code review * Better description in CHANGELOG for this change. * Changes requested through code review
* Go wrapper for rd_kafka_sasl_set_credentials * Fixes after code review * Fixes after code review * Better description in CHANGELOG for this change. * Changes requested through code review
This PR adds a Go wrapper for the rd_kafka_sasl_set_credentials call in librdkafka. Not much to it, since all of the hard work (locking etc) is done in the called C function.
Note: At the time of writing the underlying function is being added to librdkafka and might appear there in v1.9.4. This PR should only be merged after the new librdkafka version containing rd_kafka_sasl_set_credentials has been merged into librdkafka_vendor.
See confluentinc/librdkafka#4033