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

Fast authentication for caching_sha2_password #56747

Open
dveeden opened this issue Oct 21, 2024 · 1 comment
Open

Fast authentication for caching_sha2_password #56747

dveeden opened this issue Oct 21, 2024 · 1 comment
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) component/mysql-protocol type/compatibility type/enhancement The issue or PR belongs to an enhancement.

Comments

@dveeden
Copy link
Contributor

dveeden commented Oct 21, 2024

Enhancement

The caching_sha2_password authentication method supports a "fast authentication" (cached) and a "full authentication". TiDB only supports "full authentication". This issue is to add support for "fast authentication".

tidb/pkg/server/conn.go

Lines 702 to 704 in c82ba4e

// Currently we always send a "FastAuthFail" as the cached part of the protocol isn't implemented yet.
// This triggers the client to send the full response.
err := cc.writePacket([]byte{0, 0, 0, 0, shaCommand, fastAuthFail})

https://dev.mysql.com/doc/dev/mysql-server/latest/page_caching_sha2_authentication_exchanges.html

Previous work: pingcap/parser#1328

Related:

@dveeden dveeden added type/enhancement The issue or PR belongs to an enhancement. type/compatibility component/mysql-protocol compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) labels Oct 21, 2024
@dveeden
Copy link
Contributor Author

dveeden commented Oct 21, 2024

Note for pingcap/parser#1328 that pingcap/parser has been merged into pingcap/tidb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) component/mysql-protocol type/compatibility type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant