Skip to content
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

SASL SCRAM support #1920

Closed
wants to merge 2 commits into from
Closed

SASL SCRAM support #1920

wants to merge 2 commits into from

Conversation

wsmith-twc
Copy link

@wsmith-twc wsmith-twc commented Oct 2, 2019

It looks like someone beat me to a pull request by a few hours, but I thought I'd submit this in case this code is useful.

I've used against Kafka 2.2.1 and 2.3.0 with Python 2.7.15 and 3.6.8. I've only used security mechanism of SCRAM-SHA-512 (not SCRAM-SHA-256). I've tried it with security protocols of SASL_PLAINTEXT and SASL_SSL.

The code re-uses sasl_plain_username and sasl_plain_password. That makes these names a little inaccurate, but having separate sasl_scram_username and sasl_scram_password didn’t seem like a great option, either. Another option would be to introduce sasl_username and sasl_password that both mechanisms use and deprecate sasl_plain_*

I didn’t follow the exact style of conn._try_authentiate_plain and conn._try_authenticate_gssapi because there are more errors that can occur. I relied on exceptions more than in those functions.


This change is Reviewable

@dpkp
Copy link
Owner

dpkp commented Dec 29, 2019

Thanks!! I'm going to go with #1918 primarily because it includes sasl fixture support + tests, which also benefit existing sasl plain mechanisms. I agree with your thinking on sasl_plain_* configs. Thanks again for working on this.

@dpkp dpkp closed this Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants