[ 
https://issues.apache.org/jira/browse/HIVE-26353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HIVE-26353:
----------------------------------
    Labels: pull-request-available  (was: )

> 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: 10m
>  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.7#820007)

Reply via email to