Hive密码授权

时间:2017-02-02 14:49:39

标签: hadoop hive hiveql

我需要在配置单元中使用密码基本授权。现在我需要创建具有RO访问数据库的用户。

但现在任何拥有任何密码的用户都可以连接到我的配置单元服务器。 我使用apache-hive-2.1.1

这是我的hive-site.xml:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
  <property>
    <name>hive.server2.enable.doAs</name>
    <value>false</value>
    <description>
      Setting this property to true will have HiveServer2 execute
      Hive operations as the user making the calls to it.
    </description>
  </property>
    <property>
    <name>hive.server2.authentication</name>
    <value>NOSASL</value>
    <description>
      Expects one of [nosasl, none, ldap, kerberos, pam, custom].
      Client authentication types.
        NONE: no authentication check
        LDAP: LDAP/AD based authentication
        KERBEROS: Kerberos/GSSAPI authentication
        CUSTOM: Custom authentication provider
                (Use with property hive.server2.custom.authentication.class)
        PAM: Pluggable authentication module
        NOSASL:  Raw transport
    </description>
  </property>
<property>
    <name>hive.support.concurrency</name>
    <value>true</value>
</property>
<property>
    <name>hive.enforce.bucketing</name>
    <value>true</value>
</property>
<property>
    <name>hive.exec.dynamic.partition.mode</name>
    <value>nonstrict</value>
</property>
<property>
    <name>hive.txn.manager</name>
    <value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
</property>
<property>
    <name>hive.compactor.initiator.on</name>
    <value>true</value>
</property>
<property>
    <name>hive.compactor.worker.threads</name>
    <value>2</value>
</property>
<property>
    <name>hive.in.test</name>
    <value>true</value>
</property>
 <property>
    <name>hive.users.in.admin.role</name>
    <value>hadoop</value>
    <description>
      Comma separated list of users who are in admin role for bootstrapping.
      More users can be added in ADMIN role later.
    </description>
  </property>
<property>
    <name>hive.security.authorization.enabled</name>
    <value>true</value>
    <description>enable or disable the Hive client authorization</description>
  </property>

  <property>
    <name>hive.security.authorization.createtable.owner.grants</name>
    <value>ALL</value>
    <description>the privileges automatically granted to the owner whenever a table gets created. An example like "select,drop" will grant select and drop privilege to
  </property>
.
  <property>
    <name>hive.security.authorization.manager</name>    <value>org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory</value>
  </property>
.
  <property>
    <name>hive.security.metastore.authorization.manager</name>    <value>org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider,org.apache.h
    <description>It takes a comma separated list, so we can add MetaStoreAuthzAPIAuthorizerEmbedOnly along with StorageBasedAuthorization parameter,if we want to enable
  </property>
</configuration>

0 个答案:

没有答案