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

server: fix authentication with MySQL 5.1 and older clients (#29732) #29808

Merged
merged 3 commits into from
Nov 16, 2021

Conversation

bb7133
Copy link
Member

@bb7133 bb7133 commented Nov 15, 2021

cherry-pick #29732 to release-5.3


What problem does this PR solve?

Issue Number: close #29725

Problem Summary:

handleAuthPlugin checks for the ClientPluginAuth capability but this didn't set the AuthPlugin causing readOptionalSSLRequestAndHandshakeResponse to return an error.

Note that this allows authentication for users that use mysql_native_password to work, but users using caching_sha2_passwords won't work.

This does now return a more specific error in case authentication with caching_sha2_password is used.

[dvaneeden@dve-carbon ~]$ ~/opt/mysql/5.1.73/bin/mysql -h 127.0.0.1 -u sha -P 4000 -psha
ERROR 1105 (HY000): ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

Verify the connection with MySQL client v5.1:

sh> mysql -u root -h 127.0.0.1 -P 4000
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 15, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • djshow832
  • wjhuang2016

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/cherry-pick-not-approved release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 15, 2021
@sre-bot
Copy link
Contributor

sre-bot commented Nov 15, 2021

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what is changed

Or if the count of mainly changed packages are more than 3, use

  • *: what is changed

After you have format title, you can leave a comment /run-check_title to recheck it

@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Nov 15, 2021
@bb7133 bb7133 changed the title Fix authentication with MySQL 5.1 and older clients (#29732) server: fix authentication with MySQL 5.1 and older clients (#29732) Nov 15, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 15, 2021
@bb7133
Copy link
Member Author

bb7133 commented Nov 15, 2021

/run-check_title

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 15, 2021
@bb7133
Copy link
Member Author

bb7133 commented Nov 15, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 2eeac32

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 15, 2021
@bb7133
Copy link
Member Author

bb7133 commented Nov 15, 2021

/run-check_dev

@bb7133
Copy link
Member Author

bb7133 commented Nov 15, 2021

/merge

@zhouqiang-cl
Copy link
Contributor

/run-check_dev

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Nov 16, 2021
@bb7133
Copy link
Member Author

bb7133 commented Nov 16, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 28e6d8d

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 16, 2021
@ti-chi-bot
Copy link
Member

@bb7133: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@bb7133
Copy link
Member Author

bb7133 commented Nov 16, 2021

/run-check_dev

1 similar comment
@bb7133
Copy link
Member Author

bb7133 commented Nov 16, 2021

/run-check_dev

@ti-chi-bot ti-chi-bot merged commit c83f032 into pingcap:release-5.3 Nov 16, 2021
@zhouqiang-cl zhouqiang-cl linked an issue Nov 17, 2021 that may be closed by this pull request
6 tasks
@zhouqiang-cl zhouqiang-cl removed a link to an issue Nov 17, 2021
6 tasks
@bb7133 bb7133 deleted the bb7133/cp-29732 branch December 29, 2023 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants