Skip to content

Commit 637adee

Browse files
claudespicelukekim
authored andcommitted
docs(cloud): document organization secrets and app secret linking
1 parent bc5f316 commit 637adee

3 files changed

Lines changed: 74 additions & 2 deletions

File tree

cloud/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* [AI Chat](portal/playground/ai-chat.md)
1919
* [Search](portal/playground/search.md)
2020
* [Organizations](portal/organizations.md)
21+
* [Organization Secrets](portal/organization-secrets.md)
2122
* [OAuth Clients](portal/oauth-clients.md)
2223
* [Apps](portal/apps/README.md)
2324
* [API keys](portal/apps/api-keys.md)

cloud/portal/apps/secrets.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ icon: lock
44

55
# Secrets
66

7-
App Secrets are key-value pairs that are passed to the Spice Runtime instance as environment secrets. Secrets are securely encrypted and accessible only through the app in which they were created.
7+
App Secrets are key-value pairs that are passed to the Spice Runtime instance as environment secrets. Secrets are securely encrypted and accessible only through the app in which they were created. To share one secret across several apps, use an [organization secret](../organization-secrets.md) instead.
88

9-
Once a secret is saved, its value cannot be retrieved through Spice Cloud. If you need to update the secret value, you must delete the existing secret and create a new one.
9+
Once a secret is saved, its value cannot be retrieved through Spice Cloud. Editing a secret replaces its value; the name cannot be changed.
10+
11+
The **Secrets** section is available to organization owners, admins, and members. Viewers cannot view or manage secrets.
1012

1113
### Create a new secret
1214

@@ -25,3 +27,11 @@ models:
2527
```
2628
2729
5. To apply secrets, you must initiate a new spicepod deployment. [Learn more about deployments.](../app-spicepod/deployments.md)
30+
31+
Secret names must start with a letter or an underscore and may contain only letters, numbers, and underscores.
32+
33+
### Linked Organization Secrets
34+
35+
Secrets defined for the organization are listed under **Linked Organization Secrets**. Only the secrets selected and saved here are available to the app at runtime and in secret pickers. When an app secret and a linked organization secret have the same name, the app secret takes precedence.
36+
37+
[Learn more about organization secrets.](../organization-secrets.md)
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
icon: key
3+
---
4+
5+
# Organization Secrets
6+
7+
**Organization Secrets** are encrypted key-value pairs defined once for an organization and shared with the apps that need them. A shared credential — a warehouse password, a model provider API key — is stored in one place instead of being copied into every app that uses it.
8+
9+
An organization secret reaches an app only after it is linked to that app. Storing a secret at the organization level does not expose it to every app in the organization.
10+
11+
Once a secret is saved, its value cannot be read back through Spice Cloud. The portal lists only the secret name and when it was created or last updated.
12+
13+
### Access by role
14+
15+
The **Secrets** section is available to organization owners, admins, and members. Viewers cannot view or manage secrets, and the section is hidden from them.
16+
17+
| Role | Organization secrets |
18+
| ------ | ------------------------------- |
19+
| Owner | Create, update, delete |
20+
| Admin | Create, update, delete |
21+
| Member | Create, update, delete |
22+
| Viewer | No access |
23+
24+
Roles are assigned per organization member. [Learn more about organizations.](organizations.md)
25+
26+
### Create an organization secret
27+
28+
1. Select the organization from the application selector.
29+
2. Navigate to the **Settings** tab and select the **Secrets** section.
30+
3. Fill the **Name** and **Value** fields and click **Add**.
31+
32+
Secret names must start with a letter or an underscore and may contain only letters, numbers, and underscores, for example `GITHUB_TOKEN`.
33+
34+
### Update or delete a secret
35+
36+
Editing a secret replaces its value. The name cannot be changed — to rename a secret, create a new one and delete the old one.
37+
38+
Deleting a secret requires confirmation, and removes it from every app it is linked to.
39+
40+
### Link a secret to an app
41+
42+
1. Select the app.
43+
2. Navigate to the **Settings** tab and select the **Secrets** section.
44+
3. Under **Linked Organization Secrets**, select each secret the app should receive.
45+
4. Click **Save linked secrets**.
46+
47+
Linked secrets are referenced in the Spicepod configuration exactly like app secrets, as `${secrets:<SECRET_NAME>}`:
48+
49+
```yaml
50+
models:
51+
- from: openai:gpt-4o
52+
name: gpt-4o
53+
params:
54+
openai_api_key: ${secrets:OPENAI_API_KEY}
55+
```
56+
57+
{% hint style="info" %}
58+
When an app secret and a linked organization secret have the same name, the app secret takes precedence at runtime.
59+
{% endhint %}
60+
61+
To apply a change to linked secrets, initiate a new Spicepod deployment. [Learn more about deployments.](app-spicepod/deployments.md)

0 commit comments

Comments
 (0)