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
Copy file name to clipboardExpand all lines: products/waf/src/content/exposed-credentials-check/configure-api.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,16 +27,21 @@ To deploy the Managed Ruleset for a given zone, do the following:
27
27
28
28
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).
29
29
30
-
31
-
## Configure an override for the Exposed Credentials Check Managed Ruleset
30
+
### Configure an override for the Exposed Credentials Check Managed Ruleset
32
31
33
32
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.
34
33
35
34
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).
36
35
37
36
## Create a custom rule checking for exposed credentials
38
37
39
-
You can create rules that check for exposed credentials using the [Rulesets API](https://developers.cloudflare.com/firewall/cf-rulesets/rulesets-api).
38
+
<Asidetype="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.
40
45
41
46
A rule with exposed credentials check has a match when both the rule expression and the result from the exposed credentials check are true.
42
47
@@ -54,9 +59,9 @@ These options have additional requirements:
54
59
55
60
</Aside>
56
61
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`.
58
63
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).
60
65
61
66
### Example
62
67
@@ -81,7 +86,7 @@ curl -X POST \
81
86
}
82
87
}
83
88
],
84
-
"phase": "http_request_firewall_managed"
89
+
"phase": "http_request_firewall_custom"
85
90
}
86
91
```
87
92
@@ -94,7 +99,7 @@ The response returns the created ruleset. Note the presence of the `exposed_cred
94
99
"name": "Custom Ruleset 1",
95
100
"description": "This ruleset includes a rule checking for exposed credentials.",
96
101
"kind": "custom",
97
-
"version": "3",
102
+
"version": "1",
98
103
"rules": [
99
104
{
100
105
"id": "{custom-rule-id}",
@@ -109,11 +114,16 @@ The response returns the created ruleset. Note the presence of the `exposed_cred
109
114
"ref": "{custom-rule-ref}",
110
115
"enabled": true
111
116
}
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": []
114
124
}
115
125
```
116
126
117
127
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`.
118
128
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