> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sync.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MongoDB

export const CommonDatasourceMoreInformation = ({datasource = "the data source", advancedurl = "", siteName = "CData Sync", driverVersion = ""}) => {
  return <>
      <p>
        {siteName} と{datasource} の連携について、詳しくは{' '}
        <a href={`https://cdn.cdata.com/help/${advancedurl}${driverVersion}/jp/synch/default.htm`}>
          {datasource} Connector for {siteName}
        </a> を参照してください。
      </p>
    </>;
};

export const CommonAuthSchemeNone = ({siteName = "CData Sync", siteNameShort = "Sync", datasource = "the data source"}) => {
  return <>
      <p>認証なしで接続するには、<strong>Auth Scheme</strong> で<strong>None</strong> を選択します。追加のプロパティは必要ありません。</p>
    </>;
};

export const CommonAuthSchemePlain = ({siteName = "CData Sync", siteNameShort = "Sync", datasource = "the data source"}) => {
  return <>
      <p>プレーンテキストログインで接続するには、以下のプロパティを指定します：</p>
      <ul>
        <li><strong>Auth Scheme：</strong><strong>Plain</strong> を選択。</li>
        <li><strong>User：</strong>{datasource} アカウントへの認証に使用するユーザー名を入力。</li>
        <li><strong>Password：</strong>{datasource} アカウントへの認証に使用するパスワードを入力。</li>
      </ul>
    </>;
};

export const CommonDatasourceAddConnector = ({datasource = "the data source", title = "the connector", destination = false, siteNameShort = "Sync"}) => {
  return <>
      <p>
        {siteNameShort} で{datasource} のデータを使用できるようにするには、まず以下の手順でコネクタを追加する必要があります：
      </p>
      <ol>
        <li>{siteNameShort} のダッシュボードから<strong>接続</strong>ページを開きます。</li>
        <li><strong>接続を追加</strong>をクリックして<strong>コネクタを選択</strong>ページを開きます。</li>
        <li>
          <strong>{destination ? "同期先" : "データソース"}</strong>タブをクリックして
          <strong>{title}</strong> 行に移動します。
        </li>
        <li>
          行末にある<strong>接続を設定</strong>アイコンをクリックして、<strong>新しい接続</strong>ページを開きます。この操作により、{' '}
          <strong>接続を追加</strong>ダイアログボックスが開きます。
          <br />
          <strong>Note：</strong> <strong>接続を設定</strong>アイコンが表示されない場合は、<strong>コネクタをダウンロード</strong>アイコンをクリックして {title} コネクタをインストールしてください。
        </li>
        <li><strong>接続を追加</strong>ダイアログボックスに接続名を入力します。</li>
        <li><strong>追加</strong>をクリックして、コネクタの<strong>設定</strong>タブを開きます。</li>
      </ol>
      <p>
        新しいコネクタのインストールについての詳細は、{' '}
        <a href="../connections">接続</a>を参照してください。
      </p>
    </>;
};

export const CommonDatasourceIntroSource = ({datasource = "the data source", siteName = "CData Sync"}) => {
  return <p>
      {siteName} アプリケーションから{datasource} コネクタを使用して、{datasource} からデータを取得してサポートされている任意の同期先に移動できます。これを行うには、コネクタを追加し、コネクタへの認証を行い、接続を完了する必要があります。
    </p>;
};

export const driverVersion = "M";

export const siteNameShort = "Sync";

export const siteName = "CData Sync";

export const datasource = "MongoDB";
export const pageTitle = "MongoDB";
export const advancedurl = "DG";

<CommonDatasourceIntroSource datasource={datasource} siteName={siteName} />

## MongoDB コネクタを追加

<CommonDatasourceAddConnector datasource={datasource} title={pageTitle} destination={false} siteNameShort={siteNameShort} />

## MongoDB への認証

After you add the connector, you need to set the required properties.

* **Server:** Enter the name or address of the server on which your {datasource} instance runs. The default server is **localhost**.
* **Port:** Enter the port for the {datasource} database. The default port value is **27017**.

{siteName} supports authenticating to {datasource} in several ways. Select your authentication method below to proceed to the relevant section that contains the authentication details.

