[
https://issues.apache.org/jira/browse/HIVE-26071?focusedWorklogId=764524&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-764524
]
ASF GitHub Bot logged work on HIVE-26071:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Apr/22 22:13
Start Date: 29/Apr/22 22:13
Worklog Time Spent: 10m
Work Description: dengzhhu653 commented on code in PR #3233:
URL: https://github.com/apache/hive/pull/3233#discussion_r862206299
##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java:
##########
@@ -605,27 +608,44 @@ private THttpClient createHttpClient(URI store, boolean
useSSL) throws MetaExcep
String path = MetaStoreUtils.getHttpPath(MetastoreConf.getVar(conf,
ConfVars.THRIFT_HTTP_PATH));
String httpUrl = (useSSL ? "https://" : "http://") + store.getHost() + ":"
+ store.getPort() + path;
- String user = MetastoreConf.getVar(conf,
ConfVars.METASTORE_CLIENT_PLAIN_USERNAME);
- if (user == null || user.equals("")) {
- try {
- LOG.debug("No username passed in config " +
ConfVars.METASTORE_CLIENT_PLAIN_USERNAME.getHiveName() +
- ". Trying to get the current user from UGI" );
- user = UserGroupInformation.getCurrentUser().getShortUserName();
- } catch (IOException e) {
- throw new MetaException("Failed to get client username from UGI");
+ HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
+ String authType = MetastoreConf.getAsString(conf,
ConfVars.METASTORE_CLIENT_AUTH_MODE).toLowerCase(
Review Comment:
sorry, I mean the the `METASTORE_CLIENT_AUTH_MODE` has been restricted to
`JWT`,..., there is no need to make the value be lower-cased by Local.ROOT,
`equalsIgnoreCase` may be better for this case? Just my opinion, thanks.
Issue Time Tracking
-------------------
Worklog Id: (was: 764524)
Time Spent: 3h 10m (was: 3h)
> JWT authentication for Thrift over HTTP in HiveMetaStore
> --------------------------------------------------------
>
> Key: HIVE-26071
> URL: https://issues.apache.org/jira/browse/HIVE-26071
> Project: Hive
> Issue Type: New Feature
> Components: Standalone Metastore
> Reporter: Sourabh Goyal
> Assignee: Sourabh Goyal
> Priority: Major
> Labels: pull-request-available
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> HIVE-25575 recently added a support for JWT authentication in HS2. This Jira
> aims to add the same feature in HMS
--
This message was sent by Atlassian Jira
(v8.20.7#820007)