Skip to content

Commit 49fd261

Browse files
committed
Refine logging
1 parent 5931a42 commit 49fd261

File tree

1 file changed

+27
-29
lines changed

1 file changed

+27
-29
lines changed

src/content/docs/cloudflare-one/policies/data-loss-prevention/dlp-policies/logging-options.mdx

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
Data Loss Prevention allows you to capture, store, and view the data that triggered a specific DLP policy for use as forensic evidence. Users on all plans can log the [payload](#log-the-payload-of-matched-rules) or [generative AI prompt content](#log-generative-ai-prompt-content) of matched HTTP requests in their Cloudflare logs. Additionally, Enterprise users can [configure a Logpush job](#send-http-requests-to-logpush-destination) to send copies of entire matched HTTP requests to storage destinations.
99

10-
The data that triggers a DLP policy is stored in the portion of the HTTP request known as the payload. Payload logging is especially useful when diagnosing the behavior of DLP policies. 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. The stored data will include a redacted version of the match, plus 75 bytes of additional context on both sides of the match.
10+
The data that triggers a DLP policy is stored in the portion of the HTTP request known as the payload. Payload logging is especially useful when diagnosing the behavior of DLP policies. Since the values that triggered a rule may contain sensitive data, they are encrypted with a public key so that only you can examine them later. The stored data will include a redacted version of the match, plus 75 bytes of additional context on both sides of the match.
1111

1212
## Set a DLP payload encryption public key
1313

@@ -27,11 +27,11 @@ To generate a public/private key pair in the command line, refer to [these instr
2727
The matching private key is required to view logs. If you lose your private key, you will need to [generate](#1-generate-a-key-pair) and [upload](#2-upload-the-public-key-to-cloudflare) a new public key. The payload of new requests will be encrypted with the new public key.
2828
:::
2929

30-
## Log the payload of matched rules
30+
## Log matched DLP policies
3131

32-
DLP can log the payload of matched HTTP requests in your Cloudflare logs.
32+
Once you set a public key, DLP can log the payload of matched HTTP requests and AI prompts in your Cloudflare logs.
3333

34-
### Turn on payload logging for a DLP policy
34+
### Turn on payload logging
3535

3636
You can enable payload logging for any Allow or Block HTTP policy that uses the [_DLP Profile_](/cloudflare-one/policies/gateway/http-policies/#dlp-profile) selector.
3737

@@ -42,7 +42,18 @@ You can enable payload logging for any Allow or Block HTTP policy that uses the
4242

4343
Data Loss Prevention will now store a portion of the payload for HTTP requests that match this policy.
4444

45-
### View payload logs
45+
### Turn on AI prompt content logging
46+
47+
You can enable payload logging for any Allow or Block HTTP policy that uses the [_Application_](/cloudflare-one/policies/gateway/http-policies/#application) selector with a supported [Cloud App Control](/cloudflare-one/policies/gateway/http-policies/#cloud-app-control) application.
48+
49+
1. Go to **Gateway** > **Firewall policies** > **HTTP**.
50+
2. Edit an existing Allow or Block DLP policy, or [create a new policy](/cloudflare-one/policies/data-loss-prevention/dlp-policies/#2-create-a-dlp-policy).
51+
3. In the policy builder, scroll down to **Configure policy settings** and turn on **Capture generative AI prompt content in logs**.
52+
4. Select **Save**.
53+
54+
Data Loss Prevention will now store the user prompt and AI model response for requests that match this policy.
55+
56+
## View payload logs
4657

4758
To view DLP payload logs:
4859

@@ -51,10 +62,12 @@ To view DLP payload logs:
5162
3. Select **Decrypt Payload Log**.
5263
4. Enter your private key and select **Decrypt**.
5364

54-
You will see the [ID of the matched DLP Profile](/api/resources/zero_trust/subresources/dlp/subresources/profiles/methods/list/) followed by the decrypted payload.
65+
Gateway logs will display the [ID of the matched DLP Profile](/api/resources/zero_trust/subresources/dlp/subresources/profiles/methods/list/) followed by the decrypted payload.
66+
67+
Additionally, if DLP detected an generative AI prompt, you can select **View prompt** to display the user prompt.
5568

5669
:::note
57-
Cloudflare does not store the key or the decrypted payload.
70+
Cloudflare does not store the private key or the decrypted payload.
5871
:::
5972

6073
### Report false and true positives to AI context analysis
@@ -70,28 +83,6 @@ To report a DLP match payload as a false or true positive:
7083

7184
Based on your report, DLP's machine learning will adjust its confidence in future matches for the associated profile.
7285

73-
### Data privacy
74-
75-
- All Cloudflare logs are encrypted at rest. Encrypting the payload content adds a second layer of encryption for the matched values that triggered a DLP rule.
76-
- Cloudflare cannot decrypt encrypted payloads, since this operation requires your private key. Cloudflare staff will never ask for the private key.
77-
- DLP will redact all predefined alphanumeric characters in the log. For example, `123-45-6789` will become `XXX-XX-XXXX`.
78-
- You can define sensitive data with [Exact Data Match (EDM)](/cloudflare-one/policies/data-loss-prevention/detection-entries/#exact-data-match). EDM match logs will redact your defined strings.
79-
80-
## Log generative AI prompt content
81-
82-
DLP can detect and log the prompt topic sent to an AI tool.
83-
84-
### Turn on AI prompt content logging for a DLP policy
85-
86-
You can enable payload logging for any Allow or Block HTTP policy that uses the [_Application_](/cloudflare-one/policies/gateway/http-policies/#application) selector with a supported [Cloud App Control](/cloudflare-one/policies/gateway/http-policies/#cloud-app-control) application.
87-
88-
1. Go to **Gateway** > **Firewall policies** > **HTTP**.
89-
2. Edit an existing Allow or Block DLP policy, or [create a new policy](/cloudflare-one/policies/data-loss-prevention/dlp-policies/#2-create-a-dlp-policy).
90-
3. In the policy builder, scroll down to **Configure policy settings** and turn on **Capture generative AI prompt content in logs**.
91-
4. Select **Save**.
92-
93-
Data Loss Prevention will now store the user prompt and AI model response for requests that match this policy.
94-
9586
## Send DLP forensic copies to Logpush destination
9687

9788
:::note[Availability]
@@ -116,3 +107,10 @@ To set up the DLP Forensic Copy Logpush job:
116107
DLP will now send a copy of HTTP requests that match this policy to your Logpush destination.
117108

118109
Logpush supports up to four DLP Forensic Copy Logpush jobs per account. By default, Gateway will send all matched HTTP requests to your configured DLP Forensic Copy jobs. To send specific policy matches to specific jobs, configure [Log filters](/logs/logpush/logpush-job/filters/). If the request contains an archive file, DLP will only send up to 100 MB of uncompressed content to your configured storage.
110+
111+
## Data privacy
112+
113+
- All Cloudflare logs are encrypted at rest. Encrypting the payload content adds a second layer of encryption for the matched values that triggered a DLP rule.
114+
- Cloudflare cannot decrypt encrypted payloads, since this operation requires your private key. Cloudflare staff will never ask for the private key.
115+
- DLP will redact all predefined alphanumeric characters in the log. For example, `123-45-6789` will become `XXX-XX-XXXX`.
116+
- You can define sensitive data with [Exact Data Match (EDM)](/cloudflare-one/policies/data-loss-prevention/detection-entries/#exact-data-match). EDM match logs will redact your defined strings.

0 commit comments

Comments
 (0)