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

fix the signing config #336

Merged
merged 3 commits into from
Feb 26, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix the signing config
  • Loading branch information
TingDaoK committed Feb 26, 2025
commit 37a7f3b16507fa69e4fb8eb5614ca01c7341f47c
10 changes: 9 additions & 1 deletion s3transfer/crt.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,14 +895,22 @@ def _default_get_make_request_args(
) and accesspoint_arn_details['region'] == "":
# Configure our region to `*` to propogate in `x-amz-region-set`
# for multi-region support in MRAP accesspoints.
# use_double_uri_encode and should_normalize_uri_path are defaulted to be True
# But SDK already encoded the URI, and it's for S3, so set both to False
make_request_args['signing_config'] = AwsSigningConfig(
algorithm=AwsSigningAlgorithm.V4_ASYMMETRIC,
region="*",
use_double_uri_encode=False,
should_normalize_uri_path=False
)
call_args.bucket = accesspoint_arn_details['resource_name']
elif is_s3express_bucket(call_args.bucket):
# use_double_uri_encode and should_normalize_uri_path are defaulted to be True
# But SDK already encoded the URI, and it's for S3, so set both to False
make_request_args['signing_config'] = AwsSigningConfig(
algorithm=AwsSigningAlgorithm.V4_S3EXPRESS
algorithm=AwsSigningAlgorithm.V4_S3EXPRESS,
use_double_uri_encode=False,
should_normalize_uri_path=False
)
return make_request_args

Expand Down
Loading