Skip to content

fix[auth] Fail closed on query-auth tables in write, index and metadata paths - #691

Open
plusplusjiajia wants to merge 1 commit into
apache:mainfrom
plusplusjiajia:query-auth-write-gate
Open

fix[auth] Fail closed on query-auth tables in write, index and metadata paths#691
plusplusjiajia wants to merge 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 — it is public, reaches Python, and returns the partition values and column stats the DataFusion $partitions table 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::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. paimon-rest-server shares it and now answers 501, 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 like Manifest::read that take a FileIO and a location, which have no table options to consult.

@plusplusjiajia
plusplusjiajia force-pushed the query-auth-write-gate branch from 59adc0c to 7ac60a2 Compare August 7, 2026 13:01
@plusplusjiajia
plusplusjiajia force-pushed the query-auth-write-gate branch 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
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