fix[auth] Fail closed on query-auth tables in write, index and metadata paths - #691
Open
plusplusjiajia wants to merge 1 commit into
Open
fix[auth] Fail closed on query-auth tables in write, index and metadata paths#691plusplusjiajia wants to merge 1 commit into
plusplusjiajia wants to merge 1 commit into
Conversation
plusplusjiajia
force-pushed
the
query-auth-write-gate
branch
from
August 7, 2026 13:01
59adc0c to
7ac60a2
Compare
plusplusjiajia
force-pushed
the
query-auth-write-gate
branch
from
August 7, 2026 13:52
7ac60a2 to
8019cbc
Compare
plusplusjiajia
marked this pull request as ready for review
August 7, 2026 14:59
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.
Purpose
CoreOptions::ensure_read_authorized()refuses aquery-auth.enabledtable because this client cannot enforce the server's row filter or column masking. It sits on the read boundary, so paths that read without crossing it are never gated: rewrites, index builds and drops, bucket assignment, commits, and partition listing.Table::partition_stats()is the clearest case — it is public, reaches Python, and returns the partition values and column stats the DataFusion$partitionstable already refuses to serve.Brief change log
The gate is added at each of those entry points, at the narrowest one that still has the table. Two placements are worth a look:
TableWrite::newrather thanDynamicBucketAssigner, which gets only aFileIOand a location. It refuses every write, not just dynamic-bucket ones: the commit is blocked anyway, so failing at open avoids writing files that can never be committed.list_partitions_from_file_systemrather than its three callers, since it is publicly re-exported and$partitionsretries it directly when the catalog call fails.paimon-rest-servershares it and now answers501, which is the right answer from a dev server that implements no authorization.Left ungated on purpose:
TableCommit::abort, which deletes only the files the caller just wrote; and path-based readers likeManifest::readthat take aFileIOand a location, which have no table options to consult.