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

Implement MariaDB Parsec new authentication #1540

Open
rusher opened this issue Jan 10, 2025 · 0 comments · May be fixed by #1543
Open

Implement MariaDB Parsec new authentication #1540

rusher opened this issue Jan 10, 2025 · 0 comments · May be fixed by #1543
Milestone

Comments

@rusher
Copy link
Contributor

rusher commented Jan 10, 2025

Since 11.6, MariaDB has a new authentication method, named parsec authentication, based in PBKDF2 authentication + (standard) ed25519 signature
This will be the default in a few version in the futur (11.9 normally)

Protocol description

documention here

authentication plugin data format :

string<32> server nonce

Client has to respond sending an empty packet to request "ext-salt".

Server respond with ext-salt.
format:

  • string<1> 'P' (denotes KDF algorithm = PBKDF2)
  • byte<1> iteration factor. number of iterations correspond to 1024 << iteration factor (0x0 means 1024, 0x1 means 2048, etc.)
  • byte salt

Client response :

The client nonce is 32 random bytes
The signature is generated by :

  • generate derived key = hash password with PBKDF2 ( sha512 digest) with iteration number and salt from ext-salt.
  • generate the signature with ed25519 of an array concatenation of server nonce + client nonce with the generated derived key as private key.

Example of implementation :

additionally, this is one of the authentication method that can be trusted for SSL fingerprint validation

switch (m_currentAuthenticationMethod)

@bgrainger bgrainger linked a pull request Jan 27, 2025 that will close this issue
@bgrainger bgrainger added this to the 2.5.0 milestone Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants