Setting the JAAS Configuration File Location

If you are using JAAS, rather than a Kerberos ticket, then you must create a JAAS configuration file. The default location for this file is <$USER_HOME>/.java.login.config.

If your JAAS configuration file is in a different location, then you must specify the location by setting the java.security.auth.login.config option (login_config) to the location of the file. For more information, see Providing Kerberos Credentials using a Keytab File and Providing Kerberos Credentials using a Ticket Cache.

You can set the location to the configuration file using the .dserc file or environment variables:

Use the dserc file

To get Kerberos credentials without having to enter a password, define the following parameters in the .dserc file:

sasl_protocol=PRINCIPAL_NAME
login_config=FILE_NAME

Set sasl_protocol to the user’s principal name, such as dse_admin@EXAMPLE.COM.

Set login_config to the absolute path to the JAAS configuration file.

Kerberos token variable

Use the environment variable DSE_TOKEN to specify a delegation token when Kerberos is used:

export DSE_TOKEN=DELEGATION_TOKEN
DSE FS Kerberos variable

When using the dse fs command, use the DSEFS_SHELL_OPTS environment variable to provide the absolute path to the login file, which is the JAAS configuration file.

DSEFS_SHELL_OPTS="-Djava.security.auth.login.config=FILE_NAME"
Apache Spark job variable

To set java.security.auth.login.config in an environment variable for submitting jobs, set the SPARK_SUBMIT_OPTS environment variable to point to your JAAS configuration file:

export SPARK_SUBMIT_OPTS='-Djava.security.auth.login.config=/path/to/jaas.config'

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2025 | Privacy policy | Terms of use Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM