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

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

                Author: ASF GitHub Bot
            Created on: 31/Aug/22 00:28
            Start Date: 31/Aug/22 00:28
    Worklog Time Spent: 10m 
      Work Description: github-actions[bot] closed pull request #3403: 
HIVE-26353: Normalize the http spnego authentication auth header
URL: https://github.com/apache/hive/pull/3403




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

    Worklog Id:     (was: 805057)
    Time Spent: 0.5h  (was: 20m)

> Http auth header for NEGOTIATE is not standard
> ----------------------------------------------
>
>                 Key: HIVE-26353
>                 URL: https://issues.apache.org/jira/browse/HIVE-26353
>             Project: Hive
>          Issue Type: Bug
>            Reporter: feiwang
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The auth header for http spnego is not standard.
> The code link: 
> https://github.com/apache/hive/blob/7b3ecf617a6d46f48a3b6f77e0339fd4ad95a420/jdbc/src/java/org/apache/hive/jdbc/HttpKerberosRequestInterceptor.java#L58-L65
> {code:java}
>   @Override
>   protected void addHttpAuthHeader(HttpRequest httpRequest, HttpContext 
> httpContext) throws Exception {
>     try {
>       // Generate the service ticket for sending to the server.
>       // Locking ensures the tokens are unique in case of concurrent requests
>       kerberosLock.lock();
>       String kerberosAuthHeader = 
> HttpAuthUtils.getKerberosServiceTicket(principal, host, serverHttpUrl, 
> loggedInSubject);
>       // Set the session key token (Base64 encoded) in the headers
>       httpRequest.addHeader(HttpAuthUtils.AUTHORIZATION + ": " + 
> HttpAuthUtils.NEGOTIATE + " ", kerberosAuthHeader);
>     } catch (Exception e) {
>       throw new HttpException(e.getMessage(), e);
>     } finally {
>       kerberosLock.unlock();
>     }
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to