Skip to content

fix: honor GCS skip_signature during uploads - #861

Open
RanaPriyansh wants to merge 1 commit into
apache:mainfrom
RanaPriyansh:fix/gcp-skip-signature-520
Open

RanaPriyansh wants to merge 1 commit into
apache:mainfrom
RanaPriyansh:fix/gcp-skip-signature-520

Conversation

@RanaPriyansh

Copy link
Copy Markdown

Which issue does this PR close?

Closes #520.

Rationale for this change

GCS upload requests fetched credentials and added a Bearer header even when with_skip_signature(true) was set. Request::send bypassed the existing skip-aware credential helper.

What changes are included in this PR?

Route upload requests through GoogleCloudStorageConfig::get_credential() and the optional Bearer-auth helper. Add a mock-server regression that checks credential calls and Authorization headers with signing enabled and disabled.

Are there any user-facing changes?

GCS uploads with skip_signature=true no longer fetch credentials at request time or send an Authorization header. The public API is unchanged.

Validation:

  • The new regression failed on the upstream base: the skipped request called the credential provider, raising the count from 1 to 2.
  • The focused regression passed after the repair.
  • cargo test --features=aws,azure,gcp,http passed: 264 unit tests, 3 integration tests, 1 HTTP test, and 57 doctests. Six unit tests and two doctests were ignored.
  • Strict Clippy passed for --features gcp and --no-default-features --features gcp-base. Formatting and diff checks passed.
  • cargo test --features gcp had one unrelated doctest failure: a doctest imports Azure when the Azure feature is disabled. The doctest passed with the repository CI feature set above.

Live GCS and custom-connector behavior were not tested. Builder-time credential-file parsing is unchanged.

Codex used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GoogleCloudStorageBuilder with_skip_signature(true) still attempting to fetch credentials

1 participant