Skip to content

Commit 8989c9a

Browse files
Merge branch 'cloudflare:production' into production
2 parents e6f977d + d9a899d commit 8989c9a

File tree

20 files changed

+203
-103
lines changed

20 files changed

+203
-103
lines changed
31.6 KB
Loading

src/content/changelog/ai-gateway/2025-02-26-guardrails.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: Introducing Guardrails in AI Gateway
33
description: Keep AI interactions secure and risk-free with Guardrails in AI Gateway
4-
products:
5-
- ai-gateway
64
date: 2025-02-26T6:00:00Z
5+
preview_image: ~/assets/images/changelog/ai-gateway/guardrails-social-preview.png
76
---
87

9-
[AI Gateway](/ai-gateway/) now includes [Guardrails](/ai-gateway/guardrails/), to help you monitor your AI apps for harmful or inappropriate content and deploy safely.
8+
[AI Gateway](/ai-gateway/) now includes [Guardrails](/ai-gateway/guardrails/), to help you monitor your AI apps for harmful or inappropriate content and deploy safely.
109

1110
Within the AI Gateway settings, you can configure:
11+
1212
- **Guardrails**: Enable or disable content moderation as needed.
1313
- **Evaluation scope**: Select whether to moderate user prompts, model responses, or both.
1414
- **Hazard categories**: Specify which categories to monitor and determine whether detected inappropriate content should be blocked or flagged.

src/content/docs/cache/performance-review/cache-analytics.mdx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,25 @@ import { FeatureTable } from "~/components"
88

99
Use Cache Analytics to improve site performance or reduce origin web server traffic. Cache Analytics helps determine if resources are missing from cache, expired, or ineligible for caching. Cache Analytics includes filter by hostname, list of top URLs that miss cache, and a query of up to three days of data.
1010

11-
First, determine whether to focus on Requests or Data Transfer. The default view is Requests, which helps with understanding performance because every cache miss degrades the speed of content delivery. Data Transfer helps with understanding cost because most hosting providers charge for every byte that leaves their network.
11+
## Availability
1212

13-
You can toggle between Requests and Data Transfer while keeping other analytics filters enabled.
13+
<FeatureTable id="cache.cache_analytics" />
1414

15-
For best practices related to Cache Analytics, refer to [Cache performance](/cache/performance-review/cache-performance/).
15+
## Access Cache Analytics
1616

17-
## Availability
17+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account and domain.
18+
2. Go to **Caching** > **Overview**.
1819

19-
<FeatureTable id="cache.cache_analytics" />
20+
## Requests vs Data Transfer
21+
22+
You can decide wheter to focus on **Requests** or **Data Transfer**:
23+
24+
- **Requests** (default view) help assess performance, as each cache miss slows down content delivery.
25+
- **Data Transfer** is useful for cost analysis, since most hosting providers charge for every byte that leaves their network.
26+
27+
You can switch between these views while keeping other analytics filters applied.
28+
29+
For best practices related to Cache Analytics, refer to [Cache performance](/cache/performance-review/cache-performance/).
2030

2131
## Add filters
2232

src/content/docs/cloudflare-one/identity/authorization-cookie/validating-json.mdx

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ pcx_content_type: how-to
33
title: Validate JWTs
44
sidebar:
55
order: 1
6-
76
---
87

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

1110
When Cloudflare sends a request to your origin, the request will include an [application token](/cloudflare-one/identity/authorization-cookie/application-token/) as a `Cf-Access-Jwt-Assertion` request header and as a `CF_Authorization` cookie.
1211

