Skip to content

Commit c14a7f6

Browse files
committed
Replace learning path authorization keys
1 parent bb6b25a commit c14a7f6

File tree

6 files changed

+18
-36
lines changed

6 files changed

+18
-36
lines changed

src/content/docs/learning-paths/replace-vpn/build-policies/create-policy.mdx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ To create a new policy, open [Zero Trust](https://one.dash.cloudflare.com/) and
3939

4040
```bash
4141
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
42-
--header "X-Auth-Email: <EMAIL>" \
43-
--header "X-Auth-Key: <API_KEY>" \
42+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
4443
--header "Content-Type: application/json" \
4544
--data '{
4645
"name": "Company Wiki DNS policy",
@@ -102,8 +101,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
102101

103102
```bash
104103
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
105-
--header "X-Auth-Email: <EMAIL>" \
106-
--header "X-Auth-Key: <API_KEY>" \
104+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
107105
--header "Content-Type: application/json" \
108106
--data '{
109107
"name": "Company Wiki network policy",
@@ -160,8 +158,7 @@ We recommend adding a catch-all policy to the bottom of your network policy list
160158

161159
```bash
162160
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
163-
--header "X-Auth-Email: <EMAIL>" \
164-
--header "X-Auth-Key: <API_KEY>" \
161+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
165162
--header "Content-Type: application/json" \
166163
--data '{
167164
"name": "Catch-all block policy",

src/content/docs/learning-paths/secure-internet-traffic/build-http-policies/browser-isolation.mdx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ You can control potential risk and shape user behavior without applying heavy-ha
4949

5050
```bash
5151
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
52-
--header "X-Auth-Email: <EMAIL>" \
53-
--header "X-Auth-Key: <API_KEY>" \
52+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
5453
--header "Content-Type: application/json" \
5554
--data '{
5655
"action": "isolate",
@@ -118,8 +117,7 @@ In this context, if some traffic is unknown to your organization, Cloudflare wil
118117

119118
```bash title="Allow known applications and websites"
120119
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
121-
--header "X-Auth-Email: <EMAIL>" \
122-
--header "X-Auth-Key: <API_KEY>" \
120+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
123121
--header "Content-Type: application/json" \
124122
--data '{
125123
"action": "isolate",
@@ -143,8 +141,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
143141

144142
```bash title="Block security risks"
145143
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
146-
--header "X-Auth-Email: <EMAIL>" \
147-
--header "X-Auth-Key: <API_KEY>" \
144+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
148145
--header "Content-Type: application/json" \
149146
--data '{
150147
"action": "isolate",
@@ -168,8 +165,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
168165

169166
```bash title="Isolate all other traffic"
170167
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
171-
--header "X-Auth-Email: <EMAIL>" \
172-
--header "X-Auth-Key: <API_KEY>" \
168+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
173169
--header "Content-Type: application/json" \
174170
--data '{
175171
"action": "isolate",

src/content/docs/learning-paths/secure-internet-traffic/build-http-policies/data-loss-prevention.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ To help this better match the needs of your organization, you can also build a c
4747

4848
```bash
4949
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
50-
--header "X-Auth-Email: <EMAIL>" \
51-
--header "X-Auth-Key: <API_KEY>" \
50+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
5251
--header "Content-Type: application/json" \
5352
--data '{
5453
"action": "block",
@@ -99,8 +98,7 @@ For example, you can use a custom expression to detect when your users share pro
9998

10099
```bash
101100
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
102-
--header "X-Auth-Email: <EMAIL>" \
103-
--header "X-Auth-Key: <API_KEY>" \
101+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
104102
--header "Content-Type: application/json" \
105103
--data '{
106104
"action": "block",

src/content/docs/learning-paths/secure-internet-traffic/build-http-policies/tls-inspection.mdx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ For example, if users are issued a corporate-managed iPhone with limited permiss
7878

7979
```bash
8080
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/lists \
81-
--header "X-Auth-Email: <EMAIL>" \
82-
--header "X-Auth-Key: <API_KEY>" \
81+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
8382
--header "Content-Type: application/json" \
8483
--data '{
8584
"description": "The serial numbers for administrators",
@@ -97,8 +96,7 @@ For example, if users are issued a corporate-managed iPhone with limited permiss
9796

9897
```bash
9998
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
100-
--header "X-Auth-Email: <EMAIL>" \
101-
--header "X-Auth-Key: <API_KEY>" \
99+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
102100
--header "Content-Type: application/json" \
103101
--data '{
104102
"name": "Do not inspect corporate devices",
@@ -142,8 +140,7 @@ If you filter your network-connected devices with Magic WAN tunnels, the WARP Co
142140

143141
```bash
144142
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
145-
--header "X-Auth-Email: <EMAIL>" \
146-
--header "X-Auth-Key: <API_KEY>" \
143+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
147144
--header "Content-Type: application/json" \
148145
--data '{
149146
"name": "Do not inspect corporate devices",

src/content/docs/learning-paths/zero-trust-web-access/advanced-workflows/isolate-application.mdx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ with HTTP policies applied"]
6868

6969
```bash
7070
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/apps/$APP_UUID/policies \
71-
--header "X-Auth-Email: <EMAIL>" \
72-
--header "X-Auth-Key: <API_KEY>" \
71+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
7372
--header "Content-Type: application/json" \
7473
--data '{
7574
"decision": "allow",
@@ -115,8 +114,7 @@ To create a list of serial numbers, refer to [Create Zero Trust list](/api/resou
115114

116115
```bash
117116
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/apps/$APP_UUID/policies \
118-
--header "X-Auth-Email: <EMAIL>" \
119-
--header "X-Auth-Key: <API_KEY>" \
117+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
120118
--header "Content-Type: application/json" \
121119
--data '{
122120
"decision": "allow",
@@ -165,8 +163,7 @@ Prevents users on unmanaged devices from downloading any files from your private
165163

166164
```bash
167165
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
168-
--header "X-Auth-Email: <EMAIL>" \
169-
--header "X-Auth-Key: <API_KEY>" \
166+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
170167
--header "Content-Type: application/json" \
171168
--data '{
172169
"name": "Disable file downloads in isolated browser",
@@ -251,8 +248,7 @@ Block users on unmanaged devices from downloading files that contain credit card
251248

252249
```bash
253250
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
254-
--header "X-Auth-Email: <EMAIL>" \
255-
--header "X-Auth-Key: <API_KEY>" \
251+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
256252
--header "Content-Type: application/json" \
257253
--data '{
258254
"name": "Block credit card numbers",

src/content/partials/learning-paths/zero-trust/device-profiles.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ To customize the default settings:
4949
```bash
5050
curl --request PATCH \
5151
https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/devices/policy \
52-
--header "X-Auth-Email: <EMAIL>" \
53-
--header "X-Auth-Key: <API_KEY>" \
52+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
5453
--header "Content-Type: application/json" \
5554
--data '{
5655
"allow_mode_switch": false,
@@ -73,8 +72,7 @@ https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/devices/policy \
7372
```bash
7473
curl --request PUT \
7574
https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/devices/settings \
76-
--header "X-Auth-Email: <EMAIL>" \
77-
--header "X-Auth-Key: <API_KEY>" \
75+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
7876
--header "Content-Type: application/json" \
7977
--data '{
8078
"disable_for_time": 3600,

0 commit comments

Comments
 (0)