> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.generaltranslation.app/llms.txt
> Use this file to discover all available pages before exploring further.

# AD/LDAPコネクターのインストールと構成

> AD/LDAPコネクターのインストール方法と構成方法について説明します。

export const InlineImage = ({src, alt = '', height = '1.6em'}) => {
  return <img noZoom src={src} alt={alt} style={{
    display: 'inline',
    verticalAlign: 'start',
    height: height,
    margin: '0'
  }} />;
};

export const AuthCodeBlock = ({filename, icon, language, highlight, children}) => {
  const [processedChildren, setProcessedChildren] = useState(children);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      unsubscribe = window.autorun(() => {
        let processedChildren = children;
        for (const [key, value] of window.rootStore.variableStore.values.entries()) {
          processedChildren = processedChildren.replace(new RegExp(key, "g"), value);
        }
        setProcessedChildren(processedChildren);
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  return <CodeBlock filename={filename} icon={icon} language={language} lines highlight={highlight}>
      {processedChildren}
    </CodeBlock>;
};

export const codeExample = `{
   "LDAP_URL": "ldap://{yourLdapServerFqdn}",
   "LDAP_BASE": "dc={yourDomain},dc=com",
   "LDAP_BIND_USER":"{yourLdapUser}",
   "LDAP_BIND_PASSWORD":"{yourLdapUserPassword}" //cleartextpassword
}`;

<div id="prerequisites">
  ## 前提条件
</div>

* システムが[システム要件](/docs/ja-JP/ja-jp/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap/ad-ldap-connector/ad-ldap-connector-requirements)を満たしていることを確認します。
* [Git](https://git-scm.com/downloads)、[Node.js](https://nodejs.org)、および[npm](http://blog.npmjs.org/post/85484771375/how-to-install-npm)がすでにインストールされていることを確認します。
* ほとんどのプラットフォームでは、rootおよび/または管理者権限が必要です。

<div id="install-the-connector-for-windows">
  ## Windows用のコネクターをインストールする
</div>

<div id="download-the-installer">
  ### インストーラーをダウンロードする
</div>

**Auth0 Active Directory/LDAP Connector for Windows** （MSI）ファイルをダウンロードします。

* <InlineImage src="https://cdn.auth0.com/docs/img/node-windows.png" /> [Windows用のAuth0 Active Directory/LDAPコネクター](https://cdn.auth0.com/adldap.msi) - <small>Current version: 6.1.8 Checksum (SHA1): faf28ef46d1776802128e4f702bc755f3102abd7</small>

<div id="run-the-installer">
  ### インストーラーを実行する
</div>

インストーラーを実行し、手順に従います。

**AD/LDAPコネクター** がWindowsサービスとしてインストールされます。

<Frame>
  <img src="https://mintcdn.com/generaltranslationinc/pgNtkB0vi40DIRw0/docs/images/ja-jp/cdy7uua7fh8z/MPMfLmJsXoPAzpPQhGAv5/25fb39ac7cef7a125110b8fa9f2dff01/adldap-connector-services.png?fit=max&auto=format&n=pgNtkB0vi40DIRw0&q=85&s=2787a190d5be2e69f43a6fb5ccaa2386" alt="AD/LDAP Connector Services" width="750" height="512" data-path="docs/images/ja-jp/cdy7uua7fh8z/MPMfLmJsXoPAzpPQhGAv5/25fb39ac7cef7a125110b8fa9f2dff01/adldap-connector-services.png" />
</Frame>

<div id="link-to-auth0">
  ### Auth0へのリンク
</div>

インストールが完了すると、ブラウザーにlocalhostを指す画面が表示されます。

<Frame>
  <img src="https://mintcdn.com/generaltranslationinc/JoMgZsgQxj2_Gov3/docs/images/ja-jp/cdy7uua7fh8z/3biSuxJYQ4swMGJkOZtC3R/cab77cb763ad3b9ff47710bc406c527b/adldap-connector-admin-ticket.png?fit=max&auto=format&n=JoMgZsgQxj2_Gov3&q=85&s=8859c6ab3bd04d5420c27695c3df955d" alt="AD/LDAP Connector Admin Ticket" width="750" height="511" data-path="docs/images/ja-jp/cdy7uua7fh8z/3biSuxJYQ4swMGJkOZtC3R/cab77cb763ad3b9ff47710bc406c527b/adldap-connector-admin-ticket.png" />
</Frame>

接続のプロビジョニングを行った際に提供された **チケットのURL** を入力します。 **チケットのURL** は、Auth0でこのコネクターを一意に識別します。コネクターはこれを使用してAuth0サーバーと通信し、自動的に構成を完了します。

<div id="link-to-ldap">
  ### LDAPへのリンク
</div>

LDAPの設定を入力します。

<Frame>
  <img src="https://mintcdn.com/generaltranslationinc/ABlkB6TUYafgJS-z/docs/images/ja-jp/cdy7uua7fh8z/2mHaknek0qyBxGmsanb30L/600b0259ed6db3fe9c526aa9f57a76bd/adldap-connector-admin-settings.png?fit=max&auto=format&n=ABlkB6TUYafgJS-z&q=85&s=73a4d4e9669d87e5bcd4298f53427a4c" alt="adldap-connector-admin-settings" width="750" height="512" data-path="docs/images/ja-jp/cdy7uua7fh8z/2mHaknek0qyBxGmsanb30L/600b0259ed6db3fe9c526aa9f57a76bd/adldap-connector-admin-settings.png" />
</Frame>

<table class="table">
  <thead>
    <tr>
      <th>設定</th>
      <th>説明</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><b>LDAP Connection String（LDAP接続文字列）</b></td>
      <td>たとえば、 `ldap://ldap.internal.contoso.com`です。これは、プロトコル + LDAPサーバーのドメイン名またはIPアドレスです。LDAPサーバーは、Active Directoryがインストールされたローカルのドメインコントローラーです。プロトコルは、`ldap`または`ldaps`です。`ldaps`を使用する必要がある場合は、現在のサーバーで証明書が有効なことを確認してください。</td>
    </tr>

    <tr>
      <td><b>Base DN（ベースDN）</b></td>
      <td>たとえば、`dc=contoso,dc=com`です。これは、コネクターが実行するクエリすべてに対するベースコンテナーです。</td>
    </tr>

    <tr>
      <td><b>Username（ユーザー名）</b></td>
      <td>たとえば、`cn=svcauth0,dc=services,dc=contoso,dc=com`です。クエリを実行するためのユーザーの完全な識別名です。</td>
    </tr>

    <tr>
      <td><b>Password（パスワード）</b></td>
      <td>ユーザーのパスワードです。</td>
    </tr>
  </tbody>
</table>

上記の情報を送信すると、コネクターは入力された情報を検証するために、一連のテストを実行します。結果はコンソール画面の **［Configuration Log（構成ログ）］** に表示されます。

<Frame>
  <img src="https://mintcdn.com/generaltranslationinc/pd2Xk6Hu-Ldfi_VV/docs/images/ja-jp/cdy7uua7fh8z/7kezId8mhvyYDbuovvi9FM/c2f3b2188fdfebc460458daf7247c124/adldap-connector-admin-settings-ok.png?fit=max&auto=format&n=pd2Xk6Hu-Ldfi_VV&q=85&s=c746b50794f4ce1e5b95037165423f8b" alt="adldap-connector-admin-settings-ok" width="750" height="511" data-path="docs/images/ja-jp/cdy7uua7fh8z/7kezId8mhvyYDbuovvi9FM/c2f3b2188fdfebc460458daf7247c124/adldap-connector-admin-settings-ok.png" />
</Frame>

すべてのテストが緑（合格）であることを確認してください。

<table class="table">
  <thead>
    <tr>
      <th>テスト</th>
      <th>説明</th>
      <th>トラブルシューティング</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>テスト1</td>
      <td>LDAPサーバーおよび指定されているポートへのTCP接続確立を試行。</td>
      <td>基本的なネットワーク接続と、接続を妨害している可能性があるファイアウォールの設定を確認します。</td>
    </tr>

    <tr>
      <td>テスト2</td>
      <td>提供されたユーザー名とパスワードを使用してLDAPサーバーおよび指定されているポートのLDAPバインドを試行。</td>
      <td>LDAP接続文字列、検索パス、ユーザー名、パスワードを確認します。</td>
    </tr>

    <tr>
      <td>テスト3</td>
      <td>指定されたユーザー名の権限を確認するために、ディレクトリに対してLDAP検索を試行。</td>
      <td>対象ディレクトリのユーザー名の権限を確認します。</td>
    </tr>

    <tr>
      <td>テスト4</td>
      <td>Auth0サーバーへの接続確立を試行。</td>
      <td>ネットワーク接続と、接続を妨害している可能性があるファイアウォールの設定を確認します。</td>
    </tr>
  </tbody>
</table>

<div id="install-the-connector-for-other-platforms">
  ## 他のプラットフォーム用のコネクターをインストールする
</div>

1. **Auth0 Active Directory/LDAP Connector** パッケージを`/tmp`にダウンロードします。\
   [adldap-6.1.8](https://github.com/auth0/ad-ldap-connector/releases/tag/v6.1.8)

**Curlの例：** \
`curl -Lo /tmp/adldap.tar.gz https://github.com/auth0/ad-ldap-connector/archive/v6.1.8.tar.gz`

2. パッケージを展開し、依存関係ファイルをインストールします。

   ```text lines theme={null}
   mkdir /opt/auth0-adldap
   tar -xzf /tmp/adldap.tar.gz -C /opt/auth0-adldap --strip-components=1
   cd /opt/auth0-adldap
   npm install
   ```

3. サーバーを起動します。
   `node server.js`チケット番号の入力を求めるメッセージが表示されたら、Auth0 Management Dashboardの **［Setup AD/LDAP connector（AD/LDAPコネクターの設定）］** 画面の **［Settings（設定）］** タブからのチケットの完全なURLを入力します。

4. LDAP接続および認証の詳細を使用して、`config.json`構成ファイルを編集するよう求められます。

   <AuthCodeBlock children={codeExample} language="json" lines />

5. `node server.js`をもう一度実行して、コネクターを起動します。この時点で、`config.json`の`LDAP_BIND_PASSWORD`の行が`LDAP_BIND_CREDENTIALS`に変わります。

6. コネクターが実行されると、コネクターをデーモン化する必要があります（まだツールを選んでいない場合は、[upstart](http://upstart.ubuntu.com/)や[systemd](https://www.freedesktop.org/wiki/Software/systemd/)を検討することもできます）。たとえば、Ubuntu Xenialでsystemdを使用する場合、`/lib/systemd/system/auth0-adldap.service`ファイルには以下の内容が含まれる可能性があります。

   ```json lines theme={null}
   [Unit]
   Description=Auth0 AD LDAP Agent
   After=network.target

   [Service]
   Type=simple
   Restart=always
   User=ubuntu
   WorkingDirectory=/opt/auth0-adldap
   ExecStart=/usr/bin/node server.js
   ```

7. `node admin/server.js`を実行して、管理者UIにアクセスします。管理者UIが`http://localhost:8357`で実行され、利用可能になります。

コネクターを初めて構成する際に`Invalid Ticket`（無効なチケット）のメッセージが表示された場合、最も考えられる原因はネットワークの問題です（たとえばコネクターがプロキシの背後で実行されている場合など）。

<div id="learn-more">
  ## もっと詳しく
</div>

* [AD/LDAPコネクタのトラブルシューティング](/docs/ja-JP/ja-jp/troubleshoot/integration-extensibility-issues/troubleshoot-ad-ldap-connector)
* [AD/LDAPコネクターのシステム要件](/docs/ja-JP/ja-jp/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap/ad-ldap-connector/ad-ldap-connector-requirements)
* [AD/LDAPコネクターがAuth0接続を指すようにする](/docs/ja-JP/ja-jp/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap/ad-ldap-connector/ad-ldap-connector-to-auth0)
* [クライアント証明書を使ってAD/LDAPコネクターの認証を構成する](/docs/ja-JP/ja-jp/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap/ad-ldap-connector/configure-ad-ldap-connector-client-certificates)
* [KerberosでAD/LDAPコネクターの認証を構成する](/docs/ja-JP/ja-jp/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap/ad-ldap-connector/configure-ad-ldap-connector-with-kerberos)
* [AD/LDAPコネクターを更新する](/docs/ja-JP/ja-jp/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap/ad-ldap-connector/update-ad-ldap-connectors)
