Repository navigation
Revert "Fix table engine grants" - #100684
Conversation
|
Workflow [PR], commit [2d84453] Summary: ✅ AI ReviewSummaryThis PR reverts the earlier PR Metadata
Exact replacement text:
Findings❌ Blockers
💡 Nits
Tests
ClickHouse Rules
Performance & Safety
Final Verdict
|
|
|
||
| namespace | ||
| { | ||
| const std::vector<String> source_table_engines = { |
There was a problem hiding this comment.
This hard-coded source_table_engines list is now missing source engines like YTsaurus and ArrowFlight, while those engines still register source_access_type in StorageFactory.
That creates RBAC drift in both modes:
- when
table_engines_require_grant = 1,GRANT READ, WRITE ON <source>no longer bridges toGRANT TABLE ENGINE ON <engine>for omitted engines; - when
table_engines_require_grant = 0, omitted engines keep implicitTABLE ENGINEaccess because they are never revoked in the loop below.
Please derive source engines from StorageFactory (as in the reverted logic) instead of maintaining a manual list.
| { | ||
| /// Add TABLE_ENGINE on * and then remove TABLE_ENGINE on particular engines. | ||
| res.grant(AccessType::TABLE_ENGINE); | ||
| for (const auto & table_engine : source_table_engines) |
There was a problem hiding this comment.
Related to the manual list below: this path now relies on source_table_engines for revocation, so any future source engine not added to that list silently keeps implicit TABLE ENGINE permissions when table_engines_require_grant = 0.
That is a security-sensitive default-permission bug. Please avoid list-based revocation here and keep this synchronized with registered source engines.
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 100.00% (80/80, 1 noise lines excluded) |
Reverts #98984
Version info
26.4.1.258