Fail authentication when server requests unknown authentication plugin #206
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changeset ensures we properly fail authentication when the server requests an unknown authentication plugin:
The feature itself is mostly limited to better debugging output to give downstream consumers a better understanding what's going on. For reference, the old error looks like this:
On top of this, this is really done in preparation to add proper authentication plugins, in particular the
caching_sha2_password
authentication mechanism used by default on MySQL 8+ as discussed in #112. Once this PR is merged, I'll file a follow-up to addcaching_sha2_password
support.The affected code has 100% code coverage and has been tested against a number of (older) MySQL server versions. The tests confirm it should continue to work for legacy servers not using authentication plugins or newer MySQL server versions using the existing
mysql_native_password
authentication. We should probably follow-up on PR #196 to add more MySQL server versions to our test matrix.Marking this as WIP until the unrelated test failures are addressed via #205.Merged.Builds on top of #205
Refs #112