You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
S3Proxy does not return the headers x-amz-server-side-encryption and x-amz-server-side-encryption-aws-kms-key-id which results in checksum validation failure in S3 clients:
Exception in thread "main" software.amazon.awssdk.core.exception.RetryableException: Data read has a different checksum than expected. Was 0x552e21cd4cd9918678e3c1a0df491bc3, but expected 0xcf11f39f138eb50ef4f7421706dfb29d. This commonly means that the data was corrupted between the client and service. Note: Despite this error, the upload still completed and was persisted in S3
As verification, I used AWS CLI which showed the difference between directly accessing the same bucket vs. via S3Proxy:
Note that when Server-side encryption with AWS Key Management Service keys (SSE-KMS) is applied, S3 clients (e.g. AWS CLI, AWS Java SDK V1 and V2) intelligently skip checksum validation if the above response haeders are returned. However, S3Proxy fails to do so therefore clients attempt to verify the checksum which will always fail as encryption alters ETags.
Workaround
As a quick workaround, we can tell the clients (serverSideEncryption(ServerSideEncryption.AWS_KMS)) that we are doing server side encryption. Here is a snippet using AWS SDK for Java 2.x:
Issue
S3Proxy does not return the headers
x-amz-server-side-encryption
andx-amz-server-side-encryption-aws-kms-key-id
which results in checksum validation failure in S3 clients:As verification, I used AWS CLI which showed the difference between directly accessing the same bucket vs. via S3Proxy:
Note that when Server-side encryption with AWS Key Management Service keys (SSE-KMS) is applied, S3 clients (e.g. AWS CLI, AWS Java SDK V1 and V2) intelligently skip checksum validation if the above response haeders are returned. However, S3Proxy fails to do so therefore clients attempt to verify the checksum which will always fail as encryption alters ETags.
Workaround
As a quick workaround, we can tell the clients (
serverSideEncryption(ServerSideEncryption.AWS_KMS)
) that we are doing server side encryption. Here is a snippet using AWS SDK for Java 2.x:The text was updated successfully, but these errors were encountered: