Skip to content

Commit 369e27f

Browse files
Merge pull request #307148 from Miskatonic-Electronic/patch-80
Update waf-application-gateway-for-containers-overview.md
2 parents 8dda249 + c3ca770 commit 369e27f

1 file changed

Lines changed: 108 additions & 15 deletions

File tree

articles/web-application-firewall/ag/waf-application-gateway-for-containers-overview.md

Lines changed: 108 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,45 @@
11
---
2-
title: Web Application Firewall on Application Gateway for Containers (Preview)
2+
title: Web Application Firewall on Application Gateway for Containers
33
description: Help protect your containerized applications with a web application firewall (WAF) on Azure Application Gateway.
44
author: halkazwini
55
ms.author: halkazwini
66
ms.service: azure-web-application-firewall
77
ms.topic: overview
8-
ms.date: 07/22/2025
8+
ms.date: 10/21/2025
99

1010
#CustomerIntent: As a developer, I want to secure my containerized applications so that I can protect them from web vulnerabilities.
1111
---
1212

13-
# What is Azure Web Application Firewall on Application Gateway for Containers (preview)?
13+
# What is Azure Web Application Firewall on Application Gateway for Containers?
1414

1515
Azure Web Application Firewall on [Azure Application Gateway for Containers](../../application-gateway/for-containers/overview.md) provides comprehensive protection for your Kubernetes workloads against common web vulnerabilities and attacks. For example, it addresses SQL injection, cross-site scripting (XSS), and other Open Web Application Security Project (OWASP) top 10 threats.
1616

1717
Application Gateway for Containers is an application-layer (Layer 7) solution for [load balancing](/azure/architecture/guide/technology-choices/load-balancing-overview) and dynamic traffic management. It's designed specifically for workloads running in Kubernetes clusters. It represents the evolution of the [Application Gateway Ingress Controller (AGIC)](../../application-gateway/ingress-controller-overview.md).
1818

19-
Azure Web Application Firewall provides real-time protection for these application-layer workloads through a set of proprietary managed rule sets and a framework for the creation of user-generated custom rules. All of these protections exist as part of a web application firewall (WAF) policy that's attached to your Application Gateway for Containers deployment via a `SecurityPolicy` resource. You can apply these protections at the listener or route path level.
19+
Azure Web Application Firewall provides real-time protection for these application-layer workloads through a set of proprietary managed rule sets and a framework for the creation of user-generated custom rules. All of these protections exist as part of a web application firewall (WAF) policy that's attached to your Application Gateway for Containers deployment via a `SecurityPolicy` resource.
2020

21-
> [!IMPORTANT]
22-
> Azure Web Application Firewall on Application Gateway for Containers is currently in preview. For legal terms that apply to Azure features that are in beta, in preview, or otherwise not yet released into general availability, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
21+
### Security policy
2322

24-
## Configuration
23+
Application Gateway for Containers introduces a new child resource called `SecurityPolicy` in Azure Resource Manager. The `SecurityPolicy` resource brings scope to which Azure Web Application Firewall policies the ALB Controller can reference.
2524

26-
To use Azure Web Application Firewall on your Application Gateway for Containers deployment, you need to attach your [WAF policy](create-waf-policy-ag.md) via a `SecurityPolicy` resource. This new Azure Resource Manager child resource is part of the Application Gateway for Containers integration. It's referenced by your Application Load Balancer (ALB) Controller and helps define the scope of how your WAF policy is applied to your application's traffic.
25+
### Kubernetes custom resource
2726

28-
Application Gateway for Containers also introduces a new resource called `WebApplicationFirewallPolicy`. This custom resource defines at which point the WAF policy is applied. You can configure it at the listener or route path level, via your Kubernetes resource's YAML file.
27+
Application Gateway for Containers introduces a new custom resource called `WebApplicationFirewallPolicy`. The custom resource is responsible for defining which Azure Web Application Firewall policy should be used at which scope.
2928

30-
Here's an example YAML configuration that shows targeting a specific path called `pathA` on an `HTTPRoute` resource:
29+
The WebApplicationFirewallPolicy resource can target the following Kubernetes resources:
30+
31+
* `Gateway`
32+
* `HTTPRoute`
33+
34+
The WebApplicationFirewallPolicy resource can also reference the following sections by name for further granularity:
35+
36+
* `Gateway`: `Listener`
37+
38+
### Example implementations
39+
40+
#### Scope a policy to a Gateway resource
41+
42+
Here's an example YAML configuration that shows targeting a Gateway resource, which would apply to all listeners on a given Application Gateway for Containers' frontend resource.
3143

