include/group_replication.inc [rpl_server_count=3] Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection server1] ############################################################ # 0. Configure members to use encryption and save defaults. [connection server1] SET @tls_version_save= @@GLOBAL.tls_version; SET @tls_ciphersuites_save= @@GLOBAL.tls_ciphersuites; SET @ssl_cipher_save= @@GLOBAL.ssl_cipher; SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode; SET @@GLOBAL.group_replication_ssl_mode= REQUIRED; [connection server2] SET @tls_version_save= @@GLOBAL.tls_version; SET @tls_ciphersuites_save= @@GLOBAL.tls_ciphersuites; SET @ssl_cipher_save= @@GLOBAL.ssl_cipher; SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode; SET @@GLOBAL.group_replication_ssl_mode= REQUIRED; SET SESSION sql_log_bin= 0; call mtr.add_suppression("\\[GCS\\] Error connecting to all peers. Member join failed. Local port:*"); call mtr.add_suppression("\\[GCS\\] The member was unable to join the group.*"); call mtr.add_suppression("Timeout on wait for view after joining group"); call mtr.add_suppression("Error connecting to the local group communication engine instance"); SET SESSION sql_log_bin= 1; [connection server3] SET @tls_version_save= @@GLOBAL.tls_version; SET @tls_ciphersuites_save= @@GLOBAL.tls_ciphersuites; SET @ssl_cipher_save= @@GLOBAL.ssl_cipher; SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode; SET @@GLOBAL.group_replication_ssl_mode= REQUIRED; SET SESSION sql_log_bin= 0; call mtr.add_suppression("\\[GCS\\] Error connecting to all peers. Member join failed. Local port:*"); call mtr.add_suppression("\\[GCS\\] The member was unable to join the group.*"); call mtr.add_suppression("Timeout on wait for view after joining group"); call mtr.add_suppression("Error connecting to the local group communication engine instance"); SET SESSION sql_log_bin= 1; ############################################################ # 1. 3 members group with OpenSSL 1.1.1 # Verify that it is possible to join a node which has TLS version 1.3 # and lower versions to a group which doesn't have this version. # No --tls-ciphersuites # server1: --tls-version='TLSv1,TLSv1.1,TLSv1.2' # server2: --tls-version='TLSv1,TLSv1.1,TLSv1.2' # server3: --tls-version='TLSv1,TLSv1.1,TLSv1.2,TLSv1.3' # Outcome: group will work. [connection server1] SET @@GLOBAL.tls_version= 'TLSv1,TLSv1.1,TLSv1.2'; ALTER INSTANCE RELOAD TLS; include/start_and_bootstrap_group_replication.inc [connection server2] SET @@GLOBAL.tls_version= 'TLSv1,TLSv1.1,TLSv1.2'; ALTER INSTANCE RELOAD TLS; include/start_group_replication.inc [connection server3] SET @@GLOBAL.tls_version= 'TLSv1,TLSv1.1,TLSv1.2,TLSv1.3'; ALTER INSTANCE RELOAD TLS; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc [connection server1] include/stop_group_replication.inc [connection server2] include/stop_group_replication.inc [connection server3] include/stop_group_replication.inc ############################################################ # 2. 2 members group with OpenSSL 1.1.1 # Verify that it is possible to start group replication when : # * TLS version is 1.3 # * A TLS ciphersuite compatible with this version is enabled # --tls-version='TLSv1.3' # --tls-ciphersuites='TLS_AES_128_CCM_SHA256' (disabled by default) # Outcome: group will work. [connection server1] SET @@GLOBAL.tls_version= 'TLSv1.3'; SET @@GLOBAL.tls_ciphersuites= 'TLS_AES_128_CCM_SHA256'; ALTER INSTANCE RELOAD TLS; include/start_and_bootstrap_group_replication.inc [connection server2] SET @@GLOBAL.tls_version= 'TLSv1.3'; SET @@GLOBAL.tls_ciphersuites= 'TLS_AES_128_CCM_SHA256'; ALTER INSTANCE RELOAD TLS; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc [connection server1] include/stop_group_replication.inc [connection server2] include/stop_group_replication.inc ############################################################ # 3. 3 members group with OpenSSL 1.1.1 # Verify that it is possible to start group replication when: # * TLS version is 1.3 # * Intersection of the allowed TLS chipersuites is non empty and valid. # --tls-version='TLSv1.3' # server1: --tls-ciphersuites='TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384' # server2: --tls-ciphersuites='TLS_AES_256_GCM_SHA384:TLS_AES_128_CCM_SHA256' # server3: --tls-ciphersuites='TLS_AES_128_CCM_8_SHA256: TLS_AES_256_GCM_SHA384' # Outcome: group will work. [connection server1] SET @@GLOBAL.tls_version= 'TLSv1.3'; SET @@GLOBAL.tls_ciphersuites= 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384'; ALTER INSTANCE RELOAD TLS; include/start_and_bootstrap_group_replication.inc [connection server2] SET @@GLOBAL.tls_version= 'TLSv1.3'; SET @@GLOBAL.tls_ciphersuites= 'TLS_AES_256_GCM_SHA384:TLS_AES_128_CCM_SHA256'; ALTER INSTANCE RELOAD TLS; include/start_group_replication.inc [connection server3] SET @@GLOBAL.tls_version= 'TLSv1.3'; SET @@GLOBAL.tls_ciphersuites= 'TLS_AES_128_CCM_8_SHA256: TLS_AES_256_GCM_SHA384'; ALTER INSTANCE RELOAD TLS; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc [connection server1] include/stop_group_replication.inc [connection server2] include/stop_group_replication.inc [connection server3] include/stop_group_replication.inc ############################################################ # 4. 3 members group with OpenSSL 1.1.1 # Verify that is is possible to join a node to a group when: # * List of TLS version of the group includes v1.3 and lower versions # * TLS chipersuites of the node is compatible with the group, # therefore TLS v1.3 is supported # * SLL cipher of the node is incompatible with the group, therefore # TLS versions lower than 1.3 are not supported # --tls-version='TLSv1,TLSv1.1,TLSv1.2,TLSv1.3' # server1: --tls-ciphersuites='TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384' # server1: --ssl-cipher='AES256-SHA:AES256-SHA256' # server2: --tls-ciphersuites='TLS_AES_256_GCM_SHA384:TLS_AES_128_CCM_SHA256' # server2: --ssl-cipher='CAMELLIA256-SHA' # server3: --tls-ciphersuites='TLS_AES_256_GCM_SHA384' # server3: --ssl-cipher='CAMELLIA128-SHA' # Outcome: group will work. [connection server1] SET @@GLOBAL.tls_version= 'TLSv1,TLSv1.1,TLSv1.2,TLSv1.3'; SET @@GLOBAL.ssl_cipher= 'AES256-SHA:AES256-SHA256'; SET @@GLOBAL.tls_ciphersuites= 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384'; ALTER INSTANCE RELOAD TLS; include/start_and_bootstrap_group_replication.inc [connection server2] SET @@GLOBAL.tls_version= 'TLSv1,TLSv1.1,TLSv1.2,TLSv1.3'; SET @@GLOBAL.ssl_cipher= 'CAMELLIA256-SHA'; SET @@GLOBAL.tls_ciphersuites ='TLS_AES_256_GCM_SHA384:TLS_AES_128_CCM_SHA256'; ALTER INSTANCE RELOAD TLS; include/start_group_replication.inc [connection server3] SET @@GLOBAL.tls_version= 'TLSv1,TLSv1.1,TLSv1.2,TLSv1.3'; SET @@GLOBAL.ssl_cipher = 'CAMELLIA128-SHA'; SET @@GLOBAL.tls_ciphersuites = 'TLS_AES_256_GCM_SHA384'; ALTER INSTANCE RELOAD TLS; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc [connection server1] include/stop_group_replication.inc [connection server2] include/stop_group_replication.inc [connection server3] include/stop_group_replication.inc ############################################################ # 5. Clean up. [connection server1] SET @@GLOBAL.group_replication_ssl_mode= @group_replication_ssl_mode_save; SET @@GLOBAL.tls_version= @tls_version_save; SET @@GLOBAL.tls_ciphersuites= @tls_ciphersuites_save; SET @@GLOBAL.ssl_cipher = @ssl_cipher_save; ALTER INSTANCE RELOAD TLS; [connection server2] SET @@GLOBAL.group_replication_ssl_mode= @group_replication_ssl_mode_save; SET @@GLOBAL.tls_version= @tls_version_save; SET @@GLOBAL.tls_ciphersuites= @tls_ciphersuites_save; SET @@GLOBAL.ssl_cipher = @ssl_cipher_save; ALTER INSTANCE RELOAD TLS; [connection server3] SET @@GLOBAL.group_replication_ssl_mode= @group_replication_ssl_mode_save; SET @@GLOBAL.tls_version= @tls_version_save; SET @@GLOBAL.tls_ciphersuites = @tls_ciphersuites_save; SET @@GLOBAL.ssl_cipher = @ssl_cipher_save; ALTER INSTANCE RELOAD TLS; include/group_replication_end.inc