feat(encryption): write encrypted parquet data files#2701
Open
aarushigupta132 wants to merge 4 commits into
Open
feat(encryption): write encrypted parquet data files#2701aarushigupta132 wants to merge 4 commits into
aarushigupta132 wants to merge 4 commits into
Conversation
xanderbailey
left a comment
Contributor
There was a problem hiding this comment.
Thanks carrying the flame on the encryption work. Have made a couple of comments to get us started.
| Encrypted(EncryptedOutputFile), | ||
| } | ||
|
|
||
| impl OutputTarget { |
Contributor
There was a problem hiding this comment.
We should by able to avoid this enum, parquet doesn’t use streaming encryption, it uses parquet PME so it should have a plan text writer
| async fn writer(&self) -> Result<Box<dyn FileWrite>> { | ||
| match self { | ||
| Self::Plain(o) => o.writer().await, | ||
| Self::Encrypted(e) => e.writer().await, |
Contributor
There was a problem hiding this comment.
Here we we don’t want stream encryption
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
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.
Which issue does this PR close?
What changes are included in this PR?
Adds
build_encryptedonParquetWriterBuilderthat takes anEncryptedOutputFileand produces aParquetWriterAES-GCM-encrypting each parquet block as it streams.This is the data-file write counterpart to the manifest-list work in #2677, using the same
EncryptionManager::encryptflow.Are these changes tested?
Tests: writes an encrypted parquet file via
build_encrypted, reads it back throughEncryptedInputFile, and asserts the rows match and the key metadata round-trips.