Bug #116312 | 8.0 replica cannot establish TLS connection with 5.7 replication source | ||
---|---|---|---|
Submitted: | 7 Oct 2024 16:51 | Modified: | 2 Nov 2024 20:46 |
Reporter: | Pierre C. Dussault | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | 8.0.39 | OS: | Red Hat (Almalinux 8) |
Assigned to: | MySQL Verification Team | CPU Architecture: | x86 |
Tags: | encryption, replication |
[7 Oct 2024 16:51]
Pierre C. Dussault
[7 Oct 2024 23:03]
Pierre C. Dussault
I think 'Not a bug'. The CLI client connection is not encrypted. SHOW VARIABLES LIKE '%ssl_cipher%' gives an empty result even though the connection succeeds. Not sure why
[7 Oct 2024 23:20]
Pierre C. Dussault
Ok this is odd. After connecting as previously mentioned with the mysql CLI client, if I enter: --- SHOW VARIABLES LIKE '%ssl_cipher%'; --- I get an empty result (as mentioned earlier): --- | Variable_name | Value | +---------------+-------+ | ssl_cipher | | --- However, if I use the following command, taken directly from the AWS RDS documentation (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/ssl-certificate-rotation-mysql.html): --- SELECT id, user, host, connection_type FROM performance_schema.threads pst INNER JOIN information_schema.processlist isp ON pst.processlist_id = isp.id; --- ... in order to verify which users are connected via SSL/TLS, my current connection is output as using SSL/TLS: --- id | user | host | connection_type | +-------+----------+-------------------------------------------------+-----------------+ | 12967 | <REDACTED> | <REDACTED> | SSL/TLS | --- ... so, I am not even sure if I am using a TLS connection or not. How to tell?
[10 Oct 2024 2:30]
Pierre C. Dussault
On the server side in the AWS RDS instance, when the replica tries to connect, it logs "Bad handshake".
[24 Oct 2024 9:43]
MySQL Verification Team
Hi, I cannot reproduce this with our binaries. Maybe the problem is with RDS?
[2 Nov 2024 20:46]
Pierre C. Dussault
Likely so. I ended up using an EC2 instance to create an SSH port forwarding tunnel to encrypt network traffic between the new database and the RDS instance, without using the replication's built-in encryption mecanism.