Skip to content

Commit

Permalink
mysql_user: add correct ed25519 plugin handling when creating a user (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersson007 authored Sep 5, 2024
1 parent 2db131f commit 3425fdb
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 when creating a user (https://github.com/ansible-collections/community.mysql/issues/672).
2 changes: 1 addition & 1 deletion plugins/module_utils/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def user_add(cursor, user, host, host_all, password, encrypted,
query_with_args = "CREATE USER %s@%s IDENTIFIED WITH %s AS %s", (user, host, plugin, plugin_hash_string)
elif plugin and plugin_auth_string:
# Mysql and MariaDB differ in naming pam plugin and Syntax to set it
if plugin == 'pam': # Used by MariaDB which requires the USING keyword, not BY
if plugin in ('pam', 'ed25519'): # Used by MariaDB which requires the USING keyword, not BY
query_with_args = "CREATE USER %s@%s IDENTIFIED WITH %s USING %s", (user, host, plugin, plugin_auth_string)
elif salt:
if plugin in ['caching_sha2_password', 'sha256_password']:
Expand Down

0 comments on commit 3425fdb

Please sign in to comment.