openclaw secrets
Secrets runtime controls.
Related:
- Secrets guide: Secrets Management
- Security guide: Security
Reload runtime snapshot
Re-resolve secret refs and atomically swap runtime snapshot.- Uses gateway RPC method
secrets.reload. - If resolution fails, gateway keeps last-known-good snapshot.
- JSON response includes
warningCount.
Audit
Scan OpenClaw state for:- plaintext secret storage
- unresolved refs
- precedence drift (
auth-profilesshadowing config refs) - legacy residues (
auth.json, OAuth out-of-scope notes)
--checkexits non-zero on findings.- unresolved refs exit with a higher-priority non-zero code.
Configure (interactive helper)
Build provider + SecretRef changes interactively, run preflight, and optionally apply:- Provider setup first (
add/edit/removeforsecrets.providersaliases). - Credential mapping second (select fields and assign
{source, provider, id}refs). - Preflight and optional apply last.
--providers-only: configuresecrets.providersonly, skip credential mapping.--skip-provider-setup: skip provider setup and map credentials to existing providers.
configuretargets secret-bearing fields inopenclaw.json.- Include all secret-bearing fields you intend to migrate (for example both
models.providers.*.apiKeyandskills.entries.*.apiKey) so audit can reach a clean state. - It performs preflight resolution before apply.
- Apply path is one-way for migrated plaintext values.
- Homebrew installs often expose symlinked binaries under
/opt/homebrew/bin/*. - Set
allowSymlinkCommand: trueonly when needed for trusted package-manager paths, and pair it withtrustedDirs(for example["/opt/homebrew"]).
Apply a saved plan
Apply or preflight a plan generated previously:Why no rollback backups
secrets apply intentionally does not write rollback backups containing old plaintext values.
Safety comes from strict preflight + atomic-ish apply with best-effort in-memory restore on failure.
Example
audit --check still reports plaintext findings after a partial migration, verify you also migrated skill keys (skills.entries.*.apiKey) and any other reported target paths.