Skip to content

Commit 01d78cd

Browse files
committed
docs(devbox): clarify infisical provider contract
1 parent 3a3a5d3 commit 01d78cd

1 file changed

Lines changed: 15 additions & 28 deletions

File tree

docs/devbox.md

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ For services and agents:
4949
5. Keep raw client secrets and access tokens out of shell startup, launchd
5050
plists, process-compose YAML, tracked files, and long-lived interactive
5151
shells.
52-
6. Use `./scripts/secrets/infisical-devbox-run.sh -- <command>` or an explicit
53-
`infisical export --token ...` at the process boundary instead of
54-
repo-managed generated dotenv files.
52+
6. Run the env-consuming runtime through
53+
`./scripts/secrets/infisical-devbox-run.sh -- <command>`. The runtime owns how
54+
it reads Infisical and sets itself up.
5555
7. Keep any identity-specific Infisical project, environment, path, client ID,
5656
or client secret values out of this repo.
5757

@@ -60,7 +60,7 @@ future agent shells and reboots needs the Universal Auth client credentials in
6060
owner-only local machine state. This is an intentional tradeoff: the
6161
credentials are persistent on that Unix account, but they are not shell
6262
exports, process-compose config, launchd config, tracked files, or generated
63-
runtime dotenv files.
63+
runtime dotenv refresh stacks.
6464

6565
One-time setup:
6666

@@ -85,23 +85,12 @@ belong at the command boundary.
8585
Routine command-boundary use:
8686

8787
```sh
88-
./scripts/secrets/infisical-devbox-run.sh -- sh -c '
89-
mkdir -p "$HOME/.config/example"
90-
infisical export \
91-
--domain "$INFISICAL_DOMAIN" \
92-
--token "$INFISICAL_TOKEN" \
93-
--projectId "$INFISICAL_PROJECT_ID" \
94-
--env "$INFISICAL_ENV" \
95-
--path "/example-devbox/runtime-env" \
96-
--format dotenv \
97-
--output-file "$HOME/.config/example/runtime.env" \
98-
--silent
99-
chmod 600 "$HOME/.config/example/runtime.env"
100-
'
88+
INFISICAL_SECRET_PATH=/example-devbox/runtime-env \
89+
./scripts/secrets/infisical-devbox-run.sh -- <runtime-command>
10190
```
10291

103-
Replace the output file with the runtime-specific file or run the service
104-
command through `infisical-devbox-run.sh`.
92+
Replace `<runtime-command>` with the service or setup command that knows how to
93+
read Infisical. Dotfiles does not generate runtime env files.
10594

10695
Do not create additional hidden helper scripts, token caches, shell exports, or
10796
runtime dotenv refresh stacks outside this contract. If another unattended
@@ -162,15 +151,13 @@ Before treating a devbox as agent-ready:
162151
2. Verify `infisical login status --domain https://eu.infisical.com/api` has no
163152
authenticated `user` session.
164153
3. Verify no default shell exports Infisical tokens or machine credentials.
165-
4. Verify runtime dotenv files are owner-only and are not workspace symlinks.
166-
167-
`./scripts/verify/devbox-services.sh` checks the Infisical CLI, local
168-
runtime-file boundary, owner-only config modes, and machine identity token
169-
minting. Set `INFISICAL_SECRET_PATH=/some/path` only when you want that check
170-
to also prove access to a specific command-boundary path. A missing persistent
171-
machine identity config fails by default. Set `INFISICAL_MACHINE_AUTH_REQUIRED=0`
172-
only for repo-local smoke checks on a machine that is not acting as an agent
173-
devbox.
154+
155+
`./scripts/verify/devbox-services.sh` checks the Infisical CLI, owner-only
156+
config modes, and machine identity token minting. Set
157+
`INFISICAL_SECRET_PATH=/some/path` only when you want that check to also prove
158+
access to a specific command-boundary path. A missing persistent machine
159+
identity config fails by default. Set `INFISICAL_MACHINE_AUTH_REQUIRED=0` only
160+
for repo-local smoke checks on a machine that is not acting as an agent devbox.
174161

175162
## Secret Topology
176163

0 commit comments

Comments
 (0)