Enable User Authentication(PAM) for Apache Drill on Linux server

Posted on by By Sayali Mahale, in Big Data, Business Intelligence | 0

Pre-requisites :

Note: To enable user authentication we need to setup apache drill in distributed mode.

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

Get your 30 Days Trail Version

1. Linux Server should be available.
2. Apache drill should be installed and running.
3. Zookeeper server should be installed and running.

 
To enable User Authentication(PAM) for Apache Drill on Linux server
 

1. Goto zookeeper server directory – Zookeeper_HOME/conf location.
2. Open file zoo.cfg configuration file and add apache drill server detail as shown below and Save file:

server.1=localhost:2888:3888

3. Restart zookeeper server using below command:

./bin/zkServer.sh restart

4. Now goto apache drill home directory and execute below command:

./bin/drillbit.sh restart

***You may get below error if your apache drill and zookeeper server exists on the same server

Exception in thread “main” org.apache.drill.exec.exception.DrillbitStartupException: Failure during
initial startup of Drillbit.

Caused by: org.apache.drill.exec.exception.DrillbitStartupException: Drillbit is disallowed to bind
to loopback address in distributed mode.

***Solution to resolve above issue:

Edit /etc/hosts file and comment below line :
127.0.1.1 abc

5. Now access the apache drill web UI in the browser. (http://localhost:8047)
 
6. Click on Query -> Execute below query for defining the admin user:

 alter system set security.admin.users = ‘admin-username’;

7.To enable PAM authentication we need to download the tar.gz of Jpam library file. Download it from below link:

Download JPAM Library

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

Grab The 30 Days Free Trail

8. Untar the file, and copy the libjpam.so file into a directory that does not contain other Hadoop components. For example, /opt/pam/ and give executable permission to libjpam.so file(chmod 0777 libjpam.so )

9.Add the following line to /conf/drill-env.sh, including the directory where the libjpam.so file is located:

export DRILLBIT_JAVA_OPTS=”$DRILLBIT_JAVA_OPTS -Djava.library.path=/opt/pam/”

10.Add the following configuration to the drill.exec block in /conf/drill-override.conf:

drill.exec: {
cluster-id: “drillbits1”,
zk.connect: “localhost:5181”,
impersonation: {
enabled: true,
max_chained_user_hops: 3
},
security: {
auth.mechanisms : [“PLAIN”],
},
security.user.auth: {
enabled: true,
packages += “org.apache.drill.exec.rpc.user.security”,
impl: “pam”,
pam_profiles: [ “sudo”, “login” ]
}
}

11. Now goto apache drill home directory and execute below command :

./bin/drillbit.sh restart

12. Open web UI of apache drill (http://localhost:8047) and click on login option present at the right top corner.

13. Provide admin user details, you will see all the apache drill options.
  Note: For the non-admin user, it will not show admin all available options of apache drill.

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

Hope it helps 🙂

In case if you have any queries please get us support@helicaltech.com
 

Thanks,
Sayali Mahale | BI Developer
Helical IT Solutions Pvt Ltd

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments