Using the JDBC Driver in an Application with Secure Clusters

Prerequisites

You can use the Drill JDBC driver in an application to connect to a secure Drill cluster and query data sources. To start, ensure that your drillbit node is configured to use secure authentication mechanisms. See Configuring Server Authentication.

MapR SASL Authentication

To secure MapR clusters to use MapR-SASL for authentication, configure the JDBC driver to use the MapR-SASL protocol to authenticate the connection.
Note: If applications such as, SQLLine or SQuirrel are connecting to a secure MapR cluster, and your client is not part of the MapR cluster follow step 1, otherwise go to step 2.
  1. Use the following instructions to secure your client systems:
  2. The client must obtain a MapR ticket from the maprlogin utility for MapR-SASL authentication. To install and use the maprlogin utility, see:
  3. To connect to the drillbit node using MapR-SASL, use one of the following connection URLs in your client application.

    For a client-to-drillbit connection:

    jdbc:drill:drillbit=ip address:port;auth=MAPRSASL 

    The default drillbit port is 31010.

    For a client-to-ZooKeeper connection:

    jdbc:drill:zk=ip address:port;auth=MAPRSASL 

    The default ZooKeeper port is 5181.

Kerberos Authentication

You can configure the driver to use the Kerberos protocol to authenticate the connection. Kerberos must be installed and configured before you can use this authentication mechanism. See the connection URL examples in the Configuring Kerberos Authentication section of the Apache Drill documentation for more information.

Plain Username and Password Authentication

Linux PAM provides a Plain username and password [(also known as basic authentication (auth)] authentication module that interfaces with any installed PAM authentication entity, such as the local operating system password file (/etc/passwd) or LDAP. To configure Plain authentication with PAM, see Installing and Configuring PAM in the Apache Drill documentation.

To connect with other BI tools, see Configuring Plain Authentication in the Apache Drill documentation.