rlamarche opened a new issue, #930:
URL: https://github.com/apache/arrow-rs-object-store/issues/930
**Describe the bug**
`GoogleCloudStorage::signed_url` and `GoogleCloudStorage::signed_url_opts`
produce URLs rejected by Google Cloud Storage with `403 SignatureDoesNotMatch`
whenever the object path contains RFC 3986 sub-delimiters such as `=` (for
example, Hive-partitioned keys like
`data/year=2026/month=12/day=03/file.parquet`).
This happens because:
1. `PathPart::from` (`src/path/parts.rs`) does not percent-encode RFC 3986
sub-delimiters like `=`.
2. `GoogleCloudStorageConfig::path_url` (`src/gcp/client.rs`) formats
`{base_url}/{bucket_name}/{path}` without strict RFC 3986 percent-encoding, and
`Url::parse` preserves `=` unencoded in `url.path()`.
3. `GCSAuthorizer::canonicalize_request` (`src/gcp/credential.rs`) passes
`url.path()` verbatim into the canonical request, leaving `=` unencoded,
whereas GCS percent-encodes `=` to `%3D` when verifying V4 signatures.
By contrast, AWS S3 signing in the same crate already encodes resource paths
with `STRICT_PATH_ENCODE_SET` (`STRICT_ENCODE_SET.remove(b'/')`).
**To Reproduce**
1. Configure a `GoogleCloudStorage` store with V4 signing credentials (e.g.
service account key).
2. Generate a signed URL (single-part `signed_url` or multipart `UploadPart`
via `signed_url_opts` with `partNumber` and `uploadId`) for a path containing
`=`:
```rust
let path = Path::from("data/year=2026/month=12/day=03/file.parquet");
let opts = SignedUrlOptions::default()
.with_query([("partNumber", "1"), ("uploadId", "<upload-id>")]);
let url = store
.signed_url_opts(Method::PUT, &path, Duration::from_secs(3600), &opts)
.await?;
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]