You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/08/25 23:54:52 UTC

[GitHub] [arrow] jduo commented on a change in pull request #7994: ARROW-9804: [FlightRPC] Flight auth redesign

jduo commented on a change in pull request #7994:
URL: https://github.com/apache/arrow/pull/7994#discussion_r476883835



##########
File path: java/flight/flight-core/src/main/java/org/apache/arrow/flight/grpc/ServerInterceptorAdapter.java
##########
@@ -87,10 +87,12 @@ public ServerInterceptorAdapter(List<KeyFactory<?>> factories) {
     // Use LinkedHashMap to preserve insertion order
     final Map<FlightServerMiddleware.Key<?>, FlightServerMiddleware> middlewareMap = new LinkedHashMap<>();
     final MetadataAdapter headerAdapter = new MetadataAdapter(headers);
+    Context currentContext = Context.current();
     for (final KeyFactory<?> factory : factories) {
       final FlightServerMiddleware m;
       try {
         m = factory.factory.onCallStarted(info, headerAdapter);
+        currentContext = m.onAuthenticationSuccess(currentContext);

Review comment:
       The issue here is there's no way to alter the Context from onCallStarted. We can get the context but can't get the ServerInterceptorAdapter to use the context.




----------------------------------------------------------------
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:
users@infra.apache.org