* [**MongoDB Challenge Response**](#mongodb-challenge-response)
* [**SCRAM SHA-1**](#scram-sha-1)
* [**SCRAM SHA-256**](#scram-sha-256)
* [**PLAIN**](#plain)
* [**General Security Services API**](#generic-security-services-api)
* [**X.509 Certificate**](#x509-certificate)
* [**None**](#none)

### MongoDB Challenge Response

To connect with a MongoDB challenge response (CR), specify the following properties:

* **Auth Scheme:** Select **MongoDB-CR**.
* **User:** Enter the username that you use to authenticate to the {datasource} account.
* **Password:** Enter the password that you use to authenticate to the {datasource} account.

### SCRAM SHA-1

To connect with the SCRAM SHA-1 credentials, specify these properties:

* **Auth Scheme:** Select **SCRAM-SHA-1**.
* **User:** Enter the username that you use to authenticate to the {datasource} account.
* **Password:** Enter the password that you use to authenticate to the {datasource} account.

### SCRAM SHA-256

To connect with the SCRAM SHA-256 credentials, specify these properties:

* **Auth Scheme:** Select **SCRAM-SHA-256**.
* **User:** Enter the username that you use to authenticate to the {datasource} account.
* **Password:** Enter the password that you use to authenticate to the {datasource} account.

### Plain

<CommonAuthSchemePlain siteName={siteName} siteNameShort={siteNameShort} datasource={datasource} />

### Generic Security Services API

To connect with Kerberos credentials, specify these properties:

* **Auth Scheme:** Select **GSSAPI**.
* **Kerberos KDC:** Enter the this to the host name or IP Address of your Kerberos Key Distribution Center (KDC) machine.
* **Kerberos Realm:** Enter the Kerberos realm that you use to authenticate to Kerberos.
* **Kerberos SPN:** Enter the service principal name (SPN) for the Kerberos domain controller.
* **Kerberos User:** Enter the principal name for the Kerberos domain controller. They syntax for this name is *Host*/*User*@realm.
* (Optional) **Kerberos Keytab File:** Enter the full file path to your Kerberos keytab file.
* (Optional) **Kerberos Ticket Cache:** Enter the full file path to an MIT Kerberos credential cache file.

<a id="x509-certificate" />

### X.509 Certificate

To connect with X.509 certificate authentication, specify these properties:

* **Auth Scheme:** Select **X509**.
* **User:** Enter the username that you use to authenticate to the {datasource} account.
* **Password:** Enter the password that you use to authenticate to the {datasource} account.

### None

<CommonAuthSchemeNone siteName={siteName} siteNameShort={siteNameShort} datasource={datasource} />

## 接続を完了する

To complete your connection:

1. Specify the following properties:
   * (Optional) **Database:** Enter the name of the {datasource} database that you want to read from and write to.

     <Note>To connect to data from one database and authenticate to another database, you need to set both **Database** and **Auth Database**.</Note>

   * (Optional) **Auth Database:** Enter the name of the {datasource} database that you want to use for authentication. (See note above for when to specify this property.)

     <Note>If you want to use LDAP authentication, set **Auth Database** to **\$external** and set **AuthScheme** to **PLAIN**. This **Auth Scheme** value specifies the SASL PLAIN mechanism. This mechanism transmits credentials over plaintext, so it is not suitable for use without TLS/SSL on untrusted networks.</Note>

   * (Optional) **Replica Set:** Enter a comma-separated list of secondary servers in the replica set, specified by address and port.

     **Example:** *ServerURL*\_1:27017,*ServerURL*\_2:27017

   * (Optional) **DNS Server:** Enter the hostname of a domain name system (DNS) server that can resolve the necessary DNS entries.

   * **Use SSL:** Select whether you want to enable Secure Sockets Layer (SSL). By default, the **Enable** checkbox is not selected.
2. Define advanced connection settings on the **Advanced** tab. (In most cases, though, you should not need these settings.)
3. Click **Create & Test** to create your connection.

## 詳細について

<CommonDatasourceMoreInformation datasource={datasource} advancedurl={advancedurl} siteName={siteName} driverVersion={driverVersion} />
