apucher commented on a change in pull request #6613:
URL: https://github.com/apache/incubator-pinot/pull/6613#discussion_r594751564
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -180,6 +180,16 @@ public BrokerResponse handleRequest(JsonNode request,
@Nullable RequesterIdentit
requestStatistics.setRequestId(requestId);
requestStatistics.setRequestArrivalTimeMillis(System.currentTimeMillis());
+ // first-stage access control to prevent unauthenticated requests from
using up resources
+ // secondary table-level check comes later
+ boolean hasAccess =
_accessControlFactory.create().hasAccess(requesterIdentity);
+ if (!hasAccess) {
+ _brokerMetrics.addMeteredTableValue(null,
BrokerMeter.REQUEST_DROPPED_DUE_TO_ACCESS_ERROR, 1);
Review comment:
imo this is the same concern. first-stage access control simply limits
resource consumption (i.e. denial of service, leakage of non-table data) for
unauthenticated requests. second-stage performs in-depth authorization per
table. any rejections are are ACL-related.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]