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

feat: support SaslHandshakeRequest v0 for SCRAM #1992

Merged
merged 3 commits into from
Sep 8, 2021
Merged

feat: support SaslHandshakeRequest v0 for SCRAM #1992

merged 3 commits into from
Sep 8, 2021

Conversation

zhaomoran
Copy link
Contributor

Fix #1918 ,Maybe other scram issues are also relevant!Thanks!

@zhaomoran zhaomoran requested a review from bai as a code owner July 30, 2021 17:55
@dnwe dnwe changed the title Support SaslHandshakeRequest v0 feat: support SaslHandshakeRequest v0 for SCRAM Aug 9, 2021
Copy link
Collaborator

@dnwe dnwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the fix looks good to me

@dnwe
Copy link
Collaborator

dnwe commented Aug 9, 2021

@zhaomoran please can you take a look at the test failures?

2021-08-09T13:35:20.5596060Z --- FAIL: TestSASLSCRAMSHAXXX (0.01s)
2021-08-09T13:35:20.5597111Z --- FAIL: TestSASLSCRAMSHAXXX/SASL/SCRAMSHAXXX_successful_authentication (0.00s)
2021-08-09T13:35:20.5599071Z --- FAIL: TestSASLSCRAMSHAXXX/SASL/SCRAMSHAXXX_SCRAM_client_step_error_client (0.00s)
2021-08-09T13:35:20.5600904Z --- FAIL: TestSASLSCRAMSHAXXX/SASL/SCRAMSHAXXX_server_authentication_error (0.00s)
2021-08-09T13:35:20.5602160Z --- PASS: TestSASLSCRAMSHAXXX/SASL/SCRAMSHAXXX_unsupported_SCRAM_mechanism (0.00s)

@zhaomoran
Copy link
Contributor Author

@dnwe I'm sorry,I ignored the test! Net.SASL.Version default is SASLHandshakeV0 in config.Newconfig() . This test is for V1;

@zhaomoran zhaomoran requested a review from dnwe August 10, 2021 12:28
@bai
Copy link
Contributor

bai commented Sep 7, 2021

@zhaomoran Looks like CI is still failing. Do you think you could take a look at it?

@dnwe
Copy link
Collaborator

dnwe commented Sep 8, 2021

It looked like it just needed gofmt -s -w broker.go when I last checked. I'd have pushed up the fix myself, but the branch didn't permit write access to maintainers :)

@bai bai merged commit b64d8eb into IBM:master Sep 8, 2021
@Neustradamus
Copy link

@zhaomoran: #1944 has been solved or not?
The ticket is always open.

@cypres
Copy link

cypres commented Mar 4, 2022

This PR changed the default behavior of conf.Net.SASL.Version to SASLHandshakeV0 instead of SASLHandshakeV1, breaking clients on sarama upgrades.

@dnwe
Copy link
Collaborator

dnwe commented Mar 4, 2022

@duedal conf.Net.SASL.Version had been defaulted to V0 for a while (if I remember correctly, due to a bug in Azure) — what changed here is that SCRAM had previously only implemented V1 handshaking and this PR added the missing capability and as a side effect conf.Net.SASL.Version is now being adhered to for SCRAM as well.

When you say "breaking clients on sarama upgrades" — can you elaborate? Any Apache Kafka cluster that supports/supported SCRAM using SASLHandshakeV1 should also support it via the legacy SASLHandshakeV0 method?

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.

SASL SCRAM is not working with Kafka 0.11.0.0 cluster (works with 2.0.0.0)
5 participants