Commit graph

268 commits

Author SHA1 Message Date
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
Laurent Indermuehle
d7beeec410
WIP attempt to retrieve all users privileges 2023-10-11 16:51:42 +02:00
kmarse
033b4c74f9
Fix column uppercasing (#569)
* Add integrations tests for column case sensitive name

* add a warning when column_case_sensitive in not set

* add announce default will change in in 4.0.0

* fix tests for engine that don't wrap column in backticks

* add filter because only MySQL 5.7 is case sensitive for users privs

* add kmarse and myself to the authors

* add kmarse to the contributors list

---------

Co-authored-by: Laurent Indermühle <laurent.indermuehle@epfl.ch>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
2023-10-06 16:08:46 +02:00
Laurent Indermühle
8c2b6b0b3c
Add ansible-core stable-2.15 and stable-2.16 to tests matrix now that "devel" links to 2.17 (#574)
* Add stable-2.15 and 2.16 now that devel link to 2.17

* document which ansible-core version we support

* add sanity ignore for ansible-core 2.17

* cut sanity ignore for 2.12 and 2.13

* Cut ansible-core 2.12 and 2.13 from GHA test matrix
2023-09-29 09:29:43 +02:00
Andrew Klychkov
94392826e1
README: Define project's mission statement (#561)
* README: Define project's mission statement

* Add suggestion
2023-07-20 09:57:51 +02:00
Pavel Rabel
b79fd94d51
Doc Attributes (#555)
* Added Attributes section

* Added Attributes section
2023-05-29 09:25:19 +02:00
Andrew Klychkov
a81b6fc081
Release 3.7.2 commit (#556) 2023-05-25 13:30:17 +02:00
betanummeric
2fcfb103f6
fix tests (include deprecation) (#554)
* tests: change deprecated "include" to "include_tasks"

* tests: fix syntax

---------

Co-authored-by: Felix Hamme <felix.hamme@ionos.com>
2023-05-24 10:00:47 +02:00
betanummeric
b6ad472c78
fix connection arguments for MySQLdb <2.0 !=1.0 (#553)
* fix connection arguments for MySQLdb <2.0 !=1.0

* add changelog fragment

---------

Co-authored-by: Felix Hamme <felix.hamme@ionos.com>
2023-05-23 15:32:21 +02:00
Andrew Klychkov
bff05ce8dd
Release 3.7.1 commit (#552) 2023-05-22 09:34:59 +02:00
betanummeric
7f7b2f76a6
fix connection arguments mysql driver compatability (#551)
* only use the "database" connection argument with driver versions where "db" is deprecated/removed

* connection arguments: fix KeyError

* connection arguments: fix KeyError

* connection arguments: use 'passwd' instead of 'password' with older drivers

* add changelog fragment

* refactoring: use "get_connector_name" in "mysql_connect"

---------

Co-authored-by: Felix Hamme <felix.hamme@ionos.com>
2023-05-18 09:28:34 +02:00
Laurent Indermühle
b03c9aac57
Document the Releases Support Timeline (#543)
* docs: add releases support timeline

* docs: clarify when the 2 years of support starts

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* docs: fix support status of the current branch

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* docs: fix date to end of support for branch 2.x.y

* fix README.md

---------

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: betanummeric <40263343+betanummeric@users.noreply.github.com>
2023-05-10 13:10:20 +02:00
Andrew Klychkov
bd90ce7cc6
MAINTAINERS: add new maintainer (#548) 2023-05-10 12:54:25 +02:00
Laurent Indermühle
04e197fe55
Release 3.7.0 commit (#544) 2023-05-05 13:32:40 +02:00
Laurent Indermühle
30a2015f6c
feat: Add support for the connector pymysql 1.0.2 (#533)
* Document connector-version relationship

* Fix missing option in the command usage documentation

* Rephrase commands descriptions

* Document that pymysql 0.10.0 disabled its warnings

* Disable tests for pymysql newer than 0.10.0 because the behavior changed

* Enable integration tests for pymysql 1.0.2

* Add exclusion to avoid requesting nonexistent test containers

* Cut comments about PyMySQL 1.0.2 need to be fixed

* docs: explain PyMySQL 0.10.0+ returns changed when using IF EXISTS
2023-05-04 11:14:58 +02:00
Laurent Indermühle
426084a131
Fix the Makefile for integration tests not using the Python Venv (#532)
* Fix venv not being used by keeping the same shell

Also fix "-set -x" command not found.

* Fix missing option in the command usage documentation

* Document connector-version relationship

* Fix missing option in the command usage documentation

* Rephrase commands descriptions

* Document that you need to kill the ansible-test container yourself
2023-04-25 16:19:41 +02:00
Andrew Klychkov
9124b1f575
Copy ignore.txt for the devel branch (#529) 2023-04-07 13:36:27 +02:00
Maximilian Stinsky
526e674e6f
Add MAX_STATEMENT_TIME resource limit (#523)
* Add MAX_STATEMENT_TIME to resource_limits

* Move version check for resource_limits to implementations
2023-04-07 10:20:49 +02:00
Laurent Indermühle
21e42b5777
Add filter to prevent rebuild container on push on stable-(1|2) (#522) 2023-03-31 13:48:41 +02:00
IBims1NicerTobi
754387c7e5
Added formatting behaviour to documentation (#516)
* Added formatting behaviour to documentation

* Update plugins/modules/mysql_query.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

---------

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2023-03-31 13:27:48 +02:00