[ 
https://issues.apache.org/jira/browse/HIVE-25875?focusedWorklogId=719590&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-719590
 ]

ASF GitHub Bot logged work on HIVE-25875:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Feb/22 19:26
            Start Date: 02/Feb/22 19:26
    Worklog Time Spent: 10m 
      Work Description: 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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 719590)
    Time Spent: 50m  (was: 40m)

> Support multiple authentication mechanisms simultaneously 
> ----------------------------------------------------------
>
>                 Key: HIVE-25875
>                 URL: https://issues.apache.org/jira/browse/HIVE-25875
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>    Affects Versions: 3.1.0
>            Reporter: Naveen Gangam
>            Assignee: Sai Hemanth Gantasala
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently, HS2 supports a single form of auth on any given instance of 
> HiveServer2. Hive should be able to support multiple auth mechanisms on a 
> single instance especially with http transport. for example, LDAP and SAML. 
> In both cases, HS2 ends up with receiving an Authorization header in the 
> request. 
> Similarly, we could be able to support JWT support or other forms of boundary 
> authentication that is done outside of Hive (This is not in the scope of this 
> jira).
> *The current scope of the Jira:* Support SAML and LDAP authentication modes 
> simultaneously when the transport mode is set to *HTTP.* This multi-auth will 
> not work when transport mode is set to {_}binary or all{_}.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to