Skip to content

Commit 7d630bf

Browse files
[Secrets Store] Use DashButton and cross-link AI Gateway (#24883)
* Change to Secrets Store (plural) for consistency * Add links from Secrets Store docs to AI Gateway * Add AI Gateway to integrations sidenav and adjust titles * Update access-control and link from bring-your-own-keys * Implement DashButton on how-to.mdx * Implement DashButton on workers.mdx
1 parent c8c37e4 commit 7d630bf

File tree

6 files changed

+74
-35
lines changed

6 files changed

+74
-35
lines changed

src/content/docs/ai-gateway/configuration/bring-your-own-keys.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { CardGrid, LinkTitleCard } from "~/components";
1212

1313
Bring your own keys (BYOK) is a feature in Cloudflare AI Gateway that allows you to securely store your AI provider API keys directly in the Cloudflare dashboard. Instead of including API keys in every request to your AI models, you can configure them once in the dashboard, and reference them in your gateway configuration.
1414

15-
The keys are stored securely with [Secret Store](/secrets-store/) and allows for:
15+
The keys are stored securely with [Secrets Store](/secrets-store/) and allows for:
1616

1717
- Secure storage and limit exposure
1818
- Easier key rotation
@@ -23,7 +23,7 @@ The keys are stored securely with [Secret Store](/secrets-store/) and allows for
2323
### Prerequisites
2424

2525
- Ensure your gateway is [authenticated](/ai-gateway/configuration/authentication/).
26-
- Ensure you have appropriate permissions to create and deploy secrets on Secret Store.
26+
- Ensure you have appropriate [permissions](/secrets-store/access-control/) to create and deploy secrets on Secrets Store.
2727

2828
### Configure API keys
2929

src/content/docs/secrets-store/access-control.mdx

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,30 @@ Secrets Store allows security administrators to have more control by implementin
1313
While all Cloudflare accounts will have access to the Secrets Store section on the dashboard, only users with the necessary permissions will be able to interact with it, as described below.
1414
:::
1515

16-
## Relevant roles for Secrets Store
16+
## Relevant roles
1717

1818
Refer to the list below for default role definitions.
1919

20-
- **Super Administrator**: Can create, edit, duplicate, delete, and view secrets metadata. Can also [add a Secrets Store binding to a Worker](/secrets-store/integrations/workers/).
21-
- **Secrets Store Admin**: Can create, edit, duplicate, delete, and view secrets metadata.
22-
- **Secrets Store Deployer**: Can view secrets metadata but cannot create, edit, duplicate, nor delete secrets. Can also [add a Secrets Store binding to a Worker](/secrets-store/integrations/workers/).
23-
- **Secrets Store Reporter**: Can view secrets metadata. Cannot perform any actions (create, edit, duplicate, delete secrets), nor add a Secrets Store binding to a Worker.
20+
#### Super Administrator
21+
22+
- Can create, edit, duplicate, delete, and view secrets metadata.
23+
- Can [add a Secrets Store binding to a Worker](/secrets-store/integrations/workers/).
24+
- Can [create an association between a secret and an AI gateway](/ai-gateway/configuration/bring-your-own-keys/).
25+
26+
#### Secrets Store Admin
27+
28+
- Can create, edit, duplicate, delete, and view secrets metadata.
29+
30+
#### Secrets Store Deployer
31+
32+
- Can view secrets metadata but cannot create, edit, duplicate, nor delete secrets.
33+
- Can [add a Secrets Store binding to a Worker](/secrets-store/integrations/workers/).
34+
- Can [create an association between a secret and an AI gateway](/ai-gateway/configuration/bring-your-own-keys/).
35+
36+
#### Secrets Store Reporter
37+
38+
- Can view secrets metadata.
39+
- Cannot perform any actions (create, edit, duplicate, delete secrets), nor use Secrets Store integrations with other Cloudflare products.
2440

2541
## API token permissions
2642

src/content/docs/secrets-store/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Encrypt and store sensitive information as secrets that are securely reusable ac
2121

2222
Cloudflare Secrets Store is a secure, centralized location in which account-level secrets are stored and managed. The secrets are securely encrypted and stored across all [Cloudflare data centers](https://www.cloudflare.com/network/).
2323

24-
Secrets Store is currently [compatible with Cloudflare Workers](/secrets-store/integrations/workers/). Integrations with other products will be added in the future.
24+
Secrets Store is currently compatible with [Cloudflare Workers](/secrets-store/integrations/workers/) and [AI Gateway](/ai-gateway/configuration/bring-your-own-keys/). Integrations with other products will be added in the future.
2525

2626
:::note[China availability]
2727
Secrets Store is unavailable in the [Cloudflare China Network](/china-network/), operated by Cloudflare's partner JD Cloud.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
pcx_content_type: navigation
3+
title: AI Gateway integration
4+
external_link: /ai-gateway/configuration/bring-your-own-keys/
5+
sidebar:
6+
order: 3
7+
label: AI Gateway
8+
---

src/content/docs/secrets-store/integrations/workers.mdx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Use Secrets Store with Workers
2+
title: Workers integration
33
pcx_content_type: tutorial
44
sidebar:
55
order: 1
6-
label: Use with Workers
6+
label: Workers
77
---
88

9-
import { WranglerConfig, Tabs, TabItem, APIRequest } from "~/components";
9+
import { WranglerConfig, Tabs, TabItem, APIRequest, DashButton } from "~/components";
1010

1111
[Cloudflare Secrets Store](/secrets-store/) is a secure, centralized location in which account-level secrets are stored and managed. The secrets are securely encrypted and stored across all Cloudflare data centers.
1212

@@ -56,8 +56,11 @@ npx wrangler secrets-store secret create <STORE_ID> --name MY_SECRET_NAME --scop
5656

5757
</TabItem> <TabItem label="Dashboard">
5858

59-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
60-
2. Go to **Secrets Store** and select **Create secret**.
59+
1. In the Cloudflare dashboard, go to the **Secrets Store** page.
60+
61+
<DashButton url="/?to=/:account/secrets-store" />
62+
63+
2. Select **Create secret**.
6164
3. Fill in the required fields, choosing _Workers_ as the **Permission scope**. Once the secret is saved, the secret value will no longer be available for viewing.
6265
4. (Optional) Select **Add additional secret** to create more than one secret at a time.
6366
5. Select **Save** to confirm.
@@ -120,8 +123,11 @@ secrets_store_secrets = [
120123

121124
### Via Dashboard
122125

123-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
124-
2. Go to **Workers & Pages** and select a Workers application.
126+
1. In the Cloudflare dashboard, go to **Workers & Pages**.
127+
128+
<DashButton url="/?to=/:account/workers-and-pages" />
129+
130+
2. Select a Workers application.
125131
3. Go to **Settings** > **Bindings** and select **Add**.
126132
4. On the **Add a resource binding** side panel, choose **Secrets Store**.
127133
5. Fill in the required fields:

src/content/docs/secrets-store/manage-secrets/how-to.mdx

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 2
66
---
77

8-
import { Tabs, TabItem, APIRequest } from "~/components";
8+
import { Tabs, TabItem, APIRequest, DashButton } from "~/components";
99

1010
Refer to the sections below to learn about common actions you might want to take when managing your data in Secrets Store.
1111

@@ -19,8 +19,11 @@ You must have a [Super Administrator or Secrets Store Admin role](/secrets-store
1919

2020
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
2121

22-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
23-
2. Go to **Secrets Store** and select **Create secret**.
22+
1. In the Cloudflare dashboard, go to the **Secrets Store** page.
23+
24+
<DashButton url="/?to=/:account/secrets-store" />
25+
26+
2. Select **Create secret**.
2427
3. Fill in the required fields. Note that, once the secret is saved, the secret value will no longer be available for viewing.
2528
4. (Optional) Select **Add additional secret** to create more than one secret at a time.
2629
5. Select **Save** to confirm.
@@ -58,12 +61,14 @@ Duplicate a secret to keep the same secret value but change name, scope, or comm
5861

5962
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
6063

61-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
62-
2. Go to **Secrets Store**.
63-
3. Search for the secret you would like to duplicate within the existing secrets list.
64-
4. Select the three dots next to the secret and choose **Duplicate**.
65-
5. Edit the **Secret name**, **Permission scope**, or **Comment**, according to your needs.
66-
6. Select **Save** to confirm.
64+
1. In the Cloudflare dashboard, go to the **Secrets Store** page.
65+
66+
<DashButton url="/?to=/:account/secrets-store" />
67+
68+
2. Search for the secret you would like to duplicate within the existing secrets list.
69+
3. Select the three dots next to the secret and choose **Duplicate**.
70+
4. Edit the **Secret name**, **Permission scope**, or **Comment**, according to your needs.
71+
5. Select **Save** to confirm.
6772

6873
</TabItem> <TabItem label="API">
6974

@@ -96,11 +101,13 @@ You can also edit the secret **Permission scope** and **Comment**.
96101

97102
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
98103

99-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
100-
2. Go to **Secrets Store**.
101-
3. Search for the secret you would like to edit within the existing secrets list.
102-
4. Select the three dots next to the secret and choose **Edit**.
103-
5. Edit the available fields according to your needs and select **Save** to confirm.
104+
1. In the Cloudflare dashboard, go to the **Secrets Store** page.
105+
106+
<DashButton url="/?to=/:account/secrets-store" />
107+
108+
2. Search for the secret you would like to edit within the existing secrets list.
109+
3. Select the three dots next to the secret and choose **Edit**.
110+
4. Edit the available fields according to your needs and select **Save** to confirm.
104111

105112
</TabItem> <TabItem label="API">
106113

@@ -123,16 +130,18 @@ https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/secrets_store/stores/$
123130
## Delete a secret
124131

125132
:::caution
126-
Before deleting a secret, make sure it is not deployed. Secrets Store secrets in use are listed in the respective [Workers application](https://dash.cloudflare.com/?to=/:account/workers-and-pages/) under **Settings** > **Bindings**.
133+
Before deleting a secret, make sure it is not deployed in your [Workers applications](https://dash.cloudflare.com/?to=/:account/workers-and-pages/) or [AI gateways](https://dash.cloudflare.com/?to=/:account/ai/ai-gateway).
127134
:::
128135

129136
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
130137

131-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
132-
2. Go to **Secrets Store**.
133-
3. Search for the secret you would like to delete within the existing secrets list.
134-
4. Select the three dots next to the secret and choose **Delete**.
135-
5. Type in the secret name and select **Delete** to confirm.
138+
1. In the Cloudflare dashboard, go to the **Secrets Store** page.
139+
140+
<DashButton url="/?to=/:account/secrets-store" />
141+
142+
2. Search for the secret you would like to delete within the existing secrets list.
143+
3. Select the three dots next to the secret and choose **Delete**.
144+
4. Type in the secret name and select **Delete** to confirm.
136145

137146
</TabItem> <TabItem label="API">
138147

0 commit comments

Comments
 (0)