Repository navigation
feat(encryption): add EncryptingFileIO - #1207
Open
shangxinli wants to merge 2 commits into
Open
shangxinli wants to merge 2 commits into
shangxinli wants to merge 2 commits into
Conversation
Member
|
The failure was because of the merging of |
EncryptingFileIO is the FileIO of an encrypted table: the catalog's FileIO paired with the table's EncryptionManager. Plain calls pass through unchanged (unencrypted files, and Parquet files, which are encrypted natively). AES GCM Stream files are handled as follows: - ForFile(io, key_metadata) / ForKeyMetadata(key_metadata): a decrypting view for a file whose key metadata is known (manifests, Avro data files, Puffin files). It wraps the raw file in an EncryptedInputFile and decrypts it through EncryptionManager::Decrypt. - NewEncryptingOutputFile(path): wraps a new output file through EncryptionManager::Encrypt and returns the EncryptedOutputFile, whose key metadata the caller records once writing is complete. This mirrors Java's EncryptingFileIO.newEncryptingOutputFile. The Arrow I/O adapter unwraps an EncryptingFileIO for plain reads and writes, so Arrow file systems keep their fast path.
shangxinli
force-pushed
the
pr-enc07-encrypting-file-io
branch
from
December 3, 2026 18:34
3def6f2 to
88ca2fc
Compare
… get a compile database
This branch has not been deployed
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.
Part of #988 (step 7 of the task breakdown), following #1071.
EncryptingFileIOis theFileIOof an encrypted table: the catalog'sFileIOpaired with the table'sEncryptionManager. It mirrors Java'sEncryptingFileIO.FileIOunchanged, which covers unencrypted files and Parquet files (encrypted natively by the format).ForFile/ForKeyMetadatareturn a decrypting view for a file whose key metadata is known (manifests, Avro data files, Puffin files). The view wraps the raw file in anEncryptedInputFileand decrypts it throughEncryptionManager::Decrypt.NewEncryptingOutputFilewraps a new output file throughEncryptionManager::Encryptand returns theEncryptedOutputFile, so the caller can record the generated key metadata once writing completes.EncryptingFileIOfor plain reads and writes, so Arrow file systems keep their fast path. Decrypting views are not unwrapped.Not in this PR: reading a manifest list by snapshot key id. That needs the manifest list key unwrap in the bundle-only
EncryptionUtil, so it comes with the manifest list reader.Tests: unit tests with a recording
EncryptionManagerinencryption_test, and an AES GCM Stream write/read round trip throughStandardEncryptionManagerand the Arrow adapter incrypto_test.🤖 Generated with Claude Code