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

*: make default_authentication_plugin more compatible with mysql #56660

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

CbcWestwolf
Copy link
Member

@CbcWestwolf CbcWestwolf commented Oct 15, 2024

What problem does this PR solve?

Issue Number: close #54138

Problem Summary:

See the issue decription

What changed and how does it work?

Get default auth plugin when creating, altering and granting user.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

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

Please refer to Release Notes Language Style Guide to write a quality release note.

make `default_authentication_plugin` control default auth plugin when creating user

Copy link

ti-chi-bot bot commented Oct 15, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Oct 15, 2024
Copy link

tiprow bot commented Oct 15, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 15, 2024
@CbcWestwolf CbcWestwolf marked this pull request as ready for review October 15, 2024 16:10
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 9 lines in your changes missing coverage. Please review.

Project coverage is 56.5109%. Comparing base (fa723c3) to head (fa4a9a1).
Report is 23 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56660         +/-   ##
=================================================
- Coverage   73.3500%   56.5109%   -16.8391%     
=================================================
  Files          1629       1756        +127     
  Lines        450090     635992     +185902     
=================================================
+ Hits         330141     359405      +29264     
- Misses        99710     252459     +152749     
- Partials      20239      24128       +3889     
Flag Coverage Δ
integration 36.7710% <57.1428%> (?)
unit 72.4549% <42.8571%> (-0.0288%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 52.3177% <ø> (+6.7383%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-tests-checked labels Oct 21, 2024
@CbcWestwolf CbcWestwolf changed the title [WIP] *: make default_authentication_plugin more compatible with mysql *: make default_authentication_plugin more compatible with mysql Oct 21, 2024
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 21, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 21, 2024

connection default;
set global default_authentication_plugin = 'caching_sha2_password';
create user default_sha256_user;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the sha256 is confusing here as there used to be a sha256_password plugin.

Suggested change
create user default_sha256_user;
create user default_sha2_user;

(more modifications needed if you merge this)

Copy link
Member Author

Choose a reason for hiding this comment

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

updated in fa4a9a1

# TestDefaultAuthPluginForCreateUser

connection default;
set global default_authentication_plugin = 'caching_sha2_password';
Copy link
Contributor

@dveeden dveeden Oct 21, 2024

Choose a reason for hiding this comment

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

Maybe add something like set global default_authentication_plugin = 'xxxxx' to test the validation of the plugin name?

Maybe add statements like CREATE USER ... IDENTIFIED WITH ... to test if you can still create users with mysql_native_plugin when the default_authentication_plugin is set to caching_sha2_password?

Copy link
Member Author

Choose a reason for hiding this comment

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

updated in fa4a9a1

@CbcWestwolf
Copy link
Member Author

/retest

Copy link

tiprow bot commented Oct 21, 2024

@CbcWestwolf: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow fa4a9a1 link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link

ti-chi-bot bot commented Oct 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dveeden, lcwangchao

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 21, 2024
Copy link

ti-chi-bot bot commented Oct 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-21 09:13:14.007748369 +0000 UTC m=+255994.704538972: ☑️ agreed by lcwangchao.
  • 2024-10-21 10:28:41.932716582 +0000 UTC m=+260522.629507193: ☑️ agreed by dveeden.

@ti-chi-bot ti-chi-bot bot merged commit d5b27a9 into pingcap:master Oct 21, 2024
22 of 23 checks passed
@CbcWestwolf CbcWestwolf deleted the default_auth_plugin branch October 21, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

default_authentication_plugin is not compatable with MySQL's
3 participants