Skip to content

Commit 2da252e

Browse files
committed
update doc for cloudflare-worker-bouncer
1 parent 5a3a18a commit 2da252e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

crowdsec-docs/unversioned/bouncers/cloudflare-workers.mdx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ sudo systemctl start crowdsec-cloudflare-worker-bouncer # the Remediation Compon
115115

116116
#### From source
117117

118-
:warning: requires go >= 1.20
118+
:warning: requires go >= 1.23
119119

120120
```bash
121121
git clone https://github.com/crowdsecurity/cs-cloudflare-worker-bouncer
@@ -137,7 +137,13 @@ The Remediation Component does the following:
137137
1. Create a Cloudflare Worker and a Worker KV per configured account.
138138
2. Create a Worker Route(s) per configured zone. Any request matching the route would be handled by the worker.
139139
3. For every matching incoming request, the worker checks whether it's IP, Country and AS have a decision against. It checks for this in it's KV store. If found it performs the corresponding remediation.
140-
4. The Remediation Component also periodically updates the KV store with the latest decisions from CrowdSec.
140+
4. The Remediation Component also periodically updates the KV store with the latest decisions from CrowdSec.
141+
142+
If your Cloudflare token has permission on D1, the remediation component will also automatically create a database to track:
143+
- Number of requests processed
144+
- Number of requests blocked
145+
146+
Those metrics are exposed through the prometheus endpoint and automatically sent to crowdsec for visualisation with `cscli`.
141147

142148
## Configuration
143149

@@ -193,7 +199,7 @@ For obtaining the `token`:
193199

194200
1. Sign in as a user who has access to the desired account.
195201

196-
Then click [this link](https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22account_settings%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22challenge_widgets%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22user_details%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22workers_kv_storage%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_routes%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_scripts%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22read%22%7D%2C%20%7B%22key%22%3A%20%22dns%22%2C%20%22type%22%3A%22read%22%7D%5D&name=) and create the token.
202+
Then click [this link](https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22account_settings%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22challenge_widgets%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22user_details%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22workers_kv_storage%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_routes%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_scripts%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22read%22%7D%2C%20%7B%22key%22%3A%20%22dns%22%2C%20%22type%22%3A%22read%22%7D%2C%20%7B%22key%22%3A%22d1%22%2C%20%22type%22%3A%22edit%22%7D%5D&name=) and create the token.
197203

198204
Alternatively, you can go to [Tokens](https://dash.cloudflare.com/profile/api-tokens) and create the token.
199205

@@ -205,6 +211,7 @@ The Remediation Component requires the following permissions to function:
205211
| Account | Workers KV Storage | Edit |
206212
| Account | Workers Scripts | Edit |
207213
| Account | Account Settings | Read |
214+
| Account | D1 | Edit |
208215
| User | User Details | Read |
209216
| Zone | DNS | Read |
210217
| Zone | Workers Routes | Edit |

0 commit comments

Comments
 (0)