Skip to content

Commit

Permalink
Add user provided SSE-C arguments to CompleteMultipartUpload call
Browse files Browse the repository at this point in the history
  • Loading branch information
nateprewitt committed Sep 22, 2023
1 parent 1eef558 commit 6969d8e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-SSEC-19962.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "``SSE-C``",
"description": "Pass SSECustomer* arguements to CompleteMultipartUpload for upload operations\""
}
7 changes: 6 additions & 1 deletion s3transfer/copies.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ class CopySubmissionTask(SubmissionTask):
'TaggingDirective',
]

COMPLETE_MULTIPART_ARGS = ['RequestPayer', 'ExpectedBucketOwner']
COMPLETE_MULTIPART_ARGS = [
'RequestPayer',
'ExpectedBucketOwner',
'SSECustomerKey',
'SSECustomerAlgorithm',
]

def _submit(
self, client, config, osutil, request_executor, transfer_future
Expand Down
7 changes: 6 additions & 1 deletion s3transfer/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,12 @@ class UploadSubmissionTask(SubmissionTask):
'ExpectedBucketOwner',
]

COMPLETE_MULTIPART_ARGS = ['RequestPayer', 'ExpectedBucketOwner']
COMPLETE_MULTIPART_ARGS = [
'RequestPayer',
'ExpectedBucketOwner',
'SSECustomerKey',
'SSECustomerAlgorithm',
]

def _get_upload_input_manager_cls(self, transfer_future):
"""Retrieves a class for managing input for an upload based on file type
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_s3transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ def test_multipart_upload_injects_proper_kwargs(self):
Bucket='bucket',
UploadId='upload_id',
Key='key',
SSECustomerKey='fakekey',
SSECustomerAlgorithm='AES256',
)

def test_multipart_upload_is_aborted_on_error(self):
Expand Down

0 comments on commit 6969d8e

Please sign in to comment.