-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][broker] Only send AuthChallenge when client supports it #19626
base: master
Are you sure you want to change the base?
[fix][broker] Only send AuthChallenge when client supports it #19626
Conversation
I did not modify the However, I think this is an edge case that this PR should cover, so I'll follow up with another commit tomorrow. |
The pr had no activity for 30 days, mark with Stale label. |
Since we will start the RC version of
So drag this PR to |
The pr had no activity for 30 days, mark with Stale label. |
Motivation
While reviewing the
ServerCnx
, I noticed the broker and client compatibility could have a missing edge case. In this case, the concept of multi-stage authentication was introduced with version 14 of the protocol by #3677. However, we send anAuthChallenge
to the client without verifying it has a sufficient protocol version to support such a challenge.This change is unlikely to fix any real issues because the
AuthChallenge
was introduced a while ago. However, I think we should add this logic to further support our claim that any version of the client can connect to any version of the broker.Another reason we might choose not to merge this PR is that it's possible #3677 introduced mutual authentication in the client and the proxy at the same time, so this case isn't possible. My main response is that the protocol is an open spec, so we should use our versioning system to ensure that there isn't even a third party client library that receives protocol messages it is unable to handle.
Modifications
AuthenticationError
and close the connection for both broker and proxy.AuthChallenge
that is triggered by authentication refresh when the client knows how to handle theAuthChallenge
protocol message. This is arguably covered by theFeatureFlag
, but given what our protocol versioning means, I think we should cover this unlikely edge case.Verifying this change
Includes a test for
ServerCnx
and I created an issue for #19624 the proxy.Does this pull request potentially affect one of the following parts:
This enforces the existing protocol.
Documentation
doc-not-needed
This is part of the protocol spec.
Matching PR in forked repository
PR in forked repository: michaeljmarshall#32