Skip to content

Commit 9f266e1

Browse files
committed
docs(onboarding): explain preserved credential profiles in reference mode
1 parent b0f98c2 commit 9f266e1

4 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎docs/cli/onboard.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ openclaw onboard --non-interactive \
262262
--accept-risk
263263
```
264264

265-
With `--secret-input-mode ref`, onboarding writes env-backed refs instead of plaintext key values: for auth-profile-backed providers this writes `keyRef: { source: "env", provider: "default", id: <envVar> }`; for custom providers it writes `models.providers.<id>.apiKey` the same way (for example `{ source: "env", provider: "default", id: "CUSTOM_API_KEY" }`). Contract: set the provider env var in the onboarding process environment (for example `OPENAI_API_KEY`) and do not also pass an inline key flag unless that env var is set - a flag value without the matching env var fails fast with guidance.
265+
With `--secret-input-mode ref`, onboarding stores new credentials as env-backed refs instead of plaintext: auth profiles use `keyRef: { source: "env", provider: "default", id: <envVar> }`, and custom providers use `models.providers.<id>.apiKey` (for example `{ source: "env", provider: "default", id: "CUSTOM_API_KEY" }`). Set the provider env var when adding a new credential; an inline key flag without its matching env var fails fast. Existing resolvable named auth profiles and their `env`, `file`, or `exec` references are reused unchanged, without a new `apiKey` or `keyRef` write or additional provider env var. Existing plaintext profile credentials are not migrated; run `openclaw secrets configure --apply`, then `openclaw secrets audit --check`. See [Secrets management](/gateway/secrets).
266266

267267
### Gateway auth (non-interactive)
268268

‎docs/start/wizard-cli-automation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Add `--json` for a machine-readable summary.
3232

3333
- `--gateway-port` defaults to `18789`; only pass it to override.
3434
- `--skip-bootstrap` skips creating default workspace files, for automation that pre-seeds its own workspace.
35-
- `--secret-input-mode ref` stores an env-backed reference (`{ source: "env", provider: "default", id: "<ENV_VAR>" }`) in the auth profile instead of the plaintext key. In non-interactive `ref` mode, the provider env var must already be set in the process environment: passing an inline key flag without its matching env var fails fast.
35+
- `--secret-input-mode ref` stores new credentials as env-backed references (`{ source: "env", provider: "default", id: "<ENV_VAR>" }`); set the provider env var when adding a credential or passing an inline key flag. Existing resolvable named profiles and their `env`, `file`, or `exec` references are reused unchanged, without a new credential write or additional provider env var. Existing plaintext is not migrated; run `openclaw secrets configure --apply`, then `openclaw secrets audit --check`. See [Secrets management](/gateway/secrets).
3636

3737
```bash
3838
openclaw onboard --non-interactive --accept-risk \

‎docs/start/wizard-cli-reference.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,13 @@ Credential storage mode:
300300
- Env refs: validates variable name + non-empty value in the current onboarding environment.
301301
- Provider refs: validates provider config and resolves the requested id.
302302
- If preflight fails, onboarding shows the error and lets you retry.
303-
- In non-interactive mode, `--secret-input-mode ref` is env-backed only.
304-
- Set the provider env var in the onboarding process environment.
303+
- In non-interactive mode, `--secret-input-mode ref` creates only env-backed references for new credentials.
304+
- Set the provider env var in the onboarding process environment when adding a new credential.
305305
- Inline key flags (for example `--openai-api-key`) require that env var to be set; otherwise onboarding fails fast.
306-
- For custom providers, non-interactive `ref` mode stores `models.providers.<id>.apiKey` as `{ source: "env", provider: "default", id: "CUSTOM_API_KEY" }`.
306+
- Existing resolvable named auth profiles are reused unchanged, including existing `env`, `file`, and `exec` references; no new `apiKey` or `keyRef` is written and no additional provider env var is required.
307+
- For new custom-provider credentials, non-interactive `ref` mode stores `models.providers.<id>.apiKey` as `{ source: "env", provider: "default", id: "CUSTOM_API_KEY" }`.
307308
- In that custom-provider case, `--custom-api-key` requires `CUSTOM_API_KEY` to be set; otherwise onboarding fails fast.
309+
- Existing plaintext profile credentials remain unchanged; reference mode does not migrate them. Run `openclaw secrets configure --apply`, then `openclaw secrets audit --check`. See [Secrets management](/gateway/secrets).
308310
- Gateway auth credentials support plaintext and SecretRef choices in interactive setup:
309311
- Token mode: **Generate/store plaintext token** (default) or **Use SecretRef**.
310312
- Password mode: plaintext or SecretRef.

‎docs/start/wizard.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,12 @@ Local mode (default) walks through these steps:
159159
Security note: if this agent will run tools or process webhook/hook
160160
content, prefer the strongest latest-generation model available and keep
161161
tool policy strict - weaker or older tiers are easier to prompt-inject.
162-
For non-interactive runs, `--secret-input-mode ref` stores env-backed refs
163-
instead of plaintext API key values; the referenced env var must already
164-
be set, or onboarding fails fast. Interactive secret reference mode can
162+
For non-interactive runs, `--secret-input-mode ref` stores new credentials
163+
as env-backed refs; set the provider env var when adding a credential.
164+
Existing resolvable named profiles and their `env`, `file`, or `exec` refs
165+
are reused unchanged without a new credential write or additional provider
166+
env var. Previously stored plaintext is not migrated; see
167+
[Secrets management](/gateway/secrets). Interactive secret reference mode can
165168
point at an environment variable or a configured provider ref (`file` or
166169
`exec`), with a fast preflight check before saving. After model/auth setup,
167170
the wizard offers an optional live completion test; a failure can return to

0 commit comments

Comments
 (0)