LDAP/Active Directoryを使用したAmbari認証の構成
ビッグ・データ・サービス・クラスタでは、Ambariがクラスタの管理に使用されます。デフォルトでは、ビッグ・データ・サービス・クラスタには、クラスタを管理できる管理者アカウントが1つのみあります。ただし、ADのユーザーがAmbariにサインインしてクラスタ管理操作を実行できるように、Active Directory (AD)統合をサポートするために不可欠です。
外部ユーザーを認証するためのAmbariの構成
-
un0ノードで次を実行します。
sudo ambari-server setup-ldap -
次の情報で各プロンプトに応答します。アスタリスクが付いたプロンプトは必須です。
確認
説明 使用するLDAPのタイプを選択してください* AD プライマリURLホスト* <AD_FQDN> プライマリURLポート* LDAPサーバーのポート。デフォルトでは、保護されたLDAPはポート636で実行されます。セキュアでないLDAPはポート389で実行されます。 セカンダリURLホスト [Enter]を押して空にしてください セカンダリURLポート [Enter]を押して空にしてください SSLの使用* LDAPS over 636ポートを使用する場合、真。 Ambari [y/n]にカスタムTrustStoreを指定しますか ビッグ・データ・サービス・クラスタの場合、ここで'n'を設定し、後続の'削除'リクエストを無視できます TrustStoreはすでに構成されています:ssl.trustStore.type = jksssl.trustStore.path = /etc/security/serverKeys/truststore.jksssl.trustStore.password = ${alias=ambari.ssl.trustStore.password}これらのプロパティ[y/n] (n)を削除しますか。 nと入力します。bds-cert.confにADのLDAPS URLを入力し、mn0ノードから sudo bds_cert_util --enableを実行した場合、このjksファイルにはすでにLDAPS証明書が含まれている必要があります。TrustStoreタイプ デフォルト・プロパティを削除しなかった場合は不要です。トラストストアの形式: jks TrustStoreへのパス デフォルト・プロパティを削除しなかった場合は不要です。 /etc/security/serverKeys/truststore.jksTrustStoreのパスワード デフォルト・プロパティを削除しなかった場合は不要です。必要に応じて、 sudo bash /home/opc/cloud/flask-microservice/cert_util/scripts/get_pass_mn0.shを実行してパスワードを取得します。ユーザー・オブジェクト・クラス* 個人 ユーザー名属性* sAMAccountName グループ・オブジェクト・クラス* グループ グループ名属性* cn グループ・メンバー属性* メンバー 識別名属性* distinguishedName 検索ベース* <AD_SEARCH_BASE> 紹介方法* ignore 匿名化* False バインドDN*: <AD_BIND_USER_DN>. ADサーバーでWindows PowerShellで dsquery user -name BIND_USER_NAMEを実行します。バインドDNパスワード*: <AD_BIND_USER_PWD> ユーザー名衝突の処理*: convert (推奨) 小文字のユーザー名を強制します。 true (推奨) 要求された場合は、LDAPからの結果がページ区切りされます。 false (推奨) SSLハンドシェイク中のエンドポイント識別を無効にします。 true (推奨) 例:
[opc@opowerun0-0 ~]$ sudo ambari-server setup-ldap Using python /usr/bin/python Currently 'no auth method' is configured, do you wish to use LDAP instead [y/n] (y)? y Enter Ambari Admin login: admin Enter Ambari Admin password: Fetching LDAP configuration from DB. No configuration. Please select the type of LDAP you want to use [AD/IPA/Generic](Generic):AD Primary LDAP Host: <PRIMARY_LDAP_HOST> Primary LDAP Port: 636 Secondary LDAP Host <Optional>: Secondary LDAP Port <Optional>: Use SSL [true/false] (false): true Disable endpoint identification during SSL handshake [true/false] (False): true Do you want to provide custom TrustStore for Ambari [y/n] (y)?n The TrustStore is already configured: ssl.trustStore.type = jks ssl.trustStore.path = /etc/security/serverKeys/truststore.jks ssl.trustStore.password = ${alias=ambari.ssl.trustStore.password} Do you want to remove these properties [y/n] (y)? n User object class (user): User ID attribute (sAMAccountName): Group object class (group): Group name attribute (cn): Group member attribute (member): Distinguished name attribute (distinguishedName): Search Base (dc=ambari,dc=apache,dc=org): cn=Users,dc=ad,dc=domain,dc=com Referral method [follow/ignore] (follow): ignore Bind anonymously [true/false] (false): Bind DN (cn=ldapbind,dc=ambari,dc=apache,dc=org): cn=Users,dc=ad,dc=domain,dc=com Enter Bind DN Password: Confirm Bind DN Password: Handling behavior for username collisions [convert/skip] for LDAP sync (skip): convert Force lower-case user names [true/false]:true Results from LDAP are paginated when requested [true/false]:false ==================== Review Settings ==================== Primary LDAP Host: <PRIMARY_LDAP_HOST> Primary LDAP Port: 636 Use SSL [true/false] (false): true User object class (user): user User ID attribute (sAMAccountName): sAMAccountName Group object class (group): group Group name attribute (cn): cn Group member attribute (member): member Distinguished name attribute (distinguishedName): distinguishedName Search Base (dc=ambari,dc=apache,dc=org): cn=Users,dc=ad,dc=domain,dc=com Bind anonymously [true/false] (false): false Handling behavior for username collisions [convert/skip] for LDAP sync (skip): convert Force lower-case user names [true/false]: true Results from LDAP are paginated when requested [true/false]: false ambari.ldap.connectivity.bind_dn: <AMBARI_LDAP_CONNECTIVITY_BIND_DN> ambari.ldap.connectivity.bind_password: ***** ambari.ldap.advanced.disable_endpoint_identification: true Save settings [y/n] (y)? y Saving LDAP properties... Saving LDAP properties finished Ambari Server 'setup-ldap' completed successfully. - Ambariに同期するActive Directoryユーザーおよびグループを制限するグループのリストを準備します。
- (オプション)ADグループ内のユーザーへのAmbariアクセスを共有する場合は、次を実行します:
echo "g1,g2,g3" > groups.csv sudo ambari-server sync-ldap --groups=$(pwd)/groups.csv - (オプション)ADユーザーのリストを明示的に指定するには、次を実行します:
echo "U1, u2, u3" > users.csv -
Ambariサーバーを再起動します。
例:
[opc@opower2un0 ambari-server]$ sudo ambari-server restart Using python /usr/bin/python Restarting ambari-server Waiting for server stop... Ambari Server stopped Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Ambari database consistency check started... Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log Waiting for server start............... Server started listening on 7183
Ambari UIを使用したActive Directoryユーザーのアクセスの構成
- 管理者ユーザーおよびパスワードを使用してApache Ambariにアクセスします。
- ユーザー名ボタンを選択し、「アンバリの管理」を選択します。
- 「ユーザー」を選択します。
- ユーザーとグループを確認します。
- フィルタで「ユーザー名」に<username>と入力し、「編集」を選択します。
- ユーザーを適切なグループに追加してください。
- 管理者をログアウトし、アクセス権を付与したユーザーとしてサインインします。