You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Tutorial to configure Azure Active Directory B2C with Cloudflare Web Application Firewall
3
3
titleSuffix: Azure AD B2C
4
-
description: Tutorial to configure Azure Active Directory B2C with Cloudflare Web application firewall to protect your applications from malicious attacks
4
+
description: Tutorial to configure Azure Active Directory B2C with Cloudflare Web application firewall and protect applications from malicious attacks
5
5
services: active-directory-b2c
6
6
author: gargi-sinha
7
-
manager: CelesteDG
7
+
manager: martinco
8
8
ms.reviewer: kengaderdus
9
-
10
9
ms.service: active-directory
11
10
ms.workload: identity
12
11
ms.topic: how-to
13
-
ms.date: 09/13/2022
12
+
ms.date: 12/6/2022
14
13
ms.author: gasinh
15
14
ms.subservice: B2C
16
15
---
16
+
# Tutorial: Configure Cloudflare Web Application Firewall with Azure Active Directory B2C
17
17
18
-
# Tutorial: Configure Cloudflare with Azure Active Directory B2C
19
-
20
-
In this sample tutorial, learn how to enable [Cloudflare Web Application Firewall (WAF)](https://www.cloudflare.com/waf/) solution for Azure Active Directory (AD) B2C tenant with custom domain. Cloudflare WAF helps organization protect against malicious attacks that aim to exploit vulnerabilities such as SQLi, and XSS.
18
+
In this tutorial, you can learn how to configure the [Cloudflare Web Application Firewall (WAF)](https://www.cloudflare.com/waf/) solution for Azure Active Directory B2C (Azure AD B2C) tenant with custom domain. Use Cloudflare WAF to help protect organizations from malicious attacks that can exploit vulnerabilities such as SQL Injection, and cross-site scripting (XSS).
21
19
22
20
>[!NOTE]
23
21
>This feature is in public preview.
@@ -26,74 +24,71 @@ In this sample tutorial, learn how to enable [Cloudflare Web Application Firewal
26
24
27
25
To get started, you'll need:
28
26
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) that is linked to your Azure subscription.
32
-
33
-
- A [Cloudflare](https://dash.cloudflare.com/sign-up) account.
27
+
- An Azure subscription
28
+
- If you don't have one, you can get an [Azure free account](https://azure.microsoft.com/free/)
29
+
-[An Azure AD B2C tenant](tutorial-create-tenant.md) linked to your Azure subscription
30
+
- A [Cloudflare](https://dash.cloudflare.com/sign-up) account
34
31
35
32
## Scenario description
36
33
37
34
Cloudflare WAF integration includes the following components:
38
35
39
-
-**Azure AD B2C Tenant** – 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.
40
-
41
-
-[**Azure Front Door**](../frontdoor/front-door-overview.md) – Responsible for enabling custom domains for Azure B2C tenant. All traffic from Cloudflare WAF will be routed to Azure Front Door before arriving at Azure AD B2C tenant.
42
-
43
-
-**Cloudflare** – The web application firewall, which manages all traffic that is sent to the authorization server.
36
+
-**Azure AD B2C tenant** – The authorization server that verifies user credentials using the custom policies defined in the tenant. It's known as the identity provider
37
+
-[**Azure Front Door**](../frontdoor/front-door-overview.md) – Enables custom domains for Azure B2C tenant. Traffic from Cloudflare WAF is routed to Azure Front Door before arriving at Azure AD B2C tenant.
38
+
-**Cloudflare** – The web application firewall that manages traffic sent to the authorization server
44
39
45
40
## Integrate with Azure AD B2C
46
41
47
-
To use custom domains in Azure AD B2C, it's required to use custom domain feature provided by Azure Front Door. Learn how to [enable Azure AD B2C custom domains](./custom-domain.md?pivots=b2c-user-flow).
42
+
For custom domains in Azure AD B2C, use the custom domain feature in Azure Front Door. Learn how to [enable Azure AD B2C custom domains](./custom-domain.md?pivots=b2c-user-flow).
48
43
49
-
After custom domain for Azure AD B2C is successfully configured using Azure Front Door, [test the custom domain](./custom-domain.md?pivots=b2c-custom-policy#test-your-custom-domain) before proceeding further.
44
+
After a custom domain for Azure AD B2C is configured using Azure Front Door, [test the custom domain](./custom-domain.md?pivots=b2c-custom-policy#test-your-custom-domain) before proceeding.
50
45
51
-
## Onboard with Cloudflare
46
+
## Create a Cloudflare account
52
47
53
-
[Sign-up](https://dash.cloudflare.com/sign-up) and create a Cloudflare account. To enable WAF, a minimum of [Pro SKU](https://www.cloudflare.com/plans/) is required.
48
+
On cloudflare.com, you can [create an account](https://dash.cloudflare.com/sign-up). To enable WAF, on [Application Services]([https://www.cloudflare.com/plans/](https://www.cloudflare.com/plans/#price-matrix) select **Pro**, which is required.
54
49
55
50
### Configure DNS
56
51
57
-
1. To enable WAF for a domain, you must **turn-on the proxy setting** from the DNS console for the CNAME entry as shown in the example for domain id.contosobank.co.uk.
52
+
1. To enable WAF for a domain, in the DNS console for the CNAME entry, turnon the proxy setting from the DNS console for the CNAME entry as shown.
58
53
59
-

54
+

60
55
61
-
1. Toggle the **Proxy status** option available under the DNS pane.
56
+
2. Under the DNS pane, toggle the **Proxy status** option to **Proxied**. It turns orange.
62
57
63
-
1. After you switch it to **Proxied**, it would turn orange. The final setting should look like:
58
+
The settings appear in the following image.
64
59
65
-

60
+

66
61
67
-
### Configure WAF
62
+
### Configure the Web Application Firewall
68
63
69
-
[Configure WAF](https://www.cloudflare.com/waf/)in your Cloudflare settings.
64
+
Go to your Cloudflare settings, and use the Cloudflare content to [configure the WAF](https://www.cloudflare.com/waf/)and learn about other security tools.
70
65
71
66
### Configure firewall rule
72
67
73
-
Add, update, or remove firewall rules using the firewall option available in the top pane of the console. For example, following firewall setting enables CAPTCHA for all incoming requests to *contosobank.co.uk* domain before the request is sent to Azure Front Door. Learn more about [setting firewall rules](https://support.cloudflare.com/hc/articles/360016473712-Cloudflare-Firewall-Rules).
74
-
75
-

68
+
In the top pane of the console, use the firewall option to add, update, or remove firewall rules. For example, the following firewall setting enables CAPTCHA for incoming requests to *contosobank.co.uk* domain before the request goes to Azure Front Door.
76
69
77
-
### Test the settings
70
+

78
71
79
-
1. After saving the rule, it's required to complete CAPTCHA every time access to custom domain is requested.
> Cloudflare also provides various [**other options**](https://support.cloudflare.com/hc/en-us/articles/200172706-Configuring-Custom-Pages-Error-and-Challenge-) to create customized block pages.
76
+
1. Complete CAPTCHA when access to the custom domain is requested.
85
77
86
-
2. User is taken to Azure AD B2C policy after successfully completing CAPTCHA.
78
+

87
79
88
-

80
+
> [!NOTE]
81
+
> Cloudflare has functionality to customize block pages. See, [Configuring Custom Pages (Error and Challenge)](https://support.cloudflare.com/hc/en-us/articles/200172706-Configuring-Custom-Pages-Error-and-Challenge-).
89
82
83
+
2. The Azure AD B2C policy sign-in dialog appears.
90
84
91
-
## Additional resources
85
+

0 commit comments