Skip to content

Commit 9c7d73a

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into microsoft-dev-box-docset-how-to
2 parents 6066657 + 2470ed6 commit 9c7d73a

File tree

259 files changed

+4383
-2422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+4383
-2422
lines changed

.openpublishing.redirection.defender-for-cloud.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@
787787
},
788788
{
789789
"source_path_from_root": "/articles/defender-for-cloud/os-coverage.md",
790-
"redirect_url": "/azure/defender-for-cloud/monitoring-components",
790+
"redirect_url": "/azure/defender-for-cloud/support-matrix-defender-for-cloud#supported-operating-systems",
791791
"redirect_document_id": false
792792
},
793793
{

articles/active-directory-b2c/configure-authentication-sample-ios-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: kengaderdus
66
manager: CelesteDG
77
ms.service: active-directory
88
ms.workload: identity
9-
ms.topic: reference
9+
ms.topic: how-to
1010
ms.date: 01/06/2023
1111
ms.author: kengaderdus
1212
ms.subservice: B2C

articles/active-directory-b2c/custom-policy-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: CelesteDG
77

88
ms.service: active-directory
99
ms.workload: identity
10-
ms.topic: reference
10+
ms.topic: overview
1111
ms.date: 01/10/2023
1212
ms.author: kengaderdus
1313
ms.subservice: B2C

articles/active-directory-b2c/enable-authentication-web-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: kengaderdus
66
manager: CelesteDG
77
ms.service: active-directory
88
ms.workload: identity
9-
ms.topic: reference
9+
ms.topic: how-to
1010
ms.date: 01/10/2023
1111
ms.author: kengaderdus
1212
ms.subservice: B2C
@@ -262,7 +262,7 @@ Add two endpoints to your web API:
262262

263263
# [ASP.NET Core](#tab/csharpclient)
264264

265-
Under the */Controllers* folder, add a *PublicController.cs* file, and then add to it the following code snippet:
265+
Under the */Controllers* folder, add a *PublicController.cs* file, and then add it to the following code snippet:
266266

267267
```csharp
268268
using System;
@@ -307,7 +307,7 @@ app.get('/public', (req, res) => res.send( {'date': new Date() } ));
307307

308308
# [ASP.NET Core](#tab/csharpclient)
309309

310-
Under the */Controllers* folder, add a *HelloController.cs* file, and then add to it the following code:
310+
Under the */Controllers* folder, add a *HelloController.cs* file, and then add it to the following code:
311311

312312
```csharp
313313
using Microsoft.AspNetCore.Authorization;
@@ -438,7 +438,7 @@ In the *appsettings.json* file, update the following properties:
438438

439439
# [Node.js](#tab/nodejsgeneric)
440440

441-
Under the project root folder, create a *config.json* file, and then add to it the following JSON snippet:
441+
Under the project root folder, create a *config.json* file, and then add it to the following JSON snippet:
442442

443443
```json
444444
{

articles/active-directory-b2c/index.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ metadata:
1616
ms.collection: collection
1717
author: kengaderdus
1818
ms.author: kengaderdus
19-
ms.date: 12/14/2022
19+
ms.date: 03/08/2023
2020

2121
## FRONT MATTER END
2222

@@ -219,6 +219,9 @@ conceptualContent:
219219
- text: Customize user experiences using custom policies
220220
url: add-sign-up-and-sign-in-policy.md?pivots=b2c-custom-policy
221221
itemType: how-to-guide
222+
- text: Custom policy how-to guide series
223+
url: custom-policies-series-overview.md
224+
itemType: how-to-guide
222225
# - text: Use API connectors
223226
# url: add-api-connector.md?pivots=b2c-user-flow
224227
# itemType: how-to-guide
@@ -330,38 +333,38 @@ conceptualContent:
330333

331334
## BAND 4 - TOOLS ###########################################################################################################################################
332335
tools:
333-
title: Easy app integration with Microsoft Authentication Libraries (MSAL)
336+
title: Use Microsoft Authentication Libraries (MSAL) for easy app integration
334337
summary: >
335-
GitHub hosts the open-source Microsoft Authentication Library (MSAL). Microsoft builds and supports MSAL. Access and use our MSAL samples for the most popular programming languages and frameworks.
338+
GitHub hosts the open-source Microsoft Authentication Library (MSAL). Microsoft builds and supports MSAL. We recommend MSAL for any app type that uses Azure AD B2C for authentication and authorization.
336339
items:
337340
## ROW 1 ######################
338341
- title: MSAL.NET
339-
url: https://github.com/Azure-Samples/active-directory-b2c-dotnet-webapp-and-webapi
342+
url: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet
340343
imageSrc: https://docs.microsoft.com/media/logos/logo_Csharp.svg
341344
- title: MSAL Android
342-
url: https://github.com/Azure-Samples/ms-identity-android-java#b2cmodefragment-class
345+
url: https://github.com/AzureAD/microsoft-authentication-library-for-android
343346
imageSrc: ../active-directory/develop/media/hub/android.svg
344347
- title: MSAL Angular
345-
url: https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/3-Authorization-II/2-call-api-b2c
348+
url: https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular
346349
imageSrc: ../active-directory/develop/media/hub/angular.svg
347350
## ROW 2 ######################
348351
- title: MSAL iOS
349-
url: https://github.com/Azure-Samples/active-directory-b2c-ios-swift-native-msal
352+
url: https://github.com/AzureAD/microsoft-authentication-library-for-objc
350353
imageSrc: https://docs.microsoft.com/media/logos/logo_ios.svg
351354
- title: MSAL Java
352-
url: https://github.com/Azure-Samples/ms-identity-msal-java-samples/tree/main/1.%20Server-Side%20Scenarios/msal-b2c-web-sample
355+
url: https://github.com/AzureAD/microsoft-authentication-library-for-java
353356
imageSrc: https://docs.microsoft.com/media/logos/logo_java.svg
354357
- title: MSAL.js
355-
url: https://github.com/Azure-Samples/ms-identity-b2c-javascript-spa
358+
url: https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser
356359
imageSrc: https://docs.microsoft.com/media/logos/logo_js.svg
357360
## ROW 3 ######################
358361
- title: MSAL Node
359-
url: https://github.com/Azure-Samples/active-directory-b2c-msal-node-sign-in-sign-out-webapp
362+
url: https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node
360363
imageSrc: ../active-directory/develop/media/hub/node.svg
361364
- title: MSAL Python
362-
url: https://github.com/Azure-Samples/ms-identity-python-webapp
365+
url: https://github.com/AzureAD/microsoft-authentication-library-for-python
363366
imageSrc: https://docs.microsoft.com/media/logos/logo_python.svg
364367
- title: MSAL React
365-
url: https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/3-Authorization-II/2-call-api-b2c
368+
url: https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-react
366369
imageSrc: ../active-directory/develop/media/hub/react.svg
367370
## BAND 4 - TOOLS END #######################################################################################################################################
Lines changed: 61 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,104 @@
11
---
22
title: Tutorial to configure Azure Active Directory B2C with Azure Web Application Firewall
33
titleSuffix: Azure AD B2C
4-
description: Tutorial to configure Azure Active Directory B2C with Azure Web application firewall to protect your applications from malicious attacks
4+
description: Learn to configure Azure AD B2C with Azure Web Application Firewall to protect applications from malicious attacks
55
services: active-directory-b2c
66
author: gargi-sinha
7-
manager: CelesteDG
7+
manager: martinco
88
ms.reviewer: kengaderdus
9-
109
ms.service: active-directory
1110
ms.workload: identity
1211
ms.topic: how-to
13-
ms.date: 08/17/2021
12+
ms.date: 03/08/2023
1413
ms.author: gasinh
1514
ms.subservice: B2C
1615
---
1716

18-
# Tutorial: Configure Azure Web Application Firewall with Azure Active Directory B2C
17+
# Tutorial: Configure Azure Active Directory B2C with Azure Web Application Firewall
1918

20-
In this sample tutorial, learn how to enable [Azure Web Application Firewall (WAF)](https://azure.microsoft.com/services/web-application-firewall/#overview) solution for Azure Active Directory (AD) B2C tenant with custom domain. Azure WAF provides centralized protection of your web applications from common exploits and vulnerabilities.
19+
Learn how to enable the Azure Web Application Firewall (WAF) service for an Azure Active Directory B2C (Azure AD B2C) tenant, with a custom domain. WAF protects web applications from common exploits and vulnerabilities.
2120

22-
>[!NOTE]
23-
>This feature is in public preview.
21+
See, [What is Azure Web Application Firewall?](../web-application-firewall/overview.md)
2422

2523
## Prerequisites
2624

27-
To get started, you'll need:
28-
29-
- An Azure subscription – If you don't have a subscription, you can get a [free account](https://azure.microsoft.com/free/).
30-
31-
- [An Azure AD B2C tenant](tutorial-create-tenant.md) – The authorization server, responsible for verifying the user’s credentials using the custom policies defined in the tenant. It's also known as the identity provider.
25+
To get started, you need:
3226

33-
- [Azure Front Door (AFD)](../frontdoor/index.yml) – Responsible for enabling custom domains for Azure AD B2C tenant.
27+
* An Azure subscription
28+
* If you don't have one, get an [Azure free account](https://azure.microsoft.com/free/)
29+
* **An Azure AD B2C tenant** – authorization server that verifies user credentials using custom policies defined in the tenant
30+
* Also known as the identity provider (IdP)
31+
* See, [Tutorial: Create an Azure Active Directory B2C tenant](tutorial-create-tenant.md)
32+
* **Azure Front Door (AFD)** – enables custom domains for the Azure AD B2C tenant
33+
* See, [Azure Front Door and CDN documentation](../frontdoor/index.yml)
34+
* **WAF** – manages traffic sent to the authorization server
35+
* [Azure Web Application Firewall](https://azure.microsoft.com/services/web-application-firewall/#overview)
3436

35-
- [Azure WAF](https://azure.microsoft.com/services/web-application-firewall/#overview) – Manages all traffic that is sent to the authorization server.
37+
## Custom domains in Azure AD B2C
3638

37-
## Azure AD B2C setup
39+
To use custom domains in Azure AD B2C, use the custom domain features in AFD. See, [Enable custom domains for Azure AD B2C](./custom-domain.md?pivots=b2c-user-flow).
3840

39-
To use custom domains in Azure AD B2C, it's required to use custom domain feature provided by AFD. Learn how to [enable Azure AD B2C custom domains](./custom-domain.md?pivots=b2c-user-flow).
41+
> [!IMPORTANT]
42+
> After you configure the custom domain, see [Test your custom domain](./custom-domain.md?pivots=b2c-custom-policy#test-your-custom-domain).
4043
41-
After custom domain for Azure AD B2C is successfully configured using AFD, [test the custom domain](./custom-domain.md?pivots=b2c-custom-policy#test-your-custom-domain) before proceeding further.
44+
## Enable WAF
4245

43-
## Onboard with Azure WAF
44-
45-
To enable Azure WAF, configure a WAF policy and associate that policy to the AFD for protection.
46+
To enable WAF, configure a WAF policy and associate it with the AFD for protection.
4647

4748
### Create a WAF policy
4849

49-
Create a basic WAF policy with managed Default Rule Set (DRS) in the [Azure portal](https://portal.azure.com).
50-
51-
1. Go to the [Azure portal](https://portal.azure.com). Select **Create a resource** and then search for Azure WAF. Select **Azure Web Application Firewall (WAF)** > **Create**.
50+
Create a WAF policy with Azure-managed default rule set (DRS). See, [Web Application Firewall DRS rule groups and rules](../web-application-firewall/afds/waf-front-door-drs.md).
5251

53-
2. Go to the **Create a WAF policy** page, select the **Basics** tab. Enter the following information, accept the defaults for the remaining settings.
52+
1. Go to the [Azure portal](https://portal.azure.com).
53+
2. Select **Create a resource**.
54+
3. Search for Azure WAF.
55+
4. Select **Azure Web Application Firewall (WAF)**.
56+
5. Select **Create**.
57+
6. Go to the **Create a WAF policy** page.
58+
7. Select the **Basics** tab.
59+
8. For **Policy for**, select **Global WAF (Front Door)**.
60+
9. For **Front Door SKU**, select between **Basic**, **Standard**, or **Premium** SKU.
61+
10. For **Subscription**, select your Front Door subscription name.
62+
11. For **Resource group**, select your Front Door resource group name.
63+
12. For **Policy name**, enter a unique name for your WAF policy.
64+
13. For **Policy state**, select **Enabled**.
65+
14. For **Policy mode**, select **Detection**.
66+
15. Select **Review + create**.
67+
16. Go to the **Association** tab of the Create a WAF policy page.
68+
17. Select **+ Associate a Front Door profile**.
69+
18. For **Front Door**, select your Front Door name associated with Azure AD B2C custom domain.
70+
19. For **Domains**, select the Azure AD B2C custom domains to associate the WAF policy to.
71+
20. Select **Add**.
72+
21. Select **Review + create**.
73+
22. Select **Create**.
5474

55-
| Value | Description |
56-
|:--------|:-------|
57-
| Policy for | Global WAF (Front Door)|
58-
| Front Door SKU | Select between Basic, Standard, or Premium SKU |
59-
|Subscription | Select your Front Door subscription name |
60-
| Resource group | Select your Front Door resource group name |
61-
| Policy name | Enter a unique name for your WAF policy |
62-
| Policy state | Set as Enabled |
63-
| Policy mode | Set as Detection |
75+
### Detection and Prevention modes
6476

65-
3. Select **Review + create**
77+
When you create WAF policy, the policy is in Detection mode. We recommend you don't disable Detection mode. In this mode, WAF doesn't block requests. Instead, requests that match the WAF rules are logged in the WAF logs.
6678

67-
4. Go to the **Association** tab of the Create a WAF policy page, select + **Associate a Front Door profile**, enter the following settings
79+
Learn more: [Azure Web Application Firewall monitoring and logging](../web-application-firewall/afds/waf-front-door-monitor.md)
6880

69-
| Value | Description |
70-
|:----|:------|
71-
| Front Door | Select your Front Door name associated with Azure AD B2C custom domain |
72-
| Domains | Select the Azure AD B2C custom domains you want to associate the WAF policy to|
81+
The following query shows the requests blocked by the WAF policy in the past 24 hours. The details include, rule name, request data, action taken by the policy, and the policy mode.
82+
83+
![Screenshot of blocked requests.](./media/partner-azure-web-application-firewall/blocked-requests-query.png)
7384

74-
5. Select **Add**.
85+
![Screenshot of blocked requests details, such as Rule ID, Action, Mode, etc.](./media/partner-azure-web-application-firewall/blocked-requests-details.png)
7586

76-
6. Select **Review + create**, then select **Create**.
87+
Review the WAF logs to determine if policy rules cause false positives. Then, exclude the WAF rules based on the WAF logs.
7788

78-
### Change policy mode from detection to prevention
89+
Learn more: [Define exclusion rules based on Web Application Firewall logs](../web-application-firewall/afds/waf-front-door-exclusion.md#define-exclusion-based-on-web-application-firewall-logs)
7990

80-
When a WAF policy is created, by default the policy is in Detection mode. In Detection mode, WAF doesn't block any requests, instead, requests matching the WAF rules are logged in the WAF logs. For more information about WAF logging, see [Azure WAF monitoring and logging](../web-application-firewall/afds/waf-front-door-monitor.md).
91+
#### Switching modes
8192

82-
The sample query shows all the requests that were blocked by the WAF policy in the past 24 hours. The details include, rule name, request data, action taken by the policy, and the policy mode.
93+
To see WAF operating, select **Switch to prevention mode**, which changes the mode from Detection to Prevention. Requests that match the rules in the DRS are blocked and logged in the WAF logs.
8394

84-
![Image shows the blocked requests](./media/partner-azure-web-application-firewall/blocked-requests-query.png)
95+
![Screenshot of options and selections for DefaultRuleSet under Web Application Firewall policies.](./media/partner-azure-web-application-firewall/switch-to-prevention-mode.png)
8596

86-
![Image shows the blocked requests details](./media/partner-azure-web-application-firewall/blocked-requests-details.png)
97+
To revert to Detection mode, select **Switch to detection mode**.
8798

88-
It's recommended that you let the WAF capture requests in Detection mode. Review the WAF logs to determine if there are any rules in the policy that are causing false positive results. Then after [exclude the WAF rules based on the WAF logs](../web-application-firewall/afds/waf-front-door-exclusion.md#define-exclusion-based-on-web-application-firewall-logs).
89-
90-
To see WAF in action, use Switch to prevention mode to change from Detection to Prevention mode. All requests that match the rules defined in the Default Rule Set (DRS) are blocked and logged in the WAF logs.
91-
92-
![Image shows the switch to prevention mode](./media/partner-azure-web-application-firewall/switch-to-prevention-mode.png)
93-
94-
In case you want to switch back to the detection mode, you can do so by using Switch to detection mode option.
95-
96-
![Image shows the switch to detection mode](./media/partner-azure-web-application-firewall/switch-to-detection-mode.png)
99+
![Screenshot of DefaultRuleSet with Switch to detection mode.](./media/partner-azure-web-application-firewall/switch-to-detection-mode.png)
97100

98101
## Next steps
99102

100-
- [Azure WAF monitoring and logging](../web-application-firewall/afds/waf-front-door-monitor.md)
101-
102-
- [WAF with Front Door service exclusion lists](../web-application-firewall/afds/waf-front-door-exclusion.md)
103+
* [Azure Web Application Firewall monitoring and logging](../web-application-firewall/afds/waf-front-door-monitor.md)
104+
* [Web Application Firewall (WAF) with Front Door exclusion lists](../web-application-firewall/afds/waf-front-door-exclusion.md)

0 commit comments

Comments
 (0)