-
Notifications
You must be signed in to change notification settings - Fork 9
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
Decrypting non-encrypted content with AmazonS3EncryptionClientV2 #71
Comments
We would need to check:
|
Findings when using
Throws the exception Below is the stack trace:
Raw HTTPS response:
Testing using Java Make sure to add following dependencies in
Used below code:
It throws below exception:
Looks like both Java and .NET clients throw the same exception. Dive Deep:
|
We had contacted Crypto Tools team (which owns Java S3 Encryption client) and got the below response: The behavior to return plaintext violates the security guarantees of the library. A threat actor with write access to S3 can replace an encrypted object with a plaintext object, and the The current behavior makes sense. We would work on improving the error messaging to return exception with message like |
Discussed in #63
Originally posted by simenstensas September 30, 2024
Hi! I've upgraded to the latest preview of AmazonS3EncryptionClientV2 and so far it works out of the box with encrypted content.
However it fails when getting non-encrypted content with message "Amazon.Runtime.AmazonServiceException: Unable to decrypt data for object [object] in bucket [bucket]". Since the metadata contains information about whether the content is encrypted or not, could one just not decrypt it if no headers are found?
If this is not possible, what could be a solution for me?
The text was updated successfully, but these errors were encountered: