DSEFS authentication 

DSEFS works with secured and unsecured DataStax Enterprise clusters.

DSEFS works with unsecured clusters and clusters.

DSEFS with unsecured clusters 

DSEFS works on unsecured clusters with the AllowAllAuthenticator setting in the cassandra.yaml file.

DSEFS authentication with secured clusters 

Authentication is required only when it is enabled in the cluster. DSEFS on secured clusters requires the DSE Unified Authenticator. Authentication is off by default.

DSEFS authentication with the DSE Unified Authenticator supports authentication using any combination of internal Cassandra password authentication and LDAP pass-through authentication. DSEFS does not support Kerberos authentication.

DSEFS authentication applies only to communication between the DSEFS client and the DSEFS server. You must configure authentication with the DSE Unified Authenticator, including configuring properties in the cassandra.yaml file and the dse.yaml file.

With dse fs commands: You can provide authentication credentials in several ways, see Credentials for authentication.

Authenticate with hadoopConfiguration object in Spark Shell

In the Spark Shell:
sc.hadoopConfiguration.set("com.datastax.bdp.fs.client.authentication", "basic")
sc.hadoopConfiguration.set("com.datastax.bdp.fs.client.authentication.basic.password", <pass>)
sc.hadoopConfiguration.set("com.datastax.bdp.fs.client.authentication.basic.username", <user>)

Spark Streaming applications

For Spark Streaming applications, provide authentication credentials in one of these ways:
  • Set with the dse spark-submit --conf command argument:
    $ dse -u cassandra -p cassandra spark-submit --conf spark.hadoop.com.datastax.bdp.fs.client.authentication=basic --conf com.datastax.bdp.fs.client.authentication.basic.username=username --conf
     com.datastax.bdp.fs.client.authentication.basic.password=password
    Note the spark.hadoop prefix for --conf spark.hadoop.com.datastax.bdp.fs.client.authentication=basic.
  • Set programmatically in the Spark configuration object before the SparkContext is created:
    conf.set("spark.hadoop.com.datastax.bdp.fs.client.authentication", "basic")
    conf.set("spark.hadoop.com.datastax.bdp.fs.client.authentication.basic.username", <user>)
    conf.set("spark.hadoop.com.datastax.bdp.fs.client.authentication.basic.password", <pass>)
  • When running the Spark Shell, where the SparkContext is created at startup, set the properties in the SparkContext Hadoop configuration object:
    sc.hadoopConfiguration.set("com.datastax.bdp.fs.client.authentication", "basic")
    sc.hadoopConfiguration.set("com.datastax.bdp.fs.client.authentication.basic.username", <user>)
    sc.hadoopConfiguration.set("com.datastax.bdp.fs.client.authentication.basic.password", <pass>)
    Note the absence of the spark.hadoop prefix.
  • When running a Spark application or the Spark Shell, provide properties in the Hadoop XML configuration file. For example, in /usr/local/lib/dse/resources/hadoop2-client/conf/dse-core-default.xml:
    <property>
        <name>com.datastax.bdp.fs.client.authentication</name>
        <value>basic</value>
    </property>
    <property>
        <name>com.datastax.bdp.fs.client.authentication.basic.username</name>
        <value>username</value>
    </property>
    <property>
        <name>com.datastax.bdp.fs.client.authentication.basic.password</name>
        <value>password</value>
    </property>
    Optional: If you want to use this method, but do not have privileges to write to dse-core-default.xml, copy this file to any location path and set the environment variable to point to the file with:
    export HADOOP2_CONF_DIR=path
The location of the dse.yaml file depends on the type of installation:
Installer-Services /etc/dse/dse.yaml
Package installations /etc/dse/dse.yaml
Installer-No Services install_location/resources/dse/conf/dse.yaml
Tarball installations install_location/resources/dse/conf/dse.yaml
The location of the cassandra.yaml file depends on the type of installation:
Installer-Services /etc/dse/cassandra/cassandra.yaml
Package installations /etc/dse/cassandra/cassandra.yaml
Installer-No Services install_location/resources/cassandra/conf/cassandra.yaml
Tarball installations install_location/resources/cassandra/conf/cassandra.yaml