nrg4878 commented on a change in pull request #2954:
URL: https://github.com/apache/hive/pull/2954#discussion_r797943031



##########
File path: 
service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java
##########
@@ -214,9 +214,13 @@ protected void doPost(HttpServletRequest request, 
HttpServletResponse response)
             }
           } else if (HiveSamlUtils.isSamlAuthMode(authType)) {
             // check if this request needs a SAML redirect
-            if (needsRedirect(request, response)) {
+            String authHeader = request.getHeader(HttpAuthUtils.AUTHORIZATION);
+            if ((authHeader == null || authHeader.isEmpty()) && 
needsRedirect(request, response)) {
               doSamlRedirect(request, response);
               return;
+            } else 
if(authHeader.toLowerCase().startsWith(HttpAuthUtils.BASIC.toLowerCase())) {
+              //LDAP Authentication if the header starts with Basic
+              clientUserName = doPasswdAuth(request, 
HiveAuthConstants.AuthTypes.NONE.toString());

Review comment:
       @hsnusonic to answer your question, yes. This should be the first check 
in the authentication process. We dont expect this trust header to exist in 
many scenarios. Sai will be looking to rearrange the code upstream.




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

Reply via email to