Skip to content

Commit a0938c1

Browse files
Update exposed credentials check API page (#1736)
Co-authored-by: Kate Tungusova <[email protected]>
1 parent 0e58d2e commit a0938c1

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

products/waf/src/content/exposed-credentials-check/configure-api.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,21 @@ To deploy the Managed Ruleset for a given zone, do the following:
2727

2828
For more information on deploying a Managed Ruleset, check [Deploy a Managed Ruleset](https://developers.cloudflare.com/firewall/cf-rulesets/managed-rulesets/deploy-managed-ruleset).
2929

30-
31-
## Configure an override for the Exposed Credentials Check Managed Ruleset
30+
### Configure an override for the Exposed Credentials Check Managed Ruleset
3231

3332
An override allows you to define an action or status different from the default values as configured by Cloudflare. You can define overrides at the ruleset, tag, and rule level for all Managed Rulesets, including the Exposed Credentials Check Managed Ruleset.
3433

3534
For more information on defining overrides for Managed Rulesets using the Rulesets API, check [Override a Managed Ruleset](https://developers.cloudflare.com/firewall/cf-rulesets/managed-rulesets/override-managed-ruleset).
3635

3736
## Create a custom rule checking for exposed credentials
3837

39-
You can create rules that check for exposed credentials using the [Rulesets API](https://developers.cloudflare.com/firewall/cf-rulesets/rulesets-api).
38+
<Aside type="note">
39+
40+
This feature is only available to customers on an Enterprise plan.
41+
42+
</Aside>
43+
44+
You can create rules that check for exposed credentials using the [Rulesets API](https://developers.cloudflare.com/firewall/cf-rulesets/rulesets-api). Include these rules in a custom ruleset, which you must create at the account level, and then deploy the custom ruleset to a phase.
4045

4146
A rule with exposed credentials check has a match when both the rule expression and the result from the exposed credentials check are true.
4247

@@ -54,9 +59,9 @@ These options have additional requirements:
5459

5560
</Aside>
5661

57-
You can use the `exposed_credential_check` field in rules with one of the following actions: `rewrite`, `log`, `block`, `challenge`, or `js_challenge`.
62+
You can use the `exposed_credential_check` field in rules with one of the following actions: `rewrite`, `log`, `block`, `challenge`, or `js_challenge`.
5863

59-
To create and deploy a custom ruleset, follow the workflow described in [Work with custom rulesets](https://developers.cloudflare.com/firewall/cf-rulesets/custom-rulesets).
64+
To create and deploy a custom ruleset, follow the workflow described in [Work with custom rulesets](https://developers.cloudflare.com/firewall/cf-rulesets/custom-rulesets).
6065

6166
### Example
6267

@@ -81,7 +86,7 @@ curl -X POST \
8186
}
8287
}
8388
],
84-
"phase": "http_request_firewall_managed"
89+
"phase": "http_request_firewall_custom"
8590
}
8691
```
8792

@@ -94,7 +99,7 @@ The response returns the created ruleset. Note the presence of the `exposed_cred
9499
"name": "Custom Ruleset 1",
95100
"description": "This ruleset includes a rule checking for exposed credentials.",
96101
"kind": "custom",
97-
"version": "3",
102+
"version": "1",
98103
"rules": [
99104
{
100105
"id": "{custom-rule-id}",
@@ -109,11 +114,16 @@ The response returns the created ruleset. Note the presence of the `exposed_cred
109114
"ref": "{custom-rule-ref}",
110115
"enabled": true
111116
}
112-
]
113-
}
117+
],
118+
"last_updated": "2021-03-19T10:48:04.057775Z",
119+
"phase": "http_request_firewall_custom"
120+
},
121+
"success": true,
122+
"errors": [],
123+
"messages": []
114124
}
115125
```
116126

117127
The example above uses the `url_decode()` function because fields in the request body (available in `http.request.body.form`) are URL-encoded when the content type is `application/x-www-form-urlencoded`.
118128

119-
See [Deploy a custom ruleset](https://developers.cloudflare.com/firewall/cf-rulesets/custom-rulesets/deploy-custom-ruleset/) for more information on deploying custom rulesets using the Rulesets API.
129+
After creating a custom ruleset, deploy it to a phase so that it can execute. Refer to [Deploy a custom ruleset](https://developers.cloudflare.com/firewall/cf-rulesets/custom-rulesets/deploy-custom-ruleset) for more information.

0 commit comments

Comments
 (0)