-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-10784. Multipart upload to encrypted bucket fails with ClassCastException #6618
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
Conversation
ivandika3
left a comment
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.
Thank you for the fix. LGTM +1.
I also saw some other explicit casting instances in ObjectEndpointStreaming:
ObjectEndpointStreaming#putKeyWithStreamObjectEndpointStreaming#copyKeyWithStreamObjectEndpointStreaming#createMultipartKey
The wrapping for createStreamKey and createMultipartStreamKey:
- OzoneDataStreamOutput
- KeyDataStreamOutput (non-secure case)
- OzoneOutputStream (secure case)
- CryptoOutputStream (FileEncryptionInfo specified)
- KeyDataStreamOutput
- OzoneOutputStream (FileEncryptionInfo not specified, but GDPR enabled)
- CipherOutputStreamOzone
- KeyDataStreamOutput
- CipherOutputStreamOzone
- CryptoOutputStream (FileEncryptionInfo specified)
I think should be fine to leave it be since these cases did not cast CryptoOutputStream to KeyMetadataAware directly. However, I think we can remove the unnecessary KeyMetadataAware casting from these methods, but I'm also fine to leave it as it is.
Another possible solution might be to extend CryptoOutputStream to support the KeyMetadataAware and delegate it to the wrapped stream, but it might entails a lot of change.
|
Thanks @ivandika3 for the review.
Thanks for pointing those out. I'll remove them as part of HDDS-10791. |
hemantk-12
left a comment
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.
Thanks @adoroszlai for the quick fix.
LGTM+1.
|
Thanks @hemantk-12, @ivandika3 for the review. |
…Exception (apache#6618) (cherry picked from commit a368769)
…Exception (apache#6618) (cherry picked from commit a368769)
…Exception (apache#6618) (cherry picked from commit a368769)
…Exception (apache#6618) (cherry picked from commit a368769)
…Exception (apache#6618) (cherry picked from commit a368769)
…Exception (apache#6618) (cherry picked from commit a368769)
What changes were proposed in this pull request?
Fix exception:
Steps to reproduce:
https://issues.apache.org/jira/browse/HDDS-10784
How was this patch tested?
Added acceptance test coverage for S3 with Ratis streaming disabled in encrypted bucket in
ozonesecureenvironment.ozonesecure-hacovers the same with Ratis streaming enabled.CI:
https://github.com/adoroszlai/ozone/actions/runs/8920571448