Skip to content

fix(auth): Fail closed on query-auth tables outside the read boundary - #691

Merged
JingsongLi merged 1 commit into
apache:mainfrom
plusplusjiajia:query-auth-write-gate
Aug 15, 2026
Merged

fix(auth): Fail closed on query-auth tables outside the read boundary#691
JingsongLi merged 1 commit into
apache:mainfrom
plusplusjiajia:query-auth-write-gate

Conversation

@plusplusjiajia

@plusplusjiajia plusplusjiajia commented Aug 7, 2026

Copy link
Copy Markdown
Member

Purpose

CoreOptions::ensure_read_authorized() refuses a query-auth.enabled table 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 — public, reaching Python, returning the
partition values and column stats the DataFusion $partitions table already refuses to serve.

Brief change log

The gate is added at each entry point, at the narrowest one that still has the table. Two placements are worth a look:

  • TableWrite::new rather than DynamicBucketAssigner, which gets only a FileIO and 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_system rather than its three callers, since it is publicly re-exported and $partitions retries it directly when the catalog call fails.

Left ungated on purpose: TableCommit::abort, which deletes only the files the caller just wrote, and path-based readers like Manifest::read, which have no table options to consult.

@plusplusjiajia
plusplusjiajia force-pushed the query-auth-write-gate branch 2 times, most recently from 7ac60a2 to 8019cbc Compare August 7, 2026 13:52
@plusplusjiajia
plusplusjiajia marked this pull request as ready for review August 7, 2026 14:59
@plusplusjiajia plusplusjiajia changed the title fix[auth] Fail closed on query-auth tables in write, index and metadata paths fix(auth) Fail closed on query-auth tables in write, index and metadata paths Aug 14, 2026
@plusplusjiajia plusplusjiajia changed the title fix(auth) Fail closed on query-auth tables in write, index and metadata paths fix(auth): Fail closed on query-auth tables outside the read boundary Aug 14, 2026

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi
JingsongLi merged commit 992aced into apache:main Aug 15, 2026
13 checks passed
jerry-024 added a commit to jerry-024/paimon-rust that referenced this pull request Aug 17, 2026
* main:
  perf(vindex): size native batches by active indexes (apache#709)
  fix(data-evolution): require row tracking and row IDs (apache#718)
  feat(go): add table write bindings (apache#658)
  fix(scan): preserve Data Evolution file order in row-id groups (apache#717)
  fix(file_index): align file index format with Java V1 (apache#719)
  fix: configure OpenDAL writer chunk size (apache#713)
  fix(python): release GIL during catalog I/O (apache#716)
  feat(write): add fixed-bucket write primitives for postpone tables (apache#659)
  feat: rust examples for creating and querying Paimon tables (apache#648)
  fix(table): reject row ranges for format tables at read construction (apache#700)
  perf(arrow): prune IN predicates with row-group stats (apache#705)
  feat(io): support in-memory local cache (apache#710)
  fix(dlf): refresh expiring credentials (apache#714)
  fix(datafusion): normalize index_type in global index procedures (apache#715)
  fix(auth): fail closed on query-auth tables outside the read boundary (apache#691)

# Conflicts:
#	crates/paimon/src/table/vector_search_builder.rs
#	crates/paimon/src/vindex/reader.rs
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.

2 participants