| 1 |
# |
| 2 |
# Validate that a node does not join a replication group when it has incompatible |
| 3 |
# certificates with the group |
| 4 |
# |
| 5 |
# server1: --ssl-*=<Group_1_certificates> |
| 6 |
# --admin-ssl-*=<Group_2_certificates> |
| 7 |
# --loose-group_replication_tls_source=MYSQL_MAIN |
| 8 |
# server2: --ssl-*=<Group_1_certificates> |
| 9 |
# --admin-ssl-*=<Group_2_certificates> |
| 10 |
# --loose-group_replication_tls_source=MYSQL_ADMIN |
| 11 |
# |
| 12 |
# |
| 13 |
# Steps: |
| 14 |
# 1. Start one member with GCS SSL enabled. |
| 15 |
# 2. Start the second member with GCS SSL enabled. Since it uses |
| 16 |
# incompatible certificates it should not be able to join the group. |
| 17 |
# 3. Clean up. |
| 18 |
# |
| 19 |
--source include/big_test.inc |
| 20 |
--source include/have_group_replication_xcom_communication_stack.inc |
| 21 |
--source include/have_group_replication_plugin.inc |
| 22 |
--let $rpl_skip_group_replication_start= 1 |
| 23 |
--source include/group_replication.inc |
| 24 |
|
| 25 |
|
| 26 |
--echo |
| 27 |
--echo ############################################################ |
| 28 |
--echo # 1. Start one member with GCS SSL enabled. |
| 29 |
--let $rpl_connection_name= server1 |
| 30 |
--source include/rpl_connection.inc |
| 31 |
SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode; |
| 32 |
SET GLOBAL group_replication_ssl_mode= VERIFY_CA; |
| 33 |
--source include/start_and_bootstrap_group_replication.inc |
| 34 |
|
| 35 |
--let $grep_file= $MYSQLTEST_VARDIR/tmp/gr_ssl_mode_tls_source_incompatible_certificates.1.err |
| 36 |
--let $grep_pattern= Group communication SSL configuration: group_replication_ssl_mode: "VERIFY_CA" |
| 37 |
--let $grep_output= print_count |
| 38 |
--source include/grep_pattern.inc |
| 39 |
|
| 40 |
|
| 41 |
--echo |
| 42 |
--echo ############################################################ |
| 43 |
--echo # 2. Start the second member with GCS SSL enabled. |
| 44 |
--echo # Since it uses incompatible certificates it should not |
| 45 |
--echo # be able to join the group. |
| 46 |
|
| 47 |
--let $rpl_connection_name= server2 |
| 48 |
--source include/rpl_connection.inc |
| 49 |
--disable_query_log |
| 50 |
--eval SET GLOBAL group_replication_group_name= '$group_replication_group_name' |
| 51 |
--enable_query_log |
| 52 |
|
| 53 |
SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode; |
| 54 |
SET GLOBAL group_replication_ssl_mode= VERIFY_CA; |
| 55 |
|
| 56 |
|
| 57 |
--error ER_GROUP_REPLICATION_CONFIGURATION |
| 58 |
START GROUP_REPLICATION; |
| 59 |
|
| 60 |
|
| 61 |
--let $assert_file = $MYSQLTEST_VARDIR/tmp/gr_ssl_mode_tls_source_incompatible_certificates.2.err |
| 62 |
--let $assert_only_after= .*XCom initialized and ready to accept incoming connections.* |
| 63 |
--let $assert_select =.*Error connecting using SSL.* |
| 64 |
--let $assert_match =.*Error connecting using SSL.* |
| 65 |
--let $assert_text = Check that group replication errors while connecting using SSL. |
| 66 |
--source include/assert_grep.inc |
| 67 |
|
| 68 |
--let $grep_file= $MYSQLTEST_VARDIR/tmp/gr_ssl_mode_tls_source_incompatible_certificates.2.err |
| 69 |
--let $grep_pattern= Group communication SSL configuration: group_replication_ssl_mode: "VERIFY_CA" |
| 70 |
--let $grep_output= print_count |
| 71 |
--source include/grep_pattern.inc |
| 72 |
|
| 73 |
--let $rpl_connection_name= server1 |
| 74 |
--source include/rpl_connection.inc |
| 75 |
--source include/stop_group_replication.inc |
| 76 |
|
| 77 |
|
| 78 |
--echo |
| 79 |
--echo ############################################################ |
| 80 |
--echo # 3. Clean up. |
| 81 |
--let $rpl_connection_name= server1 |
| 82 |
--source include/rpl_connection.inc |
| 83 |
SET GLOBAL group_replication_ssl_mode= @group_replication_ssl_mode_save; |
| 84 |
|
| 85 |
--let $rpl_connection_name= server2 |
| 86 |
--source include/rpl_connection.inc |
| 87 |
SET GLOBAL group_replication_ssl_mode= @group_replication_ssl_mode_save; |
| 88 |
|
| 89 |
--source include/group_replication_end.inc |