JPAM Configuration for Apache Drill

299 Views Asked by At

I'm trying to configure PLAIN authentification based on JPAM 1.1 and am going crazy since it doesnt work after x times checking my syntax and settings. When I start drill with cluster-id and zk-connect only, it works, but with both options of PLAIN authentification it fails. Since I started with pam4j and tried JPAM later on, I kept JPAM for this post. In general I don't have any preferences. I just want to get it done. I'm running Drill on CentOS in embedded mode.

I've done anything required due to the official documentation:

  • I downloaded JPAM 1.1, uncompressed it and put libjpam.so into a specific folder (/opt/pamfile/)

  • I've edited drill-env.sh with: export DRILLBIT_JAVA_OPTS="-Djava.library.path=/opt/pamfile/"

  • I edited drill-override.conf with:

    drill.exec: { cluster-id: "drillbits1", zk.connect: "local", 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" ] } }

It throws the subsequent error:

Error: Failure in starting embedded Drillbit: org.apache.drill.exec.exception.DrillbitStartupException: Problem in finding the native library of JPAM (Pluggable Authenticator Module API). Make sure to set Drillbit JVM option 'java.library.path' to point to the directory where the native JPAM exists.:no jpam in java.library.path (state=,code=0)

I've run that *.sh file by hand to make sure that the necessary path is exported since I don't know if Drill is expecting that. The path to libjpam should be know known. I've started Sqlline with sudo et cetera. No chance. Documentation doesn't help. I don't get it why it's so bad and imo incomplete. Sadly there is 0 explanation how to troubleshoot or configure basic user authentification in detail.

Or do I have to do something which is not told but expected? Are there any Prerequsites concerning PLAIN authentification which aren't mentioned by Apache Drill itself?

1

There are 1 best solutions below

0
On

Try change:

export DRILLBIT_JAVA_OPTS="-Djava.library.path=/opt/pamfile/"

to:

export DRILL_JAVA_OPTS="$DRILL_JAVA_OPTS -Djava.library.path=/opt/pamfile/"

It works for me.