-
Notifications
You must be signed in to change notification settings - Fork 233
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
Support SASL authentication in AIOKafkaAdminClient #890
Conversation
It would be nice to cover them with tests. |
Codecov Report
@@ Coverage Diff @@
## master #890 +/- ##
==========================================
- Coverage 97.61% 88.71% -8.90%
==========================================
Files 30 30
Lines 5451 5451
==========================================
- Hits 5321 4836 -485
- Misses 130 615 +485
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 13 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@ods, TBH it's not quite clear, why the coverage is decreased so much. Especially taking into account the there shouldn't be any coverage loss because of this change - parameters are just passed to I agree that would be nice to cover the SASL auth by tests in general. But it implies configuring a separate kafka instance with those settings, and IMO this should have been done when adding this SASL functionality into the main client. Regarding this particular change, I just proxy the same parameters into Let me know, what kind of tests would you like to see here, and I'll try to implement them, if it's not something very time consuming. UPD: I see why coverage is decreased, because of a different bug that seems to be fixed already in master, right? Some existing tests just didn't run because of an environment error related to docker. |
…min_sasl_auth_support
Sure, we can introduce such simple changes with just manual testing. But producer/consumer have the tests for some of SASL mechanisms in |
Oh, thanks for pointing them out. I have added a first testcase into test_sasl.py: kafka.errors.IncompatibleBrokerVersion: IncompatibleBrokerVersion: Kafka broker does not support the 'MetadataRequest_v0' Kafka protocol. How to reproduce:
I noticed that there was a similar bug in python-kafka, but it's fixed in 2.0.2 already. Any quick idea about the reason? Exactly the same calls work in |
Changes
Fixes #889
Added the following keyword arguments into
AioKafkaAdminClient
:sasl_mechanism
.sasl_plain_username
sasl_plain_password
sasl_kerberos_service_name
sasl_kerberos_domain_name
sasl_oauth_token_provider