-
Notifications
You must be signed in to change notification settings - Fork 16
feat: implement BufferedCipherSubscriber to enforce buffered decrypti… #99
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
texastony
reviewed
Mar 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 Blocking Question.
CipherPublisher plaintextPublisher = new CipherPublisher(cipher, ciphertextPublisher, getObjectResponse.contentLength(), desiredRange, contentMetadata.contentRange(), algorithmSuite.cipherTagLengthBits()); | ||
wrappedAsyncResponseTransformer.onStream(plaintextPublisher); | ||
if (algorithmSuite.equals(AlgorithmSuite.ALG_AES_256_CBC_IV16_NO_KDF) || _enableDelayedAuthentication) { | ||
// CBC and GCM with delayed auth enabled use a standard publisher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Praise: I love clarifying comments.
src/main/java/software/amazon/encryption/s3/internal/BufferedCipherSubscriber.java
Outdated
Show resolved
Hide resolved
…round legacy wrapping mode in GetEncryptedObjectPipeline
texastony
approved these changes
Mar 8, 2023
…d code around legacy wrapping mode in GetEncryptedObjectPipeline" This reverts commit 346c57b.
…nto delayed-auth-async-fix
texastony
approved these changes
Mar 8, 2023
aws-crypto-tools-ci-bot
pushed a commit
that referenced
this pull request
Mar 13, 2023
## [2.3.0](v2.2.0...v2.3.0) (2023-03-13) ### Features * implement BufferedCipherSubscriber to enforce buffered decrypti… ([#99](#99)) ([87411c8](87411c8)) ### Maintenance * add a new test class for ranged gets using the CRT client ([#104](#104)) ([9b244be](9b244be)) ### Fixes * handle contentLength in request object ([#106](#106)) ([58ee9bc](58ee9bc)) * regression in ranged gets when using buffered subscriber ([#107](#107)) ([ebcddbf](ebcddbf)) * remove duplicate call to appendTestPrefix in deleteObjects ([#97](#97)) ([62953a6](62953a6)) * Revert "feat: Add S3CrtAsyncClient as MultipartPutobject ([#90](#90))" ([#103](#103)) ([93011f2](93011f2)) * update README to reflect option split ([#105](#105)) ([5efabf8](5efabf8))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…on of GCM
Issue #, if available:
Description of changes:
To avoid release of unauthenticated plaintext, it must be buffered until
doFinal
is called, as this is when the GCM auth tag is verified. This is done by simply enqueuing the ByteBuffers passing through the decrypting subscriber, then forwarding them to the wrapped subscriber oncedoFinal
has been called.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.