Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 25D6C106AD for ; Mon, 1 Dec 2014 10:34:13 +0000 (UTC) Received: (qmail 52151 invoked by uid 500); 1 Dec 2014 10:34:12 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 52083 invoked by uid 500); 1 Dec 2014 10:34:12 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 52071 invoked by uid 500); 1 Dec 2014 10:34:12 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 52068 invoked by uid 99); 1 Dec 2014 10:34:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2014 10:34:12 +0000 Date: Mon, 1 Dec 2014 10:34:12 +0000 (UTC) From: "Amithsha (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-8999) hiveserver2 CUSTOM authentication Fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Amithsha created HIVE-8999: ------------------------------ Summary: hiveserver2 CUSTOM authentication Fails Key: HIVE-8999 URL: https://issues.apache.org/jira/browse/HIVE-8999 Project: Hive Issue Type: Bug Components: Beeline, HiveServer2 Affects Versions: 0.14.0 Environment: Centos 6.5 Hadoop 2.4.1 Hive 0.14.0 Reporter: Amithsha Planned to secure the hiverserver2 Using Custom authentication Method. But when the beeline starts and sets the server Ip and port using command. It hanges in the terminal after providing the username and Password. ******************************Procedure Followed************************************ *Compiled Java File to create a jar import java.util.Hashtable; import javax.security.sasl.AuthenticationException; import org.apache.hive.service.auth.PasswdAuthenticationProvider; public class SampleAuthenticator implements PasswdAuthenticationProvider { Hashtable store = null; public SampleAuthenticator () { store = new Hashtable(); store.put("user1", "passwd1"); store.put("user2", "passwd2"); } @Override public void Authenticate(String user, String password) throws AuthenticationException { String storedPasswd = store.get(user); if (storedPasswd != null && storedPasswd.equals(password)) return; throw new AuthenticationException("SampleAuthenticator: Error validating user"); } } --------------------------------------------------------------------------------------------- *Properties Used in Hive-site.xml hive.server2.authentication CUSTOM hive.server2.custom.authentication.class org.apache.hive.service.auth.PasswdAuthenticationProvider.SampleAuth -------------------------------------------------------------------------- *Started Beeline beeline> !connect jdbc:hive2://localhost:10000/default scan complete in 13ms Connecting to jdbc:hive2://localhost:10000/default Enter username for jdbc:hive2://localhost:10000/default: user1 Enter password for jdbc:hive2://localhost:10000/default: ******* SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/opt/apache-hive/lib/hive-jdbc-0.14.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] ------------------------------------------------------------------------------------------ Can Anyone help me by providing the correct Java file and Procedures to use Custom Authentication Thank you Amithsha.S -- This message was sent by Atlassian JIRA (v6.3.4#6332)