<?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: Not able to enable authorization in hive. in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-enable-authorization-in-hive/m-p/389766#M247073</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111255"&gt;@kaif&lt;/a&gt;&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 17:28:36 GMT</pubDate>
    <dc:creator>DianaTorres</dc:creator>
    <dc:date>2024-07-01T17:28:36Z</dc:date>
    <item>
      <title>Not able to enable authorization in hive.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-enable-authorization-in-hive/m-p/389553#M246999</link>
      <description>&lt;PRE&gt;I have running hive locally using this docker compose image. However when trying to acecss admin role by docker exec -it hiveserver2 beeline -u 'jdbc:hive2://hiveserver2:10000/' -n hive and doing  set role admin; I am getting this error ERROR : DDLTask failed, DDL Operation: class org.apache.hadoop.hive.ql.ddl.privilege.role.set.SetRoleOperation&lt;BR /&gt;org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAccessControlException: kaif doesn't belong to role admin&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;version&lt;/SPAN&gt;: &lt;SPAN&gt;'3.9'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;services&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;postgres&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;image&lt;/SPAN&gt;: postgres&lt;BR /&gt;&lt;SPAN&gt;restart&lt;/SPAN&gt;: unless-stopped&lt;BR /&gt;&lt;SPAN&gt;container_name&lt;/SPAN&gt;: postgres&lt;BR /&gt;&lt;SPAN&gt;hostname&lt;/SPAN&gt;: postgres&lt;BR /&gt;&lt;SPAN&gt;environment&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;POSTGRES_DB&lt;/SPAN&gt;: &lt;SPAN&gt;'metastore_db'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;POSTGRES_USER&lt;/SPAN&gt;: &lt;SPAN&gt;'hive'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;POSTGRES_PASSWORD&lt;/SPAN&gt;: &lt;SPAN&gt;'password'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;ports&lt;/SPAN&gt;:&lt;BR /&gt;- &lt;SPAN&gt;'5432:5432'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;volumes&lt;/SPAN&gt;:&lt;BR /&gt;- hive-db:/var/lib/postgresql&lt;BR /&gt;&lt;SPAN&gt;networks&lt;/SPAN&gt;:&lt;BR /&gt;- hive&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;metastore&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;image&lt;/SPAN&gt;: apache/hive:4.0.0&lt;BR /&gt;&lt;SPAN&gt;depends_on&lt;/SPAN&gt;:&lt;BR /&gt;- postgres&lt;BR /&gt;&lt;SPAN&gt;restart&lt;/SPAN&gt;: unless-stopped&lt;BR /&gt;&lt;SPAN&gt;container_name&lt;/SPAN&gt;: metastore&lt;BR /&gt;&lt;SPAN&gt;hostname&lt;/SPAN&gt;: metastore&lt;BR /&gt;&lt;SPAN&gt;environment&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;DB_DRIVER&lt;/SPAN&gt;: postgres&lt;BR /&gt;&lt;SPAN&gt;SERVICE_NAME&lt;/SPAN&gt;: &lt;SPAN&gt;'metastore'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;SERVICE_OPTS&lt;/SPAN&gt;: &lt;SPAN&gt;'-Xmx1G -Djavax.jdo.option.ConnectionDriverName=org.postgresql.Driver&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; -Djavax.jdo.option.ConnectionURL=jdbc:postgresql://postgres:5432/metastore_db&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; -Djavax.jdo.option.ConnectionUserName=hive&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; -Djavax.jdo.option.ConnectionPassword=password'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;ports&lt;/SPAN&gt;:&lt;BR /&gt;- &lt;SPAN&gt;'9083:9083'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;volumes&lt;/SPAN&gt;:&lt;BR /&gt;- warehouse:/opt/hive/data/warehouse&lt;BR /&gt;- &lt;SPAN&gt;type&lt;/SPAN&gt;: bind&lt;BR /&gt;&lt;SPAN&gt;source&lt;/SPAN&gt;: /Users/apple/postgresql-42.7.3.jar&lt;BR /&gt;&lt;SPAN&gt;target&lt;/SPAN&gt;: /opt/hive/lib/postgres.jar&lt;BR /&gt;&lt;SPAN&gt;networks&lt;/SPAN&gt;:&lt;BR /&gt;- hive&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hiveserver2&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;image&lt;/SPAN&gt;: apache/hive:kaif&lt;BR /&gt;&lt;SPAN&gt;depends_on&lt;/SPAN&gt;:&lt;BR /&gt;- metastore&lt;BR /&gt;&lt;SPAN&gt;restart&lt;/SPAN&gt;: unless-stopped&lt;BR /&gt;&lt;SPAN&gt;container_name&lt;/SPAN&gt;: hiveserver2&lt;BR /&gt;&lt;SPAN&gt;environment&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;HIVE_SERVER2_THRIFT_PORT&lt;/SPAN&gt;: 10000&lt;BR /&gt;&lt;SPAN&gt;SERVICE_OPTS&lt;/SPAN&gt;: &lt;SPAN&gt;'-Dhive.metastore.uris=thrift://metastore:9083&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; -Dhive.users.in.admin.role=hive&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; -Dhive.security.metastore.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.MetaStoreAuthzAPIAuthorizerEmbedOnly&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; -Dhive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdConfOnlyAuthorizerFactory&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; -Dhive.security.authorization.enabled=true'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;IS_RESUME&lt;/SPAN&gt;: &lt;SPAN&gt;'true'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;SERVICE_NAME&lt;/SPAN&gt;: &lt;SPAN&gt;'hiveserver2'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;ports&lt;/SPAN&gt;:&lt;BR /&gt;- &lt;SPAN&gt;'10000:10000'&lt;BR /&gt;&lt;/SPAN&gt; - &lt;SPAN&gt;'10002:10002'&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;volumes&lt;/SPAN&gt;:&lt;BR /&gt;- warehouse:/opt/hive/data/warehouse&lt;BR /&gt;&lt;SPAN&gt;networks&lt;/SPAN&gt;:&lt;BR /&gt;- hive&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;volumes&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;hive-db&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;warehouse&lt;/SPAN&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;networks&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;hive&lt;/SPAN&gt;:&lt;BR /&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;: hive&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Jun 2024 11:43:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-enable-authorization-in-hive/m-p/389553#M246999</guid>
      <dc:creator>kaif</dc:creator>
      <dc:date>2024-06-24T11:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to enable authorization in hive.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-enable-authorization-in-hive/m-p/389560#M247000</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111255"&gt;@kaif&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our Hive experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/45798"&gt;@james_jones&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70785"&gt;@Shmoo&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.@&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 17:51:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-enable-authorization-in-hive/m-p/389560#M247000</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-06-24T17:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to enable authorization in hive.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-enable-authorization-in-hive/m-p/389701#M247049</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111255"&gt;@kaif&lt;/a&gt;&amp;nbsp;This is non-Cloudera Hive you are testing. But let me share my two cents.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are using '&lt;FONT face="courier new,courier"&gt;org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdConfOnlyAuthorizerFactory&lt;/FONT&gt;' as the auth manager.&lt;/P&gt;&lt;P&gt;You may want to use the following auth provider that enables you to use GRANT/REVOKE statements.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;hive.security.authorization.manager=&lt;/SPAN&gt;&lt;SPAN&gt;org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;...and use:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;GRANT ROLE admin TO USER kaif;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;SET ROLE admin;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 06:23:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-enable-authorization-in-hive/m-p/389701#M247049</guid>
      <dc:creator>smruti</dc:creator>
      <dc:date>2024-06-28T06:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to enable authorization in hive.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-enable-authorization-in-hive/m-p/389766#M247073</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111255"&gt;@kaif&lt;/a&gt;&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 17:28:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-enable-authorization-in-hive/m-p/389766#M247073</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-07-01T17:28:36Z</dc:date>
    </item>
  </channel>
</rss>

