apache / apache/arrow-rs-object-store
Default headers not signed for CompleteMultipartUpload
- Dominant language
- Rust
- Stars
- 322
- Forks
- 212
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 10
Description
**Describe the bug**
When doing a multi-part upload with custom default headers, I got error
```
AccessDeniedThere were headers present in the request which were not signedx-amz-source-arn, x-amz-source-account
```
**To Reproduce**
```
use object_store::ClientOptions;
use object_store::HeaderMap;
use object_store::ObjectStoreExt;
use object_store::aws::AmazonS3Builder;
use object_store::path::Path;
#[tokio::main]
async fn main() {
let mut headers = HeaderMap::new();
headers.insert("x-amz-source-account", "123456789111".parse().unwrap());
headers.insert(
"x-amz-source-arn",
"arn:aws:s3:::source-bucket"
.parse()
.unwrap(),
);
let client = AmazonS3Builder::from_env()
.with_bucket_name("bucket-name")
.with_region("us-east-1")
.with_client_options(ClientOptions::new().with_default_headers(headers))
.build()
.unwrap();
let mut upload = client.put_multipart(&Path::from("test-mpu")).await.unwrap();
let res = upload.complete().await.unwrap();
println!("Upload complete: {:?}", res);
}
```
**Expected behavior**
Headers are signed. No error.
**Additional context**
Contributor guide
Research direction
Start from the AmazonS3Builder and put_multipart(...).complete() flow shown in the reproduction, then trace how the CompleteMultipartUpload request is signed. Reproduce the failure with the provided default headers and verify that both x-amz-source-arn and x-amz-source-account are included in the signature and the completion succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, rust
- Domain
- cloud, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100