A.26.1 Spark Interpreter User Impersonation

Configure the Spark cluster and Studio to allow proxy users.

Add the below properties and values in core-site.xml in the Spark cluster as well as Studio and restart the Spark cluster and Studio:
<property>
<name>hadoop.proxyuser.zeppelin.groups</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.zeppelin.hosts</name>
<value>*</value>
</property>

Configure the Spark interpreter to run the spark-submit job as the currently logged-in user.

Add the below property in spark.json:
"zeppelin.spark.run.asLoginUser": {
"envName": null,
"propertyName": "zeppelin.spark.run.asLoginUser",
"defaultValue": true,
"description": "Whether run spark job as the zeppelin login user, it is
only applied when running spark job in hadoop yarn cluster and shiro is
enabled",
"type": "checkbox"
}

Note:

There will be only a single keytab used by all Spark interpreter runs.