Apache spark 如何在AWS EMR的Spark Thrift服务器上配置LDAP?

Apache spark 如何在AWS EMR的Spark Thrift服务器上配置LDAP?,apache-spark,spark-thriftserver,Apache Spark,Spark Thriftserver,请注意,这里我们不是在谈论hiveserver2或hive thrift server。 如果有人对此有经验,我想在spark thrift server上配置LDAP验证。我使用AWS EMR作为集群。 我可以启动服务器并使用它进行查询,但不需要任何用户名或密码。甚至不确定在哪里指定与身份验证相关的属性。关于这方面的文档很少 期待着收到任何有这方面经验的人的来信 将hive-site.xml从~/hive/conf目录复制到~/spark/conf/目录 您需要配置出口规则,以允许您的EMR群

请注意,这里我们不是在谈论hiveserver2或hive thrift server。 如果有人对此有经验,我想在spark thrift server上配置LDAP验证。我使用AWS EMR作为集群。 我可以启动服务器并使用它进行查询,但不需要任何用户名或密码。甚至不确定在哪里指定与身份验证相关的属性。关于这方面的文档很少

期待着收到任何有这方面经验的人的来信

将hive-site.xml从~/hive/conf目录复制到~/spark/conf/目录

您需要配置出口规则,以允许您的EMR群集连接到LDAP服务器/ip/端口

根据hiveserver2的官方文档:

为LDAP模式设置以下选项: hive.server2.authentication.ldap.url–例如ldap url,ldap://hostname.com:389. hive.server2.authentication.ldap.baseDN–ldap基本DN。可选择的广告。 hive.server2.authentication.ldap.Domain–ldap域。Hive 0.12.0及更高版本。 有关Hive 1.3.0及更高版本中的其他LDAP配置参数,请参阅HiveServer2中LDAP Atn Provider的用户和组筛选器支持

hive-site.xml–更改:

  <property>
    <name>hive.server2.authentication</name>
    <value>LDAP</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>
    <name>hive.server2.authentication.ldap.url</name>
    <value>ldaps://changemetoyour.ldap.url:5000</value>
    <description>
      LDAP connection URL(s),
      this value could contain URLs to mutiple LDAP servers instances for HA,
      each LDAP URL is separated by a SPACE character. URLs are used in the
       order specified until a connection is successful.
    </description>
  </property>
  <property>
    <name>hive.server2.authentication.ldap.baseDN</name>
    <value>changeme.mydomain.com</value>
    <description>LDAP base DN</description>
  </property>
  <property>
    <name>hive.server2.authentication.ldap.Domain</name>
    <value/>
    <description/>
  </property>
  <property>
    <name>hive.server2.authentication.ldap.groupDNPattern</name>
    <value/>
    <description>
      COLON-separated list of patterns to use to find DNs for group entities in this directory.
      Use %s where the actual group name is to be substituted for.
      For example: CN=%s,CN=Groups,DC=subdomain,DC=domain,DC=com.
    </description>
  </property>