Skip to content

Commit d49ba64

Browse files
committed
Fixing FAQs, adding more info on response headers
1 parent 46dc052 commit d49ba64

File tree

4 files changed

+83
-72
lines changed

4 files changed

+83
-72
lines changed

public/__redirects

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@
238238
/bots/get-started/bm-subscription/ /bots/get-started/bot-management/ 301
239239
/bots/get-started/pro/ /bots/get-started/super-bot-fight-mode/ 301
240240
/bots/additional-configurations/javascript-detections/ /cloudflare-challenges/challenge-types/javascript-detections/ 301
241+
/bots/troubleshooting/frequently-asked-questions/ /bots/frequently-asked-questions/ 301
241242

242243
#browser-rendering
243244
/browser-rendering/get-started/browser-rendering-with-do/ /browser-rendering/workers-binding-api/browser-rendering-with-do/ 301

src/content/docs/bots/concepts/bot/verified-bots/web-bot-auth.mdx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,17 @@ You need to host a key directory which creates a way for Cloudflare to authentic
4848
/.well-known/http-message-signatures-directory/
4949
```
5050
2. Serve the web page over HTTPS (not HTTP).
51-
3. Sign your HTTP response using the HTTP message signature specification by attaching one signature per key in your key directory. This ensures no one else can mirror your directory and attempt to register on your behalf. Your response must include the following headers:
52-
- `Signature`: TBD
53-
- `Signature-Input`: TBD
51+
3. [Calculate the base64 URL-encoded JWK thumbprint](https://www.rfc-editor.org/rfc/rfc8037.html#appendix-A.3) associated with your Ed25519 public key.
52+
4. Sign your HTTP response using the HTTP message signature specification by attaching one signature per key in your key directory. This ensures no one else can mirror your directory and attempt to register on your behalf. Your response must include the following headers:
53+
- `Signature`: Construct a [`Signature` header](https://www.rfc-editor.org/rfc/rfc9421#name-the-signature-http-field) over your chosen components.
54+
- `Signature-Input`: Construct a [`Signature-Input` header](https://www.rfc-editor.org/rfc/rfc9421#name-the-signature-input-http-fi) over your chosen components. The header must meet the following requirements.
55+
| Required component parameter | Requirement |
56+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
57+
| `tag` | This should be equal to `http-message-signatures-directory`. |
58+
| `alg` | This should be equal to `ed25519`. |
59+
| `keyid` | JWK thumbprint of the corresponding key in your directory. |
60+
| `created` | This should be equal to a `Unix` timestamp associated with when the message was sent by your application. |
61+
| `expires` | This should be equal to a `Unix` timestamp associated with when Cloudflare should no longer attempt to verify the message. |
5462

5563
The following example shows the annotated request and response with required headers against `https://example.com`.
5664
```txt
@@ -172,7 +180,7 @@ Signature: sig2=:jdq0SqOwHdyHr9+r5jw3iYZH6aNGKijYp/EstF4RQTQdi5N5YYKrD+mCT1HA1nZ
172180

173181
You may wish to refer to the following resources.
174182

175-
- [Bots FAQs](/bots/reference/faqs/).
183+
- [Bots FAQs](/bots/frequently-asked-questions/).
176184
- Link to new blog TBC.
177185
- Cloudflare blog: [Forget IPs: using cryptography to verify bot and agent traffic](https://blog.cloudflare.com/web-bot-auth/).
178186
- Cloudflare's [`web-bot-auth` library in Rust](https://crates.io/crates/web-bot-auth).

src/content/docs/bots/troubleshooting/frequently-asked-questions.mdx renamed to src/content/docs/bots/frequently-asked-questions.mdx

Lines changed: 70 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@ pcx_content_type: faq
33
title: FAQ
44
structured_data: true
55
sidebar:
6-
order: 3
6+
order: 11
77
---
88

99
import { Render, RuleID } from "~/components";
1010

1111
## Bots
1212

13-
## How does Cloudflare detect bots?
13+
### How does Cloudflare detect bots?
1414

1515
Cloudflare uses multiple methods to detect bots, but these vary by plan. For more details, refer to [Plans](/bots/plans).
1616

1717
---
1818

19-
## How do I know what is included in my plan?
19+
### How do I know what is included in my plan?
2020

2121
To know what's included in your plan, refer to our [Plans](/bots/plans).
2222

2323
---
2424

25-
## How do I set up my bot product?
25+
### How do I set up my bot product?
2626

2727
To learn how to set up your bot product, refer to [Get started](/bots/get-started).
2828

2929
---
3030

31-
## Yandex bot unexpectedly blocked by the WAF managed rule with ID `...f6cbb163`
31+
### Yandex bot unexpectedly blocked by the WAF managed rule with ID `...f6cbb163`
3232

3333
Yandex updates their bots very frequently, you may see more false positives while these changes are propagated. New and recently updated bots will occasionally be blocked by a Cloudflare WAF managed rule, as the IP list of Yandex bots has not yet synced with Yandex's most recent changes.
3434

@@ -45,7 +45,7 @@ Once the new Yandex IP is propagated to our system, the requests will not be blo
4545

4646
---
4747

48-
## How does machine learning work?
48+
### How does machine learning work?
4949

5050
Supervised machine learning takes certain variables (X) like gender and age and predicts another variable (Y) like income.
5151

@@ -55,7 +55,7 @@ Cloudflare uses data from millions of requests and re-train the system on a peri
5555

5656
---
5757

58-
## Why am I seeing a Managed Challenge action for WAF rules?
58+
### Why am I seeing a Managed Challenge action for WAF rules?
5959

6060
When you choose to challenge different bot categories with Bot Fight Mode or Super Bot Fight Mode, you will see Security Events with an **Action Taken** of **Managed Challenge**.
6161

@@ -65,13 +65,13 @@ This does not mean that your traffic was blocked. It is the challenge sent to yo
6565

6666
To understand if the result of the challenge was a success or a failure, you can verify using [Logpush](/logs/about/).
6767

68-
## Does the WAF run before Super Bot Fight Mode?
68+
### Does the WAF run before Super Bot Fight Mode?
6969

7070
Yes. WAF rules are executed before Super Bot Fight Mode. If a WAF custom rule performs a [terminating action](/ruleset-engine/rules-language/actions/) such as _Block_, your Super Bot Fight Mode configuration will not be evaluated.
7171

7272
---
7373

74-
## What is cf.bot_management.verified_bot?
74+
### What is cf.bot_management.verified_bot?
7575

7676
A request's _cf.bot_management.verified_bot_ value is a boolean indicating whether such request comes from a Cloudflare allowed bot.
7777

@@ -83,21 +83,21 @@ To allow traffic from good bots, use the [Verified Bot](/ruleset-engine/rules-la
8383

8484
---
8585

86-
## Why might the ja3hash or JA4 be empty in HTTP logs?
86+
### Why might the ja3hash or JA4 be empty in HTTP logs?
8787

8888
<Render file="ja3-ja4-null" />
8989

9090
---
9191

92-
## I run a good bot and want for it to be added to the allowlist (cf.bot_management.verified_bot). What should I do?
92+
### I run a good bot and want for it to be added to the allowlist (cf.bot_management.verified_bot). What should I do?
9393

9494
Cloudflare maintains a sample list of verified bots in [Cloudflare Radar](https://radar.cloudflare.com/verified-bots).
9595

9696
As a bot operator, in order to be listed by Cloudflare as a Verified Bot, your bot must conform with our [verified bot public policy](/bots/concepts/bot/verified-bots/policy/). If your bot meets this criteria, submit this [online application](https://docs.google.com/forms/d/e/1FAIpQLSdqYNuULEypMnp4i5pROSc-uP6x65Xub9svD27mb8JChA_-XA/viewform?usp=sf_link).
9797

9898
---
9999

100-
## What information do I need to troubleshoot my bot issues?
100+
### What information do I need to troubleshoot my bot issues?
101101

102102
If you are experiencing errors with your bot solution and need to submit a Support request, include the following information:
103103

@@ -124,7 +124,7 @@ Please follow instructions in the following questions on how to disable BFM and
124124

125125
---
126126

127-
## What should I do if I am getting False positives caused by Bot Fight Mode (BFM) or Super Bot Fight Mode (SBFM)?
127+
### What should I do if I am getting False positives caused by Bot Fight Mode (BFM) or Super Bot Fight Mode (SBFM)?
128128

129129
:::caution[Important considerations you need to be aware of before turning on BFM or SBFM]
130130

@@ -150,7 +150,7 @@ Bot Fight Mode can still trigger if you have IP Access rules, but it cannot trig
150150

151151
---
152152

153-
## Super Bot Fight Mode feature (SBFM) is still blocking requests even though the feature is turned off, why?
153+
### Super Bot Fight Mode feature (SBFM) is still blocking requests even though the feature is turned off, why?
154154

155155
This is a known issue the Bots team is working to resolve in the near future. In the meantime, there is a workaround to resolve such issue. You will need to run the following API command to check and remove the SBFM ruleset:
156156

@@ -171,3 +171,59 @@ This is a known issue the Bots team is working to resolve in the near future. In
171171
```
172172

173173
Note that you need to replace `<API_TOKEN>` with your own [API token](/fundamentals/api/get-started/create-token/).
174+
175+
---
176+
177+
## Web Bot Auth
178+
179+
### What key algorithms does Cloudflare support?
180+
181+
Cloudflare does not support key algorithms other than Ed25519.
182+
183+
---
184+
185+
### What `web-bot-auth` features from the spec are not supported?
186+
187+
The following derived components are not supported, and we will fail to verify a message if they are included:
188+
189+
- `@query-params`: Cloudflare recommends signing the whole query instead of an individual parameter.
190+
- `@status`: This is not possible to include in the request path.
191+
192+
The following component parameters defined in IETF RFC 9421 are not supported, and Cloudflare will fail to verify a message if they are included:
193+
194+
- `sf` (for HTTP header fields)
195+
- `bs` (for HTTP header fields)
196+
- `key` (for HTTP header fields)
197+
- `req` (for HTTP header fields or derived components)
198+
- `name` (for `@query-param` support - this requires `@query-param` support)
199+
200+
---
201+
202+
### Should I supply a `nonce` parameter in `Signature-Input`?
203+
204+
The `nonce` parameter allows you to supply a `nonce` to prevent attackers from replaying past messages against a server.
205+
206+
While Cloudflare recommends including it, there is currently no `nonce` validation, nor does Cloudflare guard against replay attacks using a database of seen `nonces`.
207+
208+
Instead, Cloudflare recommends short `expires` as a protection against replay attacks. A minute is often sufficient.
209+
210+
---
211+
212+
### How do I know my JSON Web Key set directory will be accepted?
213+
214+
Cloudflare uses [`http-signature-directory` tool](https://crates.io/crates/http-signature-directory) to validate your directory. Please your this works before submitting a verification request.
215+
216+
---
217+
218+
### My message is failing validation. What could be the cause?
219+
220+
- Ensure you have a [`Signature-Agent` header](/bots/concepts/bot/verified-bots/web-bot-auth/#signature-agent-header), and that its value in double-quotes.
221+
- Ensure you include `signature-agent` in the component list in your [`Signature-Input` header](/bots/concepts/bot/verified-bots/web-bot-auth/#signature-agent-header).
222+
- Ensure your `expires` timestamp is not too short, such that, by the time it arrives at Cloudflare servers, it has already expired. A minute is often sufficient.
223+
- Ensure you are not signing components containing non-ASCII values, or on the unsupported list.
224+
225+
---
226+
227+
### I want to use HTTP message signatures / Web Bot Auth on my zone, and do not want Cloudflare's verification to intervene. What do I do?
228+
229+
You can request the Web Bot Auth feature be disabled for your zone by contacting Cloudflare support. This will disable usage of Web Bot Auth specifically with Cloudflare, and verified bots will fallback to other modes to validate traffic.

src/content/docs/bots/reference/FAQs.mdx

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)