<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to set up authentication for spark history server? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-set-up-authentication-for-spark-history-server/m-p/381082#M244228</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97216"&gt;@michalLi&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have been trying this in CDP PvC now but does not seem to work . Here is the behavior i see for spark history server web ui (&lt;SPAN&gt;7.1.7.2000&lt;/SPAN&gt;)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TLS enabled and kerberos enabled : without keytab https://172.25.42.2:18088 works fine
TLS disabled and kerberos enabled : with/without keytab http://172.25.42.2:18088 is failing for 401 Auth in Mac OS/Chrome&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Dec 2023 13:14:52 GMT</pubDate>
    <dc:creator>Majeti</dc:creator>
    <dc:date>2023-12-21T13:14:52Z</dc:date>
    <item>
      <title>How to set up authentication for spark history server?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-set-up-authentication-for-spark-history-server/m-p/350671#M236046</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know how to&amp;nbsp;set up authentication for spark history server, so that unauthorized users cannot view the spark history server web ui, any help would be appreciated, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I do notice there are below statements in the official spark document:“Enabling authentication for the Web UIs is done using&amp;nbsp;javax servlet filters. You will need a filter that implements the authentication method you want to deploy. Spark does not provide any built-in authentication filters.”&lt;/P&gt;&lt;P&gt;&amp;nbsp;2. There is also a thread on stackoverflow regardig this : “You re-use Hadoop's jetty authentication filter for Kerberos/SPNEGO: spark.ui.filters=org.apache.hadoop.security.authentication.server.AuthenticationFilter and spark.org.apache.hadoop.security.authentication.server.AuthenticationFilter.params=type=kerberos,kerberos.principal=${spnego_principal_name},kerberos.keytab=${spnego_keytab_path}”.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with&amp;nbsp;kerberos authentication enabled in CDH6.3, I followed the instructions in the above stackoverflow thread, but is unable to acheive the expected results, any user can view the spark history server web ui.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 03:35:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-set-up-authentication-for-spark-history-server/m-p/350671#M236046</guid>
      <dc:creator>michalLi</dc:creator>
      <dc:date>2022-08-24T03:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up authentication for spark history server?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-set-up-authentication-for-spark-history-server/m-p/357313#M237548</link>
      <description>&lt;P&gt;Just an update, this is resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. With&amp;nbsp;kerberos authentication enabled, you can go to the spark service's configuration tab and&amp;nbsp;turn on "history_server_spnego_enabled", which will "Enables user authentication using SPNEGO (requires Kerberos), and enables access control to application history data.", and after the restart, the shs webui will be authenticated, as below screenshot shows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michalLi_0-1668051212950.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36203iC270A1650DA3A556/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michalLi_0-1668051212950.png" alt="michalLi_0-1668051212950.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michalLi_1-1668051365660.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36204i031D5DB9F16FC092/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michalLi_1-1668051365660.png" alt="michalLi_1-1668051365660.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Underneath, the shs is restarted with below configuration:&lt;/P&gt;&lt;P&gt;spark.history.kerberos.enabled=true&lt;BR /&gt;spark.history.kerberos.principal=xx&lt;BR /&gt;spark.history.kerberos.keytab=xxx&lt;BR /&gt;spark.org.apache.hadoop.security.authentication.server.AuthenticationFilter.param.type=kerberos&lt;BR /&gt;spark.org.apache.hadoop.security.authentication.server.AuthenticationFilter.param.kerberos.principal=xx&lt;BR /&gt;spark.org.apache.hadoop.security.authentication.server.AuthenticationFilter.param.kerberos.keytab=xx&lt;BR /&gt;spark.org.apache.hadoop.security.authentication.server.AuthenticationFilter.param.kerberos.name.rules=xxx&lt;BR /&gt;spark.history.ui.acls.enable=true&lt;BR /&gt;spark.ui.filters=org.apache.spark.deploy.yarn.YarnProxyRedirectFilter,org.apache.hadoop.security.authentication.server.AuthenticationFilter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. If kerberos is not enabled, you have to implement your own authentication filter and configure below parameters：&lt;/P&gt;&lt;P&gt;spark.ui.filters=org.apache.spark.deploy.yarn.YarnProxyRedirectFilter,your-authentication-filter-name&lt;/P&gt;&lt;P&gt;spark.your-authentication-filter-name.param.parm-name=parm-value&lt;/P&gt;&lt;P&gt;spark.history.ui.acls.enable&lt;/P&gt;&lt;P&gt;spark.history.ui.admin.acls&lt;/P&gt;&lt;P&gt;spark.history.ui.admin.acls.groups&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 03:44:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-set-up-authentication-for-spark-history-server/m-p/357313#M237548</guid>
      <dc:creator>michalLi</dc:creator>
      <dc:date>2022-11-10T03:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up authentication for spark history server?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-set-up-authentication-for-spark-history-server/m-p/381082#M244228</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97216"&gt;@michalLi&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have been trying this in CDP PvC now but does not seem to work . Here is the behavior i see for spark history server web ui (&lt;SPAN&gt;7.1.7.2000&lt;/SPAN&gt;)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TLS enabled and kerberos enabled : without keytab https://172.25.42.2:18088 works fine
TLS disabled and kerberos enabled : with/without keytab http://172.25.42.2:18088 is failing for 401 Auth in Mac OS/Chrome&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 13:14:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-set-up-authentication-for-spark-history-server/m-p/381082#M244228</guid>
      <dc:creator>Majeti</dc:creator>
      <dc:date>2023-12-21T13:14:52Z</dc:date>
    </item>
  </channel>
</rss>

