LDAP/Active Directory用のHadoopグループ・マッピングの構成
LDAP/Active Directoryグループ・レベルの認可をHadoopで強制できるようにActive Directoryユーザーおよびグループを認識するには、次のいずれかのオプションを使用してHadoopグループ・マッピングを設定します。
core-site.xmlでのHadoopグループ・マッピングの構成
すべてのマッピングを一度に設定するには、un0で次を実行します:
- un0で、次を実行します。
export AMBARI_CONF_SCRIPT=/var/lib/ambari-server/resources/scripts/configs.py - <ambari_password>、<un0_node_IP>および<cluster_name>を収集し(Ambari UIからクラスタ名を確認)、次を実行して現在の
core-site構成を取得します。python ${AMBARI_CONF_SCRIPT} \ --user=admin \ --password='<ambari_password>' \ --protocol=https --unsafe \ --host=<un0_node_IP> \ --port=7183 \ --cluster=<cluster_name> \ --config-type=core-site \ --action=get \ --file=/tmp/current_core-site.json - 適切な値を含むキーと値のペアを構成JSONファイル
current_core-site.jsonのプロパティ・オブジェクトのキーと値のシリーズに貼り付け、次のキーと値のペアをproperties_attributesオブジェクトのパスワード・オブジェクトに追加します。"password": { "hadoop.security.group.mapping.provider.ad4usersX.ldap.bind.password": "true" //the key-value pair to mask out your password in Ambari. }, - 次を実行して、構成を更新します。
python ${AMBARI_CONF_SCRIPT} \ --user=admin \ --password='<ambari_password>' \ --protocol=https --unsafe \ --host=<un0_node_IP> \ --port=7183 \ --cluster=<cluster_name> \ --config-type=core-site \ --action=set \ --file=/tmp/current_core-site.json - デフォルトでは、Hadoopはユーザー・グループ・マッピング・キャッシュを300秒ごとにリフレッシュします。リフレッシュ間隔を短くするには、次のキーと値のペアを追加します。
"hadoop.security.groups.cache.secs":"<number of seconds you need>" - 「サービス」の「...」アイコンを選択し、「必要なものをすべて再起動」を選択します。