* Add default database "mysql" to mysql_user
Since permissions are stored in the "mysql" database anyway this should not change the behaviour of the module. But replication / binlog filters which rely on the current database will be able to filter the statements correctly afterwards. Prior to this change they were not executed in any database context and could not be filtered in any way by the existing methods in MySQL.
* Added changelog fragment
* Update changelogs/fragments/266-default-database-for-mysql-user
Thanks!
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update mysql_user.py
Make the change a configureable boolean
* Update 266-default-database-for-mysql-user
update changelog fragment
* Update 266-default-database-for-mysql-user
it´s not a bugfix anymore
* Update plugins/modules/mysql_user.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update plugins/modules/mysql_user.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update plugins/modules/mysql_user.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update plugins/modules/mysql_user.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* renamed new option to force_context
enhanced description
added tests
* fixed changelog
* Update plugins/modules/mysql_user.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update plugins/modules/mysql_user.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* added more tests
* removed first test attempts again (from issue-28.yml)
created new tests for testing with and without replication
* added force_context: no testing
* forgot to add the new part to main.yml
* found a copy&paste issue
* fix include naming
* Made sure the tests work in local testing
* MariaDB handles online replication filters differently
* fix changelog
* Update changelogs/fragments/266-default-database-for-mysql-user.yml
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update changelogs/fragments/266-default-database-for-mysql-user.yml
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Remove all code related to VALID_PRIVS and get_valid_privs()
* Add tests to update user with invalid privs
* Re-raise InvalidPrivsError when granting privileges
* Fix: compatibility with python2
* More explicit assertions as commented by Andersson007
* Add changelog fragment
* mysql_user: replace VALID_PRIVS by get_valid_privs() function
* Add EXTRA_PRIVS in case we need to add more privs in the future
* Add changelog fragment
* mysql_user: add proper handling of INSERT, UPDATE, REFERENCES on columns
* Add changelog fragment
* fix sanity
* fix CI
* fix sanity
* fix CI
* make the assertion fairer
* Improve
* mysql_user: fix the module is not idempotent when there is SELECT on columns granted
* add changelog fragment
* fix
* Add unit tests for has_select_on_col function
* Add unit tests for sort_column_order function
* Add unit tests for handle_select_on_col function
* Update a comment
This module does not currently log the SQL statements that it executes.
A change was proposed to add this functionality, but it would require
modifications in many sections of the code due to how many cursor.execute()
statements there currently are. This change simply consolidates the
number of execute() calls where it is trivial to do so.
* mysql_user: fixed encrypted option for MySQL 8.0 and test coverage
The purpose of this change was originally to expand test coverage to
unblock #76, but an issue was detected with the encrypted parameter on
MySQL 8.0 in the process of writing the tests. Additionally,
user_password_update_test.yml had been disabled at some point, so I
opted to replace it with two new files that will focus on the password
and plugin auth paths.
* Updated tests to cover a couple of missing branches
* Skip tests that rely on sha256_password if pymysql < 0.9
* Cover the case where pymysql isn't installed for plugin tests
* Added better plugin auth checking to tests and other minor changes
* Fixed version detection to explicitly handle MariaDB
* Removed unneeded import from previous change
* Remove whitespace that was introduced by change that was removed
* Added unit tests for missing coverage
* mysql_user: Fixed change detection with append_privs (#69)
Prior to this change, mysql_user with append_privs would attempt to make
a change even if the current privileges were a superset of the new
privileges (shouldn't require any action).
* Fixed unrelated mysql_replication doc causing failures in CI
* Added fragments and check_mode tests
* Expanded priv append tests to cover additional case
* Add changelog fragment
* Add check_hostname option
* Propagate check_hostname option across the collection
* Update documentation fragment
* Propagate test to all other plugins
* Remove stray line
* Give test user privileges to run test operations
* Extend integration tests job matrix
* Add caution note to documentation fragment.
* Update matrix job name
* Rearrange job matrix
* Fix sanity issues
* Fix issue with mysqldb silently failing to update out of range variables
* Fix variable overwrite
* Ignore `check_hostname` when using MySQLdb
* Update plugins/doc_fragments/mysql.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update plugins/doc_fragments/mysql.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update changelogs/fragments/35-disable-hostname-check.yml
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Add test to verify TLS requirements are removed
* Fix cursor parsing
* small fixes
* Refactor TLS tests into their own file
* Fix TLS requirements parsing
* Add TLS connection parameters
* Add check mode tests
* Fix check mode indentation
* Run MySQL commands with the mysql_command variable
* Fix typo
* Restore code lost during cherry pick
* Fix conditionals to accomodate for MySQL v8
* Fix equal operators
* Remove Black formatting in an attempt to make codecov happy
* Remove deprecation notice
* Fix closing bracket
* Remove code duplication
* Add changelog fragments from c.g.
* Adjust version_added to 0.1.0, which comes closer to the truth.
* Add changelogs/.plugin-cache.yaml to gitignore.
* initial commit
* removed remaining references to community.general
* enabled integration pipeline
* switched from preconfigured replication topology to simple multinode install
* updated version from 1.0.0 to 0.1.0