MySQL Flexible Server must require secure transport

High Azure General mysql-secure-transport

Applies to

  • Microsoft.DBforMySQL/flexibleServers

What CGPulse checks

A resource passes this rule when requireSecureTransport must equal ON. Anything else is reported as a finding with the evaluated property value attached as evidence.

How to fix it

Require SSL for all connections to encrypt queries and data in transit. In Azure Portal: MySQL > Server parameters > set require_secure_transport to ON. See: https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-connect-tls-ssl

Careful: May break clients not configured for SSL connections

CLI

az mysql flexible-server parameter set --ids "{id}" -n require_secure_transport --value ON

Terraform

resource "azurerm_mysql_flexible_server" "{name}" {
  name                = "{name}"
  resource_group_name = "{rg}"
  location            = var.location
  sku_name            = "B_Standard_B1ms"
}
resource "azurerm_mysql_flexible_server_configuration" "require_ssl" {
  name                = "require_secure_transport"
  resource_group_name = "{rg}"
  server_name         = azurerm_mysql_flexible_server.{name}.name
  value               = "ON"
}

Compliance frameworks

Vendor documentation

Is your environment compliant with this rule?

CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.

Run a free scan

Related Azure rules

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.