feat: support GCP broker metadata auth#1017
Conversation
|
Codex review: needs changes before merge. Reviewed July 9, 2026, 4:19 AM ET / 08:19 UTC. Summary Reproducibility: not applicable. as a bug reproduction; this is a feature PR for a new brokered GCP credential source. Source inspection confirms current main and v0.36.0 still require static service-account key credentials. Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 findings
Review detailsBest possible solution: Land the provider-local metadata auth path after maintainer security-boundary acceptance, with the release-owned changelog entry removed from the feature branch. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction; this is a feature PR for a new brokered GCP credential source. Source inspection confirms current main and v0.36.0 still require static service-account key credentials. Is this the best way to solve the issue? Mostly yes: the provider-local implementation preserves the default key path, fails partial config closed, and includes focused tests plus live proof. The remaining issue is release-note ownership and maintainer approval of the auth boundary. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7239e753df64. Label changesLabel justifications:
Evidence reviewedAcceptance criteria:
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 (7 earlier review cycles)
|
4d17f40 to
199ca80
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
199ca80 to
272e957
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Thanks @steipete & his claws army! :) |
…entity # Conflicts: # CHANGELOG.md
Summary
CRABBOX_GCP_CREDENTIAL_SOURCE=metadatasupport for brokered GCP coordinators running with an attached Google Cloud service identity.429and503responses with bounded exponential backoff.Refs #1016.
Config and secret implications
Google-hosted coordinators can set
CRABBOX_GCP_CREDENTIAL_SOURCE=metadataplusGCP_PROJECT_IDorCRABBOX_GCP_PROJECT. Portable coordinators continue to use bothGCP_CLIENT_EMAILandGCP_PRIVATE_KEY. Metadata mode sends no Crabbox credential to the metadata endpoint; it makes the documented fixed-host request withMetadata-Flavor: Googleand uses the returned short-lived access token only for Google Compute API calls.Verification
npm test --prefix worker— 916 passed, 3 skippednpm run format:check --prefix workernpm run lint --prefix workernpm run check --prefix workernpm run check:node --prefix workerHOME=/tmp/crabbox-home npm run build --prefix workernpm run build:node --prefix worker./scripts/check-docs.sh.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --parallel-tests "npm test --prefix worker -- --run test/gcp.test.ts test/fleet.test.ts test/gcp-release.live.test.ts" --stream-engine-output— clean, no accepted or actionable findingsLive proof
Exact candidate
e87367e9passed on a real GCPe2-standard-2lease,cbx_ed35f8631aef. The branch's bundledGCPClientran with onlyCRABBOX_GCP_CREDENTIAL_SOURCE=metadataand the metadata-derived project ID, acquired the attached service-account token, and completed the real aggregated Compute instance-list request:The lease was deleted after the command, and
go run ./cmd/crabbox list --provider gcpreturned an empty inventory. No static GCP key was copied into the lease.