Authentication Mechanisms

To connect to a Spark server, you must configure the Simba Apache Spark ODBC Connector to use the authentication mechanism that matches the access requirements of the server and provides the necessary credentials. To determine the authentication settings that your Spark server requires, check the server configuration and then refer to the corresponding section below.

Shark Server

You must use No Authentication as the authentication mechanism. Shark Server instances do not support authentication.

Spark Thrift Server on an HDInsight Distribution

If you are connecting to HDInsight Emulator running on Windows Azure, then you must use the Windows Azure HDInsight Emulator mechanism.

If you are connecting to HDInsight Service running on Windows Azure, then you must use the Windows Azure HDInsight Service mechanism.

Spark Thrift Server on a non-HDInsight Distribution

Note:

Most default configurations of Spark Thrift Server on non-HDInsight distributions require User Name authentication.

Configuring authentication for a connection to a Spark Thrift Server instance on a non-HDInsight Distribution involves setting the authentication mechanism, the Thrift transport protocol, and SSL support. To determine the settings that you need to use, check the following three properties in the hive-site.xml file in the Spark server that you are connecting to:

  • hive.server2.authentication
  • hive.server2.transport.mode
  • hive.server2.use.SSL

Use the following table to determine the authentication mechanism that you need to configure, based on the hive.server2.authentication value in the hive-site.xml file:

hive.server2.authentication Authentication Mechanism

NOSASL

No Authentication (see Using No AuthenticationUsing No Authentication)

KERBEROS

Kerberos (see Using KerberosUsing Kerberos)

NONE

User Name (see Using User NameUsing User Name)

LDAP

User Name and Password (see Using User Name And PasswordUsing User Name And Password)

SAML SAML 2.0 (see Using SAML 2.0 Using SAML 2.0)

Use the following table to determine the Thrift transport protocol that you need to configure, based on the hive.server2.authentication and hive.server2.transport.mode values in the hive-site.xml file:

hive.server2.authentication hive.server2.transport.mode Thrift Transport Protocol

NOSASL

binary

Binary

KERBEROS

binary or http

SASL or HTTP

NONE

binary or http

SASL or HTTP

LDAP

binary or http

SASL or HTTP

SAML  http HTTP

To determine whether SSL should be enabled or disabled for your connection, check the hive.server2.use.SSL value in the hive-site.xml file. If the value is true, then you must enable and configure SSL in your connection. If the value is false, then you must disable SSL in your connection.