Commit graph

287 commits

Author SHA1 Message Date
Laurent Indermuehle
77c6a68a02
document how to use mysql_info to clone accounts to another server 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
213d6b8a5a
fix tests teardown error if db delete before users 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
008f92230b
fix tests failing when recreating root account 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
62e9ad7812
fix tests after keys returned have change in previous commit 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
ddd3812574
fix case when user as no other privileges than USAGE 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
122625c477
fix space in front of first privilege of the list 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
74ffacfa0f
fix key for username in the output to match mysql_user input 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
af327daa8e
fix key for privileges in the output to match mysql_user input 2023-10-11 16:51:48 +02:00
Laurent Indermühle
28c247a14c
add link to the PR
Co-authored-by: Markus Bergholz <git@osuv.de>
2023-10-11 16:51:48 +02:00
Laurent Indermuehle
4ee6659b54
cut unused import (sanity) 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
f80ef4f9b4
fix sanity tests for python 2.6 the right way (my bad) 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
4093de51dd
fix sanity tests for python 2.6 in ansible-core 2.12 for good 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
89b42e2b83
fix sanity tests for Python 2.6 found in ansible-core 2.12 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
77c7beb514
fix case when fetch return a tuple instead of a dict 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
319b7e86f3
fix undefined variable 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
88af430380
linting (sanity) 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
08b7842001
cut newlines added by accident 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
29b6ad89a1
add back all the tests steps disabled during development 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
b3b7868079
document changelog 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
0c17778f63
document better description 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
2ea7120f2e
document output form 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
2acc3d2a77
document what's missing from the output 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
487036e2ff
add set to work no matter the order 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
42224f3eee
add the wait for container to be ready back to prevent connection issue 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
270217aa30
fix recreate user tasks using correct auth options 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
5dd0321607
add filter to return an auth key when not empty 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
fcb2d49b24
Add test users for MySQL auth plugins (sha256 and cache_sha2) 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
83ad999038
document returned value 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
c1248cb692
cut unused option (will be in authentications.auth_string) 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
093fe79e17
add missing option (forgotten in previous commit) 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
6123d77b99
fix malformed SQL query 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
eb840f6ae4
WIP: get user authentications plugins 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
bd944f7bf9
add host in case multiple accounts uses the same username 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
fa6eded000
fix KeyError 0 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
9f34b926bf
fix returned value since get_resource_limit is used by other methods 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
367a528058
Add reimport of users in the database to see if there is changes 2023-10-11 16:51:44 +02:00
Laurent Indermuehle
1c93c1bd66
Add user resources limit to the output 2023-10-11 16:51:44 +02:00
Laurent Indermuehle
248b30cad6
fix get_resource_limit to work with MariaDB and MySQL
I was getting KeyError 0
2023-10-11 16:51:44 +02:00
Laurent Indermuehle
089e1c3fb1
add a get_server_type module_utils method to detect MySQL vs MariaDB 2023-10-11 16:51:44 +02:00
Laurent Indermuehle
1e24343375
Fix USAGE line not filtered 2023-10-11 16:51:44 +02:00
Laurent Indermuehle
3288c22e64
fix quote around special priv Proxy for root on `@%` 2023-10-11 16:51:44 +02:00
Laurent Indermuehle
019a6d89cd
add a test user with multiple privs 2023-10-11 16:51:44 +02:00
Laurent Indermuehle
cf4c230725
Add the privileges in the returned values 2023-10-11 16:51:44 +02:00
Laurent Indermuehle
2054241920
Fix KeyError 0 2023-10-11 16:51:43 +02:00
Laurent Indermuehle
6a9ff85ca3
Fix privleges error 2023-10-11 16:51:43 +02:00
Laurent Indermuehle
123b73aa3f
attempt to fix KeyError 0 in privileges_get 2023-10-11 16:51:43 +02:00
Laurent Indermuehle
028089da6d
attempt to use privileges_get 2023-10-11 16:51:43 +02:00
Laurent Indermuehle
7f2f141275
revert changes to get_grants() 2023-10-11 16:51:43 +02:00
Laurent Indermuehle
3d99d94193
Add tests users 2023-10-11 16:51:43 +02:00
Laurent Indermuehle
31a5eb8739
Debug error "0"
This debug output this:

[
  {'Grants for root@localhost': \"GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION\"},
  {'Grants for root@localhost': \"GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION\"}
],
[
  {'Grants for mysql.session@localhost': \"GRANT SUPER ON *.* TO 'mysql.session'@'localhost'\"},
  {'Grants for mysql.session@localhost': \"GRANT SELECT ON `performance_schema`.* TO 'mysql.session'@'localhost'\"},
  {'Grants for mysql.session@localhost': \"GRANT SELECT ON `mysql`.`user` TO 'mysql.session'@'localhost'\"}
 ],
 [
   {'Grants for mysql.sys@localhost': \"GRANT USAGE ON *.* TO 'mysql.sys'@'localhost'\"},
   {'Grants for mysql.sys@localhost': \"GRANT TRIGGER ON `sys`.* TO 'mysql.sys'@'localhost'\"},
   {'Grants for mysql.sys@localhost': \"GRANT SELECT ON `sys`.`sys_config` TO 'mysql.sys'@'localhost'\"}
 ],
 [
   {'Grants for root@%': \"GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION\"}
 ]

 I think something is wrong in the lambda and when grants art on ''@''.
2023-10-11 16:51:43 +02:00