Debian Codegraph @

mysql-test/suite/group_replication/r/gr_recovery_tlsv13.result

raw
1 include/group_replication.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection server1]
6 #
7 # Setup the first member with a recovery user that requires TLS 1.3
8 #
9 [connection server1]
10 SET SESSION sql_log_bin=0;
11 CREATE USER 'rec_ssl_user'@'%' REQUIRE SSL;
12 GRANT replication slave ON *.* TO 'rec_ssl_user'@'%';
13 GRANT GROUP_REPLICATION_STREAM ON *.* TO 'rec_ssl_user'@'%';
14 FLUSH PRIVILEGES;
15 SET SESSION sql_log_bin=1;
16 SET @tls_version_saved= @@GLOBAL.tls_version;
17 SET GLOBAL tls_version='TLSv1.3';
18 SET @conf_rec_ssl_mode= @@GLOBAL.group_replication_ssl_mode;
19 SET GLOBAL group_replication_ssl_mode= REQUIRED;
20 ALTER INSTANCE RELOAD TLS;
21 #
22 # Add some data and start the member
23 #
24 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
25 INSERT INTO t1 VALUES (1);
26 include/start_and_bootstrap_group_replication.inc
27 #
28 # Configure a joining member to use SSL options on recovery and start it
29 #
30 [connection server2]
31 SET SESSION sql_log_bin=0;
32 CREATE USER 'rec_ssl_user'@'%' REQUIRE SSL;
33 GRANT replication slave ON *.* TO 'rec_ssl_user'@'%';
34 GRANT GROUP_REPLICATION_STREAM ON *.* TO 'rec_ssl_user'@'%';
35 FLUSH PRIVILEGES;
36 SET SESSION sql_log_bin=1;
37 CHANGE REPLICATION SOURCE TO SOURCE_USER="rec_ssl_user" FOR CHANNEL "group_replication_recovery";
38 SET @group_replication_recovery_use_ssl_saved= @@GLOBAL.group_replication_recovery_use_ssl;
39 SET GLOBAL group_replication_recovery_use_ssl=1;
40 SET @conf_rec_ssl_mode= @@GLOBAL.group_replication_ssl_mode;
41 SET GLOBAL group_replication_ssl_mode= REQUIRED;
42 include/start_group_replication.inc
43 #
44 # Check the data is there
45 #
46 include/assert.inc [On the recovered member, the table should exist and have 1 elements;]
47 #
48 # Clean up
49 #
50 SET @@GLOBAL.group_replication_recovery_use_ssl= @group_replication_recovery_use_ssl_saved;
51 [connection server1]
52 SET @@GLOBAL.tls_version= @tls_version_saved;
53 SET @@GLOBAL.group_replication_ssl_mode= @conf_rec_ssl_mode;
54 ALTER INSTANCE RELOAD TLS;
55 SET SESSION sql_log_bin=0;
56 DROP USER 'rec_ssl_user';
57 SET SESSION sql_log_bin=1;
58 DROP TABLE t1;
59 [connection server2]
60 SET SESSION sql_log_bin=0;
61 DROP USER 'rec_ssl_user';
62 SET SESSION sql_log_bin=1;
63 SET @@GLOBAL.group_replication_ssl_mode= @conf_rec_ssl_mode;
64 ALTER INSTANCE RELOAD TLS;
65 include/group_replication_end.inc