thelabdude commented on a change in pull request #168:
URL: https://github.com/apache/solr/pull/168#discussion_r648734114



##########
File path: solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java
##########
@@ -90,17 +95,34 @@ public boolean isClosed() {
     return builder.build();
   }
 
-  private Map<String, LukeResponse.FieldInfo> getFieldInfo(String collection) {
-    String zk = this.properties.getProperty("zk");
-    CloudSolrClient cloudSolrClient = solrClientCache.getCloudSolrClient(zk);
+  @SuppressForbidden(reason = "Do not want the MDC to propagate the user 
principal, need PKI principal")
+  private Map<String, LukeResponse.FieldInfo> getFieldInfo(final String 
collection) {
+    final String zk = this.properties.getProperty("zk");
+    // Need to run this in a background server thread so the PKI principal is 
used to authn / authz the luke request
+    // Not using the MDC aware executor framework b/c that propagates the 
principal from this thread, which is what we don't want here
+    ExecutorService service = Executors.newSingleThreadExecutor(threadFactory);

Review comment:
       I took another approach for this, see updated code and PR description.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to