Add Vault SecretRef plugin#89255
Conversation
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph change authorizedThis PR includes dependency graph changes. A repository admin or member of
A later push changes the PR head SHA and requires a fresh security approval. |
|
Codex review: needs maintainer review before merge. Reviewed July 9, 2026, 6:00 AM ET / 10:00 UTC. Summary PR surface: Source +1099, Tests +1147, Docs +384, Config +33, Generated 0, Other +6. Total +2669 across 30 files. Reproducibility: not applicable. as a bug reproduction; this is a new bundled integration. The PR body provides redacted live output for Vault-backed setup, apply, audit, status, and provider model listing. Review metrics: 3 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land only after maintainers explicitly accept bundled Vault ownership, resolver env pass-through, security posture, SDK/config setup behavior, and dependency metadata; otherwise keep Vault as an external or ClawHub plugin using the existing SecretRef integration seam. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction; this is a new bundled integration. The PR body provides redacted live output for Vault-backed setup, apply, audit, status, and provider model listing. Is this the best way to solve the issue? Unclear as product direction; technically it uses the existing plugin-managed SecretRef seam and the latest head fixes prior policy-boundary concerns. The remaining question is whether Vault should be bundled in OpenClaw rather than shipped externally. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f650d641e439. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1099, Tests +1147, Docs +384, Config +33, Generated 0, Other +6. Total +2669 across 30 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (18 earlier review cycles; latest 8 shown)
|
Signed-off-by: sallyom <[email protected]>
Signed-off-by: sallyom <[email protected]>
|
/allow-dependencies-change |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
/allow-dependencies-change |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Summary
vaultplugin that provides a reference SecretRef exec provider for HashiCorp Vault KV.VAULT_ADDR,VAULT_TOKEN, optionalVAULT_NAMESPACE, and KV mount/version env vars, so no Vault CLI is required in the Gateway image.openclaw vault statusandopenclaw vault setuphelpers for local and server workflows.Linked context
Adding a reference implementation for the external SecretRef provider contract.
Real behavior proof
vaultSecretRef provider to resolve model provider credentials from a real Vault KV secret without storing plaintext provider keys in OpenClaw config.OPENCLAW_STATE_DIRandOPENCLAW_CONFIG_PATH, a maintainer-provided HTTPS Vault endpoint,VAULT_TOKEN,OPENCLAW_VAULT_KV_MOUNT=users, and Vault idsallyom/openrouter/apiKey.vaultplugin in the temp config, generated a setup plan withpnpm openclaw vault setup --plan-out <plan> --openrouter-id sallyom/openrouter/apiKey, dry-ranpnpm openclaw secrets apply --from <plan> --dry-run --allow-exec --json, applied it withpnpm openclaw secrets apply --from <plan> --allow-exec --json, audited withpnpm openclaw secrets audit --allow-exec --json, then ranpnpm openclaw models list --provider openrouter --json.exec; plugin integration was{ pluginId: "vault", integrationId: "vault" }; OpenRouterapiKeyremained a SecretRef instead of plaintext.openclaw secrets audit --allow-exec --jsonreportedstatus: "clean",refsChecked: 1,unresolvedRefCount: 0, andplaintextCount: 0.openclaw models list --provider openrouter --jsonreturnedmodelCount: 3while using the Vault-backed SecretRef.VAULT_ADDRbehavior, including no returned value when token/address requirements are not met.models listcommand reported that gatewaysecrets.resolvewas unavailable in the temp config and resolved command secrets locally; the earlier linked K8s smoke covers installer-configured deployment behavior.From local run:
Tests and validation
Commands run locally:
Broad changed gate run in Blacksmith Testbox:
Testbox result:
blacksmith-testbox.tbx_01ktkvw57z4t3f2c82v1r2448b.Current PR CI snapshot at head
87fb72f88ed58760c49534a0f8288060a4020a0a:Real behavior proof: pass.actionlintandno-tabs: pass.tui-pty: in progress when this body was refreshed.Regression coverage added:
What failed before this fix:
Risk checklist
YesYesYessecrets apply, and has focused resolver/CLI/secrets tests plus extension boundary/type checks.Current review state
Next action: maintainer/security review for the bundled exec resolver trust model.
Waiting on:
tui-ptycompletion at the current head SHA.Reviewer focus:
<vault-secret-path>/<field>) and KV v1/v2 behavior.VAULT_TOKENis passed through environment, network read is host-scoped toVAULT_ADDR, and failures do not echo secret values or raw Vault response bodies.OPENCLAW_VAULT_*; standard HashiCorp Vault knobs remainVAULT_*.