Repository navigation
feat(encryption): add EncryptionManager and StandardEncryptionManager - #1071
Open
shangxinli wants to merge 2 commits into
Open
shangxinli wants to merge 2 commits into
shangxinli wants to merge 2 commits into
Conversation
- EncryptionManager (core): per-table interface to generate key metadata, open AES GCM Stream files for reading and writing, and encrypt and decrypt manifest list key metadata. - EncryptionManagerRegistry (core): creates the manager of an encrypted table from the trusted table key ID, the table's encryption-keys and the catalog's KMS client. The bundle registers the implementation, so the core library has no crypto dependency. - StandardEncryptionManager (bundle): Java's envelope encryption. Key encryption keys are wrapped by the table master key in the KMS, timestamped, used for 730 days and then rotated; manifest list key metadata is encrypted by a KEK with the KEK timestamp as AAD. Unwrapped KEKs are cached for one hour. Thread-safe. - encryption::RegisterAll() / IsEncryptionAvailable() in the bundle; a no-op when built with ICEBERG_ENCRYPTION=OFF. Adds the Java-written encrypted table fixture under test/resources/encryption/table. Tests decrypt the manifest list key metadata of every Java snapshot and check that its file length is the stored size of the manifest list.
Resolves modernize-use-designated-initializers clang-tidy warnings.
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 the envelope encryption stack for #988.
Adds
EncryptionManager/EncryptionManagerRegistry(the pluggable manager interfaceand factory) and
StandardEncryptionManager, the envelope encryption manager compatiblewith Java's
StandardEncryptionManager:every 730 days (NIST SP 800-57), manifest-list key metadata AES-GCM encrypted by a KEK
with the KEK timestamp as AAD.
Gated behind
ICEBERG_ENCRYPTION, registered in CMakeLists.txt, with a newcrypto_testtarget covering manifest-list key decryption against a Java-produced fixture, key
registration/decryption round trips, KEK rotation, and unwrapped-key cache expiry.