いわさです。
先日 Azure Front Door の TLS 1.3 サポート状況が現状よくわからないという話を記事にしました。
一方で Azure Application Gateway についてはしっかりとサポートされているようです。
2022 年 7 月にプレビューリリースされ、同年 11 月には GA となっています。
また、上記アナウンスではデフォルトポリシーについてもいずれ更新される予定だと記述されています。
本日は Application Gateway の最新デフォルトポリシーの状況と、カスタムポリシーの設定方法について確認してみましたので紹介します。
Application Gateway V2 の SSL ポリシーでサポートされる
早速 Application Gateway を作成していきたいのですが、TLS 1.3 をサポート出来るのは SKU が Standard V2 か WAF V2 のみとなっています。
そのため今回は Standard V2 で作成を行いました。
基本的な Application Gateway の構成手順については割愛します。
作成後リスナー設定から適用される SSL ポリシーを確認することが出来ます。
本日時点のデフォルト SSL ポリシーは次のようになっていました。
sslscan
で確認してみると次のとおり TLS 1.2 と TLS 1.3 が有効化されており、TLS 1.0 と TLS 1.1 は無効化されています。
また、TLS 1.2 についても PFS 対応暗号スイートのみがサポートされています。
% sslscan https://hoge0225.tak1wa.com/
Version: 2.1.3
OpenSSL 3.2.1 30 Jan 2024
Connected to 74.226.225.199
Testing SSL server hoge0225.tak1wa.com on port 443 using SNI name hoge0225.tak1wa.com
SSL/TLS Protocols:
SSLv2 disabled
SSLv3 disabled
TLSv1.0 disabled
TLSv1.1 disabled
TLSv1.2 enabled
TLSv1.3 enabled
TLS Fallback SCSV:
Server supports TLS Fallback SCSV
TLS renegotiation:
Session renegotiation not supported
TLS Compression:
OpenSSL version does not support compression
Rebuild with zlib1g-dev package for zlib support
Heartbleed:
TLSv1.3 not vulnerable to heartbleed
TLSv1.2 not vulnerable to heartbleed
Supported Server Cipher(s):
Preferred TLSv1.3 256 bits TLS_AES_256_GCM_SHA384 Curve 25519 DHE 253
Accepted TLSv1.3 128 bits TLS_AES_128_GCM_SHA256 Curve 25519 DHE 253
Preferred TLSv1.2 128 bits ECDHE-RSA-AES128-GCM-SHA256 Curve 25519 DHE 253
Accepted TLSv1.2 256 bits ECDHE-RSA-AES256-GCM-SHA384 Curve 25519 DHE 253
Accepted TLSv1.2 128 bits ECDHE-RSA-AES128-SHA256 Curve 25519 DHE 253
Accepted TLSv1.2 256 bits ECDHE-RSA-AES256-SHA384 Curve 25519 DHE 253
Server Key Exchange Group(s):
TLSv1.3 128 bits secp256r1 (NIST P-256)
TLSv1.3 192 bits secp384r1 (NIST P-384)
TLSv1.3 260 bits secp521r1 (NIST P-521)
TLSv1.3 128 bits x25519
TLSv1.3 224 bits x448
TLSv1.2 128 bits secp256r1 (NIST P-256)
TLSv1.2 192 bits secp384r1 (NIST P-384)
TLSv1.2 260 bits secp521r1 (NIST P-521)
TLSv1.2 128 bits x25519
TLSv1.2 224 bits x448
SSL Certificate:
Signature Algorithm: sha256WithRSAEncryption
RSA Key Strength: 2048
Subject: hoge0225.tak1wa.com
Issuer: hoge0225.tak1wa.com
Not valid before: Feb 25 00:22:30 2024 GMT
Not valid after: Feb 25 00:32:30 2025 GMT
SSL ポリシーをカスタムする
Azure Application Gateway の SSL ポリシーは柔軟にカスタマイズすることが出来ます。
最小プロトコルバージョンと、サポートさせる暗号スイートを任意で選択することが出来ます。
ただし、TLS 1.3 のさオートについては通常のカスタムポリシーではなく、CustomV2 ポリシーでのみ設定が出来ます。
カスタムの場合は最小 TLS には TLS 1.0 から TLS 1.2 まで選択可能です。
一方で CustomV2 の場合は次のように最小プロトコルバージョンに指定出来るのは TLS 1.2 と TLS 1.3 のみです。
TLS 1.3 を最小にするのはまだしばらくは無さそうな気がしますが、最小に TLS 1.3 からも指定出来るみたいですね。
まず次のように TLS 1.3 のみでポリシーを変更してみました。
sslscan
で確認してみると、確かに TLS 1.2 も無効化されていますね。
% sslscan https://hoge0225.tak1wa.com/
Version: 2.1.3
OpenSSL 3.2.1 30 Jan 2024
Connected to 74.226.225.199
Testing SSL server hoge0225.tak1wa.com on port 443 using SNI name hoge0225.tak1wa.com
SSL/TLS Protocols:
SSLv2 disabled
SSLv3 disabled
TLSv1.0 disabled
TLSv1.1 disabled
TLSv1.2 disabled
TLSv1.3 enabled
TLS Fallback SCSV:
Server supports TLS Fallback SCSV
TLS renegotiation:
Session renegotiation not supported
TLS Compression:
OpenSSL version does not support compression
Rebuild with zlib1g-dev package for zlib support
Heartbleed:
TLSv1.3 not vulnerable to heartbleed
Supported Server Cipher(s):
Preferred TLSv1.3 256 bits TLS_AES_256_GCM_SHA384 Curve 25519 DHE 253
Accepted TLSv1.3 128 bits TLS_AES_128_GCM_SHA256 Curve 25519 DHE 253
Server Key Exchange Group(s):
TLSv1.3 128 bits secp256r1 (NIST P-256)
TLSv1.3 192 bits secp384r1 (NIST P-384)
TLSv1.3 260 bits secp521r1 (NIST P-521)
TLSv1.3 128 bits x25519
TLSv1.3 224 bits x448
SSL Certificate:
Signature Algorithm: sha256WithRSAEncryption
RSA Key Strength: 2048
Subject: hoge0225.tak1wa.com
Issuer: hoge0225.tak1wa.com
Not valid before: Feb 25 00:22:30 2024 GMT
Not valid after: Feb 25 00:32:30 2025 GMT
ちなみに CustomV2 の TLS 1.2 暗号スイートは PFS 対応のもののみが使えました。
一方で従来(レガシー?)のカスタムポリシーだと TLS 1.2 で RSA も選択出来ますね。
現在は TLS 1.2 以上で PFS 対応暗号スイートの利用が推奨されているので、レガシークライアントのサポートが必須要件でなければ CustomV2 を基本的に使うのが良いですね。
カスタムの場合はレガシークライアントサポート用に非推奨のバージョンを設定出来ます。
次は TLS 1.1 を最低プロトコルバージョンに指定した場合です。
% sslscan https://hoge0225.tak1wa.com/
Version: 2.1.3
OpenSSL 3.2.1 30 Jan 2024
Connected to 74.226.225.199
Testing SSL server hoge0225.tak1wa.com on port 443 using SNI name hoge0225.tak1wa.com
SSL/TLS Protocols:
SSLv2 disabled
SSLv3 disabled
TLSv1.0 disabled
TLSv1.1 enabled
TLSv1.2 enabled
TLSv1.3 disabled
TLS Fallback SCSV:
Server supports TLS Fallback SCSV
TLS renegotiation:
Session renegotiation not supported
TLS Compression:
OpenSSL version does not support compression
Rebuild with zlib1g-dev package for zlib support
Heartbleed:
TLSv1.2 not vulnerable to heartbleed
TLSv1.1 not vulnerable to heartbleed
Supported Server Cipher(s):
Preferred TLSv1.2 256 bits AES256-SHA256
Accepted TLSv1.2 256 bits ECDHE-RSA-AES256-SHA384 Curve P-256 DHE 256
Accepted TLSv1.2 128 bits ECDHE-RSA-AES128-GCM-SHA256 Curve P-256 DHE 256
Accepted TLSv1.2 128 bits ECDHE-RSA-AES128-SHA256 Curve P-256 DHE 256
Accepted TLSv1.2 128 bits AES128-GCM-SHA256
Accepted TLSv1.2 128 bits AES128-SHA256
Accepted TLSv1.2 128 bits AES128-SHA
Accepted TLSv1.2 256 bits AES256-SHA
Accepted TLSv1.2 256 bits AES256-GCM-SHA384
Preferred TLSv1.1 128 bits AES128-SHA
Accepted TLSv1.1 256 bits AES256-SHA
SSL Certificate:
Signature Algorithm: sha256WithRSAEncryption
RSA Key Strength: 2048
Subject: hoge0225.tak1wa.com
Issuer: hoge0225.tak1wa.com
Not valid before: Feb 25 00:22:30 2024 GMT
Not valid after: Feb 25 00:32:30 2025 GMT
TLS 1.1 と TLS 1.2 が使える状態であることを確認しました。
柔軟に設定出来て良きですが、気をつけて使う必要がありますね。
さいごに
本日は Azure Application Gateway で TLS 1.3 がサポートされているので、カスタム SSL ポリシーやデフォルトポリシーの設定値を確認してみました。
AWS だとセキュリティポリシーということで暗号スイートのセットが提供されている形なのですが、Azure の場合は柔軟にカスタマイズすることも出来ますね。
高セキュリティなポリシー設定も出来ますし、レガシークライアントをサポートするための例外的なポリシー設定も出来ます。