【问题标题】:How to configure LDAP on Spark-Thrift server on AWS EMR?如何在 AWS EMR 上的 Spark-Thrift 服务器上配置 LDAP?
【发布时间】:2018-02-13 21:41:09
【问题描述】:

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

期待听到任何有这方面经验的人的意见。

【问题讨论】:

    标签: apache-spark spark-thriftserver


    【解决方案1】:
    1. 将 hive-site.xml 从 ~/hive/conf 目录复制到 ~/spark/conf/ 目录。

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

    根据 hiveserver2 的官方文档: https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2

    为 LDAP 模式设置以下内容: hive.server2.authentication.ldap.url – LDAP URL(例如,ldap://hostname.com:389)。 hive.server2.authentication.ldap.baseDN – LDAP 基本 DN。 (对于 AD 是可选的。) hive.server2.authentication.ldap.Domain – LDAP 域。 (Hive 0.12.0 及更高版本。) 有关 Hive 1.3.0 及更高版本中的其他 LDAP 配置参数,请参阅 HiveServer2 中的 LDAP Atn 提供程序的用户和组过滤器支持。

    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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-18
      • 2017-02-21
      • 2017-03-19
      • 1970-01-01
      • 2015-10-06
      • 2019-05-14
      • 2022-08-09
      • 2020-02-19
      相关资源
      最近更新 更多