Azure Cosmos DB コネクタを追加
Verify the Role Assignment for Your Azure Identity
Before you connect to Azure Cosmos DB, you need to ensure that your Azure identity is assigned the correct role. The identity is the account that you use to log in to the browser (during Azure Active Directory authentication) or into the application (for Azure Service Principal authentication). You can create custom role definitions:- CosmosDB Built-in Data Reader
- CosmosDB Built-in Data Contributor
Azure Cosmos DB への認証
After you add the connector, you need to set the required properties. Account Endpoint: Enter the Cosmos DB account URL. This URL is available the Keys blade (Settings > Keys) of your Cosmos DB account. CData Sync supports authenticating to Azure Cosmos DB in several ways. Select your authentication method below to proceed to the relevant section that contains the authentication details.Account Key
To connect with account-key credentials, specify the following properties:- Auth Scheme: Select AccountKey.
- (Default) Account Key: Enter the master key token or resource token that is required to connect to the Azure Cosmos DB REST API.
- Token Type: Select the type of token (master or resource) that you are using in the Account Key field. The default token type is master.
Azure Active Directory
Azure Service Principal
Azure サービスプリンシパルとクライアントシークレットで接続するには、次のプロパティを設定します:
- Auth Scheme:AzureServicePrincipal を選択。
- Azure Tenant:接続するMicrosoft Online テナントを入力。
- OAuth Client Id:OAuth 認証サーバーにアプリケーションを登録した際に割り当てられたクライアントId を入力。
- OAuth Client Secret:OAuth 認証サーバーにアプリケーションを登録した際に割り当てられたクライアントシークレットを入力。
アプリケーションのOAuth クライアントId およびクライアントシークレットを取得するには:
- Azure ポータルにログインします。
- 左ナビゲーションペインですべてのサービスを選択します。次にアプリの登録を検索し選択します。
- 新規登録をクリックします。
- アプリケーションの名前を入力して任意のAzure AD ディレクトリ - マルチテナントを選択します。
- アプリケーションを作成したら、概要セクションに表示されるアプリケーション (クライアント) ID の値をコピーします。この値をOAuth クライアントId として使用します。
- 証明書とシークレットセクションに移動して、アプリケーションの新しいクライアント シークレットを選択します。
- 有効期間を指定してクライアントシークレットを保存します。保存するとキーの値が表示されます。
- 値は一度しか表示されないので、コピーしておきます。この値をOAuth クライアントシークレットとして使用します。
- 認証タブで、必ずアクセストークン (暗黙的なフローに使用) を選択します。
Azure Service Principal Certificate
Azure サービスプリンシパルとクライアント証明書で接続するには、次のプロパティを設定します:
- Auth Scheme:AzureServicePrincipalCert を選択。
- Azure Tenant:接続するMicrosoft Online テナントを入力。
- OAuth Client Id:OAuth 認証サーバーにアプリケーションを登録した際に割り当てられたクライアントId を入力。
- OAuth JWT Cert:Java web token(JWT)証明書ストアを入力。
- OAuth JWT Cert Type:JWT 証明書を格納するキーストアの種類を入力。デフォルトの種類はPEMKEY_BLOB です。
- (オプション)OAuth JWT Cert Password:OAuth JWT 証明書のパスワードを入力。
- (オプション)OAuth JWT Cert Subject:OAuth JWT 証明書のサブジェクトを入力。
アプリケーションのOAuth 証明書を取得するには:
- Azure ポータルにログインします。
- 左ナビゲーションペインですべてのサービスを選択します。次にアプリの登録を検索し選択します。
- 新規登録をクリックします。
- アプリケーションの名前を入力して任意のAzure AD ディレクトリ - マルチテナントを選択します。
- アプリケーションを作成したら、概要セクションに表示されるアプリケーション (クライアント) ID の値をコピーします。この値をOAuth クライアントId として使用します。
- 証明書とシークレットセクションに移動して、証明書のアップロードを選択します。次に、ローカルマシンからアップロードする証明書を選択します。
- 有効期間を指定してクライアントシークレットを保存します。保存するとキーの値が表示されます。
- 値は一度しか表示されないので、コピーしておきます。この値をOAuth クライアントシークレットとして使用します。
- 認証タブで、必ずアクセストークン (暗黙的なフローに使用) を選択します。
接続を完了する
To complete your connection:- For the Schema property (optional), enter the schema (the Azure Cosmos DB database) with which you want to work.
- Define advanced connection settings on the Advanced tab. (In most cases, though, you should not need these settings.)
- Connect to Azure Cosmos DB to connect to your Azure Cosmos DB account.
- Click Create & Test to create your connection.