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

Update s3.go to enable content-md5 #50

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Update s3.go to enable content-md5 #50

merged 1 commit into from
Sep 28, 2023

Conversation

udf2457
Copy link
Contributor

@udf2457 udf2457 commented Sep 27, 2023

Per #49

If my understanding is correct, the MiniO library actually does most of the heavy-lifting for you so all that should be needed is setting the putObjectOptions.SendContentMd5 flag and the MinIO library will automagically do the rest for you, which makes enabling this enhancement pretty easy.

I have worked on the assumption that the desired default behaviour is to enable sending Content-MD5 since doing so has significant benefits (upload integrity) and minimal downsides (on modern processors calculating MD5 should not be a demanding task). But I have attempted to add a way for people to disable sending it if they feel they need to.

N.B. I am not overly familiar with the simpleblob codebase so its possible I might have missed another section of code that needs to be "touched" but as I understand everything calls doStore() in the end.

Add call to minio putObjectOptions.SendContentMd5 to enable sending of content-md5 header for end-to-end integrity checking.
@ahouene ahouene added this to the v0.2.6 milestone Sep 28, 2023
@ahouene ahouene linked an issue Sep 28, 2023 that may be closed by this pull request
@ahouene
Copy link
Contributor

ahouene commented Sep 28, 2023

LGTM. Thank you for this :)

I'll make a v0.2.6 release now. You can open a PR for lightningstream with the upgrade so you have full credits!

@ahouene ahouene merged commit 3666dc4 into PowerDNS:main Sep 28, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

S3: Send a Content-MD5 header to ensure data integrity
2 participants