Skip to content

feat(encryption): [10/N] Read encrypted manifests - #4308

Open
xanderbailey wants to merge 1 commit into
apache:mainfrom
xanderbailey:xb/encryption-read-manifests
Open

xanderbailey wants to merge 1 commit into
apache:mainfrom
xanderbailey:xb/encryption-read-manifests

Conversation

@xanderbailey

Copy link
Copy Markdown
Contributor

Working towards #3222

Rationale for this change

Now that we can read encrypted manifest lists (#4159), we need to read the manifests they point to.

  • A manifest list entry's key_metadata holds the manifest's plaintext key metadata (key, AAD prefix and file length). That's safe because the manifest list holding it is itself encrypted, so reading a manifest doesn't need the EncryptionManager or the KMS.
  • ManifestFile.fetch_manifest_entry decrypts the manifest when key_metadata is set, matching iceberg-rust's ManifestReader ([8/N] feat(encryption) [8/N] Read encrypted manifest file iceberg-rust#2586). Every manifest read goes through it, so scans, inspect, validation and purge pick this up without changes.

This depends on #4296. iceberg-rust's manifest writer leaves out avro.codec, and we currently read a missing codec as gzip (#4295), so the iceberg-rust test below fails until that lands.

Are these changes tested?

Yes. An encrypted v3 manifest written by iceberg-rust is checked in under tests/table/encryption, and reading it returns its entries. There's also a round trip of an encrypted manifest, checking that a wrong key fails and that the encrypted bytes don't read as plaintext.

Are there any user-facing changes?

No. Nothing changes for unencrypted tables.

A manifest list entry's key_metadata is the plaintext key metadata of its
manifest, so fetch_manifest_entry decrypts with it when it is set, as
iceberg-rust's ManifestReader does.
@xanderbailey
xanderbailey marked this pull request as ready for review November 8, 2026 17:35

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant