Azure Proactive Resiliency Library v2
Tools Glossary GitHub GitHub Issues Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

applicationGateways

Summary

RecommendationImpactCategoryAutomation AvailablePG Verified
自動スケール機能が有効になっていることを確認してくださいMediumScalabilityYesVerified
すべての受信接続を SSL で保護するHighSecurityYesVerified
Web アプリケーション ファイアウォール ポリシーを有効にするLowSecurityYesVerified
Application Gateway v2 への移行HighScalabilityYesVerified
構成とトラフィックを監視し、ログに記録しますHighMonitoring and AlertingNoVerified
ヘルスプローブを使用してバックエンドの可用性を検出するHighMonitoring and AlertingYesVerified
ゾーン冗長構成で Application Gateway をデプロイするHighHigh AvailabilityYesVerified
コネクションドレインを使用してバックエンドのメンテナンスを計画するMediumHigh AvailabilityYesVerified
Application Gateway サブネットが /24 サブネット マスクを使用していることを確認するHighOther Best PracticesYesVerified

Details


自動スケール機能が有効になっていることを確認してください

Impact:  Medium Category:  Scalability PG Verified:  Verified

Description:

Azure Application Gateways v2 は、デフォルトで複数のインスタンスを使用して常に高可用性の方法でデプロイされます。自動スケールを有効にすると、サービスはスケーリングのための手動介入に依存しなくなります。

Potential Benefits:

Enhances uptime and enables autoscaling
Learn More:
Application Gateway Autoscaling Zone-Redundant

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// This query will return all Application Gateways that do not have autoscale enabled or have a min capacity of 1
resources
| where type =~ "microsoft.network/applicationGateways"
| where isnull(properties.autoscaleConfiguration) or properties.autoscaleConfiguration.minCapacity <= 1
| project recommendationId = "823b0cff-05c0-2e4e-a1e7-9965e1cfa16f", name, id, tags, param1 = "autoScaleConfiguration: isNull or MinCapacity <= 1"
| order by id asc




すべての受信接続を SSL で保護する

Impact:  High Category:  Security PG Verified:  Verified

Description:

Application Gateway でのエンドツーエンド SSL/TLS または SSL/TLS 終端により、運用サービスに対して HTTPS を使用してすべての受信接続を保護し、攻撃から保護し、Web サーバーとブラウザーの間でデータのプライバシーと暗号化を確保します。

Potential Benefits:

Enhanced security and privacy
Learn More:
Application Gateway Security
Application Gateway SSL Overview
Application Gateway SSL Policy Overview
Application Gateway KeyVault Certs
Application Gateway SSL Cert Management

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// You can use the following Azure Resource Graph query to check if an HTTP rule is using an SSL certificate or is using Azure Key Vault to store the certificates
resources
| where type =~ "microsoft.network/applicationGateways"
| mv-expand frontendPorts = properties.frontendPorts
| mv-expand httpListeners = properties.httpListeners
| where isnull(parse_json(httpListeners.properties.sslCertificate))
| project recommendationId="233a7008-71e9-e745-923e-1a1c7a0b92f3", name, id, tags, param1=strcat("frontendPort: ", frontendPorts.properties.port), param2="tls: false"



Web アプリケーション ファイアウォール ポリシーを有効にする

Impact:  Low Category:  Security PG Verified:  Verified

Description:

アプリケーション仮想ネットワークで Application Gateway と Web アプリケーション ファイアウォール (WAF) を使用して、受信 HTTP/S インターネット トラフィックを保護します。 WAF は、OWASP コア ルール セット ベースのルールを通じて、潜在的なエクスプロイトに対する一元的な防御を提供します。

Potential Benefits:

Enhanced security for HTTP/S traffic
Learn More:
Well-Architected Framework Application Gateway Overview
Application Gateway - Web Application Firewall

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// This query will return all Application Gateways that do not have WAF enabled
Resources
| where type =~ "microsoft.network/applicationGateways"
| where properties.firewallpolicy != ""
| project recommendationId = "8d9223c4-730d-ca47-af88-a9a024c37270", name, id, tags, param1 = "webApplicationFirewallConfiguration: isNull"
| order by id asc




Application Gateway v2 への移行

Impact:  High Category:  Scalability PG Verified:  Verified

Description:

v1 が必要な場合を除き、自動スケーリング、静的 VIP、Azure KeyVault 統合などの組み込み機能を使用してトラフィック管理とパフォーマンスを向上させます。

Potential Benefits:

Better performance, autoscaling, more features
Learn More:
Application Gateway Overview V2
Application Gateway Feature Comparison Between V1 and V2
Application Gateway V1 Retirement

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Get all Application Gateways, which are using the deprecated V1 SKU
resources
| where type =~ 'microsoft.network/applicationgateways'
| extend tier = properties.sku.tier
| where tier == 'Standard' or tier == 'WAF'
| project recommendationId = "7893f0b3-8622-1d47-beed-4b50a19f7895", name, id, tags



