<?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: Possibility to use Principals across clusters in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170202#M132508</link>
    <description>&lt;P&gt;So after a conversation with &lt;A rel="user" href="https://community.cloudera.com/users/354/lmccay.html" nodeid="354"&gt;@lmccay&lt;/A&gt;, it appears that my assumption/statement about Ranger is incorrect and therefore a compromised service principal compromises all (relevant) services on all clusters that use the same Kerberos realm.  But once again, Kerberos is not an authorization mechanism... it is merely an authentication mechanism.&lt;/P&gt;&lt;P&gt;I think the only real solution here is to isolate clusters using different Kerberos realms.  This can be done by using a local KDC and realm for the cluster-specific principals and creating a one-way trust with an Active Directory (or centralized KDC) for the user accounts. This has a few benefits over the centralized-only solution, including cluster isolation as well as network traffic isolation and distribution of load on the KDC.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2017 04:32:14 GMT</pubDate>
    <dc:creator>rlevas</dc:creator>
    <dc:date>2017-03-23T04:32:14Z</dc:date>
    <item>
      <title>Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170198#M132504</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;a security related question: I got two clusters in my environment. Both are kerberized and connected to the same Active directory as KDC.&lt;/P&gt;&lt;P&gt;Let's look at technical users now: For the hive-user for instance I created a keytab both on the first and second cluster:&lt;/P&gt;&lt;P&gt;hive/somehostinclusterA@REALM.COM&lt;/P&gt;&lt;P&gt;hive/somehostinclusterB@REALM.COM&lt;/P&gt;&lt;P&gt;Now imagine that the first cluster (A) is run by development with moderate rules, while cluster B is run in production with strict rules.&lt;/P&gt;&lt;P&gt;When somebody now steals a keytab from cluster A, there is a security threat: Not only can he access cluster A, but he can also access cluster B (=production), which is bad.&lt;/P&gt;&lt;P&gt;Why? Because the auth_to_local rules just convert both hive/somehostinclusterA@REALM.COM and hive/somehostinclusterB@REALM.COM to hive, who is Superuser for the Hive Service in both clusters.&lt;/P&gt;&lt;P&gt;Is this a known security problem and are there guidelines on how to fix it. I thought about making complex auth_to_local rules, but this seems to be unoperatable.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 11:18:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170198#M132504</guid>
      <dc:creator>benhadoop</dc:creator>
      <dc:date>2022-09-16T11:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170199#M132505</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/10171/benjaminruland.html" nodeid="10171"&gt;@Roland Simonis&lt;/A&gt;&lt;P&gt;I believe that you are confusing &lt;STRONG&gt;authentication&lt;/STRONG&gt; with &lt;STRONG&gt;authorization&lt;/STRONG&gt;.  Kerberos is only an &lt;STRONG&gt;authentication&lt;/STRONG&gt; mechanism.  It tells &lt;STRONG&gt;who&lt;/STRONG&gt; the user is... not &lt;STRONG&gt;what&lt;/STRONG&gt; the user can do.  In some cases, the lack of &lt;EM&gt;&lt;STRONG&gt;who&lt;/STRONG&gt;&lt;/EM&gt; helps with &lt;STRONG&gt;authorization&lt;/STRONG&gt; since there is no user to authorize. This is what you are trying to do by not translating certain principal names to local user names. &lt;/P&gt;&lt;P&gt;In the scenario you pose, there is a security issue; but, I am not sure that I would blame &lt;EM&gt;Kerberos&lt;/EM&gt; or Ambari's configuration of the Kerberos infrastructure on it.  I believe that by installing an &lt;STRONG&gt;authorization&lt;/STRONG&gt; service, like Ranger, you should be able protect against unauthorized access to Hive and other services and thus rule out any cross-cluster access issues. &lt;/P&gt;&lt;P&gt;If you are looking to proceed with limiting access based on auth-to-local rules, be sure to see &lt;A target="_blank" href="https://community.hortonworks.com/articles/14463/auth-to-local-rules-syntax.html"&gt;Auth-to-local Rules Syntax&lt;/A&gt; for information on the syntax of the rules. &lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 22:13:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170199#M132505</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2017-03-22T22:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170200#M132506</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/322/rlevas.html" nodeid="322"&gt;@Robert Levas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for your comment. &lt;/P&gt;&lt;P&gt;For any other users than technical users, I agree with you. Authorization is my friend to keep away users from the wrong cluster.&lt;/P&gt;&lt;P&gt;In this particular case, however, I am really "blaming" &lt;STRONG&gt;authentication. &lt;/STRONG&gt;My problem is, that the &lt;STRONG&gt;technical&lt;/STRONG&gt; users of two cluster have the same name and can therefore not be distinguished from another by an authorization engine, such as Ranger.&lt;/P&gt;&lt;P&gt;Example: The hive-Principal in cluster B SHOULD have access to all tables (as he is the superuser) but the hive-Principal from cluster B SHOULD NOT. Kerberos authentication, however, does not distinguish between the users, as they both have the same name.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 22:20:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170200#M132506</guid>
      <dc:creator>benhadoop</dc:creator>
      <dc:date>2017-03-22T22:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170201#M132507</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10171/benjaminruland.html" nodeid="10171"&gt;@Roland Simonis&lt;/A&gt; - I believe that &lt;A rel="user" href="https://community.cloudera.com/users/322/rlevas.html" nodeid="322"&gt;@Robert Levas&lt;/A&gt; is generally correct but you are talking about a keytab being compromised. In that case, I believe it is generally gameover. Keytab management is extremely important. They should only be readable by root and not even backed up. If you want to protect clusters from keytabs that are compromised from other clusters then they should be for different realms - IMO.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 04:02:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170201#M132507</guid>
      <dc:creator>lmccay</dc:creator>
      <dc:date>2017-03-23T04:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170202#M132508</link>
      <description>&lt;P&gt;So after a conversation with &lt;A rel="user" href="https://community.cloudera.com/users/354/lmccay.html" nodeid="354"&gt;@lmccay&lt;/A&gt;, it appears that my assumption/statement about Ranger is incorrect and therefore a compromised service principal compromises all (relevant) services on all clusters that use the same Kerberos realm.  But once again, Kerberos is not an authorization mechanism... it is merely an authentication mechanism.&lt;/P&gt;&lt;P&gt;I think the only real solution here is to isolate clusters using different Kerberos realms.  This can be done by using a local KDC and realm for the cluster-specific principals and creating a one-way trust with an Active Directory (or centralized KDC) for the user accounts. This has a few benefits over the centralized-only solution, including cluster isolation as well as network traffic isolation and distribution of load on the KDC.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 04:32:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170202#M132508</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2017-03-23T04:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170203#M132509</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10171/benjaminruland.html" nodeid="10171"&gt;@Roland Simonis&lt;/A&gt; &lt;A rel="user" href="https://community.cloudera.com/users/322/rlevas.html" nodeid="322"&gt;@Robert Levas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My thoughts from my experience&lt;/P&gt;&lt;P&gt;First, I would start with compromising on hive.keytab itself is a major security risk, which isn't typical or there should be restrictions put in place to prevent that.
