Debian Codegraph @

mysql-test/suite/group_replication/r/gr_ssl_fips_mode.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 # 1. Setup the first member (M1) with a recovery user that requires SSL
8 # with ssl_fips_mode= 'ON'.
9 #
10 [connection server1]
11 # restart:--group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS --ssl-fips-mode=ON
12 include/rpl_reconnect.inc
13 SET SESSION sql_log_bin= 0;
14 CREATE USER 'rec_ssl_user'@'%' REQUIRE SSL;
15 GRANT replication slave ON *.* TO 'rec_ssl_user'@'%';
16 SET SESSION sql_log_bin= 1;
17 #
18 # 2. Start and bootstrap M1.
19 #
20 include/start_and_bootstrap_group_replication.inc
21 #
22 # 3. Insert some data and verify that it gives warning for MD5().
23 #
24 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, hash CHAR(32)) ENGINE=InnoDB;
25 INSERT INTO t1 VALUES (1, 'test');
26 INSERT INTO t1 VALUES (2, MD5(8));
27 Warnings:
28 Warning 4073 SSL fips mode error: FIPS mode ON/STRICT: MD5 digest is not supported.
29 SHOW WARNINGS;
30 Level Code Message
31 Warning 4073 SSL fips mode error: FIPS mode ON/STRICT: MD5 digest is not supported.
32 #
33 # 4. Configure joining member (M2) to use SSL and Fips mode options on recovery.
34 # Start GR on M2. Check the data is there.
35 #
36 [connection server2]
37 # restart:--group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS --ssl-fips-mode=ON
38 include/rpl_reconnect.inc
39 SET @group_replication_recovery_use_ssl_save= @@GLOBAL.group_replication_recovery_use_ssl;
40 SET @group_replication_recovery_ssl_ca_save= @@GLOBAL.group_replication_recovery_ssl_ca;
41 SET @group_replication_recovery_ssl_cert_save= @@GLOBAL.group_replication_recovery_ssl_cert;
42 SET @group_replication_recovery_ssl_key_save= @@GLOBAL.group_replication_recovery_ssl_key;
43 SET @group_replication_recovery_ssl_cipher_save= @@GLOBAL.group_replication_recovery_ssl_cipher;
44 SET @group_replication_recovery_retry_count_save= @@GLOBAL.group_replication_recovery_retry_count;
45 CHANGE REPLICATION SOURCE TO SOURCE_USER="rec_ssl_user" FOR CHANNEL "group_replication_recovery";
46 SET GLOBAL group_replication_recovery_use_ssl= 1;
47 SET GLOBAL group_replication_recovery_ssl_ca= 'MYSQL_TEST_DIR/std_data/cacert.pem';
48 SET GLOBAL group_replication_recovery_ssl_cert= 'MYSQL_TEST_DIR/std_data/client-cert.pem';
49 SET GLOBAL group_replication_recovery_ssl_key= 'MYSQL_TEST_DIR/std_data/client-key.pem';
50 include/start_group_replication.inc
51 #
52 # Check the data is there
53 #
54 include/assert.inc [On the recovered member, the table should exist and have 1 elements;]
55 #
56 # 5. Restart M2 with weak cipher with Fips mode ON and verify it
57 # does not start.
58 #
59 include/stop_group_replication.inc
60 SET SESSION sql_log_bin= 0;
61 call mtr.add_suppression("There was an error when connecting to the donor server. Please check that group_replication_recovery channel credentials and all MEMBER_HOST column values of performance_schema.replication_group_members table are correct and DNS resolvable.");
62 call mtr.add_suppression("For details please check performance_schema.replication_connection_status table and error log messages of Replica I/O for channel group_replication_recovery.");
63 call mtr.add_suppression("Maximum number of retries when trying to connect to a donor reached. Aborting group replication incremental recovery.");
64 call mtr.add_suppression("Fatal error during the incremental recovery process of Group Replication. The server will leave the group.");
65 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
66 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
67 SET SESSION sql_log_bin= 1;
68 SET GLOBAL group_replication_recovery_ssl_cipher= 'CAMELLIA256-SHA';
69 SET GLOBAL group_replication_recovery_retry_count= 1;
70 include/start_group_replication.inc
71 include/stop_group_replication.inc
72 #
73 # Clean up
74 #
75 SET @@GLOBAL.group_replication_recovery_use_ssl= @group_replication_recovery_use_ssl_save;
76 SET @@GLOBAL.group_replication_recovery_ssl_ca= @group_replication_recovery_ssl_ca_save;
77 SET @@GLOBAL.group_replication_recovery_ssl_cert= @group_replication_recovery_ssl_cert_save;
78 SET @@GLOBAL.group_replication_recovery_ssl_key= @group_replication_recovery_ssl_key_save;
79 SET @@GLOBAL.group_replication_recovery_ssl_cipher= @group_replication_recovery_ssl_cipher_save;
80 SET @@GLOBAL.group_replication_recovery_retry_count= @group_replication_recovery_retry_count_save;
81 [connection server1]
82 SET SESSION sql_log_bin= 0;
83 DROP USER 'rec_ssl_user';
84 SET SESSION sql_log_bin= 1;
85 DROP TABLE t1;
86 include/group_replication_end.inc