[ https://issues.apache.org/jira/browse/HIVE-22267?focusedWorklogId=323398&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-323398 ]
ASF GitHub Bot logged work on HIVE-22267: ----------------------------------------- Author: ASF GitHub Bot Created on: 04/Oct/19 12:41 Start Date: 04/Oct/19 12:41 Worklog Time Spent: 10m Work Description: ashutosh-bapat commented on pull request #793: HIVE-22267 : Support password based authentication for HMS along-side kerberos authentication. URL: https://github.com/apache/hive/pull/793#discussion_r331480455 ########## File path: standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java ########## @@ -590,7 +592,30 @@ private void open() throws MetaException { transport = new TSocket(store.getHost(), store.getPort(), clientSocketTimeout); } - if (useSasl) { + if (usePasswordAuth) { + // we are using PLAIN Sasl connection with user/password + LOG.debug("HMSC::open(): Creating plain authentication thrift connection."); + String userName = MetastoreConf.getVar(conf, ConfVars.METASTORE_CLIENT_PLAIN_USERNAME); + // The password is not directly provided. It should be obtained from a keystore pointed + // by configuration "hadoop.security.credential.provider.path". + try { + String passwd = null; + char[] pwdCharArray = conf.getPassword(userName); + if (null != pwdCharArray) { + passwd = new String(pwdCharArray); + } Review comment: Done. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 323398) Time Spent: 2h 10m (was: 2h) > Support password based authentication in HMS > -------------------------------------------- > > Key: HIVE-22267 > URL: https://issues.apache.org/jira/browse/HIVE-22267 > Project: Hive > Issue Type: New Feature > Reporter: Ashutosh Bapat > Assignee: Ashutosh Bapat > Priority: Major > Labels: pull-request-available > Attachments: HIVE-22267.00.patch, HIVE-22267.01.patch, > HIVE-22267.02.patch, HIVE-22267.03.patch, HIVE-22267.04.patch, > HIVE-22267.05.patch, HIVE-22267.06.patch, HIVE-22267.07.patch, > HIVE-22267.08.patch > > Time Spent: 2h 10m > Remaining Estimate: 0h > > Similar to HS2, support password based authentication in HMS. > Right now we provide LDAP and CONFIG based options. The later allows to set > user and password in config and is used only for testing. -- This message was sent by Atlassian Jira (v8.3.4#803005)