Skip to content

Commit 66bd3d0

Browse files
authored
Add disableNormalizePath when resolving auth_scheme for s3 (#3072)
1 parent 8d5d7e1 commit 66bd3d0

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

gems/aws-sdk-core/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Unreleased Changes
22
------------------
33

4+
* Issue - Add `disableNormalizePath` when resolving auth_scheme for S3.
5+
46
3.201.2 (2024-07-18)
57
------------------
68

gems/aws-sdk-core/lib/aws-sdk-core/endpoints.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ def resolve_auth_scheme(context, endpoint)
4242
def merge_signing_defaults(auth_scheme, config)
4343
if %w[sigv4 sigv4a sigv4-s3express].include?(auth_scheme['name'])
4444
auth_scheme['signingName'] ||= sigv4_name(config)
45+
46+
# back fill disableNormalizePath for S3 until it gets correctly set in the rules
47+
if auth_scheme['signingName'] == 's3' &&
48+
!auth_scheme.include?('disableNormalizePath') &&
49+
auth_scheme.include?('disableDoubleEncoding')
50+
auth_scheme['disableNormalizePath'] = auth_scheme['disableDoubleEncoding']
51+
end
4552
if auth_scheme['name'] == 'sigv4a'
4653
# config option supersedes endpoint properties
4754
auth_scheme['signingRegionSet'] =

gems/aws-sigv4/lib/aws-sigv4/signer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ class Signer
138138
# but is treated as "unsigned" and does not contribute
139139
# to the authorization signature.
140140
#
141-
# @option options [Boolean] :normalize_path (true) (Supported only when `aws-crt` is available)
142-
# When `true`, the uri paths will be normalized when building the canonical request
141+
# @option options [Boolean] :normalize_path (true) When `true`, the
142+
# uri paths will be normalized when building the canonical request.
143143
def initialize(options = {})
144144
@service = extract_service(options)
145145
@region = extract_region(options)

0 commit comments

Comments
 (0)