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

Allow usage of RETAIN CURRENT PASSWORD clause when updating a password #663

Open
pwakano opened this issue Jul 22, 2024 · 1 comment
Open
Labels
help wanted Extra attention is needed

Comments

@pwakano
Copy link

pwakano commented Jul 22, 2024

SUMMARY

Allow usage of RETAIN CURRENT PASSWORD when updating a password

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

mysql_user

ADDITIONAL INFORMATION

MySQL 8.0.14 allows the use of RETAIN CURRENT PASSWORD, which are nice additions when handling password updates (https://dev.mysql.com/doc/mysql-security-excerpt/8.0/en/password-management.html#dual-passwords). The mysql_user module could support these options when updating a user's password.
I think this option could handled in the update_password parameter, but of course a new parameter would be fine too.
There is also the DISCARD OLD PASSWORD clause that could be supported as well to be fully up-to-date with the latest MySQL features and allow total control via Ansible.

  mysql_user:
    login_host: "my_db_host"
    login_user: "my_admin"
    login_password: "my_admin_secret_password"
    name: "my_user"
    password: "my_user_new_password"
    update_password: "retain" # --> THIS IS NEW/PROPOSED

  mysql_user:
    login_host: "my_db_host"
    login_user: "my_admin"
    login_password: "my_admin_secret_password"
    name: "my_user"
    update_password: "discard_old" # --> THIS IS NEW/PROPOSED
@laurent-indermuehle laurent-indermuehle added the waiting_on_contributor Feel free to pick it up label Jul 24, 2024
@laurent-indermuehle
Copy link
Collaborator

Note: Dual Password introduced in MySQL 8.0.14. Not supported by MariaDB.

Contribution welcome. Thanks @pwakano for the suggestion!

@laurent-indermuehle laurent-indermuehle added help wanted Extra attention is needed and removed waiting_on_contributor Feel free to pick it up labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants