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 caching_sha2_password Hashing #1602

Open
daylicron opened this issue Oct 27, 2023 · 2 comments
Open

Implement caching_sha2_password Hashing #1602

daylicron opened this issue Oct 27, 2023 · 2 comments

Comments

@daylicron
Copy link

daylicron commented Oct 27, 2023

Use Case

I want to be able to use the Puppet MySQL module with future MySQL 8 versions. The MySQL Server warns me in his logs, that mysql_native_password will be removed in the future

[Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

Describe the Solution You Would Like

Implementing a feature that can create MySQL users using caching_sha2_password.

Additional Context

This one seems difficult as I couldn't find a documented way that MySQL uses to hash passwords with caching_sha2_password, so that Puppet can hash the password the same way. The MySQL password function has been removed, too. I was thinking about using
IDENTIFIED WITH caching_sha2_password BY '#{string}'"
but I guess this way Puppet would recreate the user every run.

Does anybody has already started on this or has any idea?

@C24-AK
Copy link

C24-AK commented Dec 28, 2023

Hey I started a PR #1612 for this topic and found a way to implement it. Maybe someone with more knowledge can improve it.

@david-barbion
Copy link

caching_sha2_password is now the default on MySQL 8.4 and mysql_native_password is disabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants