You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tutorial explains how to use [Cloudflare AI Gateway](/ai-gateway/) and Zero Trust to create a functional and secure website wrapper for an AI agent. Cloudflare Zero Trust administrators can protect access to the wrapper with [Cloudflare Access](/cloudflare-one/policies/access/). Additionally, you can enforce [Gateway policies](/cloudflare-one/policies/gateway/) to control how your users interact with AI agents, including executing AI agents in an isolated browser with [Browser Isolation](/cloudflare-one/policies/browser-isolation/), enforcing [Data Loss Prevention](/cloudflare-one/policies/data-loss-prevention/) profiles to prevent your users from sharing sensitive data, and scanning content to avoid answers from AI agents that violate internal corporate guidelines. Creating an AI agent wrapper is also an effective way to enforce tenant control if you have an enterprise plan for a specific AI provider, such as ChatGPT Enterprise.
13
13
@@ -24,14 +24,16 @@ Make sure you have:
24
24
25
25
First, create an AI gateway to control your AI app.
26
26
27
-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
28
-
2. Go to **AI** > **AI Gateway**.
29
-
3. Select **Create Gateway**.
30
-
4. Name your gateway.
31
-
5. Select **Create**.
32
-
6. Configure your desired options for the gateway.
33
-
7.[Connect your AI provider](/ai-gateway/get-started/#connect-application) to proxy queries to your AI agent of choice using your AI gateway.
34
-
8. (Optional) Turn on [Authenticated Gateway](/ai-gateway/configuration/authentication/). The Authenticated Gateway feature ensures your AI gateway can only be called securely by enforcing a token in the form of a request header `cf-aig-authorization`.
27
+
1. In the [Cloudflare dashboard](https://dash.cloudflare.com/), go to the **AI Gateway** page.
28
+
29
+
<DashButtonurl="/?to=/:account/ai/ai-gateway" />
30
+
31
+
2. Select **Create Gateway**.
32
+
3. Name your gateway.
33
+
4. Select **Create**.
34
+
5. Configure your desired options for the gateway.
35
+
6.[Connect your AI provider](/ai-gateway/get-started/#connect-application) to proxy queries to your AI agent of choice using your AI gateway.
36
+
7. (Optional) Turn on [Authenticated Gateway](/ai-gateway/configuration/authentication/). The Authenticated Gateway feature ensures your AI gateway can only be called securely by enforcing a token in the form of a request header `cf-aig-authorization`.
35
37
1. Go to **AI** > **AI Gateway**.
36
38
2. Select your AI gateway, then go to **Settings**.
37
39
3. Turn on **Authenticated Gateway**, then choose **Confirm**.
@@ -44,7 +46,10 @@ For more information, refer to [Getting started with AI Gateway](/ai-gateway/get
44
46
45
47
[Guardrails](/ai-gateway/features/guardrails/) is an built-in AI Gateway security feature that allows Cloudflare to identify unsafe or inappropriate content in prompts and responses based on selected categories.
46
48
47
-
1. Go to **AI** > **AI Gateway**.
49
+
1. In the Cloudflare dashboard, go to the **AI Gateway** page.
50
+
51
+
<DashButtonurl="/?to=/:account/ai/ai-gateway" />
52
+
48
53
2. Select your AI gateway.
49
54
3. Go to **Guardrails**.
50
55
4. Turn on Guardrails.
@@ -93,14 +98,16 @@ You can now build the Worker using the `index.js` file created by Wrangler.
93
98
94
99
</TabItem> <TabItemlabel="Dashboard">
95
100
96
-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
97
-
2. Go to **Workers & Pages** > **Workers & Pages**.
98
-
3. Select **Create**.
99
-
4. In **Workers**, choose the **Hello world** template.
100
-
5. Name your worker, then select **Deploy**.
101
-
6. Select your Worker, then go to the **Settings** tab.
102
-
7. Go to **Variables and Secrets**, then select **Add**.
103
-
8. Choose _Secret_ as the type, name your secret (for example, `OPENAI_API_KEY`), and enter the value of your AI provider's API key in **Value**.
101
+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
Copy file name to clipboardExpand all lines: src/content/docs/cloudflare-one/tutorials/r2-logs.mdx
+8-18Lines changed: 8 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,49 +6,42 @@ pcx_content_type: tutorial
6
6
title: Use Cloudflare R2 as a Zero Trust log destination
7
7
products:
8
8
- R2
9
-
10
9
---
11
10
12
-
:::note
13
-
11
+
import { DashButton } from"~/components";
14
12
13
+
:::note
15
14
Only available on Zero Trust Enterprise plans.
16
-
17
-
18
15
:::
19
16
20
17
This tutorial covers how to build a [Cloudflare R2 bucket](/r2/buckets/) to store logs, and how to connect the bucket to the Zero Trust [Logpush service](/cloudflare-one/insights/logs/logpush/) to store logs persistently and export them into other tools.
21
18
22
-
23
19
## Before you begin
24
20
25
-
26
-
* Ensure Cloudflare R2 and the Zero Trust Logpush integration are included in your plan. For more information, contact your account team.
27
-
21
+
- Ensure Cloudflare R2 and the Zero Trust Logpush integration are included in your plan. For more information, contact your account team.
28
22
29
23
## Create a Cloudflare R2 bucket
30
24
25
+
1. In the [Cloudflare dashboard](https://dash.cloudflare.com/), go to the **R2 Overview** page.
31
26
32
-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
33
-
2. Go to **R2** > **Overview**. Select **Create bucket**.
34
-
3. Enter an identifiable name for the bucket, then select **Create bucket**.
27
+
<DashButtonurl="/?to=/:account/r2/overview" />
35
28
29
+
2. Select **Create bucket**.
30
+
3. Enter an identifiable name for the bucket, then select **Create bucket**.
36
31
37
32
## Create an R2 API token
38
33
39
34
1. Return to **R2**, then select **Manage R2 API tokens**.
40
35
2. Select **Create API token**.
41
36
3. In **Permissions**, select **Object Read & Write**.
42
-
4. In **Specify bucket(s)**, choose *Apply to specific buckets only*. Select the bucket you created.
37
+
4. In **Specify bucket(s)**, choose _Apply to specific buckets only_. Select the bucket you created.
43
38
5. Configure other token settings to your preferences.
44
39
6. Select **Create API Token**.
45
40
7. Copy the **Access Key ID**, **Secret Access Key**, and endpoint URL values. You will not be able to access these values again.
46
41
8. Select **Finish**.
47
42
48
-
49
43
## Connect a Zero Trust Logpush job
50
44
51
-
52
45
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Logs** > **Logpush**.
53
46
2. Select **Connect a service**.
54
47
3. Choose which data sets and fields you want to send to your bucket. Select **Next**.
@@ -59,6 +52,3 @@ This tutorial covers how to build a [Cloudflare R2 bucket](/r2/buckets/) to stor
59
52
8. Select **Push**. If prompted, you do not need to prove ownership with a token challenge.
60
53
61
54
The Logpush job will send the selected Zero Trust logs to your R2 bucket.
0 commit comments