Skip to content

Support sha256_password auth plugin - #186

Merged
blackbeam merged 3 commits into
blackbeam:masterfrom
t8y2:dbx/sha256-password-auth
Jul 20, 2026
Merged

blackbeam merged 3 commits into
blackbeam:masterfrom
t8y2:dbx/sha256-password-auth

Conversation

@t8y2

@t8y2 t8y2 commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

Adds first-class support for MySQL's deprecated sha256_password authentication plugin.

The plugin is now implemented as a ChallengeResponsePlugin under auth::plugins, alongside the other authentication plugins:

  • recognizes sha256_password as an AuthPlugin variant;
  • sends the null-terminated password over TLS;
  • requests the server RSA public key over non-TLS transports when no key is configured;
  • encrypts the password using the plugin scramble and server public key;
  • participates in the generic AuthProc dispatcher;
  • documents the challenge preprocessing contract expected from drivers.

Validation:

  • cargo test --features test
  • 89 unit tests passed.

@blackbeam

Copy link
Copy Markdown
Owner

@t8y2, hi!

All the plugins now moved to auth::plugins module so could you please update the PR and move the logic from blackbeam/mysql_async#397 to the new auth::plugins::sha256_password module?

@blackbeam
blackbeam force-pushed the dbx/sha256-password-auth branch from 5b30d49 to cd6b328 Compare July 17, 2026 07:22
@t8y2 t8y2 changed the title Recognize sha256_password auth plugin Support sha256_password auth plugin Jul 17, 2026
@t8y2

t8y2 commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Correction: MySQL does not treat IPC as secure for sha256_password; that differs from caching_sha2_password. I reverted my follow-up commit and restored the maintainer implementation unchanged.

Comment thread src/auth/plugins/sha256_password.rs Resolved
@t8y2
t8y2 force-pushed the dbx/sha256-password-auth branch from 630f304 to 77085e9 Compare July 17, 2026 08:27
@t8y2

t8y2 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

The requested IPC change has been fully reverted, the review thread is resolved, and CI passes on the restored maintainer implementation (77085e9). Could you please re-review when convenient?

@blackbeam
blackbeam merged commit c5dd252 into blackbeam:master Jul 20, 2026
2 checks passed
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.

2 participants