You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/01/19 20:24:52 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #8030: Adding pinot server grpc metadata acl

Jackie-Jiang commented on a change in pull request #8030:
URL: https://github.com/apache/pinot/pull/8030#discussion_r788109322



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/transport/grpc/GrpcQueryServer.java
##########
@@ -88,6 +94,20 @@ public void submit(ServerRequest request, StreamObserver<ServerResponse> respons
       return;
     }
 
+    // Table level access control
+    GrpcRequesterIdentity requestIdentity = new GrpcRequesterIdentity(request.getMetadataMap());
+    if (!_accessControl.hasDataAccess(requestIdentity, queryRequest.getTableNameWithType())) {
+      Exception unsupportedOperationException = new UnsupportedOperationException(
+          String.format("No access to table %s while processing request %s: %s from broker: %d",
+              queryRequest.getTableNameWithType(), queryRequest.getRequestId(),
+              queryRequest.getQueryContext(), queryRequest.getBrokerId()));
+      LOGGER.error("Table not found: {}", queryRequest.getTableNameWithType(), unsupportedOperationException);

Review comment:
       Discussed with @richardstartin offline, and both methods are okay and should have the same behavior




-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org