構成とトラフィックを監視し、ログに記録します

Impact:  High Category:  Monitoring and Alerting PG Verified:  Verified

Description:

ストレージ アカウント、Log Analytics、監査と分析情報の監視サービスへのログインを有効にします。 NSG を使用している場合は、NSG フロー ログの保存を有効にして、Azure クラウドへの詳細なトラフィック分析を提供します。

Potential Benefits:

Enhanced traffic insight and audit
Learn More:
Application Gateway Metrics
Application Gateway Diagnostics

ARG Query:

Click the Azure Resource Graph tab to view the query

// cannot-be-validated-with-arg



ヘルスプローブを使用してバックエンドの可用性を検出する

Impact:  High Category:  Monitoring and Alerting PG Verified:  Verified

Description:

カスタム正常性プローブを使用すると、バックエンドの可用性についての理解が深まり、バックエンド サービスの影響の監視が容易になります。

Potential Benefits:

Ensures backend uptime monitoring.
Learn More:
Application Gateway Probe Overview
Well-Architected Framework Application Gateway Overview

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// Application Gateways are not using health probes to monitor the availability of the backend systems
resources
| where type =~ "microsoft.network/applicationGateways"
| where array_length(properties.probes) == 0
| project recommendationId="847a8d88-21c4-bc48-a94e-562206edd767", name, id, tags, param1="customHealthProbeUsed: false"



ゾーン冗長構成で Application Gateway をデプロイする

Impact:  High Category:  High Availability PG Verified:  Verified

Description:

Application Gateway をゾーン対応構成でデプロイすると、特定のゾーンがダウンした場合でも、他のゾーンのサービスは引き続き利用できるため、お客様はサービスに継続的にアクセスできます。

Potential Benefits:

Enhanced uptime and customer access
Learn More:
Well-Architected Framework Application Gateway Reliability
Application Gateway V2 Overview

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// list Application Gateways that are not configured to use at least 2 Availability Zones
resources
| where type =~ "microsoft.network/applicationGateways"
| where isnull(zones) or array_length(zones) < 2
| extend zoneValue = iff((isnull(zones)), "null", zones)
| project recommendationId = "c9c00f2a-3888-714b-a72b-b4c9e8fcffb2", name, id, tags, param1="Zones: No Zone or Zonal", param2=strcat("Zones value: ", zoneValue )



コネクションドレインを使用してバックエンドのメンテナンスを計画する

Impact:  Medium Category:  High Availability PG Verified:  Verified

Description:

バックエンドのメンテナンスに接続ドレインを使用すると、更新時や正常性の問題時にバックエンド プール メンバーが正常に削除されます。これはバックエンド設定を通じて有効になり、ルールの作成中にすべてのメンバーに適用されます。

Potential Benefits:

Smooth updates, no dropped users
Learn More:
Application Gateway Connection Draining
Application Gateway Connection Draining HTTP Settings

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// This query will check if connection draining is enabled
resources
| where type =~ "microsoft.network/applicationGateways"
| mv-expand backendHttpSettings = properties.backendHttpSettingsCollection
| extend connectionDrainingEnabled = backendHttpSettings.properties.connectionDraining.enabled
| where connectionDrainingEnabled != true
| extend backendPoolName = backendHttpSettings.name
| project recommendationId = "10f02bc6-e2e7-004d-a2c2-f9bf9f16b915", name, id, tags, param1 = "connectionDraining: Disabled", param2 = strcat("backendSettingsName: ", backendPoolName)



Application Gateway サブネットが /24 サブネット マスクを使用していることを確認する

Impact:  High Category:  Other Best Practices PG Verified:  Verified

Description:

Application Gateway v2 (Standard_v2 または WAF_v2 SKU) は、最大 125 個のインスタンスをサポートできます。 /24 サブネットは展開に必須ではありませんが、自動スケーリングとメンテナンス アップグレードに十分なスペースを提供することをお勧めします。

Potential Benefits:

Allows autoscaling and maintenance
Learn More:
Azure Application Gateway infrastructure configuration | Microsoft Learn

ARG Query:

Click the Azure Resource Graph tab to view the query

// Azure Resource Graph Query
// This query will validate the subnet id for an appGW ends with a /24

resources
| where type =~ 'Microsoft.Network/applicationGateways'
| extend subnetid = tostring(properties.gatewayIPConfigurations[0].properties.subnet.id)
| join kind=leftouter(resources
    | where type == "microsoft.network/virtualnetworks"
    | mv-expand properties.subnets
    | extend subnetid = tostring(properties_subnets.id)
    | extend addressprefix = tostring(properties_subnets.properties.addressPrefix)
    | project subnetid, addressprefix) on subnetid
| where addressprefix !endswith '/24'
| project recommendationId = "8364fd0a-7c0e-e240-9d95-4bf965aec243", name, id, tags, param1 = strcat('AppGW subnet prefix: ', addressprefix)