xiangfu0 commented on code in PR #20422:
URL: https://github.com/apache/pinot/pull/20422#discussion_r4805773700
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -1475,6 +1518,50 @@ private void throwAccessDeniedError(long requestId,
String query, RequestContext
throw new WebApplicationException("Permission denied." + failureMessage,
Response.Status.FORBIDDEN);
}
+ /// Stamps each policy under the exact physical table name that the server
receives with its segments.
+ private static boolean applyLogicalTableRlsFilters(AccessControl
accessControl,
+ @Nullable RequesterIdentity requesterIdentity, Set<String>
physicalTableNames, PinotQuery serverPinotQuery,
+ boolean disableGroovy) {
+ Map<String, String> policies = new HashMap<>();
+ for (String physicalTableName : physicalTableNames) {
Review Comment:
This looks policies up for the backing tables only. The multi-stage handler
looks them up by the queried name (`applyRlsFilters`), which for a
logical-table query is the logical table's own name, and the leaf stage then
applies that policy. Should a policy defined on the logical name be combined
into each backing table's policy here too, so both engines return the same rows?
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -677,6 +703,14 @@ protected BrokerResponse doHandleRequest(long requestId,
String query, SqlNodeAn
return BrokerResponseNative.NO_TABLE_RESULT;
}
+ // Routing reads the logical-table config again. Query only backing tables
authorized above.
+ if (logicalTableConfig != null && _enableRowColumnLevelAuth
Review Comment:
This check is tied to `_enableRowColumnLevelAuth`, but it also keeps routing
in line with the table-level authorization on line 520, which runs regardless
of that flag. Should it apply to every logical-table query?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]