Second, we can chose to use seperate REALMS for the clusters in which case the rules will be specific to individual cluster.&lt;/P&gt;&lt;P&gt;Third,we can remove "DEFAULT" rule from auth_to_local and then manually code for needed principals.
more details: &lt;A href="https://hortonworks.com/blog/fine-tune-your-apache-hadoop-security-settings/" target="_blank"&gt;https://hortonworks.com/blog/fine-tune-your-apache-hadoop-security-settings/&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;I am sure we can be more creative on auth_to_local for cluster specific rules and principals, but to simplify and still be secure would be to have seperate realms.&lt;/P&gt;&lt;P&gt;With the given scenario, that seems appropriate since they are part of the same kerberos realm with the default configurations.&lt;/P&gt;&lt;P&gt;The rules are necessary to find the hdfs directories , hdfs folder/file permissions or hive table owners and many others which use short name, I dont think ranger can help with that.&lt;/P&gt;&lt;P&gt;Let me know your thoughts&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 04:42:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170203#M132509</guid>
      <dc:creator>spotluri</dc:creator>
      <dc:date>2017-03-23T04:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170204#M132510</link>
      <description>&lt;P&gt;Thank you &lt;A rel="user" href="https://community.cloudera.com/users/322/rlevas.html" nodeid="322"&gt;@Robert Levas&lt;/A&gt; and &lt;A rel="user" href="https://community.cloudera.com/users/354/lmccay.html" nodeid="354"&gt;@lmccay&lt;/A&gt; for your insights. It appears, protecting the keytabs really is one of the most important Hadoop security tasks.&lt;/P&gt;&lt;P&gt;As seperating REALMs is not realizable in my case, I will stick with keeping keytabs secure and maybe tuning auth-to-local-rules.&lt;/P&gt;&lt;P&gt;Also thanks to &lt;A rel="user" href="https://community.cloudera.com/users/9125/spotluri.html" nodeid="9125"&gt;@spotluri&lt;/A&gt; for summing it up.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 13:27:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170204#M132510</guid>
      <dc:creator>benhadoop</dc:creator>
      <dc:date>2017-03-23T13:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170205#M132511</link>
      <description>&lt;P&gt;Just had a new idea, that probably can solve the problem&lt;/P&gt;&lt;P&gt;We can have different account names such as hive-clusterA/hostname@realm.com&lt;/P&gt;&lt;P&gt;hive-clusterB/hostname@realm.com&lt;/P&gt;&lt;P&gt;And then have an auth_to_local rule in clusterA which converts hive-clusterA to hive and vice versa in clusterB.&lt;/P&gt;&lt;P&gt;Very similar to how "dn", "nn","nm" principals get resolved.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 11:03:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170205#M132511</guid>
      <dc:creator>spotluri</dc:creator>
      <dc:date>2017-03-24T11:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170206#M132512</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/9125/spotluri.html" nodeid="9125"&gt;@spotluri&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is also a great idea, if splitting REALMs is not feasible.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 14:37:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170206#M132512</guid>
      <dc:creator>benhadoop</dc:creator>
      <dc:date>2017-03-24T14:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Possibility to use Principals across clusters</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170207#M132513</link>
      <description>&lt;P&gt;Just to sum it up: I have now chosen to place some regex in the auth-to-local rules to match exactly those hosts, which are used in a certain cluster.&lt;/P&gt;&lt;P&gt;While this adds operations overhead, it will make the cluster more secure.&lt;/P&gt;&lt;P&gt;The guys of Cloudera have a good summary about that in their documentation: &lt;A href="https://www.cloudera.com/documentation/enterprise/5-9-x/topics/sg_auth_to_local_isolate.html" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/5-9-x/topics/sg_auth_to_local_isolate.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 19:59:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Possibility-to-use-Principals-across-clusters/m-p/170207#M132513</guid>
      <dc:creator>benhadoop</dc:creator>
      <dc:date>2017-03-29T19:59:13Z</dc:date>
    </item>
  </channel>
</rss>

