title: Kerberos error connecting to impala and hbase
body: <p>We are developing a web application that interacts with hadoop components such as HDFS, HBase and Impala.
  The cluster is kerberized, we are authenticating with JAAS config.
  We are configuring JAAS in VM arguments as below</p>
  
  <pre><code>-Djava.security.auth.login.config=/user/gss-jaas.conf
  -Djava.security.krb5.conf=/user/krb5.ini
  -Djavax.security.auth.useSubjectCredsOnly=false 
  </code></pre>
  
  <p>Our JAAS config is as below</p>
  
  <pre><code>com.sun.security.jgss.initiate {
    com.sun.security.auth.module.Krb5LoginModule required
    useTicketCache=false
    doNotPrompt=true
    useKeyTab=true
    keyTab="file:C:/blah/blah/dummy.keytab"
    principal="dummy@SOME.REALM"
    debug=false;
  };
  </code></pre>
  
  <p>It works fine when connecting to hbase and Hdfs. But while connecting with Impala, we are facing problems.
  We can connect with Impala when we change <code>com.sun.security.jgss.initiate</code> to <code>Client</code>
  But we don't want to change or switch between Jaas configs. </p>
  
  <p>Is there any way we can use the same JAAS config file for all service? We don't want to use System.setProperties to do this. and also when switching between JAAS configs we are getting exceptions. So using the same config file would be better.</p>
  
  <p>Any help?</p>