Skip to content

Commit c44dcf3

Browse files
authored
[WAF] Update payload matching section (#18236)
1 parent 7db88ef commit c44dcf3

File tree

4 files changed

+27
-20
lines changed

4 files changed

+27
-20
lines changed

src/content/docs/waf/managed-rules/payload-logging/configure-api.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Configure payload logging via API
33
pcx_content_type: how-to
44
sidebar:
55
order: 4
6+
label: Configure via API
67
head:
78
- tag: title
89
content: Configure payload logging for a managed ruleset via API

src/content/docs/waf/managed-rules/payload-logging/configure.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ title: Configure payload logging in the dashboard
33
pcx_content_type: how-to
44
sidebar:
55
order: 2
6+
label: Configure in the dashboard
67
head:
78
- tag: title
89
content: Configure payload logging for a managed ruleset in the dashboard
9-
1010
---
1111

1212
Configure payload logging for a ruleset in the ruleset configuration page.
1313

1414
:::note
1515

16-
Only users with the [Super Administrator role](/fundamentals/setup/manage-members/roles/) can configure payload logging and decrypt payloads in the Cloudflare dashboard. Other users can decrypt payloads if they have access to the logs and to the private key.
16+
Only users with the [Super Administrator role](/fundamentals/setup/manage-members/roles/) can configure payload logging and decrypt payloads in the Cloudflare dashboard. Other users can decrypt payloads if they have access to the logs and to the private key.
1717
:::
1818

1919
Do the following:
@@ -28,9 +28,9 @@ Do the following:
2828

2929
4. After reading and understanding the implications of enabling payload logging, select one of the available options:
3030

31-
* **Generate key pair using your web browser**: Generates a key pair (a private and a public key) in your browser and configures payload logging with the generated public key.
31+
- **Generate key pair using your web browser**: Generates a key pair (a private and a public key) in your browser and configures payload logging with the generated public key.
3232

33-
* **Use my own public key**: Enter a public key [generated by the `matched-data-cli` command-line tool](/waf/managed-rules/payload-logging/command-line/generate-key-pair/).
33+
- **Use my own public key**: Enter a public key [generated by the `matched-data-cli` command-line tool](/waf/managed-rules/payload-logging/command-line/generate-key-pair/).
3434

3535
5. Select **Next**.
3636

src/content/docs/waf/managed-rules/payload-logging/index.mdx

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,54 @@ pcx_content_type: concept
33
title: Log the payload of matched rules
44
sidebar:
55
order: 11
6-
76
---
87

9-
import { GlossaryTooltip } from "~/components"
8+
import { GlossaryTooltip } from "~/components";
109

1110
The WAF allows you to log the request information that triggered a specific rule of a managed ruleset. This information is known as the payload. Payload logging is especially useful when diagnosing the behavior of WAF rules. Since the values that triggered a rule may contain sensitive data, they are encrypted with a customer-provided public key so that only you can examine them later.
1211

1312
:::note
1413

15-
1614
This feature is only available for customers on an Enterprise plan.
1715

18-
1916
:::
2017

21-
Each managed ruleset has its own payload logging configuration. To enable the feature, configure a public key to encrypt the logged payload by doing one of the following:
18+
## Turn on payload logging
2219

23-
* Generate a key pair directly in the dashboard (Cloudflare will **only** save the generated public key)
24-
* Enter your own public key
20+
Each managed ruleset has its own payload logging configuration. To turn on payload logging, configure a public key to encrypt the logged payload by doing one of the following:
21+
22+
- Generate a key pair directly in the Cloudflare dashboard
23+
- Use your own public key
2524

2625
Once enabled, the WAF saves the payload of any rule matches for the managed ruleset configured with payload logging, encrypting the payload with your public key.
2726

27+
For more information, refer to [Configure payload logging in the dashboard](/waf/managed-rules/payload-logging/configure/) or [Configure payload logging via API](/waf/managed-rules/payload-logging/configure-api/).
28+
29+
:::caution[Important remarks]
30+
31+
- When you generate a key pair in the dashboard, Cloudflare will only save the generated public key, not the private key. You must store your private key safely.
32+
- Cloudflare will not save the matched payload if the action of the matched rule is _Log_.
33+
34+
:::
35+
36+
## View payload content
37+
2838
To view the content of the payload in clear text, do one of the following:
2939

30-
* In the Security Events page (**Security** > **Events**), enter your private key to decrypt the payload of a log entry directly in the browser. Refer to [View the payload content in the dashboard](/waf/managed-rules/payload-logging/view/) for details.
40+
- In the Security Events page (**Security** > **Events**), enter your private key to decrypt the payload of a log entry directly in the browser. Refer to [View the payload content in the dashboard](/waf/managed-rules/payload-logging/view/) for details.
3141

32-
* Decrypt the payload in the command line using the `matched-data-cli` tool. Refer to [Decrypt the payload content in the command line](/waf/managed-rules/payload-logging/command-line/decrypt-payload/) for details.
42+
- Decrypt the payload in the command line using the `matched-data-cli` tool. Refer to [Decrypt the payload content in the command line](/waf/managed-rules/payload-logging/command-line/decrypt-payload/) for details.
3343

34-
* Decrypt the matched payload in your [Logpush](/logs/about/) job using a Worker before storing the logs in your <GlossaryTooltip term="SIEM">SIEM system</GlossaryTooltip>. Refer to [Store decrypted matched payloads in logs](/waf/managed-rules/payload-logging/decrypt-in-logs/) for details.
44+
- Decrypt the matched payload in your [Logpush](/logs/about/) job using a Worker before storing the logs in your <GlossaryTooltip term="SIEM">SIEM system</GlossaryTooltip>. Refer to [Store decrypted matched payloads in logs](/waf/managed-rules/payload-logging/decrypt-in-logs/) for details.
3545

3646
:::caution[Important]
3747

38-
3948
All Cloudflare logs are encrypted at rest. Encrypting the payload content adds a second layer of encryption for the matched values that triggered a WAF rule.
4049

4150
Make sure you store your private key safely. If you lose the private key, configure payload logging with a new public key. The payload of new requests will be encrypted with the new public key.
4251

4352
Cloudflare cannot decrypt encrypted payloads, since this operation requires your private key. Cloudflare staff will never ask for the private key.
4453

45-
4654
:::
4755

4856
## User role requirements

src/content/docs/waf/managed-rules/payload-logging/view.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ pcx_content_type: how-to
33
title: View the payload content in the dashboard
44
sidebar:
55
order: 3
6-
76
---
87

98
View the content of the matched rule payload in the dashboard by entering your private key.
@@ -16,13 +15,12 @@ View the content of the matched rule payload in the dashboard by entering your p
1615

1716
![Example of a firewall event with available payload match data (still encrypted)](~/assets/images/waf/transform-rules/payload-logging-example.png)
1817

18+
The **Payload match** section is not available if the action taken by the matched rule is _Log_.
19+
1920
4. Enter your private key in the pop-up window and select **Decrypt**.
2021

2122
:::note
22-
23-
2423
The private key is not sent to a Cloudflare server. The decryption occurs entirely in the browser.
25-
2624
:::
2725

2826
If the private key you entered decrypts the encrypted payload successfully, the **Payload match** card displays the payload content in clear text.

0 commit comments

Comments
 (0)