1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00
Files
mariadb/mysql-test/suite/sys_vars/r/wsrep_sst_auth_basic.result
Alexey Yurchenko a1e5a284fc MDEV-31809 Automatic SST user account management
Implement automatic creation of temporary accounts for SST and pass
account credentials to SST script via socket as opposed to environment
variables. Delete the user after the SST script returns,

Respect wsrep_sst_auth set by the adminitrator in case some additional
privilege grants are needed for particular SST method.

mysqldump SST requires significant change to make use of the new
automatic user generation facility. For now just make it compatible
by ignoring automatically generated user and rely only on wsrep_sst_auth
setting on the joiner node to keep backward compatibility.

Adapt mysqldump SST to automatic SST user generation changes:
 - disable special treatment for mysqldump SST on donor
 - make mysqldump SST script compatible with the new SST script
   interface.

Differentiate user privileges for different SST methods:
 - grant minimum required privileges for clone and xtrabackup SST
   accounts
 - grant all privileges to custom SST accounts as it is not known what
   is needed.
 - disable SST account generation for rsync SST since it is not needed.

MTR tests:
 - add MTR tests for clone and xtrabackup SSTs without wsrep_sst_auth,
 - add MTR test for testing masking of wsrep_sst_auth.
 - don't attmept to restore original wsrep_sst_auth in MTR tests as it
   is always masked.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-06-10 23:29:05 +02:00

49 lines
1.2 KiB
Plaintext

#
# wsrep_sst_auth
#
# default
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
NULL
# scope
SELECT @@session.wsrep_sst_auth;
ERROR HY000: Variable 'wsrep_sst_auth' is a GLOBAL variable
SET @@global.wsrep_sst_auth='user:pass';
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
********
# valid values
SET @@global.wsrep_sst_auth=user;
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
********
SET @@global.wsrep_sst_auth='user:1234';
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
********
SET @@global.wsrep_sst_auth='hyphenated-user-name:';
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
********
SET @@global.wsrep_sst_auth=default;
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
NULL
SET @@global.wsrep_sst_auth=NULL;
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
NULL
# invalid values
SET @@global.wsrep_sst_auth=1;
ERROR 42000: Incorrect argument type to variable 'wsrep_sst_auth'
SELECT @@global.wsrep_sst_auth;
@@global.wsrep_sst_auth
NULL
SET @@global.wsrep_sst_auth=user:pass;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':pass' at line 1
# End of test