説明
Azure Cache for Redis の非 TLS ポートを有効にすると、TLS 接続に加えて平文接続も利用できます。
想定される影響
このポートで送信したキャッシュデータ、セッショントークン、認証情報は通信経路上で漏えいするおそれがあります。
対処方法
アプリと管理ツールを TLS ポートに切り替え、サーバー証明書とホスト名を検証します。認証付きの接続を確認してから非 TLS ポートを無効にし、平文接続が拒否されることをテストしてください。キャッシュの認証とネットワーク制限は維持します。
例
どちらの例も同じ Standard キャッシュで最小 TLS バージョンを 1.2 に保ちます。参照先のリソースグループを用意し、AzureRM 3.117.1 では enable_non_ssl_port = false、5.6.0 では non_ssl_port_enabled = false を指定してください。
変更前
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"
enable_non_ssl_port = true
minimum_tls_version = "1.2"
redis_configuration {
}
}
変更後
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"
enable_non_ssl_port = false
minimum_tls_version = "1.2"
redis_configuration {
}
}