This section is currently a work in progress!
The Spark UI is mainly used to monitor the performance of your Spark setup. However, it may also expose sensitive data such as the keystore password in some of the UIs depending on your Spark configurations. For security purposes, you can either disable the Spark UI completely, remove selected tabs from selected UIs, or disable only the required properties. The following sections cover the different methods to disable the Spark UI.
Disabling the Spark UI completely
To disable the Spark UI completely, follow the steps below.
- Build a sample servlet filter as described here.
- Place the build jar in the
<DAS_HOME>/repository/component/lib
directory. Add the following property to the
<DAS_HOME>/repository/conf/analytics/spark/spark-default.conf
file.spark.ui.filters com.neolitec.examples.BasicAuthenticationFilter spark.com.neolitec.examples.BasicAuthenticationFilter.params username=admin,password=admin
Add the following property to the
<DAS_HOME>/repository/conf/analytics/spark/external-spark-classpath.conf
file.repository/components/lib/basicAuthenticationFilter-0.0.1-SNAPSHOT.jar
- Restart the the DAS cluster.
Disabling selected UIs
Disable the Spark UIs for your DAS deployment by setting the spark.ui.enabled property to false in the <DAS_HOME>/repository/conf/analytics/spark/spark-defaults.conf
file as shown below.
spark.ui.enabled false
Disabling the selected properties
- Exclude the relevant Spark properties from being displayed in the Environment tab of the Application UI by editing your spark properties.