gianm commented on code in PR #14376:
URL: https://github.com/apache/druid/pull/14376#discussion_r1220350149
##########
server/src/main/java/org/apache/druid/server/QueryLifecycle.java:
##########
@@ -220,6 +220,18 @@ public void initialize(final Query<?> baseQuery)
* @return authorization result
*/
public Access authorize(HttpServletRequest req)
+ {
+ return authorize(AuthorizationUtils.authenticationResultFromRequest(req));
+ }
+
+ /**
+ * Authorize the query using the authentication result.
+ * Will return an Access object denoting whether the query is authorized or
not.
+ *
+ * @param authenticationResult authentication result indicating identity of
the requester
+ * @return authorization result of requester
+ */
+ public Access authorize(AuthenticationResult authenticationResult)
Review Comment:
Please include some unit tests for this new method, in case it's called
directly.
--
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]