1 つのプロジェクトの保管時の暗号化構成を更新
クラウドプロバイダーを通じて管理するキーを使用して、保管時の暗号化の構成を更新します。MongoDB Cloud は、独自のキー管理を使用しない場合でも、すべてのストレージを暗号化します。このリソースには、リクエスト元のサービス アカウントまたは API キーにプロジェクト オーナーのロールが必要です。この機能は、M0
無料クラスター、M2
、M5
、サーバーレス クラスターでは使用できません。
MongoDB Cloud プロジェクトでカスタマー キー管理プロバイダーを使った保管時の暗号化を少なくとも 1 つ設定すると、プロジェクトオーナーは暗号化が必要な MongoDB Cloud クラスターごとにカスタマーキー管理を使った保管時の暗号化を有効にできます。カスタマー キー管理プロバイダーを使用した保管時の暗号化は、クラスター クラウド サービス プロバイダーと一致する必要はありません。MongoDB Cloud は、ユーザーが管理する暗号化キーを自動的にローテーションしません。キー ローテーションのベストプラクティスについては、カスタマー キー管理プロバイダーのドキュメントとガイダンスを利用して、ご希望の保管時の暗号化を行ってください。MongoDB Cloud プロジェクトでキー管理を使って、カスタマー キー管理を使った保管時の暗号化を設定すると、MongoDB Cloud は自動的に 90 日間のキー ローテーション アラートを作成します。MongoDB Cloud は、独自のキー管理を使用するかどうかに関係なく、すべてのストレージを暗号化します。
path パラメータ
-
プロジェクトを識別する一意の 24 桁の 16 進数文字列。 認証済みユーザーがアクセスできるすべてのプロジェクトを取得するには、 /groups エンドポイントを使用します。
注: グループとプロジェクトは同義語です。そのため、グループ ID はプロジェクト ID と同じです。既存のグループの場合、グループ/プロジェクト ID は同じままです。リソースおよび対応するエンドポイントでは、グループという用語が使用されます。
形式は次のパターンと一致する必要があります:
^([a-f0-9]{24})$
。
クエリ パラメータ
-
アプリケーションがレスポンスを
envelope
JSON オブジェクトにラップするかどうかを示すフラグ。一部の API クライアントは、HTTP レスポンス ヘッダーまたはステータス コードにアクセスできません。これを修正するには、クエリで envelope=true を設定します。結果のリストを返すエンドポイントは、結果オブジェクトをエンベロープとして使用します。アプリケーションは、レスポンス本体にステータス パラメータを追加します。デフォルト値は
false
です。 -
レスポンス本体を pretty-print 形式にするかどうかを示すフラグ。
デフォルト値は
false
です。Prettyprint
body
必須
必要なパラメーターは、カスタマー キー管理を使用して保管時の暗号化を有効にしているかどうかによって異なります。
CMK(Customer Key Management、カスタマー キー管理)を使用して保管時の暗号化を有効にした場合、Atlas には目的の暗号化プロバイダーの全パラメーターが必要です。
- AWS KMS(Key Management Service)を使うには、MongoDB Cloud に awsKms オブジェクトのすべてのフィールドが必要です。
- Azure Key Vault を使うには、MongoDB Cloud に azureKeyVault オブジェクトのすべてのフィールドが必要です。
- Google Cloud Platform KMS(KMS)を使うには、 MongoDB Cloud に googleCloudKms オブジェクトのすべてのフィールドを必要です認証には、serviceAccountKey(静的認証情報)または roleId (サービスアカウントベースの認証)のいずれかを提供する必要があります。 roleId が構成されていると、serviceAccountKey はのサポートを開始しました。
カスタマー キー管理を使用して保管時の暗号化を有効にした場合、管理者は awsKms、azureKeyVault、または googleCloudKms オブジェクトの変更されたフィールドのみを渡して、このエンドポイントへの構成を更新できます。
-
AWS(Amazon Web Services)KMS 設定の詳細と、指定されたプロジェクトの保管時の暗号化の設定セット。
Amazon Web Services Key Management Service -
AKV(Azure Key Vault)を使用した保管時の暗号化の設定を定義する詳細。
Azure Key Vault -
指定したプロジェクトで専用検索ノードに対し保管時の暗号化が有効になっているかどうかを示すフラグ。
-
Google Cloud KMS(Key Management Service)を使用した保管時の暗号化の設定を定義する詳細。
Google Cloud Key Management Service
curl \
--request PATCH 'https://cloud.mongodb.com/api/atlas/v1.0/groups/32b6e34b3d91647abb20e7b8/encryptionAtRest' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"awsKms":{"accessKeyID":"019dd98d94b4bb778e7552e4","customerMasterKeyID":"string","enabled":true,"region":"US_GOV_WEST_1","requirePrivateNetworking":true,"roleId":"32b6e34b3d91647abb20e7b8","secretAccessKey":"string"},"azureKeyVault":{"azureEnvironment":"AZURE","clientID":"string","enabled":true,"keyIdentifier":"https://EXAMPLEKeyVault.vault.azure.net/keys/EXAMPLEKey/d891821e3d364e9eb88fbd3d11807b86","keyVaultName":"string","requirePrivateNetworking":true,"resourceGroupName":"string","secret":"string","subscriptionID":"string","tenantID":"string"},"enabledForSearchNodes":true,"googleCloudKms":{"enabled":true,"keyVersionResourceID":"projects/my-project-common-0/locations/us-east4/keyRings/my-key-ring-0/cryptoKeys/my-key-0/cryptoKeyVersions/1","roleId":"32b6e34b3d91647abb20e7b8","serviceAccountKey":"string"}}'
{
"awsKms": {
"accessKeyID": "019dd98d94b4bb778e7552e4",
"customerMasterKeyID": "string",
"enabled": true,
"region": "US_GOV_WEST_1",
"requirePrivateNetworking": true,
"roleId": "32b6e34b3d91647abb20e7b8",
"secretAccessKey": "string"
},
"azureKeyVault": {
"azureEnvironment": "AZURE",
"clientID": "string",
"enabled": true,
"keyIdentifier": "https://EXAMPLEKeyVault.vault.azure.net/keys/EXAMPLEKey/d891821e3d364e9eb88fbd3d11807b86",
"keyVaultName": "string",
"requirePrivateNetworking": true,
"resourceGroupName": "string",
"secret": "string",
"subscriptionID": "string",
"tenantID": "string"
},
"enabledForSearchNodes": true,
"googleCloudKms": {
"enabled": true,
"keyVersionResourceID": "projects/my-project-common-0/locations/us-east4/keyRings/my-key-ring-0/cryptoKeys/my-key-0/cryptoKeyVersions/1",
"roleId": "32b6e34b3d91647abb20e7b8",
"serviceAccountKey": "string"
}
}
{
"awsKms": {
"accessKeyID": "019dd98d94b4bb778e7552e4",
"customerMasterKeyID": "string",
"enabled": true,
"region": "US_GOV_WEST_1",
"requirePrivateNetworking": true,
"valid": true
},
"azureKeyVault": {
"azureEnvironment": "AZURE",
"clientID": "string",
"enabled": true,
"keyIdentifier": "https://EXAMPLEKeyVault.vault.azure.net/keys/EXAMPLEKey/d891821e3d364e9eb88fbd3d11807b86",
"keyVaultName": "string",
"requirePrivateNetworking": true,
"resourceGroupName": "string",
"subscriptionID": "string",
"tenantID": "string",
"valid": true
},
"enabledForSearchNodes": true,
"googleCloudKms": {
"enabled": true,
"keyVersionResourceID": "projects/my-project-common-0/locations/us-east4/keyRings/my-key-ring-0/cryptoKeys/my-key-0/cryptoKeyVersions/1",
"roleId": "32b6e34b3d91647abb20e7b8",
"valid": true
}
}
{
"error": 400,
"detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
"reason": "Bad Request",
"errorCode": "VALIDATION_ERROR"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"error": 404,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
"reason": "Not Found",
"errorCode": "RESOURCE_NOT_FOUND"
}
{
"error": 409,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
"reason": "Conflict",
"errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}