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
## Secrets with Devbox (Create, Inject, Verify, Delete)
171
+
## Secrets with Devbox and Agent Gateway
172
172
173
-
**Use case:**Create a secret, inject it into a devbox as an environment variable, verify access, and clean up.
173
+
**Use case:**Use a normal secret for sensitive app data in the devbox and agent gateway for upstream API credentials that should never be exposed to the agent.
title: Secrets with Devbox (Create, Inject, Verify, Delete)
4
+
title: Secrets with Devbox and Agent Gateway
5
5
slug: secrets-with-devbox
6
-
use_case: Create a secret, inject it into a devbox as an environment variable, verify access, and clean up.
6
+
use_case: Use a normal secret for sensitive app data in the devbox and agent gateway for upstream API credentials that should never be exposed to the agent.
7
7
workflow:
8
-
- Create a secret with a test value
9
-
- Create a devbox with the secret mapped to an env var
10
-
- Execute a command that reads the secret from the environment
11
-
- Verify the value matches
12
-
- Update the secret and verify
13
-
- List secrets and verify the secret appears
14
-
- Shutdown devbox and delete secret
8
+
- Create a secret for application data that should be available inside the devbox
9
+
- Create a separate secret for an upstream API credential
10
+
- Create an agent gateway config for an upstream API
11
+
- Launch a devbox with one secret injected directly and the credential wired through agent gateway
12
+
- Verify the devbox can read MAGIC_NUMBER while the upstream API credential is replaced with gateway values
13
+
- Shutdown the devbox and delete the gateway config and both secrets
15
14
tags:
16
15
- secrets
17
16
- devbox
17
+
- agent-gateway
18
+
- credentials
18
19
- environment-variables
19
20
- cleanup
20
21
prerequisites:
@@ -33,37 +34,85 @@
33
34
34
35
# Note: do NOT hardcode secret values in your code!
35
36
# This is example code only; use environment variables instead!
- [Devbox snapshot and resume example](examples/devbox_snapshot_resume.py): Snapshot disk, resume from snapshot, verify state isolation
15
15
- [MCP GitHub example](examples/mcp_github_tools.py): MCP Hub integration with Claude Code
16
-
- [Secrets with Devbox example](examples/secrets_with_devbox.py): Create secret, inject into devbox, verify, cleanup
16
+
- [Secrets with Devbox example](examples/secrets_with_devbox.py): Inject a normal secret for app runtime use, protect upstream credentials with agent gateway, verify both behaviors, cleanup
0 commit comments