fix(google): support Vertex ADC from GCE metadata service accounts#79476
fix(google): support Vertex ADC from GCE metadata service accounts#79476batson-j wants to merge 171 commits intoopenclaw:mainfrom
Conversation
(cherry picked from commit a373468)
(cherry picked from commit 2e8761c)
(cherry picked from commit 712aa96)
(cherry picked from commit 0eb06ca)
(cherry picked from commit cf3ce08)
(cherry picked from commit a91c17c)
(cherry picked from commit b546aa9)
Normalize WhatsApp onboarding allowlist entries to digit-only WhatsApp IDs and reject invalid owner-phone inputs during prompt validation. (cherry picked from commit 68a500c)
* fix(telegram): reuse preview for long text finals * test(qa): cover long telegram finals * fix(qa): satisfy extension lint * fix(qa): keep telegram long final fixture to two chunks * test(telegram): cover three chunk finals * fix(telegram): force long final preview boundary (cherry picked from commit e03fe1e)
(cherry picked from commit b0f841e)
Bind the default loopback gateway listener only to `127.0.0.1` on Windows so libuv dual-stack `::1` behavior cannot wedge localhost HTTP requests. Also keeps non-Windows dual-loopback behavior covered, replaces the redundant Windows passthrough test with guard coverage, and adds the required changelog entry. Fixes openclaw#69674. Tests: - pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/gateway/net.ts src/gateway/net.test.ts - pnpm test src/gateway/net.test.ts - pnpm check:changed - GitHub required checks: green Thanks @SARAMALI15792. Co-authored-by: saram ali <140950904+SARAMALI15792@users.noreply.github.com> Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com> (cherry picked from commit 978bc53)
…isted] (openclaw#74161) Summary: - The PR updates agents skill prompt guidance to require exact `<location>` paths for single- and multi-skill selection, adds prompt assertions, and records the fix in the changelog. - Reproducibility: yes. Static source reproduction is enough: current main lacks the exact-`<location>` guard ... illsSection()`, while the PR diff adds it to both selection branches and asserts the resulting prompt text. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: enforce exact skill paths for all skill matches Validation: - ClawSweeper review passed for head 743c984. - Required merge gates passed before the squash merge. Prepared head SHA: 743c984 Review: openclaw#74161 (comment) Co-authored-by: tianguicheng <tianguicheng@xiaomi.com> Co-authored-by: sallyom <somalley@redhat.com> (cherry picked from commit c739088)
Accept drive-absolute Windows sandbox Docker bind sources in config and runtime validation while keeping blocked-path and allowed-root comparisons case-insensitive for Windows drive paths. Also remove a stale WhatsApp setup import that blocked extension lint after the rebase. Co-authored-by: 6607changchun <84566142+6607changchun@users.noreply.github.com> Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com> (cherry picked from commit d02fbc6)
(cherry picked from commit c37871e)
(cherry picked from commit a0ea07e)
(cherry picked from commit add9a49)
(cherry picked from commit b32d4c5)
Adds cap_drop and no-new-privileges hardening for the bundled gateway Docker Compose services.\n\nThanks @VintageAyu. (cherry picked from commit f9da484)
…penclaw#77280) Merged via squash. Prepared head SHA: f4188b4 Co-authored-by: openperf <80630709+openperf@users.noreply.github.com> Co-authored-by: openperf <80630709+openperf@users.noreply.github.com> Reviewed-by: @openperf (cherry picked from commit 31da1fe)
|
Codex review: needs changes before merge. Summary Reproducibility: yes. Source inspection shows current main throws when no local ADC file exists and only exposes the Vertex transport for Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Land a narrow current-main branch containing only the Google Vertex metadata ADC implementation, docs/changelog, and focused regression tests, with unrelated release and workflow changes removed. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main throws when no local ADC file exists and only exposes the Vertex transport for Is this the best way to solve the issue? No as a merge artifact. The provider-local metadata fallback plus generic live-auth evidence direction is reasonable, but the PR must be rebased or replaced with a narrow diff before it is a maintainable fix. Full review comments:
Overall correctness: patch is incorrect Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against a130dd080b8a. |
|
Thanks for the PR. This branch carries unrelated release/main replay around the Google Vertex ADC change, so it is not reviewable as a focused Telegram PR. Please reopen as a narrow PR with only the intended fix. |
Summary
google-vertexonly accepted file-basedauthorized_userADC, so GCE Docker installs with attached VM service accounts could not authenticate even though Vertex AI worked directly.gcloud auth application-default loginor downloaded service-account keys.models status --probe, and doctor to recognize provider-declared live metadata auth, and routed local simple-completion Vertex calls through the OpenClaw Google Vertex transport.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
authorized_userADC discovery before the provider transport was exposed, and the ADC header resolver threw when no local ADC file existed or when the local ADC file was notauthorized_user.authorized_userADC refresh, but not VM-attached service-account ADC through the GCE metadata server, nor probe/doctor discovery for live provider auth evidence.Regression Test Plan (if applicable)
extensions/google/transport-stream.test.ts,src/agents/model-auth-live-evidence.test.ts,src/commands/models/list.probe.targets.test.ts,src/commands/models/list.status.test.ts,src/commands/doctor-memory-search.test.ts.authorized_userADC plus metadata token succeeds; unavailable metadata still throws the credential error; status/probe/doctor can discover live metadata auth without persisting tokens.authorized_userADC refresh coverage remains unchanged.User-visible / Behavior Changes
google-vertexcan authenticate on GCE using the VM's attached service-account token from the metadata server when local ADC is absent or notauthorized_user.models status --probeandopenclaw doctorrecognize this asGCE metadata service accountauth evidence.infer model run --model google-vertex/...uses the OpenClaw Google Vertex transport path.Diagram (if applicable)
Security Impact (required)
Yes/No): NoYes/No): YesYes/No): YesYes/No): NoYes/No): NoYes, explain risk + mitigation:authorized_user.Metadata-Flavor: Google, has a 1s timeout, returns undefined on failure, and does not persist or log the access token.models status --probeand doctor expose only the non-secretgcp-vertex-credentialsmarker/source, not the token.SECURITY.md; the provider plugin is part of the gateway TCB. It also intentionally differs from generic user-controlled URL fetch surfaces documented indocs/security/network-proxy.mdbecause this is a provider-owned fixed metadata endpoint for ADC.Repro + Verification
Environment
google-vertex/gemini-3.1-pro-previewGOOGLE_CLOUD_PROJECT,GOOGLE_CLOUD_LOCATION, attached VM service account; no service-account key file required.Steps
google-vertex/gemini-3.1-pro-preview.models status --probe --probe-provider google-vertex.infer model run --gateway --model google-vertex/gemini-3.1-pro-preview --prompt "Say exactly: vertex ok".Expected
source=GCE metadata service accountand probes Vertex successfully.vertex ok.Actual
authorized_userADC and failed without a local ADC JSON file.Evidence
Verification run locally through the Docker compose CLI image because host
node/pnpmwere not on PATH:pnpm docs:listpnpm exec oxfmt --check --threads=1 CHANGELOG.md docs/auth-credential-semantics.md docs/cli/models.md docs/plugins/manifest.md docs/providers/google.md extensions/google/index.test.ts extensions/google/openclaw.plugin.json extensions/google/provider-registration.ts extensions/google/transport-stream.test.ts extensions/google/vertex-adc.ts src/agents/model-auth.ts src/agents/model-auth-live-evidence.ts src/agents/model-auth-live-evidence.test.ts src/agents/provider-transport-stream.ts src/agents/provider-transport-stream.test.ts src/agents/simple-completion-transport.ts src/agents/simple-completion-transport.test.ts src/commands/doctor-memory-search.test.ts src/commands/doctor-memory-search.ts src/commands/models/list.auth-overview.ts src/commands/models/list.probe.targets.test.ts src/commands/models/list.probe.ts src/commands/models/list.status-command.ts src/commands/models/list.status.test.ts src/plugins/manifest-registry.test.ts src/plugins/manifest.ts src/secrets/provider-env-vars.dynamic.test.ts src/secrets/provider-env-vars.tspnpm test extensions/google/transport-stream.test.ts extensions/google/index.test.ts src/agents/model-auth-live-evidence.test.ts src/agents/provider-transport-stream.test.ts src/agents/simple-completion-transport.test.ts src/commands/models/list.probe.targets.test.ts src/commands/models/list.status.test.ts src/commands/doctor-memory-search.test.ts src/plugins/manifest-registry.test.ts src/secrets/provider-env-vars.dynamic.test.ts -- --reporter=verbosepnpm docs:check-i18n-glossarygit diff --checkManual live proof from GCE Docker:
Human Verification (required)
authorized_userADC falling through to metadata; existingauthorized_userADC refresh behavior; status/probe/doctor auth evidence discovery; local simple-completion Vertex transport selection.pnpm check/fullpnpm test; only focused touched-surface tests plus live Docker/GCE proof were run.Review Conversations
Compatibility / Migration
Yes/No): YesYes/No): YesYes/No): Noauthorized_userADC behavior is unchanged. GCE metadata ADC requiresGOOGLE_CLOUD_PROJECTorGCLOUD_PROJECT, plusGOOGLE_CLOUD_LOCATION, and an attached VM service account with Vertex AI permission.Risks and Mitigations
gcp-vertex-credentialsmarker and source label only.