Skip to content

Commit a1b4228

Browse files
committed
[WAF] Add exposed credentials check migration guide
1 parent c2067ef commit a1b4228

File tree

5 files changed

+91
-26
lines changed

5 files changed

+91
-26
lines changed

src/content/docs/waf/detections/leaked-credentials/get-started.mdx

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,11 @@ head:
88
content: Get started with leaked credentials detection
99
---
1010

11-
import { TabItem, Tabs, Details } from "~/components";
11+
import { Render, TabItem, Tabs, Details } from "~/components";
1212

1313
## 1. Turn on leaked credentials detection
1414

15-
On Free plans, the leaked credentials detection is enabled by default, and no action is required. On paid plans, you can turn on the detection in the Cloudflare dashboard or via API.
16-
17-
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
18-
19-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
20-
2. Go to **Security** > **Settings**.
21-
3. Under **Incoming traffic detections**, turn on **Leaked credentials**.
22-
23-
</TabItem> <TabItem label="API">
24-
25-
Enable the feature using a `POST` request similar to the following:
26-
27-
```bash
28-
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/leaked-credential-checks" \
29-
--header "X-Auth-Email: <EMAIL>" \
30-
--header "X-Auth-Key: <API_KEY>" \
31-
--header "Content-Type: application/json" \
32-
--data '{ "enabled": true }'
33-
```
34-
35-
</TabItem> </Tabs>
15+
<Render file="leaked-credentials-detection-enable" />
3616

