

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Amazon S3 データアクセスのキー管理
<a name="key-management"></a>

このページは、プロバイダーが SSE-KMS を使用して暗号化されたオブジェクトを共有する Amazon S3 データアクセスタイプに固有のものです。サブスクライバーは、アクセスに使用するキーを付与されている必要があります。

Amazon S3 バケットに AWS KMS カスタマーマネージドキーを使用して暗号化されたデータが含まれている場合は、それらを AWS KMS keys と共有 AWS Data Exchange して Amazon S3 データアクセスデータセットを設定する必要があります。詳細については、「[ステップ 2: Amazon S3 データアクセスを設定する](publish-s3-data-access-product.md#configure-s3-data-access-product)」を参照してください。

**Topics**
+ [AWS KMS 許可の作成](#create-kms-grants)
+ [暗号化コンテキストと許可制約](#encryption-context-grant-constraint)
+ [AWS KMS keys での のモニタリング AWS Data Exchange](#monitoring-your-kms-keys)

## AWS KMS 許可の作成
<a name="create-kms-grants"></a>

Amazon S3 データアクセスデータセット AWS KMS keys の一部として を指定すると、 AWS Data Exchange は AWS KMS key 共有された各 に AWS KMS 許可を作成します。*親*権限と呼ばれるこの権限は、サブスクライバーに追加の AWS KMS 権限を作成する AWS Data Exchange アクセス許可を付与するために使用されます。*これらの追加許可は子許可補助金と呼ばれます*。各サブスクライバーには 1 つの AWS KMS 許可が付与されます。サブスクライバーは、 を復号するアクセス許可を取得します AWS KMS key。その後、共有されている暗号化された Amazon S3 オブジェクトを復号して使用できます。詳細については、「*AWS Key Management Service デベロッパーガイド*」の「[AWS KMSでの許可](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html)」を参照してください。

AWS Data Exchange は、 AWS KMS 親グラントを使用して、作成する AWS KMS グラントのライフサイクルを管理します。サブスクリプションが終了すると、 は対応するサブスクライバー用に作成された AWS KMS 子許可を AWS Data Exchange 廃止します。リビジョンが取り消された場合、またはデータセットが削除された場合、 は AWS KMS 親許可を AWS Data Exchange 廃止します。 AWS KMS アクションの詳細については、 [AWS KMS API リファレンス](https://docs.aws.amazon.com/kms/latest/APIReference/API_Operations.html)を参照してください。

## 暗号化コンテキストと許可制約
<a name="encryption-context-grant-constraint"></a>

AWS Data Exchange は許可制約を使用して、リクエストに指定された暗号化コンテキストが含まれている場合にのみ復号オペレーションを許可します。Amazon S3 バケットキー機能を使用してAmazon S3 オブジェクトを暗号化し、 と共有できます AWS Data Exchange。バケットの Amazon リソースネーム (ARN) は Amazon S3 によって暗号化コンテキストとして暗黙的に使用されます。次の例は、 が AWS KMS 作成するすべての許可の許可制約としてバケット ARN AWS Data Exchange を使用することを示しています。

```
"Constraints": {
   "EncryptionContextSubset":  "aws:s3:arn": “arn:aws:s3:::<Bucket ARN>"
   }
}
```

## AWS KMS keys での のモニタリング AWS Data Exchange
<a name="monitoring-your-kms-keys"></a>

 AWS KMS カスタマーマネージドキーを と共有する場合 AWS Data Exchange、 [AWS CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)を使用して、 AWS Data Exchange またはデータサブスクライバーが送信するリクエストを追跡できます AWS KMS。以下は、 `CreateGrant`および `Decrypt`呼び出しの CloudTrail ログの例です AWS KMS。

------
#### [ CreateGrant for parent ]

`CreateGrant` は、 自体のために によって作成された親許可 AWS Data Exchange 用です。

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole", 
        "principalId": "AROAIGDTESTANDEXAMPLE:Provider01",
        "arn": "arn:aws:sts::<your-account-id>:assumed-role/Admin/Provider01",
        "accountId": "<your-account-id>",
        "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AROAIGDTESTANDEXAMPLE",
                "arn": "arn:aws:iam::<your-account-id>:role/Admin/Provider01”,
                "accountId": "<your-account-id>",
                "userName": "Admin"
            },
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2023-02-16T17:29:23Z",
                "mfaAuthenticated": "false"
            }
        },
        "invokedBy": "datax.amazonaws.com"
    },
    "eventTime": "2023-02-16T17:32:47Z",
    "eventSource": "kms.amazonaws.com",
    "eventName": "CreateGrant",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "datax.amazonaws.com",
    "userAgent": "datax.amazonaws.com",
    "requestParameters": {
        "keyId": "<Key ARN of the Key you shared with AWS Data Exchange>",
        "operations": [
            "CreateGrant",
            "Decrypt",
            "RetireGrant"
        ],
        "granteePrincipal": "dataexchange.us-east-2.amazonaws.com",
        "retiringPrincipal": "dataexchange.us-east-2.amazonaws.com",
        "constraints": {
            "encryptionContextSubset": { AWS:s3:arn": "arn:aws:s3:::<Your Bucket ARN>"
            }
        }
    },
    "responseElements": {
        "grantId": "<KMS Grant ID of the created Grant>",
        "keyId": "<Key ARN of the Key you shared with AWS Data Exchange>"
    },
    "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "readOnly": false,
    "resources": [
        {
            "accountId": "<Your Account Id>",
            "type": "AWS::KMS::Key",
            "ARN": "<Key ARN of the Key you shared with AWS Data Exchange>"
        }
    ],
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "<Your Account Id>",
    "eventCategory": "Management"
}
```

------
#### [ CreateGrant for child ]

`CreateGrant` は、サブスクライバー用に によって作成された子許可 AWS Data Exchange 用です。

```
{
      "eventVersion": "1.08",
      "userIdentity": {
         "type": "AWSService",
         "invokedBy": "datax.amazonaws.com"
     },
     "eventTime": "2023-02-15T23:15:49Z",
     "eventSource": "kms.amazonaws.com",
     "eventName": "CreateGrant",
     "awsRegion": "us-east-2",
     "sourceIPAddress": "datax.amazonaws.com",
     "userAgent": "datax.amazonaws.com",
     "requestParameters": {
         "keyId": "<Key ARN of the Key you shared with AWS Data Exchange>",
         "operations": [
             "Decrypt"
         ],
         "granteePrincipal": “<Subscriber’s account Id>”,
         "retiringPrincipal": "dataexchange.us-east-2.amazonaws.com",
         "constraints": {
             "encryptionContextSubset": {
                 "aws:s3:arn": "arn:aws:s3:::<Your Bucket ARN>"
             }
         }
     },
     "responseElements": {
         "grantId": "<KMS Grant ID of the created Grant>",
         "keyId": "<Key ARN of the Key you shared with AWS Data Exchange>"
     },
     "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
     "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
     "readOnly": false,
     "resources": [
         {
             "accountId": "<Your Account Id>",
             "type": "AWS::KMS::Key",
             "ARN": "<Key ARN of the Key you shared with AWS Data Exchange>"
         }
     ],
     "eventType": "AwsApiCall",
     "managementEvent": true,
     "recipientAccountId": "<Your Account Id>",
     "sharedEventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE ",
     "eventCategory": "Management"
}
```

------
#### [ Decrypt ]

`Decrypt`は、サブスクライバーがサブスクライブしている暗号化データを読み取ろうとしたときに呼び出されます。

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AWSAccount",
        "principalId": "AROAIGDTESTANDEXAMPLE:Subscriber01",
        "accountId": "<subscriber-account-id>",
        "invokedBy": "<subscriber’s IAM identity>"
    },
    "eventTime": "2023-02-15T23:28:30Z",
    "eventSource": "kms.amazonaws.com",
    "eventName": "Decrypt",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "<subscriber’s IP address>",
    "userAgent": "<subscriber’s user agent>",
    "requestParameters": {
        "encryptionContext": {
            "aws:s3:arn": "arn:aws:s3:::<Your Bucket ARN>"
        },
        "encryptionAlgorithm": "SYMMETRIC_DEFAULT"
    },
    "responseElements": null,
    "requestID": ""ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "eventID": ""ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE”,
    "readOnly": true,
    "resources": [
        {
            "accountId": "<Your Account Id>",
            "type": "AWS::KMS::Key",
            "ARN": "<Key ARN of the Key you shared with AWS Data Exchange>"
        }
    ],
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "602466227860",
    "sharedEventID": "bcf4d02a-31ea-4497-9c98-4c3549f20a7b",
    "eventCategory": "Management"
}
```

------