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

Fix SASL authentication bugs #1257

Merged
merged 4 commits into from
Oct 16, 2017
Merged

Fix SASL authentication bugs #1257

merged 4 commits into from
Oct 16, 2017

Conversation

dpkp
Copy link
Owner

@dpkp dpkp commented Oct 15, 2017

This PR fixes three bugs in sasl handshake processing: First, after #1230 _recv() does not handle futures / in-flight-request processing. We need to call self.recv() if we want callbacks to be triggered automatically. Second, it is possible that recv() may catch a network error and close the connection. This will reset _sasl_auth_future and so we need to validate that it is not None before checking if it failed or succeeded. Third, when processing the SaslHandShakeResponse we should validate that the configured sasl_mechanism is listed as enabled in the handshake response.

In addition, I have consolidated the socket send routine into a single private method, _send_bytes_blocking(data).

Fixes #1255

@tvoinarovskyi tvoinarovskyi self-requested a review October 15, 2017 10:26
@tvoinarovskyi
Copy link
Collaborator

We need tests for the SASL code. So many issues already (

Copy link
Collaborator

@tvoinarovskyi tvoinarovskyi left a comment

Choose a reason for hiding this comment

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

Looks good!

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.

Can not connect with SASL_PLAINTEX and GSSAPI
2 participants