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
.dsercfile:sasl_protocol=PRINCIPAL_NAME login_config=FILE_NAMESet
sasl_protocolto the user’s principal name, such asdse_admin@EXAMPLE.COM.Set
login_configto the absolute path to the JAAS configuration file. - Kerberos token variable
-
Use the environment variable
DSE_TOKENto specify a delegation token when Kerberos is used:export DSE_TOKEN=DELEGATION_TOKEN - DSE FS Kerberos variable
-
When using the
dse fscommand, use theDSEFS_SHELL_OPTSenvironment variable to provide the absolute path to theloginfile, 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.configin an environment variable for submitting jobs, set theSPARK_SUBMIT_OPTSenvironment variable to point to your JAAS configuration file:export SPARK_SUBMIT_OPTS='-Djava.security.auth.login.config=/path/to/jaas.config'