Skip to content

Commit 2192ff6

Browse files
committed
fix
2 parents 6a8bda2 + 8e449a7 commit 2192ff6

File tree

3 files changed

+116
-55
lines changed

3 files changed

+116
-55
lines changed

articles/defender-for-cloud/defender-for-databases-introduction.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Microsoft Defender for open-source relational databases - the benefits and features
33
description: Learn about the benefits and features of Microsoft Defender for open-source relational databases such as PostgreSQL, MySQL, and MariaDB
4-
ms.date: 11/09/2021
4+
ms.date: 01/17/2022
55
ms.topic: overview
66
---
77

@@ -19,15 +19,14 @@ Defender for Cloud detects anomalous activities indicating unusual and potential
1919

2020
## Availability
2121

22-
| Aspect | Details |
23-
|------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------|
24-
| Release state: | General availability (GA) |
25-
| Pricing: | **Microsoft Defender for open-source relational databases** is billed as shown on the [pricing page](https://azure.microsoft.com/pricing/details/defender-for-cloud/) |
26-
| Protected versions of PostgreSQL: | Single Server - General Purpose and Memory Optimized. Learn more in [PostgreSQL pricing tiers](../postgresql/concepts-pricing-tiers.md). |
27-
| Protected versions of MySQL: | Single Server - General Purpose and Memory Optimized. Learn more in [MySQL pricing tiers](../mysql/concepts-pricing-tiers.md). |
28-
| Protected versions of MariaDB: | General Purpose and Memory Optimized. Learn more in [MariaDB pricing tiers](../mariadb/concepts-pricing-tiers.md). |
29-
| Clouds: | :::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds<br>:::image type="icon" source="./media/icons/no-icon.png"::: National (Azure Government, Azure China 21Vianet) |
30-
| | |
22+
| Aspect | Details |
23+
|--|:-|
24+
| Release state: | General availability (GA) |
25+
| Pricing: | **Microsoft Defender for open-source relational databases** is billed as shown on the [pricing page](https://azure.microsoft.com/pricing/details/defender-for-cloud/) |
26+
| Protected versions of PostgreSQL: | Single Server - General Purpose and Memory Optimized. Learn more in [PostgreSQL pricing tiers](../postgresql/concepts-pricing-tiers.md). |
27+
| Protected versions of MySQL: | Single Server - General Purpose and Memory Optimized. Learn more in [MySQL pricing tiers](../mysql/concepts-pricing-tiers.md). |
28+
| Protected versions of MariaDB: | General Purpose and Memory Optimized. Learn more in [MariaDB pricing tiers](../mariadb/concepts-pricing-tiers.md). |
29+
| Clouds: | :::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds<br> :::image type="icon" source="./media/icons/yes-icon.png"::: Azure Government<br>:::image type="icon" source="./media/icons/no-icon.png"::: Azure China 21Vianet |
3130

3231
## What are the benefits of Microsoft Defender for open-source relational databases?
3332

articles/static-web-apps/configuration.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,24 @@ In addition to IP address blocks, you can also specify [service tags](../virtual
316316
* [Default authentication providers](authentication-authorization.md#login), don't require settings in the configuration file.
317317
* [Custom authentication providers](authentication-custom.md) use the `auth` section of the settings file.
318318

319+
## Disable cache for authenticated paths
320+
321+
If you have enabled [enterprise-grade edge](enterprise-edge.md), or set up [manual integration with Azure Front Door](front-door-manual.md), you may want to disable caching for your secured routes.
322+
323+
To disable Azure Front Door caching for secured routes, add `"Cache-Control": "no-store"` to the route header definition.
324+
325+
For example:
326+
327+
```json
328+
{
329+
"route": "/members",
330+
"allowedRoles": ["authenticated, members"],
331+
"headers": {
332+
"Cache-Control": "no-store"
333+
}
334+
}
335+
```
336+
319337
## Forwarding gateway
320338

321339
The `forwardingGateway` section configures how a static web app is accessed from a forwarding gateway such as a CDN or Azure Front Door.
@@ -357,7 +375,7 @@ For example, the following configuration shows how you can add a unique identifi
357375

358376
- Key/value pairs can be any set of arbitrary strings
359377
- Keys are case insensitive
360-
- Values are case sensitive
378+
- Values are case-sensitive
361379

362380
## Example configuration file
363381

articles/static-web-apps/front-door-manual.md

Lines changed: 88 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: static-web-apps
55
author: craigshoemaker
66
ms.service: static-web-apps
77
ms.topic: how-to
8-
ms.date: 09/20/2021
8+
ms.date: 01/12/2022
99
ms.author: cshoe
1010
---
1111

@@ -17,13 +17,13 @@ In this tutorial, you learn how to:
1717

1818
> [!div class="checklist"]
1919
>
20-
> - Create an Azure Front Door instance
20+
> - Create an Azure Front Door Standard/Premium instance
2121
> - Associate Azure Front Door with your Azure Static Web Apps site
2222
2323
> [!NOTE]
24-
> This tutorial requires the Azure Static Web Apps Standard plan.
24+
> This tutorial requires the Azure Static Web Apps Standard and Azure Front Door Standard / Premium plans.
2525
26-
## Copy URL
26+
## Copy web app URL
2727

2828
1. Navigate to the Azure portal.
2929

@@ -35,80 +35,104 @@ In this tutorial, you learn how to:
3535

3636
## Add Azure Front Door
3737

38-
1. Navigate to the Azure portal.
38+
1. Navigate to the Azure home screen.
3939

4040
1. Select **Create a resource**.
4141

42-
1. Search for **Azure Front Door**.
42+
1. Search for **Front Door**.
4343

44-
1. Select **Front Door**.
44+
1. Select **Front Door Standard/Premium**.
4545

46-
Make sure not to select the service labeled *Front Door Standard/Premium* as the steps for the Standard/Premium service differ from what's presented in this tutorial.
46+
Make sure to select the service labeled *Front Door Standard/Premium* and not the plain *Front Door* option.
4747

4848
1. Select **Create**.
4949

50+
1. Select the **Azure Front Door Standard/Premium** option.
51+
52+
1. Select the **Quick create** option.
53+
54+
1. Select the **Continue to create a front door** button.
55+
5056
1. In the *Basics* tab, enter the following values:
5157

5258
| Setting | Value |
5359
|---|---|
5460
| Subscription | Select your Azure subscription. |
5561
| Resource group | Enter a resource group name. This name is often the same group name used by your static web app. |
5662
| Resource group location | If you create a new resource group, enter the location nearest you. |
63+
| Name | Enter **my-static-web-app-front-door**. |
64+
| Tier | Select **Standard**. |
65+
| Endpoint name | Enter a unique name for your Front Door host. |
66+
| Origin type | Select **Custom**. |
67+
| Origin host name | Enter the hostname of your static web app that you set aside from the beginning of this tutorial. Make sure your value does not include a trailing slash or protocol. (For example, `desert-rain-04056.azurestaticapps.net`) |
68+
| Caching | Check the **Enable caching** checkbox. |
69+
| Query string caching behavior | Select **Use Query string** from the dropdown. |
5770

58-
Select **Next: Configuration >**.
71+
1. Select **Review + create**.
5972

60-
1. In the *Configuration* tab, select the **plus sign** next to *Frontends/domains*, and enter the following value:
73+
1. Select **Create**.
6174

62-
| Setting | Value |
63-
|---|---|
64-
| Host name | Enter a unique name for your Front Door host. |
75+
The creation process may take a few minutes to complete.
6576

66-
Accept the defaults for the rest of the form, and select **Add**.
77+
1. Select **Go to resource**.
6778

68-
1. Select the **plus sign** next to *Backend pools*, and enter the following value:
79+
## Disable cache for auth workflow
6980

70-
| Setting | Value |
71-
|---|---|
72-
| Name | Enter **my-static-web-app-pool**. |
81+
Add the following settings to disable Front Door's caching policies from trying to cache authentication and authorization-related pages.
7382

74-
1. Select **+ Add a backend**, and enter the following values:
83+
### Add a condition
7584

76-
| Setting | Value |
77-
|---|---|
78-
| Backend host type | Select **Custom host**. |
79-
| Backend host name | Enter the hostname of your static web app. Make sure your value does not include a trailing slash or protocol. (For example, `desert-rain-04056.azurestaticapps.net`) |
80-
| Backend host header | Enter the hostname of your static web app. Make sure your value does not include a trailing slash protocol. (For example, `desert-rain-04056.azurestaticapps.net`) |
81-
82-
Accept the defaults for the rest of the form, and select **Add**.
85+
1. Under *Settings*, select **Rule set**.
8386

8487
1. Select **Add**.
8588

86-
1. Select the **plus sign** next to *Routing rule*, and enter the following value:
89+
1. In the *Rule set name* textbox, enter **Security**.
8790

88-
| Setting | Value |
89-
|---|---|
90-
| Name | Enter **my-routing-rule**. |
91+
1. In the *Rule name* textbox, enter **NoCacheAuthRequests**.
9192

92-
Accept the defaults for the rest of the form, and select **Add**.
93+
1. Select **Add a condition**.
9394

94-
1. Select **Review + create**.
95+
1. Select **Request path**.
9596

96-
1. Select **Create**.
97+
1. Select **Begins With** in the *Operator* drop down.
9798

98-
The creation process may take a few minutes to complete.
99+
1. Select the **Edit** link above the *Value* textbox.
99100

100-
1. Select **Go to resource**.
101+
1. Enter **/.auth** in the textbox.
101102

102-
1. Select **Overview**.
103+
1. Select the **Update** button.
103104

104-
1. Select the link labeled *Frontend host*.
105+
1. Select the **No transform** option from the *Case transform* dropdown.
105106

106-
When you select this link, you may see a 404 error if the site is not fully propagated. Instead of refreshing the page, wait a few minutes and return back to the *Overview* window and select the link labeled *Frontend host*.
107+
### Add an action
107108

108-
1. From the *Overview* window, copy the value labeled **Front Door ID** and paste it into a file for later use.
109+
1. Select the **Add an action** dropdown.
110+
111+
1. Select **Cache expiration**.
109112

110-
> [!IMPORTANT]
111-
> By default, Azure Front Door configures [health probes](../frontdoor/front-door-health-probes.md) that may affect your traffic statistics. You may want to edit the default values for the [health probes](../frontdoor/front-door-health-probes.md).
113+
1. Select **Bypass cache** in the *Cache Behavior* dropdown.
114+
115+
1. Select the **Save** button.
116+
117+
### Associate rule to an endpoint
118+
119+
Now that the rule is created, you apply the rule to a Front Door endpoint.
120+
121+
1. Select the **Unassociated** link.
122+
123+
1. Select the Endpoint name to which you want to apply the caching rule.
124+
125+
1. Select the **Next** button.
126+
127+
1. Select the **Associate** button.
128+
129+
## Copy Front Door ID
130+
131+
Use the following steps to copy the Front Door instance's unique identifier.
132+
133+
1. Select the **Overview** link on the left-hand navigation.
134+
135+
1. From the *Overview* window, copy the value labeled **Front Door ID** and paste it into a file for later use.
112136

113137
## Update static web app configuration
114138

@@ -117,6 +141,7 @@ To complete the integration with Front Door, you need to update the application
117141
- Restrict traffic to your site only through Front Door
118142
- Restrict traffic to your site only from your Front Door instance
119143
- Define which domains can access your site
144+
- Disable caching for secured routes
120145

121146
Open the [staticwebapp.config.json](configuration.md) file for your site and make the following changes.
122147

@@ -147,12 +172,31 @@ Open the [staticwebapp.config.json](configuration.md) file for your site and mak
147172

148173
In this example, replace `my-sitename.azurefd.net` with the Azure Front Door hostname for your site.
149174

175+
1. For all secured routes in your app, disable Azure Front Door caching by adding `"Cache-Control": "no-store"` to the route header definition.
176+
177+
```json
178+
{
179+
"route": "/members",
180+
"allowedRoles": ["authenticated, members"],
181+
"headers": {
182+
"Cache-Control": "no-store"
183+
}
184+
}
185+
```
186+
150187
With this configuration, your site is no longer available via the generated `*.azurestaticapps.net` hostname, but exclusively through the hostnames configured in your Front Door instance.
151188

152-
> [!NOTE]
153-
> When you deploy updates to existing files in your static web app, Azure Front Door may continue to serve older versions of your files until their [time-to-live](https://wikipedia.org/wiki/Time_to_live) expires. [Purge the Azure Front Door cache](../frontdoor/front-door-caching.md#cache-purge) for the affected paths to ensure the latest files are served.
189+
## Considerations
190+
191+
- **Custom domains**: Now that Front Door is managing your site, you no long use the Azure Static Web Apps custom domain feature. Azure Front Door has a separate process for adding a custom domain. Refer to [Add a custom domain to your Front Door](../frontdoor/front-door-custom-domain.md). When you add a custom domain to Front Door, you'll need to update your static web app configuration file to include it in the `allowedForwardedHosts` list.
192+
193+
- **Traffic statistics**: By default, Azure Front Door configures [health probes](../frontdoor/front-door-health-probes.md) that may affect your traffic statistics. You may want to edit the default values for the [health probes](../frontdoor/front-door-health-probes.md).
194+
195+
- **Serving old versions**: When you deploy updates to existing files in your static web app, Azure Front Door may continue to serve older versions of your files until their [time-to-live](https://wikipedia.org/wiki/Time_to_live) expires. [Purge the Azure Front Door cache](../frontdoor/front-door-caching.md#cache-purge) for the affected paths to ensure the latest files are served.
196+
197+
## Clean up resources
154198

155-
Now that Front Door is managing your site, you no long use the Azure Static Web Apps custom domain feature. Azure Front Door has a separate process for adding a custom domain. Refer to [Add a custom domain to your Front Door](../frontdoor/front-door-custom-domain.md). When you add a custom domain to Front Door, you'll need to update your static web app configuration file to include it in the `allowedForwardedHosts` list.
199+
If you no longer want to use the resources created in this tutorial, delete the Azure Static Web Apps and Azure Front Door instances.
156200

157201
## Next steps
158202

0 commit comments

Comments
 (0)