xDB Collection データベースに対する Always Encrypted の設定
このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。
適用対象 |
xDB Collection データベース (SQL) のみ |
Sitecore Installation Framework |
Always Encrypted は、デフォルトで有効になっていません。 |
Azure Toolkit |
Always Encrypted は、デフォルトで有効になっていません。 |
xDB Collection データベースでは、機密データを含む特定の列に対して Always Encrypted がサポートされています。このトピックでは、既存の xDB Collection データベースに対して Always Encrypted を有効にする方法について説明します。
ステージング テーブルの実行戦略に切り替える
Sitecore 9.3 以降では、xDB Collection SQL プロバイダーによってデフォルトで TVP (テーブル値パラメーター) 実行戦略が使用されます。TVP と Always Encrypted を一緒に使用することはできません。したがって、Always Encrypted を有効にする前に、ステージング テーブル戦略に切り替える必要があります。また、これは Index Worker ファイルに行う必要があります。
キーを設定する
列マスター キー (CMK) と列暗号化キー (CEK) を生成する手順は、使用しているキー ストアのタイプによって異なります。
オプション 1: Windows キー ストア
Windows キー ストアを使用している場合は、次の手順が適用されます。
キーを作成する
列マスター キー (CMK) と列暗号化キー (CEK) の作成および使用方法については、Microsoft の Always Encrypted に関するドキュメントを参照してください。手順の概要は次のとおりです。
-
xDB Collection データベースに接続するロールで、CMK をエクスポートして適切な証明書ストアにインポートします。
-
各ロールのユーザーに CMK へのアクセス許可があることを確認してください。ローカル マシンの証明書ストアを使用している場合、各ロールのユーザーには読み取りアクセス許可が必要です。
トポロジ
ロール
ユーザーの例 (<IdentityType>\<username>)
XP 単一
xConnect (スタンドアロン) (w3wp)
IIS AppPool\AppPoolName
xConnect Search Indexer (Windows サービス)
NT AUTHORITY\LocalService
XP スケーリング
xConnect Collection Search (w3wp)
IIS AppPool\AppPoolName
xConnect Collection (w3wp)
IIS AppPool\AppPoolName
xConnect Search Indexer (Windows サービス)
NT AUTHORITY\LocalService
Azure Web App Service を使用しているが、Azure Key Vault を使用していない場合は、「Using SQL Always Encrypted with Azure Web App Service (Azure Web App Service で SQL Always Encrypted を使用する)」を参照してください。
xConnect ロールを設定する
次の手順は、xDB Collection データベースにアクセスするロールのすべてのインスタンスで実行する必要があります。
-
xConnect Search Indexer
-
xConnect Collection Search service
-
xConnect Collection service
Index Worker ファイルの設定も忘れずに変更してください。
Always Encrypted を使用するように xConnect ロールを設定するには:
-
<role-root>\App_data\config\Sitecore\Collection\sc.Xdb.Collection.Data.Sql.xml
設定ファイルを開き、UseAlwaysEncrypted
要素を true に設定します。
<UseAlwaysEncrypted>true</UseAlwaysEncrypted>
オプション 2: Azure Key Vault
Azure Key Vault を使用している場合は、次の手順が適用されます。
キーを作成する
Azure Key Vault の設定方法については、Microsoft の Azure Key Vault に関するドキュメントを参照してください。手順の概要は次のとおりです。
-
アプリケーション (xConnect ロール) を Azure Active Directory に登録します。
-
キー/シークレットを使用するようにアプリケーションを承認します。
-
Azure Key Vault に基づいて列マスター キー (CMK) と列暗号化キー (CEK) を作成します。その方法については、https://docs.microsoft.com/en-us/azure/sql-database/sql-database-always-encrypted-azure-key-vault の「Master Key Configuratiion (マスター キーの構成)」セクションを参照してください。
xConnect ロールを設定する
次の手順は、xDB Collection データベースにアクセスするロールのすべてのインスタンスで実行する必要があります。
-
xConnect Search Indexer
-
xConnect Collection Search service
-
xConnect Collection service
Index Worker ファイルの設定も忘れずに変更してください。
-
<role-root>\App_data\config\Sitecore\Collection\sc.Xdb.Collection.Data.Sql.xml
設定ファイルを開き、UseAlwaysEncrypted
要素を true に設定します。RequestResponse<UseAlwaysEncrypted>true</UseAlwaysEncrypted>
-
Sitecore 9.1 Update-1 以降では、
App_Data\Config\Sitecore\Collection\sc.Xdb.Collection.Data.Sql.KeyStoreProviders.xml.disabled
を有効にします。Sitecore 9.1 初期リリース以前では、<role-root>\App_Data\Config\Sitecore\CoreServices\sc.Xdb.Sql.Common.Encryption.AzureKeyVault.xml.disabled
を有効にします。注記このファイルでは、
ClientIdAppSettingsKey
(デフォルト値:AzureKeyVaultClientId
) とClientSecretAppSettingsKey
(デフォルト値:AzureKeyVaultClientSecret
) の設定の名前が定義されます。これらの設定を変更する必要はありません。 -
<role-root>\App_Config\App.config
に、次のアプリ設定を追加します。その値を Azure Key Vault からコピーします (ClientId、SecretId)。RequestResponse<add key="AzureKeyVaultClientId" value="1fb143e0-b103-472b-a281-c8727d3dfb2f" /> <add key="AzureKeyVaultClientSecret" value="mfCEb0z5r3UOIBMG38tpbdi1OvC9NvUSJV9u+VwpGEg=" />
すべてのシャードで Always Encrypted を設定する
次の手順は、各シャードで実行する必要があり、CEK キーと CMK キーが作成されていることを前提としています。
-
xDB Collection データベースのすべてのストアド プロシージャを含むスクリプトを生成します。このスクリプトを保存します。
-
xDB Collection データベースからすべてのストアド プロシージャを削除します。
-
次のテーブルに対して変更のトラッキングを無効にします。
-
[Contacts]
-
[ContactFacets]
-
[Interactions]
-
[InteractionFacets]
-
-
対応する暗号化タイプを使用して、次の列に対して Always Encrypted を設定します。
列
暗号化タイプ
[ContactFacets].[FacetData]
ランダム化
[ContactFacets_Staging].[FacetData]
ランダム化
[InteractionFacets].[FacetData]
ランダム化
[InteractionFacets_Staging].[FacetData]
ランダム化
[DeviceProfileFacets].[FacetData]
ランダム化
[DeviceProfileFacets_Staging].[FacetData]
ランダム化
[ContactIdentifiers].[Identifier]
決定論的
[ContactIdentifiers].[Source]
決定論的
[ContactIdentifiers_Staging].[Identifier]
決定論的
[ContactIdentifiers_Staging].[Source]
決定論的
[ContactIdentifiersIndex].[Identifier]
決定論的
[ContactIdentifiersIndex].[Source]
決定論的
[ContactIdentifiersIndex_Staging].[Identifier]
決定論的
[ContactIdentifiersIndex_Staging].[Source]
決定論的
[GetContactIdsByIdentifiers_Staging].[Identifier]
決定論的
[GetContactIdsByIdentifiers_Staging].[Source]
決定論的
[GetContactsByIdentifiers_Staging].[Identifier]
決定論的
[GetContactsByIdentifiers_Staging].[Source]
決定論的
[CheckContacts_Staging].[Identifier]
決定論的
[CheckContacts_Staging].[Source]
決定論的
[UnlockContactIdentifiersIndex_Staging].[Identifier]
決定論的
[UnlockContactIdentifiersIndex_Staging].[Source]
決定論的
-
手順 1 で作成したスクリプトを使用して、ストアド プロシージャを復元します。
-
次のテーブルに対して変更のトラッキングを再度有効にします。
-
[Contacts]
-
[ContactFacets]
-
[Interactions]
-
[InteractionFacets]
-
-
制限されたユーザーに次のアクセス許可を付与します (デフォルトでは、このユーザーの名前は collection_user です)。
GRANT VIEW ANY COLUMN MASTER KEY DEFINITION TO [collection_user]
GRANT VIEW ANY COLUMN ENCRYPTION KEY DEFINITION TO [collection_user]