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

Compute hash of input bytestrings and include those in the completed CompleteMultipartUpload #37

Open
axman6 opened this issue Jan 8, 2023 · 1 comment

Comments

@axman6
Copy link
Owner

axman6 commented Jan 8, 2023

CompleteMultipartUpload has fields to include several hash digests, it wouldn't be hard in streamUpload to compute these from the data coming into the conduit and including that at the end. This should be easy to do efficiently with a combination of cryptonite and some of the modules in amazonka-core.

One big benefit of this is making testing simpler, at the moment I upload a file to S3, download it and check the hash matches; if the hash is computed from the input data and not anything internal to buffers etc, then Amazon will do the work of checking that the hash matches for us, and hopefully return an error if we ever mess up uploading.

@axman6
Copy link
Owner Author

axman6 commented Jan 8, 2023

Sadly it looks like this won't work how I hoped, AWS won't compute the checksum of the total object, only the checksum of the concatenated checksums. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html

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