ihuzenko commented on a change in pull request #1972: DRILL-7562: Support HTTP 
Basic authentication for REST API calls
URL: https://github.com/apache/drill/pull/1972#discussion_r378322275
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/auth/DrillHttpSecurityHandlerProvider.java
 ##########
 @@ -139,10 +140,14 @@ public void handle(String target, Request baseRequest, 
HttpServletRequest reques
       if (isSpnegoEnabled() && (!isFormEnabled() || 
uri.equals(WebServerConstants.SPENGO_LOGIN_RESOURCE_PATH))) {
         securityHandler = securityHandlers.get(Constraint.__SPNEGO_AUTH);
         securityHandler.handle(target, baseRequest, request, response);
+      } else if(isBasicEnabled() && 
request.getHeader(HttpHeader.AUTHORIZATION.asString()) != null) {
+        final DrillHttpConstraintSecurityHandler basicSecurityHandler = 
securityHandlers.get(Constraint.__BASIC_AUTH);
+        basicSecurityHandler.handle(target, baseRequest, request, response);
 
 Review comment:
   please reuse already defined ```securityHandler``` variable as was done for 
other cases. 

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to