fix(install): manage auth-profile env refs via OPENCLAW_SERVICE_MANAGED_ENV_KEYS#96059
fix(install): manage auth-profile env refs via OPENCLAW_SERVICE_MANAGED_ENV_KEYS#96059Darren2030 wants to merge 1 commit into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close: this branch is superseded by #96149, and this patch is not safe to merge because it removes auth-profile env values from the install plan without marking them file-backed for service delivery. Canonical path: Close this branch and review or land the file-backed So I’m closing this here and keeping the remaining discussion on #96149. Review detailsBest possible solution: Close this branch and review or land the file-backed Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows auth-profile env refs enter the install plan as inline values on current main, and this PR then removes those values through the managed-key policy before service renderers can deliver them. Is this the best way to solve the issue? No. Security review: Security review cleared: The diff touches credential rendering but I found no new plaintext exposure or supply-chain change; the blocking issue is provider credential delivery. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 654544b6b7c4. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
Fixes #95895. When a provider API key such as
GEMINI_API_KEYis configured via an auth profile,openclaw gateway installwas writing the key as a plaintext literal in the generated systemd/LaunchAgent service file. All other provider secrets were already handled viaOPENCLAW_SERVICE_MANAGED_ENV_KEYSand resolved at runtime; auth-profile env refs were the missing source.Changes
src/commands/daemon-install-helpers.ts: include auth-profile env refs when computingOPENCLAW_SERVICE_MANAGED_ENV_KEYS, so they are removed from inline service env values and referenced via the managed-keys list instead.src/commands/daemon-install-helpers.test.ts: update existing auth-profile assertions and add a GEMINI_API_KEY regression test.scripts/repro/issue-95895-auth-profile-managed-env-keys.mts: standalone reproduction script that runsbuildGatewayInstallPlanagainst a real temp home and verifies the key is managed, not inline.Real behavior proof
GEMINI_API_KEYno longer appears as a plaintext literal in the generated gateway service environment; it is listed inOPENCLAW_SERVICE_MANAGED_ENV_KEYS.pnpm buildnode --import tsx scripts/repro/issue-95895-auth-profile-managed-env-keys.mtsplan.environment.GEMINI_API_KEYisundefined;plan.environment.OPENCLAW_SERVICE_MANAGED_ENV_KEYScontainsGEMINI_API_KEY.systemctl; the fix is at the install-plan environment level.Verification
pnpm test src/commands/daemon-install-helpers.test.ts --run— 45 passednode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/commands/daemon-install-helpers.ts src/commands/daemon-install-helpers.test.ts— passednode --import tsx scripts/repro/issue-95895-auth-profile-managed-env-keys.mts— PASSAI-assisted: yes.