|
| 1 | +--- |
| 2 | +title: Upgrade to leaked credentials detection |
| 3 | +pcx_content_type: reference |
| 4 | +sidebar: |
| 5 | + order: 7 |
| 6 | +--- |
| 7 | + |
| 8 | +import { Render } from "~/components"; |
| 9 | + |
| 10 | +This guide describes the general steps to upgrade 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 update their configuration to use the new leaked credentials detection, which offers the following advantages: |
| 13 | + |
| 14 | +- Uses a comprehensive database of leaked credentials, containing over 15 billion passwords. |
| 15 | +- After enabling the detection, you can review the amount of incoming requests containing leaked credentials in Security Analytics, even before creating any mitigation rules. |
| 16 | +- You can take action on the requests containing leaked credentials using WAF features like rate limiting rules or custom rules. |
| 17 | + |
| 18 | +:::note |
| 19 | +This upgrade guide applies to customers changing from Exposed Credentials Check at the zone level. |
| 20 | +::: |
| 21 | + |
| 22 | +## 1. Turn off Exposed Credentials Check |
| 23 | + |
| 24 | +If you had deployed the Cloudflare Exposed Credentials Check managed ruleset: |
| 25 | + |
| 26 | +1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain. |
| 27 | +2. Go to **Security** > **WAF** > **Managed rules**. |
| 28 | +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. |
| 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 | +--- |
| 47 | + |
| 48 | +## More resources |
| 49 | + |
| 50 | +- Check for the results of leaked credentials detection in [Security Analytics](/waf/analytics/security-analytics/). |
| 51 | +- Refer to [Mitigation examples](/waf/detections/leaked-credentials/examples/) for example mitigation strategies you can use when detecting leaked credentials. |
0 commit comments