hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amithsha (JIRA)" <>
Subject [jira] [Created] (HIVE-8999) hiveserver2 CUSTOM authentication Fails
Date Mon, 01 Dec 2014 10:34:12 GMT
Amithsha created HIVE-8999:

             Summary: hiveserver2 CUSTOM authentication Fails
                 Key: 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 org.apache.hive.service.auth.PasswdAuthenticationProvider;

public class SampleAuthenticator implements PasswdAuthenticationProvider {

  Hashtable<String, String> store = null;

  public SampleAuthenticator () {
    store = new Hashtable<String, String>();
    store.put("user1", "passwd1");
    store.put("user2", "passwd2");

  public void Authenticate(String user, String  password)
      throws AuthenticationException {

    String storedPasswd = store.get(user);

    if (storedPasswd != null && storedPasswd.equals(password))

    throw new AuthenticationException("SampleAuthenticator: Error validating user");

*Properties Used in Hive-site.xml

*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 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

This message was sent by Atlassian JIRA

View raw message