3244
```yaml
3345
apiVersion: alb.networking.azure.io/v1
@@ -38,23 +50,104 @@ metadata:
3850
spec:
3951
targetRef:
4052
group: gateway.networking.k8s.io
41-
kind: HTTPRoute
53+
kind: Gateway
4254
name: contoso-waf-route
4355
namespace: test-infra
44-
sectionNames: ["pathA"]
4556
webApplicationFirewall:
4657
id: /subscriptions/.../Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/waf-policy-0
4758
```
4859
60+
#### Scope policy to a specific listener of a Gateway resource
61+
62+
Within a `Gateway` resource, you may have different hostnames defined by different listeners (e.g. contoso.com and fabrikam.com). If contoso.com is a hostname of listenerA and fabrikam.com is a hostname of listenerB, you can define the `sectionNames` property to select the proper listener (for example, listenerA for contoso.com).
63+
64+
```yaml
65+
apiVersion: alb.networking.azure.io/v1
66+
kind: WebApplicationFirewallPolicy
67+
metadata:
68+
name: sample-waf-policy
69+
namespace: test-infra
70+
spec:
71+
targetRef:
72+
group: gateway.networking.k8s.io
73+
kind: Gateway
74+
name: contoso-waf-route
75+
namespace: test-infra
76+
sectionNames: ["contoso-listener"]
77+
webApplicationFirewall:
78+
id: /subscriptions/.../Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/waf-policy-0
79+
```
80+
81+
#### Scope policy across all routes and paths
82+
83+
This example shows how to target a defined HTTPRoute resource to apply the policy to any routing rules and paths within a given HTTPRoute resource.
84+
85+
```yaml
86+
apiVersion: alb.networking.azure.io/v1
87+
kind: WebApplicationFirewallPolicy
88+
metadata:
89+
name: sample-waf-policy
90+
namespace: test-infra
91+
spec:
92+
targetRef:
93+
group: gateway.networking.k8s.io
94+
kind: HTTPRoute
95+
name: contoso-pathA
96+
namespace: test-infra
97+
webApplicationFirewall:
98+
id: /subscriptions/.../Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/waf-policy-0
99+
```
100+
101+
#### Scope policy to a particular path
102+
103+
To use different WAF policies to different paths of the same `Gateway` or Gateway -> Listener sectionName, you can define two HTTPRoute resources, each with a unique path, that each references its applicable WAF policy.
104+
105+
```yaml
106+
apiVersion: alb.networking.azure.io/v1
107+
kind: WebApplicationFirewallPolicy
108+
metadata:
109+
name: sample-waf-policy-A
110+
namespace: test-infra
111+
spec:
112+
targetRef:
113+
group: gateway.networking.k8s.io
114+
kind: HTTPRoute
115+
name: contoso-pathA
116+
namespace: test-infra
117+
webApplicationFirewall:
118+
id: /subscriptions/.../Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/waf-policy-0
119+
---
120+
apiVersion: alb.networking.azure.io/v1
121+
kind: WebApplicationFirewallPolicy
122+
metadata:
123+
name: sample-waf-policy-B
124+
namespace: test-infra
125+
spec:
126+
targetRef:
127+
group: gateway.networking.k8s.io
128+
kind: HTTPRoute
129+
name: contoso-pathB
130+
namespace: test-infra
131+
webApplicationFirewall:
132+
id: /subscriptions/.../Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/waf-policy-1
133+
```
134+
49135
## Limitations
50136

51137
The following functionality isn't supported on a WAF policy that's associated with an Application Gateway for Containers instance:
52138

53139
- **Cross-region, cross-subscription policy**: Your WAF policy must be in the same subscription and region as your Application Gateway for Containers resource.
54140
- **Core Rule Set (CRS) managed rules**: An Application Gateway for Containers WAF supports only Default Rule Set (DRS) managed rule sets.
55-
- **Legacy Bot Manager Rule Set**: Bot Manager Rule Set 0.1 isn't supported, but all newer Bot Manager Rule Set versions are supported.
56-
- **JavaScript challenge actions on Bot Manager rules**: You can't set the action on a Bot Manager rule to JavaScript challenge during the preview.
57-
- **Microsoft Security Copilot**: This offering isn't supported during the preview.
141+
- **Legacy Bot Manager Rule Set**: Bot Manager Ruleset 0.1 isn't supported, but Bot Manager Ruleset versions 1.0 and 1.1 are supported.
142+
- **JavaScript challenge actions on Bot Manager rules**: You can't set the action on a Bot Manager rule to JavaScript challenge.
143+
- **Captcha challenge actions on Bot Manager rules**: You can't set the action on a Bot Manager rule to Captcha.
144+
- **Microsoft Security Copilot**: The Security Copilot is not supported on Application Gateway for Containers WAF.
145+
- **Custom Block Response**: Setting a custom block response in your WAF policy is not supported on Application Gateway for Containers WAF.
146+
- **X-Forwarded-For Header (XFF)**: Application Gateway for Containers WAF doesn't support the XFF variable in custom rules.
147+
148+
## Pricing
149+
150+
For pricing details, see [Application Gateway for Containers pricing](../../application-gateway/for-containers/understanding-pricing.md).
58151

59152
## Related content
60153

0 commit comments

Comments
 (0)