3717
:::note
3818
To achieve optimal latency performance, Cloudflare recommends that you turn off [Exposed Credentials Checks](/waf/managed-rules/reference/exposed-credentials-check/) (a previous implementation) after turning on leaked credentials detection and setting up your mitigation strategy as described in the next steps.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Exposed credentials check migration
3+
pcx_content_type: reference
4+
sidebar:
5+
order: 4
6+
---
7+
8+
import { Render } from "~/components";
9+
10+
This guide describes the general steps to migrate your [Exposed Credentials Check](/waf/managed-rules/check-for-exposed-credentials/) configuration to the new [leaked credentials detection](/waf/detections/leaked-credentials/).
11+
12+
Cloudflare recommends that customers still using the Exposed Credentials Check feature migrate to the new leaked credentials detection. This applies both to users that have deployed the [Cloudflare Exposed Credentials Check Ruleset](/waf/managed-rules/reference/exposed-credentials-check/) and users that have [created custom rules checking for exposed credentials](/waf/managed-rules/check-for-exposed-credentials/#exposed-credentials-checks-in-custom-rules).
13+
14+
The leaked credentials detection offers the following advantages over Exposed Credentials Check:
15+
16+
- The detection uses a comprehensive database of leaked credentials, containing over 15 billion passwords.
17+
- After enabling the feature, you can review the amount of incoming requests with leaked credentials in Security Analytics, even before creating any mitigation rules.
18+
- You can take action on the requests containing leaked credentials using WAF features like rate limiting rules or custom rules.
19+
20+
## 1. Turn off Exposed Credentials Check
21+
22+
If you had deployed the Cloudflare Exposed Credentials Check managed ruleset:
23+
24+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
25+
2. Go to **Security** > **WAF** > **Managed rules**.
26+
3. Under **Managed rules**, edit the rule that executes the Cloudflare Exposed Credentials Check Ruleset and take note of the current configuration (namely the performed action). Next, delete (or turn off) that rule.
27+
28+
If you had created [custom rules that checked for exposed credentials](/waf/managed-rules/check-for-exposed-credentials/configure-api/#create-a-custom-rule-checking-for-exposed-credentials), you should delete these specific rules after taking note of their configuration for the next steps. Custom rules checking for exposed credentials were only available at the account level and could only be configured via API.
29+
30+
:::note
31+
While Exposed Credentials Check and leaked credentials detection can work side by side, enabling both features will increase the latency on incoming requests related to authentication.
32+
:::
33+
34+
## 2. Turn on leaked credentials detection
35+
36+
<Render file="leaked-credentials-detection-enable" />
37+
38+
## 3. Configure the actions to take
39+
40+
Based on your previous configuration, do one of the following:
41+
42+
- If you were using the [default action](/waf/managed-rules/check-for-exposed-credentials/#available-actions) in Exposed Credentials Check: Turn on the [**Add Leaked Credentials Checks Header** managed transform](/rules/transform/managed-transforms/reference/#add-leaked-credentials-checks-header) that adds the `Exposed-Credential-Check` header to incoming requests containing leaked credentials. Even though the header name is the same as in Exposed Credentials Check, the header values in the new implementation will vary between `1` and `4`.
43+
44+
- If you were using a different action: Create a [custom rule](/waf/custom-rules/) with an action equivalent to the one you were using. The rule should match `User and password leaked is true` (if you are using the expression editor, enter `(cf.waf.credential_check.username_and_password_leaked)`).
45+
46+
If you had configured custom rules at the account level checking for exposed credentials:
47+
48+
1. (Optional) Configure [custom detection locations](/waf/detections/leaked-credentials/get-started/#4-optional-configure-a-custom-detection-location) for leaked credentials detection. This step may not be necessary if the authentication requests are from well-known web applications or follow common web authentication patterns.
49+
50+
2. Create custom rules that perform an equivalent action to the rules you had previously configured. You can used leaked credentials fields in custom rules at the account or at the zone level.
51+
52+
---
53+
54+
## More resources
55+
56+
- Check for the results of leaked credentials detection in [Security Analytics](/waf/analytics/security-analytics/).
57+
- Refer to [Mitigation examples](/waf/detections/leaked-credentials/examples/) for example mitigation strategies you can use when detecting leaked credentials.

src/content/docs/waf/reference/migration-guides/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ sidebar:
66
group:
77
hideIndex: true
88
head: []
9-
description: Reference guides for users migrating from deprecated Cloudflare
10-
features to the Cloudflare WAF.
9+
description: Reference guides for users migrating from older Cloudflare
10+
features to new implementations in the Cloudflare WAF.
1111
---
1212

1313
import { DirectoryListing } from "~/components";
1414

15-
Refer to the following pages for more information on migrating from deprecated features to the Cloudflare WAF:
15+
Refer to the following pages for more information on migrating from older features to new implementations in the Cloudflare WAF:
1616

1717
<DirectoryListing />
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
{}
3+
---
4+
5+
import { TabItem, Tabs } from "~/components";
6+
7+
On Free plans, the leaked credentials detection is enabled by default, and no action is required. On paid plans, you can turn on the detection in the Cloudflare dashboard or via API.
8+
9+
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
10+
11+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
12+
2. Go to **Security** > **Settings**.
13+
3. Under **Incoming traffic detections**, turn on **Leaked credentials**.
14+
15+
</TabItem> <TabItem label="API">
16+
17+
Enable the feature using a `POST` request similar to the following:
18+
19+
```bash
20+
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/leaked-credential-checks" \
21+
--header "X-Auth-Email: <EMAIL>" \
22+
--header "X-Auth-Key: <API_KEY>" \
23+
--header "Content-Type: application/json" \
24+
--data '{ "enabled": true }'
25+
```
26+
27+
</TabItem> </Tabs>

src/content/partials/waf/leaked-credentials-recommend-detection.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
---
44

55
:::note[Recommendation: Use leaked credentials detection instead]
6-
Cloudflare recommends that you use [leaked credentials detection](/waf/detections/leaked-credentials/) instead of Cloudflare Exposed Credentials Check, which refers to a previous implementation.
6+
Cloudflare recommends that you use [leaked credentials detection](/waf/detections/leaked-credentials/) instead of Cloudflare Exposed Credentials Check, which refers to a previous implementation.<br/>
7+
For more information on migrating your Exposed Credentials Check configuration, refer to the [migration guide](/waf/reference/migration-guides/exposed-credentials-check-migration/).
78
:::

0 commit comments

Comments
 (0)