Repository navigation
feat(encryption): [15/N] Reject writes to encrypted tables - #4478
Open
xanderbailey wants to merge 1 commit into
Open
xanderbailey wants to merge 1 commit into
xanderbailey wants to merge 1 commit into
Conversation
Snapshot producers raise for tables with encryption.key-id, so nothing commits plaintext manifests to an encrypted table before encrypted manifest and manifest list writes are wired up. Metadata-only updates are still allowed.
xanderbailey
commented
Nov 24, 2026
Comment on lines
+167
to
+169
| from pyiceberg.encryption.manager import _reject_encrypted_writes | ||
|
|
||
| _reject_encrypted_writes(transaction.table_metadata) |
Contributor
Author
There was a problem hiding this comment.
I think this spot makes the most sense to block this, everything in the library goes through here today and hopefully we won't have to block this for long!
xanderbailey
marked this pull request as ready for review
November 24, 2026 18:00
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.
Working towards #3222
Rationale for this change
Writes to a table with
encryption.key-idnow raiseNotImplementedErroruntil encrypted manifests and manifest lists are wired into commits. Otherwise, once v3 manifest writing (#3624) lands, a commit would write plaintext manifests, holding the data file keys, to an encrypted table.The check is in the snapshot producer, which writes the manifests, so it runs before any are written. Metadata-only updates are still allowed.
This will allow us to hookup the KMS service through the catalog without worry of people writing unencrypted files to an encrypted table.
Are these changes tested?
Yes, append, overwrite and delete raise on an encrypted table without writing any files, and a property update still works.
Are there any user-facing changes?
Writes to encrypted tables raise
NotImplementedError.