Skip to content

Commit e9cd30e

Browse files
committed
docs(devbox): polish infisical auth guidance
1 parent 8de4b0b commit e9cd30e

4 files changed

Lines changed: 29 additions & 38 deletions

File tree

AGENTS.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,11 @@ agent guide.
3131
identity context.
3232

3333
Machine-local secrets belong in explicit owner-only local storage or an
34-
approved secret manager login. Humans may use both 1Password and Infisical;
35-
agents use Infisical only for secrets/env access. Agent devboxes should use
36-
Infisical machine identity config through the devbox runner and should not keep
37-
authenticated human Infisical CLI sessions.
38-
39-
When a devbox task needs shared env, check the relevant Infisical
40-
project/path first. Do not revive workspace `.env` symlinks, devbox-env
41-
generated files, or 1Password service-account refresh stacks.
42-
43-
For agent SSH, ordinary private keys may live in Infisical under the devbox or
44-
agent boundary. Keep fingerprints and public metadata in docs, retrieve keys
45-
only for the command or owner-only local file that needs them, and keep key
46-
files mode `0600`.
34+
approved secret manager login. For shared agent hosts, use the current contract
35+
in [Devbox setup](docs/devbox.md): humans may use 1Password and Infisical;
36+
agents use Infisical machine identity auth only for secrets/env access. Do not
37+
revive workspace `.env` symlinks, devbox-env generated files, or 1Password
38+
service-account refresh stacks.
4739

4840
## Agent Operating Checklist
4941

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,11 @@ Keep these out of Git:
7878
- Codex auth, Browser approvals, sessions, caches, worktrees, and app state.
7979
- Browser profiles, Docker/Colima state, dependency folders, and build output.
8080

81-
For always-on agent hosts, use the secret model in [Devbox setup](docs/devbox.md):
82-
humans use both 1Password and Infisical, agents use Infisical only, and normal
83-
shells do not export Infisical tokens or machine credentials. Devbox agents
84-
should use owner-only persistent machine identity config plus
85-
`scripts/secrets/infisical-devbox-run.sh`, not saved human Infisical CLI
86-
sessions. Agent SSH keys may live in Infisical under the devbox secret boundary
87-
and should be retrieved only into owner-only local key files or the command
88-
environment that needs them.
81+
For always-on agent hosts, use the secret model in
82+
[Devbox setup](docs/devbox.md). The short version: humans may use 1Password and
83+
Infisical, agents use Infisical machine identity auth only, and tokens or client
84+
credentials must not live in default shells, process managers, tracked files, or
85+
generated dotenv refresh stacks.
8986

9087
## Personalization
9188

docs/bootstrap.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,10 @@ use a different local key path than commit signing.
214214
If the devbox runs long-lived workspace or agent services, follow
215215
[Devbox setup](devbox.md). The short version: run
216216
`./scripts/secrets/configure-infisical-devbox.sh` once with a human-supplied
217-
machine identity client ID/secret, keep human Infisical CLI sessions off agent
218-
devboxes, keep long-lived tokens out of default shells and process-compose
219-
YAML, and run routine secret-aware commands through
220-
`./scripts/secrets/infisical-devbox-run.sh`. Agent SSH keys may live in
221-
Infisical under the devbox secret boundary and should be retrieved only into
222-
owner-only local key files or the command environment that needs them.
217+
Universal Auth client ID/secret, keep human Infisical CLI sessions off agent
218+
devboxes, keep long-lived tokens out of default shells and process-compose YAML,
219+
and run routine secret-aware commands through
220+
`./scripts/secrets/infisical-devbox-run.sh`.
223221

224222
Verify each devbox user:
225223

docs/devbox.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ write it.
3434

3535
When an agent task needs shared env, check the relevant Infisical project/path
3636
first. Do not recreate workspace `.env` symlinks, devbox-env generated files,
37-
or 1Password service-account refresh stacks.
37+
token caches, or 1Password service-account refresh stacks.
3838

3939
For services and agents:
4040

@@ -71,9 +71,9 @@ One-time setup:
7171
The helper prompts locally for the Infisical domain, project ID, environment,
7272
Universal Auth client ID, and Universal Auth client secret. Use the client ID
7373
shown under the machine identity's Universal Auth method, not the machine
74-
identity ID shown in the identity details panel. Humans should source the
75-
initial client ID/secret from their secret manager, usually 1Password or
76-
Infisical, and enter them locally. Do not paste them into agent chat.
74+
identity ID shown in the identity details panel. Humans should source those
75+
values from their secret manager, usually 1Password or Infisical, and enter them
76+
locally. Do not paste them into agent chat.
7777

7878
It writes non-secret selectors to `~/.config/uinaf/devbox.env` and machine
7979
credentials to `~/.config/uinaf/infisical-machine.env`. Both files must be mode
@@ -86,27 +86,31 @@ Routine command-boundary use:
8686

8787
```sh
8888
./scripts/secrets/infisical-devbox-run.sh -- sh -c '
89+
mkdir -p "$HOME/.config/example"
8990
infisical export \
9091
--domain "$INFISICAL_DOMAIN" \
9192
--token "$INFISICAL_TOKEN" \
9293
--projectId "$INFISICAL_PROJECT_ID" \
9394
--env "$INFISICAL_ENV" \
94-
--path "/example-devbox/openclaw-env" \
95+
--path "/example-devbox/runtime-env" \
9596
--format dotenv \
96-
--output-file "$HOME/.openclaw/.env" \
97+
--output-file "$HOME/.config/example/runtime.env" \
9798
--silent
99+
chmod 600 "$HOME/.config/example/runtime.env"
98100
'
99-
100-
chmod 600 "$HOME/.openclaw/.env"
101101
```
102102

103-
For non-OpenClaw services, replace the output file with the runtime-specific
104-
file or run the service command through `infisical-devbox-run.sh`.
103+
Replace the output file with the runtime-specific file or run the service
104+
command through `infisical-devbox-run.sh`.
105105

106106
Do not create additional hidden helper scripts, token caches, shell exports, or
107107
runtime dotenv refresh stacks outside this contract. If another unattended
108108
refresh mechanism becomes necessary, document and verify that mechanism first.
109109

110+
If setup fails with `Invalid credentials`, check that the ID came from the
111+
Universal Auth method. The machine identity ID in the details panel is not a
112+
Universal Auth client ID and cannot mint a token.
113+
110114
## Agent SSH Key Storage
111115

112116
Devbox agent SSH keys may be stored as Infisical secrets. This keeps the key in
@@ -229,7 +233,7 @@ INFISICAL_CLIENT_SECRET=...
229233
```
230234

231235
Keep both files out of Git. Do not create repo-local workspace `.env` symlinks
232-
for agent/OpenClaw runtime env.
236+
for agent runtime env.
233237

234238
If a devbox identity does not run process-compose, set
235239
`PROCESS_COMPOSE_ENABLED=0` in its local config so verification does not

0 commit comments

Comments
 (0)