Skip to content

Commit 5af8c4b

Browse files
authored
[Docs] Update ip.geoip.* fields to ip.src.* fields (#18756)
1 parent 33db7e3 commit 5af8c4b

File tree

26 files changed

+108
-109
lines changed

26 files changed

+108
-109
lines changed
-15 KB
Loading
-8.71 KB
Loading

src/content/docs/ddos-protection/managed-rulesets/http/override-expressions.mdx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ sidebar:
66
head:
77
- tag: title
88
content: Override expressions for HTTP DDoS Attack Protection
9-
109
---
1110

1211
:::note
1312

14-
Only available to Enterprise customers with the Advanced DDoS Protection subscription.
13+
Only available to Enterprise customers with the Advanced DDoS Protection subscription.
1514
:::
1615

1716
Set an override expression for the HTTP DDoS Attack Protection managed ruleset to define a specific scope for [sensitivity level](/ddos-protection/managed-rulesets/http/override-parameters/#sensitivity-level) or [action](/ddos-protection/managed-rulesets/http/override-parameters/#action) adjustments.
@@ -36,11 +35,11 @@ You can use the following fields in override expressions:
3635
- `http.request.cookies`
3736
- `http.user_agent`
3837
- `http.x_forwarded_for`
39-
- `ip.geoip.asnum`
40-
- `ip.geoip.continent`
41-
- `ip.geoip.country`
42-
- `ip.geoip.is_in_european_union`
4338
- `ip.src`
39+
- `ip.src.asnum`
40+
- `ip.src.continent`
41+
- `ip.src.country`
42+
- `ip.src.is_in_european_union`
4443
- `ssl`
4544
- `cf.tls_client_auth.cert_verified`
4645

src/content/docs/logs/get-started/enable-destinations/splunk.mdx

Lines changed: 39 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ sidebar:
66
head:
77
- tag: title
88
content: Enable Logpush to Splunk
9-
109
---
1110

12-
import { Render } from "~/components"
11+
import { Render } from "~/components";
1312

1413
Cloudflare Logpush supports pushing logs directly to Splunk via the Cloudflare dashboard or via API.
1514

@@ -20,25 +19,27 @@ Cloudflare Logpush supports pushing logs directly to Splunk via the Cloudflare d
2019
5. In **Select a destination**, choose **Splunk**.
2120

2221
6. Enter or select the following destination information:
23-
* **Splunk raw HTTP Event Collector URL**
24-
* **Channel ID** - This is a random GUID that you can generate using [guidgenerator.com](http://guidgenerator.com/).
25-
* **Auth Token**
26-
* **Source Type** - For example, `cloudflare:json`. If you are using the [Cloudflare App for Splunk](https://splunkbase.splunk.com/app/4501), refer to the appropriate source type for the corresponding datasets under the **Details** section. For instance, for Zero Trust Access requests logs, the source type is `cloudflare:access`.
27-
* **Use insecure skip verify option** (not recommended).
22+
- **Splunk raw HTTP Event Collector URL**
23+
- **Channel ID** - This is a random GUID that you can generate using [guidgenerator.com](http://guidgenerator.com/).
24+
- **Auth Token**
25+
- **Source Type** - For example, `cloudflare:json`. If you are using the [Cloudflare App for Splunk](https://splunkbase.splunk.com/app/4501), refer to the appropriate source type for the corresponding datasets under the **Details** section. For instance, for Zero Trust Access requests logs, the source type is `cloudflare:access`.
26+
- **Use insecure skip verify option** (not recommended).
2827

2928
When you are done entering the destination details, select **Continue**.
3029

3130
7. Select the dataset to push to the storage service.
3231

3332
8. In the next step, you need to configure your logpush job:
34-
* Enter the **Job name**.
35-
* Under **If logs match**, you can select the events to include and/or remove from your logs. Refer to [Filters](/logs/reference/filters/) for more information. Not all datasets have this option available.
36-
* In **Send the following fields**, you can choose to either push all logs to your storage destination or selectively choose which logs you want to push.
33+
34+
- Enter the **Job name**.
35+
- Under **If logs match**, you can select the events to include and/or remove from your logs. Refer to [Filters](/logs/reference/filters/) for more information. Not all datasets have this option available.
36+
- In **Send the following fields**, you can choose to either push all logs to your storage destination or selectively choose which logs you want to push.
3737

3838
9. In **Advanced Options**, you can:
39-
* Choose the format of timestamp fields in your logs (`RFC3339`(default),`Unix`, or `UnixNano`).
40-
* Select a [sampling rate](/logs/get-started/api-configuration/#sampling-rate) for your logs or push a randomly-sampled percentage of logs.
41-
* Enable redaction for `CVE-2021-44228`. This option will replace every occurrence of `${` with `x{`.
39+
40+
- Choose the format of timestamp fields in your logs (`RFC3339`(default),`Unix`, or `UnixNano`).
41+
- Select a [sampling rate](/logs/get-started/api-configuration/#sampling-rate) for your logs or push a randomly-sampled percentage of logs.
42+
- Enable redaction for `CVE-2021-44228`. This option will replace every occurrence of `${` with `x{`.
4243

4344
10. Select **Submit** once you are done configuring your logpush job.
4445

@@ -49,12 +50,8 @@ To set up a Splunk Logpush job:
4950
1. Create a job with the appropriate endpoint URL and authentication parameters.
5051
2. Enable the job to begin pushing logs.
5152

52-
:::note[Note]
53-
54-
53+
:::note
5554
Unlike configuring Logpush jobs for AWS S3, GCS, or Azure, there is no ownership challenge when configuring Logpush to Splunk.
56-
57-
5855
:::
5956

6057
<Render file="enable-read-permissions" />
@@ -63,34 +60,33 @@ Unlike configuring Logpush jobs for AWS S3, GCS, or Azure, there is no ownership
6360

6461
To create a job, make a `POST` request to the Logpush jobs endpoint with the following fields:
6562

66-
* **name** (optional) - Use your domain name as the job name.
67-
* **destination\_conf** - A log destination consisting of an endpoint URL, channel id, insecure-skip-verify flag, source type, authorization header in the string format below.
68-
69-
* **\<SPLUNK\_ENDPOINT\_URL>**: The Splunk raw HTTP Event Collector URL with port. For example: `splunk.cf-analytics.com:8088/services/collector/raw`.
70-
* Cloudflare expects the HEC network port to be configured to `:443` or `:8088`.
71-
* Cloudflare expects the Splunk endpoint to be `/services/collector/raw` while configuring and setting up the Logpush job.
72-
* Ensure you have enabled HEC in Splunk. Refer to [Splunk Analytics Integrations](/analytics/analytics-integrations/splunk/) for information on how to set up HEC in Splunk.
73-
* You may notice an API request failed with a 504 error, when adding an incorrect URL. Splunk Cloud endpoint URL usually contains `http-inputs-` or similar text before the hostname. Refer to [Send data to HTTP Event Collector on Splunk Cloud Platform](https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector#Send_data_to_HTTP_Event_Collector) for more details.
74-
* **\<SPLUNK\_CHANNEL\_ID>**: A unique channel ID. This is a random GUID that you can generate by:
75-
* Using an online tool like the [GUID generator](https://www.guidgenerator.com/).
76-
* Using the command line. For example: `python -c 'import uuid; print(uuid.uuid4())'`.
77-
* **\<INSECURE\_SKIP\_VERIFY>**: Boolean value. Cloudflare recommends setting this value to `false`. Setting this value to `true` is equivalent to using the `-k` option with `curl` as shown in Splunk examples and is **not** recommended. Only set this value to `true` when HEC uses a self-signed certificate.
78-
79-
:::note[Note]
80-
81-
Cloudflare highly recommends setting this value to <code class="InlineCode">false</code>. Refer to the [Logpush FAQ](/logs/faq/logpush/) for more information.
63+
- **name** (optional) - Use your domain name as the job name.
64+
- **destination_conf** - A log destination consisting of an endpoint URL, channel id, insecure-skip-verify flag, source type, authorization header in the string format below.
65+
66+
- **\<SPLUNK_ENDPOINT_URL>**: The Splunk raw HTTP Event Collector URL with port. For example: `splunk.cf-analytics.com:8088/services/collector/raw`.
67+
- Cloudflare expects the HEC network port to be configured to `:443` or `:8088`.
68+
- Cloudflare expects the Splunk endpoint to be `/services/collector/raw` while configuring and setting up the Logpush job.
69+
- Ensure you have enabled HEC in Splunk. Refer to [Splunk Analytics Integrations](/analytics/analytics-integrations/splunk/) for information on how to set up HEC in Splunk.
70+
- You may notice an API request failed with a 504 error, when adding an incorrect URL. Splunk Cloud endpoint URL usually contains `http-inputs-` or similar text before the hostname. Refer to [Send data to HTTP Event Collector on Splunk Cloud Platform](https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector#Send_data_to_HTTP_Event_Collector) for more details.
71+
- **\<SPLUNK_CHANNEL_ID>**: A unique channel ID. This is a random GUID that you can generate by:
72+
- Using an online tool like the [GUID generator](https://www.guidgenerator.com/).
73+
- Using the command line. For example: `python -c 'import uuid; print(uuid.uuid4())'`.
74+
- **\<INSECURE_SKIP_VERIFY>**: Boolean value. Cloudflare recommends setting this value to `false`. Setting this value to `true` is equivalent to using the `-k` option with `curl` as shown in Splunk examples and is **not** recommended. Only set this value to `true` when HEC uses a self-signed certificate.
75+
76+
:::note
77+
Cloudflare highly recommends setting this value to <code class="InlineCode">false</code>. Refer to the [Logpush FAQ](/logs/faq/logpush/) for more information.
8278
:::
8379

84-
* `<SOURCE_TYPE>`: The Splunk source type. For example: `cloudflare:json`.
85-
* `<SPLUNK_AUTH_TOKEN>`: The Splunk authorization token that is URL-encoded. For example: `Splunk%20e6d94e8c-5792-4ad1-be3c-29bcaee0197d`.
80+
- `<SOURCE_TYPE>`: The Splunk source type. For example: `cloudflare:json`.
81+
- `<SPLUNK_AUTH_TOKEN>`: The Splunk authorization token that is URL-encoded. For example: `Splunk%20e6d94e8c-5792-4ad1-be3c-29bcaee0197d`.
8682

8783
```bash
8884
"splunk://<SPLUNK_ENDPOINT_URL>?channel=<SPLUNK_CHANNEL_ID>&insecure-skip-verify=<INSECURE_SKIP_VERIFY>&sourcetype=<SOURCE_TYPE>&header_Authorization=<SPLUNK_AUTH_TOKEN>"
8985
```
9086

91-
* **dataset** - The category of logs you want to receive. Refer to [Log fields](/logs/reference/log-fields/) for the full list of supported datasets.
87+
- **dataset** - The category of logs you want to receive. Refer to [Log fields](/logs/reference/log-fields/) for the full list of supported datasets.
9288

93-
* **output\_options** (optional) - To configure fields, sample rate, and timestamp format, refer to [Log Output Options](/logs/reference/log-output-options/). For timestamp, Cloudflare recommends using `timestamps=rfc3339`.
89+
- **output_options** (optional) - To configure fields, sample rate, and timestamp format, refer to [Log Output Options](/logs/reference/log-output-options/). For timestamp, Cloudflare recommends using `timestamps=rfc3339`.
9490

9591
Example request using cURL:
9692

@@ -185,8 +181,6 @@ If your logpush destination hostname is proxied through Cloudflare, and you have
185181
2. Select **Create rule** and enter a descriptive name for it (for example, `Splunk`).
186182
3. Under **If incoming requests match**, use the **Field**, **Operator**, and **Value** dropdowns to create a rule. After finishing each row, select **And** to create the next row of rules. Refer to the table below for the values you should input:
187183

188-
189-
190184
| Field | Operator | Value |
191185
| ---------------- | ---------- | --------------------------------------------------------------------- |
192186
| Request Method | `equals` | `POST` |
@@ -196,21 +190,18 @@ If your logpush destination hostname is proxied through Cloudflare, and you have
196190
| AS Num | `equals` | `132892` |
197191
| User Agent | `equals` | `Go-http-client/2.0` |
198192

199-
200-
201193
4. After inputting the values as shown in the table, you should have an Expression Preview with the values you added for your specific rule. The example below reflects the hostname `splunk.cf-analytics.com`.
202194

203195
```txt
204-
(http.request.method eq "POST" and http.host eq "splunk.cf-analytics.com" and http.request.uri.path eq "/services/collector/raw" and http.request.uri.query contains "channel" and ip.geoip.asnum eq 132892 and http.user_agent eq "Go-http-client/2.0")
196+
(http.request.method eq "POST" and http.host eq "splunk.cf-analytics.com" and http.request.uri.path eq "/services/collector/raw" and http.request.uri.query contains "channel" and ip.src.asnum eq 132892 and http.user_agent eq "Go-http-client/2.0")
205197
```
206198

207-
5. Under the **Then** > **Choose an action** dropdown, select *Skip*.
208-
6. Under **WAF components to skip**, select *All managed rules*.
199+
5. Under the **Then** > **Choose an action** dropdown, select _Skip_.
200+
6. Under **WAF components to skip**, select _All managed rules_.
209201
7. Select **Deploy**.
210202

211203
The WAF should now ignore requests made to Splunk HEC by Cloudflare.
212204

213-
:::note[Note]
214-
215-
To analyze and visualize Cloudflare Logs using the Cloudflare App for Splunk, follow the steps in the [Splunk Analytics integration page](/analytics/analytics-integrations/splunk/).
205+
:::note
206+
To analyze and visualize Cloudflare Logs using the Cloudflare App for Splunk, follow the steps in the [Splunk Analytics integration page](/analytics/analytics-integrations/splunk/).
216207
:::

src/content/docs/rules/cloud-connector/examples/send-eu-visitors-to-gcs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To route requests from visitors in the European Union to a Google Cloud Storage
1818
5. _(Optional)_ Use the [Rewrite URL](/rules/transform/url-rewrite/) feature of [Transform Rules](/rules/transform/) to adjust the URL structure. For example, you can [create a URL rewrite](/rules/transform/url-rewrite/create-dashboard/) that changes `/eu` to `/<BUCKET_NAME>` to match the URI path-style URL structure.
1919
6. Click **Next** and enter a descriptive name like "Route EU visitors to GCP" in Cloud Connector name.
2020
7. Under **If**, select **Custom filter expression** and enter the following expression:
21-
`(ip.geoip.is_in_european_union)`<br />
21+
`(ip.src.is_in_european_union)`<br />
2222
This expression targets traffic from European Union users.
2323
8. Select **Deploy** to activate the rule.
2424

src/content/docs/rules/transform/examples/rewrite-welcome-for-countries.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To have a welcome page in two languages, create two rewrite URL rules with a sta
2222
Text in **Expression Editor**:
2323

2424
```txt
25-
http.request.uri.path == "/welcome.html" && ip.geoip.country == "GB"
25+
http.request.uri.path == "/welcome.html" && ip.src.country == "GB"
2626
```
2727

2828
Text after **Path** > **Rewrite to...** > _Static_:
@@ -40,7 +40,7 @@ Text after **Path** > **Rewrite to...** > _Static_:
4040
Text in **Expression Editor**:
4141

4242
```txt
43-
http.request.uri.path == "/welcome.html" && ip.geoip.country == "PT"
43+
http.request.uri.path == "/welcome.html" && ip.src.country == "PT"
4444
```
4545

4646
Text after **Path** > **Rewrite to...** > _Static_:

src/content/docs/rules/url-forwarding/examples/redirect-country-subdomains.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ This example single redirect for zone `example.com` will redirect United Kingdom
2222
**When incoming requests match**
2323

2424
Using the Expression Editor:<br/>
25-
`(ip.geoip.country eq "GB" or ip.geoip.country eq "FR") and http.request.uri.path eq "/"`
25+
`(ip.src.country eq "GB" or ip.src.country eq "FR") and http.request.uri.path eq "/"`
2626

2727
**Then**
2828

2929
- **Type:** _Dynamic_
30-
- **Expression:** `lower(concat("https://", ip.geoip.country, ".example.com"))`
30+
- **Expression:** `lower(concat("https://", ip.src.country, ".example.com"))`
3131
- **Status code:** _301_
3232

3333
</Example>

src/content/docs/rules/url-forwarding/single-redirects/create-api.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ curl https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets \
3838
"phase": "http_request_dynamic_redirect",
3939
"rules": [
4040
{
41-
"expression": "(ip.geoip.country eq \"GB\" or ip.geoip.country eq \"FR\") and http.request.uri.path eq \"/\"",
41+
"expression": "(ip.src.country eq \"GB\" or ip.src.country eq \"FR\") and http.request.uri.path eq \"/\"",
4242
"description": "Redirect GB and FR users in home page to localized site.",
4343
"action": "redirect",
4444
"action_parameters": {
4545
"from_value": {
4646
"target_url": {
47-
"expression": "lower(concat(\"https://\", ip.geoip.country, \".example.com\"))"
47+
"expression": "lower(concat(\"https://\", ip.src.country, \".example.com\"))"
4848
},
4949
"status_code": 307,
5050
"preserve_query_string": true
@@ -68,13 +68,13 @@ curl https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets \
6868
{
6969
"id": "235e557b92fd4e5e8753ee665a9ddd75",
7070
"version": "1",
71-
"expression": "(ip.geoip.country eq \"GB\" or ip.geoip.country eq \"FR\") and http.request.uri.path eq \"/\"",
71+
"expression": "(ip.src.country eq \"GB\" or ip.src.country eq \"FR\") and http.request.uri.path eq \"/\"",
7272
"description": "Redirect GB and FR users in home page to localized site.",
7373
"action": "redirect",
7474
"action_parameters": {
7575
"from_value": {
7676
"target_url": {
77-
"expression": "lower(concat(\"https://\", ip.geoip.country, \".example.com\"))"
77+
"expression": "lower(concat(\"https://\", ip.src.country, \".example.com\"))"
7878
},
7979
"status_code": 307,
8080
"preserve_query_string": true
@@ -107,13 +107,13 @@ https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{ruleset_id} \
107107
"phase": "http_request_dynamic_redirect",
108108
"rules": [
109109
{
110-
"expression": "(ip.geoip.country eq \"GB\" or ip.geoip.country eq \"FR\") and http.request.uri.path eq \"/\"",
110+
"expression": "(ip.src.country eq \"GB\" or ip.src.country eq \"FR\") and http.request.uri.path eq \"/\"",
111111
"description": "Redirect GB and FR users in home page to localized site.",
112112
"action": "redirect",
113113
"action_parameters": {
114114
"from_value": {
115115
"target_url": {
116-
"expression": "lower(concat(\"https://\", ip.geoip.country, \".example.com\"))"
116+
"expression": "lower(concat(\"https://\", ip.src.country, \".example.com\"))"
117117
},
118118
"status_code": 307,
119119
"preserve_query_string": true
@@ -155,13 +155,13 @@ https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{ruleset_id} \
155155
"action_parameters": {
156156
"from_value": {
157157
"target_url": {
158-
"expression": "lower(concat(\"https://\", ip.geoip.country, \".example.com\"))"
158+
"expression": "lower(concat(\"https://\", ip.src.country, \".example.com\"))"
159159
},
160160
"status_code": 307,
161161
"preserve_query_string": true
162162
}
163163
},
164-
"expression": "(ip.geoip.country eq \"GB\" or ip.geoip.country eq \"FR\") and http.request.uri.path eq \"/\"",
164+
"expression": "(ip.src.country eq \"GB\" or ip.src.country eq \"FR\") and http.request.uri.path eq \"/\"",
165165
"description": "Redirect GB and FR users in home page to localized site.",
166166
"last_updated": "2022-10-03T15:38:51.658387Z",
167167
"ref": "235e557b92fd4e5e8753ee665a9ddd75",

src/content/docs/ruleset-engine/custom-rulesets/add-rules-ruleset.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ https://api.cloudflare.com/client/v4/accounts/{account_id}/rulesets/{custom_rule
3232
--data '{
3333
"rules": [
3434
{
35-
"expression": "(ip.geoip.country eq \"GB\" or ip.geoip.country eq \"FR\") or cf.threat_score > 0",
35+
"expression": "(ip.src.country eq \"GB\" or ip.src.country eq \"FR\") or cf.threat_score > 0",
3636
"action": "challenge",
3737
"description": "challenge GB and FR or based on IP Reputation"
3838
},
@@ -57,7 +57,7 @@ https://api.cloudflare.com/client/v4/accounts/{account_id}/rulesets/{custom_rule
5757
"id": "<CUSTOM_RULE_ID_1>",
5858
"version": "1",
5959
"action": "challenge",
60-
"expression": "(ip.geoip.country eq \"GB\" or ip.geoip.country eq \"FR\") or cf.threat_score \u003e 0",
60+
"expression": "(ip.src.country eq \"GB\" or ip.src.country eq \"FR\") or cf.threat_score \u003e 0",
6161
"description": "challenge GB and FR or based on IP Reputation",
6262
"last_updated": "2021-03-18T18:25:08.122758Z",
6363
"ref": "<CUSTOM_RULE_REF_1>",
@@ -133,7 +133,7 @@ https://api.cloudflare.com/client/v4/accounts/{account_id}/rulesets/{ruleset_id}
133133
"id": "<CUSTOM_RULE_ID_1>",
134134
"version": "1",
135135
"action": "challenge",
136-
"expression": "(ip.geoip.country eq \"GB\" or ip.geoip.country eq \"FR\") or cf.threat_score \u003e 0",
136+
"expression": "(ip.src.country eq \"GB\" or ip.src.country eq \"FR\") or cf.threat_score \u003e 0",
137137
"description": "challenge GB and FR or based on IP Reputation",
138138
"last_updated": "2021-03-18T18:25:08.122758Z",
139139
"ref": "<CUSTOM_RULE_ID_1>",

0 commit comments

Comments
 (0)