Skip to content

feat(backend): enable GCS backend (multistore gcp + wasm-compatible signing) - #191

Merged
alukach merged 2 commits into
mainfrom
feat/gcs-backend
Jul 22, 2026
Merged

feat(backend): enable GCS backend (multistore gcp + wasm-compatible signing)#191
alukach merged 2 commits into
mainfrom
feat/gcs-backend

Conversation

@alukach

@alukach alukach commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What

Enables the Google Cloud Storage backend in the data proxy so source.coop data connections with provider: "gcs" resolve to a real storage client instead of erroring.

Changes (Cargo.toml / Cargo.lock only)

  1. gcp feature on multistore and multistore-cf-workersBackendType::Gcs builds a GoogleCloudStorageBuilder instead of returning ConfigError("GCS backend support not enabled").
  2. ring wasm32_unknown_unknown_js feature (via a direct wasm-target entry): object_store's GCS credential module signs JWTs with ring::rand::SystemRandom, whose SecureRandom impl on wasm32-unknown-unknown is gated behind that ring feature (enables getrandom 0.2's js backend). Without it the Workers build fails to compile:
    error[E0277]: the trait bound `SystemRandom: SecureRandom` is not satisfied
      --> object_store-0.13.2/src/gcp/credential.rs
    
    ring is transitive (via object_store); this only turns the feature on for the wasm target.

Runtime note

source.coop uses keyless Workload Identity Federation for GCS, so the RSA private-key signing path isn't exercised at runtime — but the code must compile, which this enables. (getrandom's js backend maps to Web Crypto, which the Workers runtime provides, so it's also safe if ever hit.)

Pairs with

source-cooperative/source.coop#453 — aligns the persisted provider value to "gcs" (the string this backend accepts).

Verification

cargo check + cargo clippy -D warnings + cargo fmt --check for wasm32-unknown-unknown, and the full cargo test suite — all pass.

🤖 Generated with Claude Code

alukach and others added 2 commits July 22, 2026 10:56
…igning)

Enable the `gcp` feature on `multistore` and `multistore-cf-workers` so
`BackendType::Gcs` builds a GoogleCloudStorageBuilder instead of erroring
with "GCS backend support not enabled". This lets source.coop data
connections with provider "gcs" reach an actual storage client.

object_store's GCS credential module signs JWTs with ring's SystemRandom,
whose SecureRandom impl on wasm32-unknown-unknown is gated behind ring's
`wasm32_unknown_unknown_js` feature. ring is a transitive dep, so opt into
that feature via a direct wasm-target entry; without it the Workers build
fails to compile. (source.coop uses keyless Workload Identity Federation,
so the signing path isn't exercised at runtime, but the code must compile.)

Verified: cargo check + clippy (-D warnings) + fmt all pass for
wasm32-unknown-unknown.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Claude finished @alukach's task in 51s —— View job


Review of PR #191

✅ No blocking issues — safe to merge.

  • The change is scoped purely to Cargo.toml/Cargo.lock — no application logic changes in this repo, so there's no business-logic to break.
  • Cargo.toml:69ring is correctly declared only under [target.'cfg(target_arch = "wasm32")'.dependencies], so the added wasm32_unknown_unknown_js feature is scoped to the wasm target and won't affect the native cargo test build.
  • Cargo.lock resolves ring to 0.17.14, which satisfies the new "0.17" requirement — consistent with the version already pulled in transitively via object_store, so no version conflict.
  • gcp feature is added consistently to both multistore (native, Cargo.toml:38) and multistore-cf-workers (wasm, Cargo.toml:70), matching the existing azure feature pattern.
  • The security note in the PR body (keyless Workload Identity Federation means the RSA-signing/SystemRandom path isn't exercised at runtime, and getrandom's js backend maps to Web Crypto if it ever is) is accurate and reduces risk of the newly-enabled ring wasm path.
  • src/source_api/registry.rs:287 already normalizes "gcs"/"gs" provider strings, so this feature flag change is what's needed to make that path actually resolve to a real backend — consistent with the stated goal.

No correctness, security, or best-practice issues found.

@github-actions

Copy link
Copy Markdown

🚀 Latest commit deployed to https://source-data-proxy-pr-191.source-coop.workers.dev

  • Date: 2026-07-22T18:37:52Z
  • Commit: 66b5273

@alukach
alukach marked this pull request as ready for review July 22, 2026 18:46
@alukach
alukach enabled auto-merge (squash) July 22, 2026 18:47
@alukach
alukach disabled auto-merge July 22, 2026 18:47
@alukach
alukach merged commit 33f2b25 into main Jul 22, 2026
14 checks passed
@alukach
alukach deleted the feat/gcs-backend branch July 22, 2026 18:47
alukach pushed a commit that referenced this pull request Jul 27, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.3.0](v2.2.2...v2.3.0)
(2026-07-27)


### Features

* **backend:** enable GCS backend (multistore gcp + wasm-compatible
signing)
([#191](#191))
([33f2b25](33f2b25))
* **s3:** enforce conditional-write preconditions on PutObject
([003db0d](003db0d))
* **s3:** support server-side CopyObject via x-amz-copy-source
([97d5121](97d5121))
* **sts:** accept ARN-shaped alias for the _default role
([#185](#185))
([8da7e72](8da7e72))
* **sts:** accept AssumeRoleWithWebIdentity from form-encoded POST
bodies
([#196](#196))
([f77e8d2](f77e8d2))


### Bug Fixes

* **gcs:** pass bucket_name to multistore GCS store
([#193](#193))
([0efb66f](0efb66f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: source-release-bot[bot] <265100246+source-release-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant