Skip to content

Commit c65f260

Browse files
maxvpmaheshwarip
authored andcommitted
[Security Center] Indicator Feed API procedures (#16902)
1 parent ed8b28e commit c65f260

File tree

2 files changed

+95
-5
lines changed

2 files changed

+95
-5
lines changed

src/content/docs/security-center/indicator-feeds.mdx

Lines changed: 94 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,104 @@ If your organization is interested in becoming a provider or a subscriber, conta
2828

2929
### Create a Custom Indicator Feed
3030

31-
Providers can create and manage a Custom Indicator Feed with the [Indicator API endpoints](/api/operations/custom-indicator-feeds-get-indicator-feeds):
31+
Providers can create and manage a Custom Indicator Feed with the [Custom Indicator Feeds API endpoints](/api/operations/custom-indicator-feeds-get-indicator-feeds):
32+
33+
1. Contact your account team to configure your account as an indicator feed provider.
34+
2. Create a feed with the [Create new indicator feed endpoint](/api/operations/custom-indicator-feeds-create-indicator-feeds). Make note of the `feed_id` generated for your feed. For example:
35+
36+
```bash title="Create new indicator feed"
37+
curl "https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/intel/indicator-feeds" \
38+
--header 'Content-Type: application/json' \
39+
--header 'X-Auth-Email: <EMAIL>' \
40+
--header 'X-Auth-Key: <API_KEY>' \
41+
--data '{
42+
"description": "Custom indicator feed to detect threats",
43+
"name": "threat_indicator_feed"
44+
}'
45+
```
46+
47+
```json output {3}
48+
{
49+
"result": {
50+
"id": 10,
51+
"name": "threat_indicator_feed",
52+
"description": "Custom indicator feed to detect threats",
53+
"created_on": "2024-09-17T21:16:09.412Z",
54+
"modified_on": "2024-09-17T21:16:09.412Z"
55+
},
56+
"success": true,
57+
"errors": [],
58+
"messages": []
59+
}
60+
```
61+
62+
3. Upload data to the feed with the [Update indicator feed data endpoint](/api/operations/custom-indicator-feeds-update-indicator-feed-data). Uploaded indicator data must be in a [`.stix2`](https://oasis-open.github.io/cti-documentation/stix/intro) formatted file.
63+
64+
```bash title="Update indicator feed data"
65+
curl --request PUT \
66+
"https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/intel/indicator-feeds/<FEED_ID>/snapshot" \
67+
--header 'Content-Type: multipart/form-data' \
68+
--header 'X-Auth-Email: <EMAIL>' \
69+
--header 'X-Auth-Key: <API_KEY>' \
70+
--form 'source=@/path/to/file'
71+
```
72+
73+
```json output
74+
{
75+
"result": {
76+
"file_id": 1,
77+
"filename": "snapshot_file.unified",
78+
"status": "unified"
79+
},
80+
"errors": [],
81+
"messages": [],
82+
"success": true
83+
}
84+
```
3285

33-
1. Create a feed with the [Create new indicator feed endpoint](/api/operations/custom-indicator-feeds-create-indicator-feeds). Feeds are lists of indicators.
34-
2. Upload data to the feed with the [Update indicator feed data endpoint](/api/operations/custom-indicator-feeds-update-indicator-feed-data). Uploaded indicator data must be in a [`.stix2`](https://oasis-open.github.io/cti-documentation/stix/intro) formatted file.
3586
:::note
3687
Indicator feeds use a snapshot system. To update feeds with new data, providers must upload a file containing all previous and new indicators.
3788
:::
38-
3. Grant access to subscribers with the [Grant permission to indicator feed endpoint](/api/operations/custom-indicator-feeds-add-permission). Any administrator of the account that owns the feed must add subscribers' `account_tag`s to the feed's allowed subscribers list.
89+
90+
4. (Optional) Verify the status of your feed upload with the [Get indicator feed data endpoint](/api/operations/custom-indicator-feeds-get-indicator-feed-data). For example:
91+
92+
```bash title="Get indicator feed data"
93+
curl --request GET \
94+
"https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/intel/indicator-feeds/<FEED_ID>/data" \
95+
--header 'Content-Type: application/json' \
96+
--header 'X-Auth-Email: <EMAIL>' \
97+
--header 'X-Auth-Key: <API_KEY>'
98+
```
99+
100+
```json output {8}
101+
{
102+
"result": {
103+
"id": 10,
104+
"name": "threat_indicator_feed",
105+
"description": "Custom indicator feed to detect threats",
106+
"created_on": "2023-08-01T18:00:26.65715Z",
107+
"modified_on": "2023-08-01T18:00:26.65715Z",
108+
"latest_upload_status": "Complete"
109+
},
110+
"success": true,
111+
"errors": [],
112+
"messages": []
113+
}
114+
```
115+
116+
5. Grant access to subscribers with the [Grant permission to indicator feed endpoint](/api/operations/custom-indicator-feeds-add-permission). You can add subscribers to the feed's allowed subscribers list using their [account IDs](/fundamentals/setup/find-account-and-zone-ids/). For example:
117+
118+
```bash title="Update indicator feed data"
119+
curl --request PUT \
120+
"https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/intel/indicator-feeds/<FEED_ID>/snapshot" \
121+
--header 'Content-Type: multipart/form-data' \
122+
--header 'X-Auth-Email: <EMAIL>' \
123+
--header 'X-Auth-Key: <API_KEY>' \
124+
--data '{
125+
"account_tag": "823f45f16fd2f7e21e1e054aga4d2859",
126+
"feed_id": 10
127+
}'
128+
```
39129

40130
### Use a feed in Gateway
41131

src/content/partials/security-center/indicator-feeds-overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Cloudflare threat intelligence data consists of a data exchange between provider
88

99
A provider is an organization that has a set of data that they are interested in sharing with other Cloudflare organizations. Any organization can be a provider. Examples of current providers are Government Cyber Defense groups.
1010

11-
Subscribers can be any Cloudflare customer that wants to secure their environment further by creating rules based on provider datasets. Subscribers must be authorized by a provider. Authorization is granted using the [Indicator Feeds permissions endpoint](/api/operations/custom-indicator-feeds-add-permission).
11+
Subscribers can be any Cloudflare customer that wants to secure their environment further by creating rules based on provider datasets. Subscribers must be authorized by a provider. Authorization is granted using the [Grant permission to indicator feed endpoint](/api/operations/custom-indicator-feeds-add-permission).

0 commit comments

Comments
 (0)