<?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: Hive cannot hide default database with Sentry in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-cannot-hide-default-database-with-Sentry/m-p/17412#M2274</link>
    <description>&lt;P&gt;Yes, the user group of impala node and hive nodes are the same.&lt;/P&gt;&lt;P&gt;I finally got the answer of my question. If I set "&lt;SPAN&gt;hive.sentry.restrict.defaultDB"&lt;/SPAN&gt; to true in sentry-site.xml, the behavior of impala and hive will be the same. Because the default value of "&lt;SPAN&gt;hive.sentry.restrict.defaultDB" is false by default.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Refer line 48 of HiveAuthzConf.java of sentry source code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Aug 2014 04:52:29 GMT</pubDate>
    <dc:creator>seafrog</dc:creator>
    <dc:date>2014-08-22T04:52:29Z</dc:date>
    <item>
      <title>Hive cannot hide default database with Sentry</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-cannot-hide-default-database-with-Sentry/m-p/15206#M2272</link>
      <description>&lt;P&gt;I use hive server 2 with sentry only let users to access "anon" database, however I still can see and use the "default" database:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;beeline&amp;gt; !connect jdbc:hive2://192.168.1.123:10000 anon1 anon1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Connecting to jdbc:hive2://&lt;SPAN&gt;192.168.1.123&lt;/SPAN&gt;&lt;SPAN style="line-height: 14px;"&gt;:10000&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Connected to: Hive (version 0.10.0)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Driver: Hive (version 0.10.0-cdh4.4.0)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;0: jdbc:hive2://&lt;SPAN&gt;192.168.1.123:10000&lt;/SPAN&gt;&amp;gt; show databases;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;+----------------+&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;| database_name &amp;nbsp;|&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;+----------------+&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;| anon &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;| default &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;+----------------+&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;2 rows selected (0.409 seconds)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the role and group definition:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[groups]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;anon_analyst = anon_select_tables_role, anon_insert_tables_role&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[roles]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;anon_select_tables_role = server=localhost-&amp;gt;db=anon-&amp;gt;table=*-&amp;gt;action=SELECT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;anon_insert_tables_role = server=localhost-&amp;gt;db=anon-&amp;gt;table=*-&amp;gt;action=INSERT&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the user anon1 is in the unix group. However, Impala cannot access the default database which is the correct behavior. Could anybody knows how to solve the problem for hive? Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:02:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-cannot-hide-default-database-with-Sentry/m-p/15206#M2272</guid>
      <dc:creator>seafrog</dc:creator>
      <dc:date>2022-09-16T09:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hive cannot hide default database with Sentry</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-cannot-hide-default-database-with-Sentry/m-p/15578#M2273</link>
      <description>The group lookup for user 'anon1' is done on the HS2 host by default. Can you ensure that the HS2 unix host also has the same groups setup for 'anon1' as the impalad hosts have (which seem to work)?</description>
      <pubDate>Sun, 20 Jul 2014 14:40:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-cannot-hide-default-database-with-Sentry/m-p/15578#M2273</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2014-07-20T14:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hive cannot hide default database with Sentry</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-cannot-hide-default-database-with-Sentry/m-p/17412#M2274</link>
      <description>&lt;P&gt;Yes, the user group of impala node and hive nodes are the same.&lt;/P&gt;&lt;P&gt;I finally got the answer of my question. If I set "&lt;SPAN&gt;hive.sentry.restrict.defaultDB"&lt;/SPAN&gt; to true in sentry-site.xml, the behavior of impala and hive will be the same. Because the default value of "&lt;SPAN&gt;hive.sentry.restrict.defaultDB" is false by default.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Refer line 48 of HiveAuthzConf.java of sentry source code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2014 04:52:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-cannot-hide-default-database-with-Sentry/m-p/17412#M2274</guid>
      <dc:creator>seafrog</dc:creator>
      <dc:date>2014-08-22T04:52:29Z</dc:date>
    </item>
  </channel>
</rss>

