Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using --region option results in 400 error reply reading location for buckets #11827

Closed
cyberduck opened this issue Sep 26, 2021 · 1 comment
Closed
Labels
bug fixed s3 AWS S3 Protocol Implementation
Milestone

Comments

@cyberduck
Copy link
Collaborator

@dkocher created the issue

Using --region eu-west-1 using Cyberduck CLI results in requests with the authorization header malformed using this default region instead of the expected us-east-1 from AWS for some requests.

The authorization header is malformed; the region 'eu-west-1' is wrong; expecting 'us-east-1'

Such as in

> GET /?location= HTTP/1.1
> Date: Sun, 26 Sep 2021 09:10:18 GMT
> x-amz-request-payer: requester
> x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
> Host: static.cyberduck.ch.s3.amazonaws.com
> x-amz-date: 20210926T091018Z
> Authorization: ********
> Connection: Keep-Alive
> User-Agent: Cyberduck/8.0.0-SNAPSHOT.35836 (Mac OS X/11.6) (x86_64)
< HTTP/1.1 400 Bad Request
< x-amz-request-id: 7T88HFP23DFETSEW
< x-amz-id-2: H0GZDbyXAA5a3TwyP0i8ghkQtxBPsq6YyLSUPfeOwUuUUanZmHQb/PCkWamSsSbLYj/WOqetSPg=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Sun, 26 Sep 2021 09:10:18 GMT
< Server: AmazonS3
< Connection: close

It seems to query the location of a bucket we should always sign this request with the us-east-1 region. This is the default when the explicit --region parameter is omitted. Alternatively send the request to the specific region as all region endpoints should support determining the bucket location.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

In e77f1e2.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed s3 AWS S3 Protocol Implementation
Projects
None yet
Development

No branches or pull requests

1 participant