|
| 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. |
0 commit comments