Skip to content

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

Open
@dw7o

Description

@dw7o

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions