Reply
Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Impala queries through impala JDBC is running with empty user

Hi All,

 

I'm using zeppelin to run report using impala.

 

I downloaded impala JDBC to my linux machine, when i'm looking at the impala queries at cloudera manager, i see my queries running with empty user " ".

 

I didn't integrate LDAP authnitication yet with Impala.

 

I have 2 small questions:

 

1- where and how i can pass the user that i need the queries to run with in the impala JDBC?

 

2- How i can restrict only queries qith user specific to run.

Posts: 390
Topics: 11
Kudos: 60
Solutions: 35
Registered: ‎09-02-2016

Re: Impala queries through impala JDBC is running with empty user

@Fawze

 

The answer for your 2nd question first, You have to implement apache sentry to restrict user specific query access on impala. Work with your Hadoop admin to setup it on your cluster

 

now for the first (generic) question, obviously you have to pass the parameter from the source. Apache sentry has dependency on other security tool called kerberos which has a concept called keytab. so when you pass the user and password from the source, you also have to pass the keytab to authenticate your network. you can achieve your first requirement with this step

 

I've shared some high level security information in the below link, hope this will give some idea

https://community.cloudera.com/t5/Security-Apache-Sentry/Hadoop-Security-for-beginners/m-p/49876#M24...

 

Thanks

Kumar

 

Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Re: Impala queries through impala JDBC is running with empty user

I'm already working to integrate authentication and security to my cluster,
it may takes time for me to complete this process, but my question where i
can provide user name in the impala JDBC if it in a linux user.
Posts: 390
Topics: 11
Kudos: 60
Solutions: 35
Registered: ‎09-02-2016

Re: Impala queries through impala JDBC is running with empty user

@Fawze

 

I think you didn't get my point yet, 

 

You don't need to provide user name for impala  instead you can authenticate your table in two steps 
1. Network authentication using Kerberos
2. Query/Table level authentication using Apache Sentry

 

so when you call the query using JDBC, you need to pass user, passworld & keytab

Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Re: Impala queries through impala JDBC is running with empty user

Hi 

 

 

 

 

 

Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Re: Impala queries through impala JDBC is running with empty user

Anyone who can help with this please.

Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Re: Impala queries through impala JDBC is running with empty user

This is my default.url and impala.url in the interpreter settings:

 

 

jdbc:impala://xxxxxx:21050/;SID=fawze;

 

Cloudera Employee
Posts: 73
Registered: ‎12-07-2015

Re: Impala queries through impala JDBC is running with empty user

Hi Fawze,

 

which JDBC driver are you using? And which version of it?

 

Cheers, Lars

Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Re: Impala queries through impala JDBC is running with empty user

ImpalaJDBC4.jar
Cloudera Employee
Posts: 73
Registered: ‎12-07-2015

Re: Impala queries through impala JDBC is running with empty user

That version should have been downloaded from Cloudera and as such the downloaded file comes with its own version number. The current version is 2.5.36 and can be found here: http://www.cloudera.com/downloads/connectors/impala/jdbc/2-5-36.html

 

Please have a look at the documentation contained in that download ("Cloudera-JDBC-Driver-for-Impala-Install-Guide.pdf"), especially at the section "Using User Name" and the "UID" parameter.

 

Cheers, Lars

Announcements