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

Fix s3 envelope encryption #669

Merged
merged 9 commits into from
Oct 8, 2021

Conversation

endgame
Copy link
Collaborator

@endgame endgame commented Oct 7, 2021

This builds on @andreyk0 's previous branch, but clears up all the merge conflicts, modernises the conduit usage and avoids reimplementing some functions already provided by conduit.

Tested using https://github.com/gilt/kms-s3/ which also needed updating but that's not our responsibility.

Tested: smaller files (<8192b) and larger files containing random data, including lengths not divisible by powers of 2 (so padding at the end should be right). Their sha256sum matched after roundtrip put/get. Also fetched the stored object directly off S3 and verified that its has was different, so it's actually doing something.

Fixes #393
Closes #405

@endgame endgame added this to the 2.0 RC 1 milestone Oct 7, 2021
Copy link
Owner

@brendanhay brendanhay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a bunch for doing this! Just for posterity, this package won't be released to hackage as part of 2.0/RC, I'm particularly hesitant to encourage the use of cryptography in Haskell for the average user. The library should probably come with a big(er) fat(er) disclaimer in the readme + description.

@endgame
Copy link
Collaborator Author

endgame commented Oct 8, 2021

Yep, I'm cool with your policy of keeping amazonka-s3-encryption off Hackage until it's either vetted or gets louder "use at own risk" warnings. Should I drop the changelog entry from the PR?

@brendanhay
Copy link
Owner

Might as well keep it around - it's a weird changelog in the sense it represents the entire monorepo, not only amazonka - but is displayed on hackage as part of the latter.

@endgame endgame merged commit ca9540e into brendanhay:develop Oct 8, 2021
@endgame endgame deleted the fix-s3-envelope-encryption branch October 8, 2021 08:11
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.

kms / s3 encrypted object fails to decrypt when getting it back
2 participants