mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-25258 : SET PASSWORD command fail with wsrep api
Problem was that we should skip strict password validation on applier nodes similarly as is done for slave nodes.
This commit is contained in:
19
mysql-test/suite/galera/r/galera_password.result
Normal file
19
mysql-test/suite/galera/r/galera_password.result
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
SHOW VARIABLES LIKE '%password%';
|
||||||
|
Variable_name Value
|
||||||
|
old_passwords OFF
|
||||||
|
report_password
|
||||||
|
strict_password_validation ON
|
||||||
|
CREATE USER 'user123456'@'localhost';
|
||||||
|
GRANT SELECT, INSERT, UPDATE ON test.* TO 'user123456'@'localhost';
|
||||||
|
SET PASSWORD FOR 'user123456'@'localhost' = PASSWORD('A$10abcdDCBA123456%7');
|
||||||
|
SHOW GRANTS FOR 'user123456'@'localhost';
|
||||||
|
Grants for user123456@localhost
|
||||||
|
GRANT USAGE ON *.* TO 'user123456'@'localhost' IDENTIFIED BY PASSWORD '*5846CF4D641598B360B3562E581586155C59F65A'
|
||||||
|
GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'user123456'@'localhost'
|
||||||
|
connection node_2;
|
||||||
|
SHOW GRANTS FOR 'user123456'@'localhost';
|
||||||
|
Grants for user123456@localhost
|
||||||
|
GRANT USAGE ON *.* TO 'user123456'@'localhost' IDENTIFIED BY PASSWORD '*5846CF4D641598B360B3562E581586155C59F65A'
|
||||||
|
GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'user123456'@'localhost'
|
||||||
|
connection node_1;
|
||||||
|
DROP USER 'user123456'@'localhost';
|
14
mysql-test/suite/galera/t/galera_password.test
Normal file
14
mysql-test/suite/galera/t/galera_password.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
--source include/galera_cluster.inc
|
||||||
|
|
||||||
|
SHOW VARIABLES LIKE '%password%';
|
||||||
|
|
||||||
|
CREATE USER 'user123456'@'localhost';
|
||||||
|
GRANT SELECT, INSERT, UPDATE ON test.* TO 'user123456'@'localhost';
|
||||||
|
SET PASSWORD FOR 'user123456'@'localhost' = PASSWORD('A$10abcdDCBA123456%7');
|
||||||
|
SHOW GRANTS FOR 'user123456'@'localhost';
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SHOW GRANTS FOR 'user123456'@'localhost';
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
DROP USER 'user123456'@'localhost';
|
@ -1566,7 +1566,11 @@ static bool validate_password(LEX_USER *user, THD *thd)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!thd->slave_thread &&
|
if (!thd->slave_thread &&
|
||||||
strict_password_validation && has_validation_plugins())
|
strict_password_validation && has_validation_plugins()
|
||||||
|
#ifdef WITH_WSREP
|
||||||
|
&& !thd->wsrep_applier
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--strict-password-validation");
|
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--strict-password-validation");
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user