mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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>
This commit is contained in:
committed by
Julius Goryavsky
parent
1aa1a7cf64
commit
a1e5a284fc
@@ -340,6 +340,28 @@ public:
|
||||
THD* const ptr;
|
||||
};
|
||||
|
||||
/* local server connection */
|
||||
class mysql
|
||||
{
|
||||
MYSQL* mysql_;
|
||||
public:
|
||||
mysql();
|
||||
~mysql();
|
||||
int execute(const std::string& query) {
|
||||
if (mysql_real_query(mysql_, query.c_str(), query.length())) {
|
||||
return mysql_errno(mysql_);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int errnum() {
|
||||
return (mysql_errno(mysql_));
|
||||
}
|
||||
const char* errstr() {
|
||||
return mysql_error(mysql_);
|
||||
}
|
||||
int disable_replication();
|
||||
};
|
||||
|
||||
class string
|
||||
{
|
||||
public:
|
||||
|
Reference in New Issue
Block a user