title: How to implement spark.ui.filter
body: <p>I have a spark cluster set up on 2 CentOS machines. I want to secure the web UI of my cluster (master node). I have made a BasicAuthenticationFilter servlet. I am unable to understand:</p>
  
  <ol>
  <li>how should I use spark.ui.filter to secure my web UI.</li>
  <li>Where should I place the servlet/jar file. </li>
  </ol>
  
  <p>Kindly help.</p>