@@ -22,9 +21,9 @@ You can also manually rotate the key using the [API](/api/resources/zero_trust/s
2221

2322
As shown in the example below, `https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/certs` contains two public keys: the current key used to sign all new tokens, and the previous key that has been rotated out.
2423

25-
* `keys`: both keys in JWK format
26-
* `public_cert`: current key in PEM format
27-
* `public_certs`: both keys in PEM format
24+
- `keys`: both keys in JWK format
25+
- `public_cert`: current key in PEM format
26+
- `public_certs`: both keys in PEM format
2827

2928
```txt
3029
{
@@ -65,9 +64,8 @@ As shown in the example below, `https://<your-team-name>.cloudflareaccess.com/cd
6564

6665
:::note[Avoid key rotation issues]
6766

68-
69-
* Validate tokens using the external endpoint rather than saving the public key as a hard-coded value.
70-
* Do not fetch the current key from `public_cert`, since your origin may inadvertently read an expired value from an outdated cache. Instead, match the `kid` value in the JWT to the corresponding certificate in `public_certs`.
67+
- Validate tokens using the external endpoint rather than saving the public key as a hard-coded value.
68+
- Do not fetch the current key from `public_cert`, since your origin may inadvertently read an expired value from an outdated cache. Instead, match the `kid` value in the JWT to the corresponding certificate in `public_certs`.
7169
:::
7270

7371
## Verify the JWT manually
@@ -175,10 +173,10 @@ func main() {
175173

176174
`pip` install the following:
177175

178-
* flask
179-
* requests
180-
* PyJWT
181-
* cryptography
176+
- flask
177+
- requests
178+
- PyJWT
179+
- cryptography
182180

183181
```python
184182
from flask import Flask, request
@@ -251,8 +249,8 @@ if __name__ == '__main__':
251249
### JavaScript example
252250

253251
```javascript
254-
const express = require('express');
255-
const jose = require('jose');
252+
const express = require("express");
253+
const jose = require("jose");
256254

257255
// The Application Audience (AUD) tag for your application
258256
const AUD = process.env.POLICY_AUD;
@@ -265,33 +263,36 @@ const JWKS = jose.createRemoteJWKSet(new URL(CERTS_URL));
265263

266264
// verifyToken is a middleware to verify a CF authorization token
267265
const verifyToken = async (req, res, next) => {
268-
const token = req.headers['cf-access-jwt-assertion'];
269-
270-
// Make sure that the incoming request has our token header
271-
if (!token) {
272-
return res.status(403).send({
273-
status: false,
274-
message: 'missing required cf authorization token',
275-
});
276-
}
277-
278-
const result = await jose.jwtVerify(token, JWKS, {
279-
issuer: TEAM_DOMAIN,
280-
audience: AUD,
281-
});
282-
283-
req.user = result.payload;
284-
next();
266+
const token = req.headers["cf-access-jwt-assertion"];
267+
268+
// Make sure that the incoming request has our token header
269+
if (!token) {
270+
return res.status(403).send({
271+
status: false,
272+
message: "missing required cf authorization token",
273+
});
274+
}
275+
276+
const result = await jose.jwtVerify(token, JWKS, {
277+
issuer: TEAM_DOMAIN,
278+
audience: AUD,
279+
});
280+
281+
req.user = result.payload;
282+
next();
285283
};
286284

287285
const app = express();
288286

289287
app.use(verifyToken);
290288

291-
app.get('/', (req, res) => {
292-
res.send('Hello World!');
289+
app.get("/", (req, res) => {
290+
res.send("Hello World!");
293291
});
294292

295293
app.listen(3333);
296-
297294
```
295+
296+
## Related resources
297+
298+
- [Verifying JWTs in Cloudflare Workers](https://kinde.com/blog/engineering/verifying-jwts-in-cloudflare-workers/) - Implement JWT verification in Cloudflare Workers.

src/content/docs/cloudflare-one/insights/dex/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: navigation
33
title: Digital Experience Monitoring
44
sidebar:
5-
order: 2
5+
order: 1
66
---
77

88
import { DirectoryListing } from "~/components";

src/content/docs/cloudflare-one/insights/dex/monitoring.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: reference
33
title: Monitoring
44
sidebar:
5-
order: 1
5+
order: 2
66
---
77

88
Monitor performance and network status for your organization's [fleet](/cloudflare-one/insights/dex/monitoring/#fleet-status) or individual [user devices](/cloudflare-one/insights/dex/monitoring/#device-monitoring).

src/content/docs/cloudflare-one/insights/dex/notifications.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
pcx_content_type: reference
33
title: Notifications
44
sidebar:
5-
order: 5
5+
order: 6
66
head:
77
- tag: title
88
content: DEX notifications
9-
109
---
1110

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

1413
Administrators can receive alerts when Cloudflare detects connectivity issues with the WARP client or degraded application performance. Notifications can be delivered via email, webhook, and third-party services.
1514

src/content/docs/cloudflare-one/insights/dex/remote-captures.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: reference
33
title: Remote captures
44
sidebar:
5-
order: 4
5+
order: 5
66
---
77

88
import { Details } from "~/components";
@@ -45,7 +45,8 @@ DEX will now send capture requests to the configured devices. If the WARP client
4545
## Check remote capture status
4646

4747
To view a list of captures, go to **DEX** > **Remote captures**. The **Status** column displays one of the following options:
48-
- **Success**: The capture is complete and ready for download. Any partially successful captures will still upload to Cloudflare. For example, there could be a scenario where the PCAP succeeds on the primary network interface but fails on the WARP tunnel interface. You can [review PCAP results](/cloudflare-one/insights/dex/remote-captures/#download-remote-captures) to determine which PCAPs succeeded or failed.
48+
49+
- **Success**: The capture is complete and ready for download. Any partially successful captures will still upload to Cloudflare. For example, there could be a scenario where the PCAP succeeds on the primary network interface but fails on the WARP tunnel interface. You can [review PCAP results](/cloudflare-one/insights/dex/remote-captures/#download-remote-captures) to determine which PCAPs succeeded or failed.
4950
- **Running**: The capture is in progress on the device.
5051
- **Pending Upload**: The capture is complete but not yet ready for download.
5152
- **Failed**: The capture has either timed out or encountered an error. To retry the capture, check the WARP client version and [connectivity status](/cloudflare-one/insights/dex/monitoring/#fleet-status), then start a [new capture](/cloudflare-one/insights/dex/remote-captures/#start-a-remote-capture).
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
pcx_content_type: reference
3+
title: Rules
4+
sidebar:
5+
order: 4
6+
---
7+
8+
DEX rules allow you to create and manage testing policies for targeted user groups within your [fleet](/cloudflare-one/insights/dex/tests/). After creating a rule, you can use it to define the scope of a [test](/cloudflare-one/insights/dex/tests/) to specific groups such as departments (like finance or sales), devices, and/or users. You can apply and reuse rules on your desired tests.
9+
10+
DEX rules are ideal for admins who want to define the scope of a test to a specific group within their fleet to allow for more precise problem detection and resolution.
11+
12+
## Create a rule
13+
14+
To create a rule:
15+
16+
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **DEX** > **Rules**.
17+
2. Select **Add a rule**.
18+
3. Give your rule a name and build your desired expressions.
19+
4. Select **Create rule** to finalize your rule.
20+
21+
### Selectors
22+
23+
Selectors are required categories in a DEX rule expression that define a group within a fleet. The selector(s) you have defined in a rule will determine which group a test will impact.
24+
25+
Review the available selectors and their scope in the following list.
26+
27+
| Selector | Description |
28+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
29+
| **User email** | For specifying [user emails](/cloudflare-one/policies/gateway/identity-selectors/#user-email). |
30+
| **User group emails** | For specifying [group emails](/cloudflare-one/policies/gateway/identity-selectors/#user-group-email). |
31+
| **User group IDs** | For specifying [group IDs](/cloudflare-one/policies/gateway/identity-selectors/#user-group-ids). |
32+
| **User group names** | For specifying a [group name](/cloudflare-one/policies/gateway/identity-selectors/#user-group-names). |
33+
| **Operating systems** | For specifying operating systems. |
34+
| **Operating system version** | For specifying an operating system version (use Operator `in`) or versions (use Operator `is`). |
35+
| **Managed network** | For specifying users accessing the network from the office (managed network) compared to those accessing remotely. |
36+
| **SAML attributes** | For specifying a value from the [SAML Attribute Assertion](/cloudflare-one/policies/gateway/identity-selectors/#saml-attributes). |
37+
| **Colos** | For specifying a Cloudflare data center location users are connected to. |
38+
39+
## Add a rule to a test
40+
41+
After you have created a rule, you can add it to a test. If you do not add a rule to a test, the test will run on your entire device fleet.
42+
43+
To add a rule to a test:
44+
45+
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **DEX** > **Tests**.
46+
2. Choose an existing test and select **Edit**, or select **Add a test** to make a new test.
47+
3. Under **Select DEX rules**, select the rule you would like to apply.
48+
4. Select **Save test** for an existing rule or **Add rule** for the new test.
49+
50+
:::note
51+
When applying or removing rules from an existing test, your change can take up to 24 hours to propagate.
52+
:::
53+
54+
To view which tests a rule is being applied to:
55+
56+
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **DEX** > **Rules**.
57+
2. Select a rule > **Edit**.
58+
3. Select the **DEX tests** tab and review the list of tests that include your selected rule.
59+
60+
## Create a test using a rule
61+
62+
You can create a new test from the [DEX test dashboard as described above](/cloudflare-one/insights/dex/rules/#add-a-rule-to-a-test) or directly from the DEX rules dashboard.
63+
64+
To create a new test using a rule from DEX rules:
65+
66+
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **DEX** > **Rules**.
67+
2. Select a rule > **Edit**.
68+
3. Select the **DEX tests** tab.
69+
4. You will be able to review all the tests that currently include this rule. To create a new test, select **Create a test using this rule**.
70+
5. Enter all required information, making sure that the box next to your rule name is checked.
71+
6. Select **Add test**.
72+
73+
## Related resources
74+
75+
- [DEX HTTP test](/cloudflare-one/insights/dex/tests/http/) - Assess the accessibility of a web application.
76+
- [DEX Traceroute test](/cloudflare-one/insights/dex/tests/traceroute/) - Measure the network path of an IP packet from an end-user device to a server.

src/content/docs/cloudflare-one/insights/dex/tests/http.mdx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ pcx_content_type: reference
33
title: HTTP test
44
sidebar:
55
order: 1
6-
76
---
87

9-
10-
import { Details } from "~/components"
8+
import { Details } from "~/components";
119

1210
<Details header="Feature availability">
1311

@@ -17,13 +15,12 @@ import { Details } from "~/components"
1715

1816
| System | Availability | Minimum WARP version |
1917
| -------- | ------------ | -------------------- |
20-
| Windows || 2023.3.381 |
21-
| macOS || 2023.3.381 |
22-
| Linux || 2023.3.398 |
23-
| iOS || |
24-
| Android || 1.0 |
25-
| ChromeOS || 1.0 |
26-
18+
| Windows || 2023.3.381 |
19+
| macOS || 2023.3.381 |
20+
| Linux || 2023.3.398 |
21+
| iOS || |
22+
| Android || 1.0 |
23+
| ChromeOS || 1.0 |
2724

2825
</Details>
2926

@@ -36,11 +33,11 @@ To set up an HTTP test for an application:
3633
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **DEX** > **Tests**.
3734
2. Select **Add a Test**.
3835
3. Fill in the following fields:
39-
* **Name**: Enter any name for the test.
40-
* **Target**: Enter the URL of the website or application that you want to test (for example, `https://jira.site.com`). Both public and private hostnames are supported. If testing a private hostname, ensure that the domain is on your [local domain fallback](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/local-domains/) list.
41-
* **Source device profiles**: (Optional) Select the [WARP device profiles](/cloudflare-one/connections/connect-devices/warp/configure-warp/device-profiles/) that you want to run the test on. If no profiles are selected, the test will run on all supported devices connected to your Zero Trust organization.
42-
* **Test type**: Select *HTTP Get*.
43-
* **Test frequency**: Specify how often the test will run. Input a minute value between 5 and 60.
36+
- **Name**: Enter any name for the test.
37+
- **Target**: Enter the URL of the website or application that you want to test (for example, `https://jira.site.com`). Both public and private hostnames are supported. If testing a private hostname, ensure that the domain is on your [local domain fallback](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/local-domains/) list.
38+
- **Source device profiles**: (Optional) Select the [WARP device profiles](/cloudflare-one/connections/connect-devices/warp/configure-warp/device-profiles/) that you want to run the test on. If no profiles are selected, the test will run on all supported devices connected to your Zero Trust organization.
39+
- **Test type**: Select _HTTP Get_.
40+
- **Test frequency**: Specify how often the test will run. Input a minute value between 5 and 60.
4441
4. Select **Add test**.
4542

4643
Next, [view the results](/cloudflare-one/insights/dex/tests/view-results/) of your test.
@@ -55,3 +52,7 @@ An HTTP test measures the following data:
5552
| Server response time | Round-trip time for the device to receive a response from the target. |
5653
| DNS response time | Round-trip time for the DNS query to resolve. |
5754
| HTTP status codes | [Status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) returned by the target. |
55+
56+
## Related resources
57+
58+
- [DEX rules](/cloudflare-one/insights/dex/rules/) - Specify the target group of a test.

0 commit comments

Comments
 (0)