Description
ssl_action = "Open" enables TLS on supported RDS instances. Configure each client to require TLS and verify the server’s CA and hostname.
Potential impact
Plaintext connections expose credentials and query data. Skipping certificate checks can connect clients to the wrong server.
Remediation
Reconnect a MySQL client and run SHOW SESSION STATUS LIKE 'Ssl_cipher'. A nonempty value confirms encryption for that session. If all clients must use TLS, enable enforcement for your engine and verify it rejects a new plaintext connection.
Examples
The excerpts use RDS MySQL. Supply a supported version, instance settings, network and database accounts.
Before
hcl
resource "alicloud_db_instance" "default" {
engine = "MySQL"
engine_version = var.mysql_version
instance_type = var.db_instance_type
instance_storage = var.db_instance_storage
ssl_action = "Close"
}
After
hcl
resource "alicloud_db_instance" "default" {
engine = "MySQL"
engine_version = var.mysql_version
instance_type = var.db_instance_type
instance_storage = var.db_instance_storage
ssl_action = "Open"
}