FrankChen021 commented on code in PR #19236:
URL: https://github.com/apache/druid/pull/19236#discussion_r3141492557
##########
multi-stage-query/src/main/java/org/apache/druid/msq/sql/MSQTaskQueryMaker.java:
##########
@@ -171,7 +172,13 @@ public QueryResponse<Object[]> runQuery(final DruidQuery
druidQuery)
taskContext
);
- FutureUtils.getUnchecked(overlordClient.runTask(taskId, controllerTask),
true);
+ // Propagate auth context headers to Overlord for consumption
+ if (plannerContext.getAuthenticationResult() != null &&
plannerContext.getAuthenticationResult().getContext() != null) {
+ final Map<String, String> extraHeaders =
CollectionUtils.mapValues(plannerContext.getAuthenticationResult().getContext(),
String::valueOf);
Review Comment:
[P2] Do not forward authenticator context as raw headers
AuthenticationResult.getContext() is authenticator-defined metadata, not a
map of HTTP headers. Forwarding every entry directly into the
Broker-to-Overlord request can leak arbitrary auth context to the internal RPC
path and can also break MSQ task submission when a provider stores
non-header-safe keys or values. Please propagate only an explicit allowlisted
header/token shape or use a typed inter-service auth-context carrier.
--
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]