Skip to content

Enforce broker table permissions for time-series queries - #20369

Merged
xiangfu0 merged 1 commit into
apache:masterfrom
xiangfu0:xiangfu0/codex2/time-series-broker-permissions
Nov 24, 2026
Merged

xiangfu0 merged 1 commit into
apache:masterfrom
xiangfu0:xiangfu0/codex2/time-series-broker-permissions

Conversation

@xiangfu0

@xiangfu0 xiangfu0 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Use the broker's requester check before time-series planning. ZooKeeper-backed authentication for this check landed in #20370. Check the caller's table grants across all leaves in the logical plan, then run the configured provider's fine-grained checks on the resolved table names. Apply both checks to execution, empty results, and EXPLAIN.

Time-series execution does not apply row filters. When row-level security is enabled and the caller has a filter on a referenced table, the broker denies the request. Deployments with a custom time-series EXPLAIN handler must implement the overload that accepts the caller identity and HTTP headers.

How to reproduce in a unit test

The broker unit test supplies a two-table logical plan and a mock provider that denies the second table. It covers regular execution, empty results, and EXPLAIN, as well as resolved-table denials and row-filter policies. The ZooKeeper Basic Auth tests from #20370 cover requester-only authentication with valid, missing, and invalid credentials.

Validation

90 tests passed after rebasing onto 3c43f6853c, across TimeSeriesRequestHandlerTest, TimeSeriesQueryEnvironmentTest, PinotClientRequestTest, BasicAuthAccessControlTest, ZkBasicAuthAccessControlFactoryTest, and PinotSinkIntegrationTest. Spotless, Checkstyle, license formatting and verification, and test compilation passed for the affected modules.

@xiangfu0 xiangfu0 added bug Something is not working as expected release-notes Referenced by PRs that need attention when compiling the next release notes labels Nov 24, 2026
@codecov-commenter

codecov-commenter commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.86957% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.44%. Comparing base (3c43f68) to head (9875526).

Files with missing lines Patch % Lines
...roker/requesthandler/TimeSeriesRequestHandler.java 53.57% 8 Missing and 5 partials ⚠️
...pinot/broker/api/resources/PinotClientRequest.java 60.00% 2 Missing ⚠️
...ava/org/apache/pinot/broker/api/AccessControl.java 85.71% 0 Missing and 1 partial ⚠️
...ot/broker/requesthandler/BrokerRequestHandler.java 0.00% 1 Missing ⚠️
...r/requesthandler/BrokerRequestHandlerDelegate.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20369      +/-   ##
============================================
- Coverage     71.45%   71.44%   -0.02%     
  Complexity     1639     1639              
============================================
  Files          3609     3609              
  Lines        243835   243855      +20     
  Branches      39630    39631       +1     
============================================
- Hits         174230   174215      -15     
- Misses        56492    56522      +30     
- Partials      13113    13118       +5     
Flag Coverage Δ
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-25 71.44% <60.86%> (-0.02%) ⬇️
lane-a 100.00% <ø> (ø)
lane-b 0.00% <ø> (ø)
temurin 71.44% <60.86%> (-0.02%) ⬇️
unittests 71.43% <60.86%> (-0.02%) ⬇️
unittests1 61.18% <0.00%> (-0.03%) ⬇️
unittests2 42.98% <60.86%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xiangfu0
xiangfu0 force-pushed the xiangfu0/codex2/time-series-broker-permissions branch from da815c8 to 9875526 Compare November 24, 2026 19:23
@xiangfu0
xiangfu0 merged commit cba500f into apache:master Nov 24, 2026
17 checks passed
xiangfu0 added a commit to pinot-contrib/pinot-docs that referenced this pull request Nov 24, 2026
…t#20369) (#1217)

Clarifies the time-series engine’s table-permission checks and how it
responds when row filters apply.

Validation: git diff --check and the docs validator passed (10 existing
anchor warnings).

Co-authored-by: Xiang Fu <xiangfu@Xiang-mac-mtv-2.local>
@xiangfu0

Copy link
Copy Markdown
Contributor Author

The time-series guide now covers table permissions and row-level security: pinot-contrib/pinot-docs#1217.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is not working as expected release-notes Referenced by PRs that need attention when compiling the next release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants