swift/swift/common/middleware/s3api
arzhna 3a6e85d9ec s3api: Allow lower-cased region name for AWS .NET SDK compatibility
When I call the S3 API using the AWS .NET SDK, I get the following error.

An error occurred (AuthorizationHeaderMalformed) when calling the
ListBuckets operation: The authorization header is malformed;
the region 'regionone' is wrong; expecting 'RegionOne'

The reason is that the AWS .NET SDK generates a signature by changing
the region name to lowercase. (AWS region names are all lowercase.)
The default region name of OpenStack is RegionOne, and custom region
names with capital letters can also be used.
If you set the location of the S3 API to a region name containing
uppercase letters, the AWS .NET SDK cannot be used.

There are two ways to solve this problem.

1. Force the location item of S3 API middleware setting to be set
   to lower case.
2. If the request contains credentail parameters that contain the
   lowercase region name, the region name of string_to_sign is
   modified to lowercase to generate a valid signature.

I think the second way is to make it more compatible.

Closes-Bug: #1888444
Change-Id: Ifb58b854b93725ed2a1e3bbd87f447f2ab40ea91
2020-07-28 08:47:51 +09:00
..
controllers s3api: Allow CompleteMultipartUpload requests to be retried 2020-06-24 10:09:26 -07:00
schema S3Api: handle non-ASCII markers in v1 listings. 2019-05-08 12:17:38 -07:00
__init__.py Import swift3 into swift repo as s3api middleware 2018-04-27 15:53:57 +09:00
acl_handlers.py s3api: Implement object versioning API 2020-01-28 14:00:08 -08:00
acl_utils.py Import swift3 into swift repo as s3api middleware 2018-04-27 15:53:57 +09:00
etree.py Remove lxml deprecated methods 2020-06-23 13:32:22 +02:00
exception.py Import swift3 into swift repo as s3api middleware 2018-04-27 15:53:57 +09:00
s3api.py doc: Fix the swift middleware doc needs more info to set s3 api 2019-09-05 23:42:36 +08:00
s3request.py s3api: Allow lower-cased region name for AWS .NET SDK compatibility 2020-07-28 08:47:51 +09:00
s3response.py s3api: Implement object versioning API 2020-01-28 14:00:08 -08:00
s3token.py Merge "s3token: Raise error on negative secret_cache_duration config" 2020-01-31 19:03:56 +00:00
subresource.py We don't have to keep the retrieved token anymore 2019-05-09 11:21:00 -07:00
utils.py s3api: Allow CompleteMultipartUpload requests to be retried 2020-06-24 10:09:26 -07:00