Skip to content

Commit

Permalink
mysql_user: fix ed25512 plugin handling (ansible-collections#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersson007 authored Mar 14, 2024
1 parent c99c19a commit bfe2fdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/0-mysql_user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- mysql_user - add correct ``ed25519`` auth plugin handling (https://github.com/ansible-collections/community.mysql/issues/6).
2 changes: 1 addition & 1 deletion plugins/module_utils/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
query_with_args = "ALTER USER %s@%s IDENTIFIED WITH %s AS %s", (user, host, plugin, plugin_hash_string)
elif plugin_auth_string:
# Mysql and MariaDB differ in naming pam plugin and syntax to set it
if plugin == 'pam':
if plugin in ('pam', 'ed25519'):
query_with_args = "ALTER USER %s@%s IDENTIFIED WITH %s USING %s", (user, host, plugin, plugin_auth_string)
else:
query_with_args = "ALTER USER %s@%s IDENTIFIED WITH %s BY %s", (user, host, plugin, plugin_auth_string)
Expand Down

0 comments on commit bfe2fdc

Please sign in to comment.