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

Failing S3 move and copy operations with SSE-C #500

Open
dw7o opened this issue Feb 7, 2025 · 1 comment
Open

Failing S3 move and copy operations with SSE-C #500

dw7o opened this issue Feb 7, 2025 · 1 comment

Comments

@dw7o
Copy link

dw7o commented Feb 7, 2025

We use S3 and SSE-C to encrypt the objects stored in the remote S3 repository.
I've initialized the S3Client accordingly with:

extra_args={
    "SSECustomerKey": sse_c_key,
    "SSECustomerAlgorithm": "AES256",
    "CopySourceSSECustomerKey": sse_c_key,
    "CopySourceSSECustomerAlgorithm": "AES256",
}

Reading and writing objects worked that way but copying and moving (= copy and delete) do not: the CopySourceSSECustomerKey and CopySourceSSECustomerAlgorithm are not passed to the copy operation.

If I saw it correctly, the reason is that in s3client.py:298 the property boto3_ul_extra_args is used, which ensures that all extra arguments match the list S3Transfer.ALLOWED_UPLOAD_ARGS (coming from TransferManager.ALLOWED_DOWNLOAD_ARGS). Unfortunately, the Copy* attributes are not included there but in TransferManager.ALLOWED_COPY_ARGS.

Would it be possible to use the ALLOWED_COPY_ARGS there? Or is this restricted intentionally?

@dw7o dw7o changed the title S3 move and copy operations with SSE-C Failing S3 move and copy operations with SSE-C Feb 7, 2025
@pjbull
Copy link
Member

pjbull commented Feb 11, 2025

Thanks!

We'd take a fix that additionally creates boto3_cp_extra_args with TransferManager.ALLOWED_COPY_ARGS and uses that in the copy call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants