Skip to content

Commit e32a1cf

Browse files
Merge pull request #233179 from craigshoemaker/aca/waf-edits
[Container Apps] WAF updates
2 parents 54493ae + 2656064 commit e32a1cf

File tree

1 file changed

+40
-12
lines changed

1 file changed

+40
-12
lines changed

articles/container-apps/waf-app-gateway.md

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.author: wviriya
1010
zone_pivot_groups: azure-cli-or-portal
1111
---
1212

13-
# Protect Azure Container Apps with Web Application Firewall on Application Gateway
13+
# Protect Azure Container Apps with Web Application Firewall on Application Gateway
1414

1515
When you host your apps or microservices in Azure Container Apps, you may not always want to publish them directly to the internet. Instead, you may want to expose them through a reverse proxy.
1616

@@ -21,8 +21,8 @@ Reverse proxies allow you to place services in front of your apps that supports
2121
- Routing
2222
- Caching
2323
- Rate limiting
24-
- Security layers
2524
- Load balancing
25+
- Security layers
2626
- Request filtering
2727

2828
This article demonstrates how to protect your container apps using a [Web Application Firewall (WAF) on Azure Application Gateway](../web-application-firewall/ag/ag-overview.md) with an internal Container Apps environment.
@@ -31,24 +31,30 @@ For more information on networking concepts in Container Apps, see [Networking A
3131

3232
## Prerequisites
3333

34-
- Have a container app that is on an internal environment and integrated with a custom virtual network. For more information on how to create a custom virtual network integrated app, see [provide a virtual network to an internal Azure Container Apps environment](./vnet-custom-internal.md).
35-
- If you must use TLS/SSL encryption to the application gateway, a valid public certificate that's used to bind to your application gateway is required.
34+
- **Internal environment with custom VNet**: Have a container app that is on an internal environment and integrated with a custom virtual network. For more information on how to create a custom virtual network integrated app, see [provide a virtual network to an internal Azure Container Apps environment](./vnet-custom-internal.md).
35+
36+
- **Security certificates**: If you must use TLS/SSL encryption to the application gateway, a valid public certificate that's used to bind to your application gateway is required.
3637

3738
## Retrieve your container app's domain
3839

39-
In the following steps, you retrieve the values of the **default domain** and the **static IP** which you use to set up your Private DNS Zone.
40+
Use the following steps to retrieve the values of the **default domain** and the **static IP** to set up your Private DNS Zone.
4041

4142
1. From the resource group's *Overview* window in the portal, select your container app.
43+
4244
1. On the *Overview* window for your container app resource, select the link for **Container Apps Environment**
4345

44-
1. On the *Overview* window for your container app environment resource, select **JSON View** in the upper right-hand corner of the page to view the JSON representation of the container apps environment.
46+
1. On the *Overview* window for your container app environment resource, select **JSON View** in the upper right-hand corner of the page to view the JSON representation of the container apps environment.
47+
4548
1. Copy the values for the **defaultDomain** and **staticIp** properties and paste them into a text editor. You'll create a private DNS zone using these values for the default domain in the next section.
4649

4750
## Create and configure an Azure Private DNS zone
4851

49-
1. On the Azure portal menu or the **Home** page, select **Create a resource**.
52+
1. On the Azure portal menu or the *Home* page, select **Create a resource**.
53+
5054
1. Search for *Private DNS Zone*, and select **Private DNS Zone** from the search results.
55+
5156
1. Select the **Create** button.
57+
5258
1. Enter the following values:
5359

5460
| Setting | Action |
@@ -59,8 +65,11 @@ In the following steps, you retrieve the values of the **default domain** and th
5965
| Resource group location | Leave as the default. A value isn't needed as Private DNS Zones are global. |
6066

6167
1. Select **Review + create**. After validation finishes, select **Create**.
68+
6269
1. After the private DNS zone is created, select **Go to resource**.
70+
6371
1. In the *Overview* window, select **+Record set**, to add a new record set.
72+
6473
1. In the *Add record set* window, enter the following values:
6574

6675
| Setting | Action |
@@ -72,7 +81,9 @@ In the following steps, you retrieve the values of the **default domain** and th
7281
| IP address | Enter the **staticIp** property of the Container Apps Environment from the previous section. |
7382

7483
1. Select **OK** to create the record set.
84+
7585
1. Select **+Record set** again, to add a second record set.
86+
7687
1. In the *Add record set* window, enter the following values:
7788

7889
| Setting | Action |
@@ -84,7 +95,9 @@ In the following steps, you retrieve the values of the **default domain** and th
8495
| IP address | Enter the **staticIp** property of the Container Apps Environment from the previous section. |
8596

8697
1. Select **OK** to create the record set.
87-
1. Select the **Virtual network links** window from the menu on the left side of the page.
98+
99+
1. Select the **Virtual network links** window from the menu on the left side of the page.
100+
88101
1. Select **+Add** to create a new link with the following values:
89102

90103
| Setting | Action |
@@ -115,7 +128,7 @@ In the following steps, you retrieve the values of the **default domain** and th
115128
| WAF Policy | Select **Create new** and enter **my-waf-policy** for the WAF Policy. Select **OK**. If you chose **Standard V2** for the tier, skip this step. |
116129
| Virtual network | Select the virtual network that your container app is integrated with. |
117130
| Subnet | Select **Manage subnet configuration**. If you already have a subnet you wish to use, use that instead, and skip to [the Frontends section](#frontends-tab). |
118-
131+
119132
1. From within the *Subnets* window of *my-custom-vnet*, select **+Subnet** and enter the following values:
120133

121134
| Setting | Action |
@@ -124,15 +137,17 @@ In the following steps, you retrieve the values of the **default domain** and th
124137
| Subnet address range | Keep the default values. |
125138

126139
1. For the remainder of the settings, keep the default values.
140+
127141
1. Select **Save** to create the new subnet.
128142

129143
1. Close the *Subnets* window to return to the *Create application gateway* window.
144+
130145
1. Select the following values:
131146

132147
| Setting | Action |
133148
|---|---|
134149
| Subnet | Select the **appgateway-subnet** you created. |
135-
150+
136151
1. Select **Next: Frontends**, to proceed.
137152

138153
### Frontends tab
@@ -154,17 +169,20 @@ In the following steps, you retrieve the values of the **default domain** and th
154169
The backend pool is used to route requests to the appropriate backend servers. Backend pools can be composed of any combination of the following resources:
155170

156171
- NICs
157-
- Virtual Machine Scale Sets
158172
- Public IP addresses
159173
- Internal IP addresses
174+
- Virtual Machine Scale Sets
160175
- Fully qualified domain names (FQDN)
161176
- Multi-tenant back-ends like Azure App Service and Container Apps
162177

163178
In this example, you create a backend pool that targets your container app.
164179

165180
1. Select **Add a backend pool**.
166-
1. Open a new tab and navigate to your container app.
181+
182+
1. Open a new tab and navigate to your container app.
183+
167184
1. In the *Overview* window of the Container App, find the **Application Url** and copy it.
185+
168186
1. Return to the *Backends* tab, and enter the following values in the **Add a backend pool** window:
169187

170188
| Setting | Action |
@@ -175,6 +193,7 @@ In this example, you create a backend pool that targets your container app.
175193
| Target | Enter the **Container App Application Url** you copied and remove the *https://* prefix. This location is the FQDN of your container app. |
176194

177195
1. Select **Add**.
196+
178197
1. On the *Backends* tab, select **Next: Configuration**.
179198

180199
### Configuration tab
@@ -243,14 +262,17 @@ On the *Configuration* tab, you connect the frontend and backend pool you create
243262
1. In the *Add a routing rule* window, select **Add** again.
244263

245264
1. Select **Next: Tags**.
265+
246266
1. Select **Next: Review + create**, and then select **Create**.
247267

248268
## Add private link to your Application Gateway
249269

250270
This step is required for internal only container app environments as it allows your Application Gateway to communicate with your Container App on the backend through the virtual network.
251271

252272
1. Once the Application Gateway is created, select **Go to resource**.
273+
253274
1. From the menu on the left, select **Private link**, then select **Add**.
275+
254276
1. Enter the following values:
255277

256278
| Setting | Action |
@@ -260,14 +282,17 @@ This step is required for internal only container app environments as it allows
260282
| Frontend IP Configuration | Select the frontend IP for your Application Gateway. |
261283

262284
1. Under **Private IP address settings** select **Add**.
285+
263286
1. Select **Add** at the bottom of the window.
264287

265288
## Verify the container app
266289

267290
# [Default domain](#tab/default-domain)
268291

269292
1. Find the public IP address for the application gateway on its *Overview* page, or you can search for the address. To search, select *All resources* and enter **my-container-apps-agw-pip** in the search box. Then, select the IP in the search results.
293+
270294
1. Navigate to the public IP address of the application gateway.
295+
271296
1. Your request is automatically routed to the container app, which verifies the application gateway was successfully created.
272297

273298
# [Custom domain](#tab/custom-domain)
@@ -291,8 +316,11 @@ When you no longer need the resources that you created, delete the resource grou
291316
To delete the resource group:
292317

293318
1. On the Azure portal menu, select **Resource groups** or search for and select *Resource groups*.
319+
294320
1. On the *Resource groups* page, search for and select **my-container-apps**.
321+
295322
1. On the *Resource group page*, select **Delete resource group**.
323+
296324
1. Enter **my-container-apps** under *TYPE THE RESOURCE GROUP NAME* and then select **Delete**
297325

298326
## Next steps

0 commit comments

Comments
 (0)