Review the minimum TLS version for Azure Redis

Protect Redis connections with supported TLS versions and certificate validation.

Description

Azure Cache for Redis requires TLS 1.2 or later on TLS connections. AzureRM 5.6.0 defaults minimum_tls_version to "1.2".

Potential impact

Clients that only support TLS 1.0 or 1.1 cannot connect. The plaintext port and server certificate validation need separate checks.

Remediation

Set minimum_tls_version = "1.2" explicitly and disable the non-TLS port. From each app, confirm that it negotiates TLS 1.2 or later, validates the server certificate and authenticates to the cache.

Examples

Both excerpts disable the plaintext port. The first shows the obsolete "1.1" setting, which the service and AzureRM 5.6.0 reject.

Before

hcl
resource "azurerm_redis_cache" "example" {
  name                 = "example-cache"
  location             = azurerm_resource_group.example.location
  resource_group_name  = azurerm_resource_group.example.name
  capacity             = 2
  family               = "C"
  sku_name             = "Standard"
  non_ssl_port_enabled = false
  minimum_tls_version  = "1.1"
}

After

hcl
resource "azurerm_redis_cache" "example" {
  name                 = "example-cache"
  location             = azurerm_resource_group.example.location
  resource_group_name  = azurerm_resource_group.example.name
  capacity             = 2
  family               = "C"
  sku_name             = "Standard"
  non_ssl_port_enabled = false
  minimum_tls_version  = "1.2"
}

References