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

mysql_user password expiration support #513

Closed
resuni opened this issue Feb 27, 2023 · 5 comments
Closed

mysql_user password expiration support #513

resuni opened this issue Feb 27, 2023 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@resuni
Copy link

resuni commented Feb 27, 2023

SUMMARY

Being able to manage user password expiration using the mysql_user module would be handy.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME
  • mysql_user
ADDITIONAL INFORMATION

Parameters would correspond with the PASSWORD EXPIRE syntax of the CREATE USER and ALTER USER commands. I envision two new parameters being created to support this:

  • password_expire - Accepted values: DEFAULT, NEVER, INTERVAL
  • password_expire_interval - Used to specify interval in days, if password_expire is set to INTERVAL.
# Create/alter user with password that expires every 90 days
- name: create user
  mysql_user:
    name: resuni
    host: "127.0.0.1"
    password: pass123
    password_expire: INTERVAL
    password_expire_interval: 90

# Create/alter user with password that doesn't expire
- name: create user
  mysql_user:
    name: resuni
    host: "127.0.0.1"
    password: pass123
    password_expire: NEVER

# Create/alter user to use default password expiration policy as defined in mysqld.cnf
- name: create user
  mysql_user:
    name: resuni
    host: "127.0.0.1"
    password: pass123
    password_expire: DEFAULT
@markuman
Copy link
Member

For the record:

mariadb >= 10.4.3
mysql >= 10.6.6

no idea if this must be still covered.

@resuni do you have some time to implement that parameter?

@resuni
Copy link
Author

resuni commented Mar 1, 2023

@markuman Not in the near future. I might have some time later this year if no one else gets to it before then.

@Andersson007 Andersson007 added the help wanted Extra attention is needed label Mar 2, 2023
@Andersson007
Copy link
Collaborator

@resuni hi, thanks for the feature request!
I've put the help_wanted label

@tompal3
Copy link
Contributor

tompal3 commented Feb 24, 2024

@Andersson007 I think this can be closed.

@Andersson007
Copy link
Collaborator

@tompal3 ah, yes, thanks for spotting! Closed via #598.
Next time if you put Fixes <Issue link> in a PR description, i'll get closed automatically.
Anyway, thanks once more for implementing the feature!

@resuni thanks for the feature request!

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

4 participants