Skip to content

Check the source table SELECT grant in parallel_distributed_insert_select - #127627

Merged
alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
azat:fix-parallel-distributed-insert-select-source-access
Nov 3, 2026
Merged

alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
azat:fix-parallel-distributed-insert-select-source-access

Conversation

@azat

@azat azat commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Closes: https://github.com/ClickHouse/clickhouse-private/issues/69095

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Check the source table SELECT grant in parallel_distributed_insert_select


Workflow [PR]
Sync PR [sync-upstream/pr/127627]

Version info

  • Merged into: 26.11.1.1161-master (included in 26.11 and later)

@clickhouse-gh

clickhouse-gh Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [6fb9810]

Summary: ✅


AI Review

Summary

The PR enforces source-table SELECT authorization for optimized distributed INSERT ... SELECT, preserves row-policy and additional-filter handling, and checks access to local shards reached through a Remote database. It explicitly documents the existing cluster-credential trust model for shard-side expressions. No actionable findings remain at commit 6fb9810ffe5f5a60a3906690e3eaf225a2385f76; the added regression passed all 50 runs in the targeted ASan report.

Missing context / blind spots
  • ⚠️ The linked private issue returned HTTP 404. Access to its reproduction would allow checking any requirements beyond the public PR, current code, discussion, and regression tests.
Final Verdict

✅ Approve. No new inline findings or thread changes are warranted.

@clickhouse-gh clickhouse-gh Bot added pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! comp-distributed Distributed table engine & query routing across shards (sharding/load balancing). labels Oct 23, 2026
Comment thread src/Storages/StorageDistributed.cpp Resolved
@azat
azat force-pushed the fix-parallel-distributed-insert-select-source-access branch from f4fb5eb to fad72c8 Compare October 23, 2026 21:51
Comment thread src/Storages/StorageDistributed.cpp Resolved
Comment thread src/Storages/StorageDistributed.cpp Resolved
@clickhouse-gh

clickhouse-gh Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 6fb9810ff with master 3fbcffc0a (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 8a2805ff9; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

8 translation units recompiled, 31 s compile time in total, 8 of them have a recent master baseline.

Job report

@azat
azat force-pushed the fix-parallel-distributed-insert-select-source-access branch 2 times, most recently from 04c7a34 to 51bdb4e Compare October 26, 2026 13:57
Comment thread src/Storages/StorageDistributed.cpp Resolved
Comment thread src/Storages/StorageDistributed.cpp Resolved
@azat
azat force-pushed the fix-parallel-distributed-insert-select-source-access branch from 51bdb4e to 4f22489 Compare October 27, 2026 10:29
Comment thread src/Storages/StorageDistributed.cpp Resolved
…_select`

Note, this patch does not cover access checks that will be done for
local on shard queries (that in case of interserver secret will use
initiator user, or configured/default otherwise)

Closes: ClickHouse/clickhouse-private#69095
@azat
azat force-pushed the fix-parallel-distributed-insert-select-source-access branch from 4f22489 to 04c07ed Compare October 27, 2026 11:57
@alexey-milovidov alexey-milovidov self-assigned this Nov 1, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 2, 2026
@clickhouse-gh clickhouse-gh Bot added the can be tested Allows running workflows for external contributors label Nov 2, 2026
Merged via the queue into ClickHouse:master with commit 708a9f4 Nov 3, 2026
356 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Nov 3, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 3, 2026
clickhouse-gh Bot added a commit that referenced this pull request Nov 3, 2026
Backport #127627 to 26.10: Check the source table `SELECT` grant in `parallel_distributed_insert_select`
robot-clickhouse-ci-1 added a commit that referenced this pull request Nov 3, 2026
Cherry pick #127627 to 26.3: Check the source table `SELECT` grant in `parallel_distributed_insert_select`
robot-clickhouse added a commit that referenced this pull request Nov 3, 2026
robot-clickhouse-ci-1 added a commit that referenced this pull request Nov 3, 2026
Cherry pick #127627 to 26.8: Check the source table `SELECT` grant in `parallel_distributed_insert_select`
robot-clickhouse added a commit that referenced this pull request Nov 3, 2026
robot-clickhouse-ci-1 added a commit that referenced this pull request Nov 3, 2026
Cherry pick #127627 to 26.9: Check the source table `SELECT` grant in `parallel_distributed_insert_select`
robot-clickhouse added a commit that referenced this pull request Nov 3, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Nov 3, 2026
clickhouse-gh Bot added a commit that referenced this pull request Nov 4, 2026
Backport #127627 to 26.9: Check the source table `SELECT` grant in `parallel_distributed_insert_select`
clickhouse-gh Bot added a commit that referenced this pull request Nov 4, 2026
Backport #127627 to 26.8: Check the source table `SELECT` grant in `parallel_distributed_insert_select`
PedroTadim added a commit that referenced this pull request Nov 4, 2026
Backport #127627 to 26.3: Check the source table `SELECT` grant in `parallel_distributed_insert_select`
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-distributed Distributed table engine & query routing across shards (sharding/load balancing). pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants