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

docs: detail on integrity checks #65

Open
udf2457 opened this issue Sep 27, 2023 · 4 comments
Open

docs: detail on integrity checks #65

udf2457 opened this issue Sep 27, 2023 · 4 comments
Milestone

Comments

@udf2457
Copy link

udf2457 commented Sep 27, 2023

Looking through the codebase, it looks like lightningstream does not use the Content-MD5 header in S3-compatible APIs in order to ensure end-to-end integrity of blobs uploaded.

It would be nice to have a couple of paragraphs in the docs as to how lightningstream approaches this.

@wojas
Copy link
Member

wojas commented Sep 27, 2023

Lightning Stream uses https://github.com/PowerDNS/simpleblob for object storage, which uses https://github.com/minio/minio-go for S3 storage.

@udf2457
Copy link
Author

udf2457 commented Sep 27, 2023

Sure, I looked briefly through that code yesterday. However you need to explicitly set the MD5 option in the minio-go struct when calling it and - as far as I can tell after a quick glance - simpleblob is neither calculating the MD5 or calling minio-go with the MD5 option.

Sending Content-MD5 is highly recommended, because otherwise the receiving S3 service has no way of ensuring integrity. With Content-MD5, the S3 service caluclates MD5 and compares it against the MD5 provided in Content-MD5, and so you therefore have a high level of confidence that what you uploaded is what was stored.

@wojas
Copy link
Member

wojas commented Sep 27, 2023

Thanks, I added PowerDNS/simpleblob#49 for this and added it to the next patch release milestone.

@udf2457
Copy link
Author

udf2457 commented Sep 27, 2023

Thanks @wojas !

@ahouene ahouene modified the milestones: v0.4.3, v0.4.4 Apr 9, 2024
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

3 participants