Add missing SELECT grant check in mergeTreeProjection table function#95480
Add missing SELECT grant check in mergeTreeProjection table function#95480alexey-milovidov merged 1 commit intomasterfrom
mergeTreeProjection table function#95480Conversation
The `mergeTreeProjection` table function was missing an access check, allowing users without SELECT permission on a table to read data from its projections. This fix adds the same access check that `mergeTreeIndex` and `mergeTreeAnalyzeIndexes` already have. Also adds tests for grant checking on all MergeTree introspection functions: `mergeTreeAnalyzeIndexes`, `mergeTreeAnalyzeIndexesUUID`, `mergeTreeIndex`, and `mergeTreeProjection`. Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Workflow [PR], commit [fa3cf80] Summary: ❌
|
|
Looks good. Clean one-liner fix following the same pattern as The CI failure (AST fuzzer) appears to be the known issue #83614, unrelated to this change. This review was drafted by an AI assistant (Claude) on behalf of @pufit. |
pufit
left a comment
There was a problem hiding this comment.
Dead Internet Theory
Looks good to me, but I would remove some of the AI comments - they are good to get initial thoughts when you are reviewing AI suggestions, but afterwards they might become overwhelming for other contributors. Some obvious ones, like # Grant SELECT permission above grant queries, are unnecessary. But this is my opinion only.
|
These comments are in tests, I see it as okay. |
…Projection` table function
…eProjection` table function
…eProjection` table function
…eProjection` table function
…Projection` table function
Backport #95480 to 26.1: Add missing SELECT grant check in `mergeTreeProjection` table function
Backport #95480 to 25.11: Add missing SELECT grant check in `mergeTreeProjection` table function
Backport #95480 to 25.12: Add missing SELECT grant check in `mergeTreeProjection` table function
Backport #95480 to 25.8: Add missing SELECT grant check in `mergeTreeProjection` table function
The
mergeTreeProjectiontable function was missing an access check, allowing users without SELECT permission on a table to read data from its projections. This fix adds the same access check thatmergeTreeIndexandmergeTreeAnalyzeIndexesalready have.Also adds tests for grant checking on all MergeTree introspection functions:
mergeTreeAnalyzeIndexes,mergeTreeAnalyzeIndexesUUID,mergeTreeIndex, andmergeTreeProjection.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The
mergeTreeProjectiontable function was missing an access check, allowing users without SELECT permission on a table (but with permissions for table functions) to read data from its projections. This fix adds the same access check thatmergeTreeIndexandmergeTreeAnalyzeIndexesalready have.