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

multipart upload with sha256 checksum not working #656

Open
bitkid opened this issue Jun 19, 2024 · 1 comment
Open

multipart upload with sha256 checksum not working #656

bitkid opened this issue Jun 19, 2024 · 1 comment

Comments

@bitkid
Copy link

bitkid commented Jun 19, 2024

i create my parts for a CompleteMultipartUploadRequest like this

CompletedPart.builder().eTag(it.etag).partNumber(it.partNumber).checksumSHA256(it.sha256).build()

then i get the warning in the logs

2024-06-19 15:58:45.105 [S3Proxy-Jetty-163] WARN o.g.s.o.e.jetty.server.HttpChannel - handleException /scinteco-repong01/01026b95-149b-47fa-91a2-984b83b3ffb7/66a1d4fd-5840-40b6-ad9c-61f34a50ac64/6f532a25-05eb-4c3b-a85c-73f4fde84f4d com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "ChecksumSHA256" (class org.gaul.s3proxy.CompleteMultipartUploadRequest$Part), not marked as ignorable (2 known properties: "PartNumber", "ETag"])
at [Source: (org.gaul.shaded.org.eclipse.jetty.server.HttpInput); line: 1, column: 252] (through reference chain: org.gaul.s3proxy.CompleteMultipartUploadRequest["Part"]->java.util.ArrayList[0]->org.gaul.s3proxy.CompleteMultipartUploadRequest$Part["ChecksumSHA256"])

and an error like this
software.amazon.awssdk.services.s3.model.S3Exception: null (Service: S3, Status Code: 500, Request ID: 4442587FB7D0A2F9)

if i remove .checksumSHA256(it.sha256) it works but it does not work when i use the real S3 .. i get the error message

software.amazon.awssdk.services.s3.model.S3Exception: The upload was created using a sha256 checksum. The complete request must include the checksum for each part. It was missing for part 1 in the request. (Service: S3, Status Code: 400, Request ID: WA1T3TAEBD0VBATD, Extended Request ID: l+XMg35OSD9bsZ1AbuHZWOcWW9BIUt1B2DOL8bNzz9yeSgtuFGbCdPn8jc+sVTt96bpuq1yne8NpuHrhVKbsBtFZMj0f8ttFJ7CnhgdaOAg=)

@bitkid
Copy link
Author

bitkid commented Jun 19, 2024

as a workaround i added the class org.gaul.s3proxy.CompleteMultipartUploadRequest and added
@JacksonXmlProperty(localName = "ChecksumSHA256")
String sha;
to the part

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

1 participant