

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# for AWS HealthScribe 靜態資料加密
<a name="health-scribe-encryption"></a>

根據預設， AWS HealthScribe 提供靜態加密，以保護使用 AWS HealthScribe 受管 AWS Key Management Service (AWS KMS) 金鑰的敏感客戶資料。依預設加密靜態資料，有助於降低保護敏感資料所涉及的營運開銷和複雜性。此外，它還可讓您建置符合嚴格加密合規和法規要求的安全應用程式。當您建立 AWS HealthScribe 轉錄任務或啟動串流時，您可以指定客戶受管金鑰。這會新增第二層加密。
+ **AWS HealthScribe 受管 AWS KMS 金鑰** — AWS HealthScribe 預設會使用 AWS HealthScribe 受管 AWS Key Management Service (AWS KMS) 金鑰自動加密中繼檔案。您無法停用此加密層，或選擇替代加密類型。您無法檢視、管理或使用金鑰，或稽核其使用方式。不過，您不需要採取任何動作或變更任何程式，即可保護加密您資料的金鑰。
+ **客戶受管金鑰** — AWS HealthScribe 支援使用您建立、擁有和管理的對稱客戶受管金鑰，以透過現有的 AWS 擁有的加密新增第二層加密。您可以完全控制此層加密，因此能執行以下任務：
  + 建立和維護金鑰政策
  + 建立和維護 IAM 政策和授予
  + 啟用和停用金鑰政策
  + 輪換金鑰密碼編譯資料
  + 新增 標籤
  + 建立金鑰別名
  + 安排金鑰供刪除

  如需詳細資訊，請參閱《 AWS Key Management Service 開發人員指南》中的[客戶受管金鑰](https://docs.aws.amazon.com//kms/latest/developerguide/concepts.html#customer-cmk)。

**注意**  
AWS HealthScribe 會使用擁有 AWS的金鑰自動啟用靜態加密，免費保護個人身分識別資料。不過，使用客戶受管金鑰會產生 AWS KMS 費用。如需定價的詳細資訊，請參閱 [AWS Key Management Service 定價](https://aws.amazon.com//kms/pricing/)。  
 如需詳細資訊 AWS KMS，請參閱[什麼是 AWS Key Management Service](https://docs.aws.amazon.com//kms/latest/developerguide/overview.html) 。

**Topics**
+ [建立客戶受管金鑰](health-scribe-encryption-customer.md)
+ [指定 AWS HealthScribe 的客戶受管金鑰](#health-scribe-encryption-managed)
+ [AWS KMS 加密內容](#health-scribe-encryption-context)
+ [監控 AWS HealthScribe 的加密金鑰](#hscribe-monitoring-keys)

## 指定 AWS HealthScribe 的客戶受管金鑰
<a name="health-scribe-encryption-managed"></a>

 您可以將客戶受管金鑰指定為轉錄任務或串流的第二層加密。
+ 對於轉錄任務，您可以在 [StartMedicalScribeJob](https://docs.aws.amazon.com//transcribe/latest/APIReference/API_StartMedicalScribeJob.html) API 操作的 [OutputEncryptionKMSKeyId](https://docs.aws.amazon.com//transcribe/latest/APIReference/API_StartMedicalScribeJob.html#transcribe-StartMedicalScribeJob-request-OutputEncryptionKMSKeyId) 中指定金鑰。
+ 對於串流，您可以在 MedicalScribeConfigurationEvent 的 [MedicalScribeEncryptionSettings](https://docs.aws.amazon.com//transcribe/latest/APIReference/API_streaming_MedicalScribeEncryptionSettings.html) 中指定 金鑰。 [MedicalScribeConfigurationEvent](https://docs.aws.amazon.com//transcribe/latest/APIReference/API_streaming_MedicalScribeConfigurationEvent.html) 

## AWS KMS 加密內容
<a name="health-scribe-encryption-context"></a>

 AWS KMS 加密內容是純文字、非私密金鑰：值對的映射。此映射代表額外的已驗證資料，稱為加密內容對，可為您的資料提供多一層的安全性。 AWS HealthScribe 需要對稱加密金鑰，才能將 AWS HealthScribe 輸出加密到客戶指定的 Amazon S3 儲存貯體。若要了解詳細資訊，請參閱 [AWS KMS中的非對稱金鑰](https://docs.aws.amazon.com//kms/latest/developerguide/symmetric-asymmetric.html)。

 建立加密內容對時，*請勿*包含敏感資訊。加密內容不是秘密，它在 CloudTrail 日誌中以純文字顯示 （因此您可以使用它來識別和分類密碼編譯操作）。加密內容對可以包含特殊字元，例如底線 (`_`)、破折號 (`-`)、斜線 (`/`、`\`) 和冒號 (`:`)。

**提示**  
 將加密內容對中的值與要加密的資料建立關聯會很實用。雖然不是必要的舉動，但我們建議您使用與加密內容相關的非敏感中繼資料，例如檔案名稱、標頭值或未加密的資料庫欄位。  
 若要搭配 API 使用輸出加密，請在 [StartMedicalScribeJob](https://docs.aws.amazon.com//transcribe/latest/APIReference/API_StartMedicalScribeJob.html) 操作中設定 [KMSEncryptionContext](https://docs.aws.amazon.com//transcribe/latest/APIReference/API_StartMedicalScribeJob.html#transcribe-StartMedicalScribeJob-request-KMSEncryptionContext) 參數。為了提供輸出加密操作的加密內容，[OutputEncryptionKMSKeyId](https://docs.aws.amazon.com//transcribe/latest/APIReference/API_StartMedicalScribeJob.html#transcribe-StartMedicalScribeJob-request-OutputEncryptionKMSKeyId) 參數必須參考對稱 AWS KMS 金鑰 ID。  
對於串流，您可以在 [MedicalScribeConfigurationEvent](https://docs.aws.amazon.com//transcribe/latest/APIReference/API_streaming_MedicalScribeConfigurationEvent.html) `KmsEncryptionContext`的 MedicalScribeEncryptionSettings 中指定 的鍵值對。 [MedicalScribeEncryptionSettings](https://docs.aws.amazon.com//transcribe/latest/APIReference/API_streaming_MedicalScribeEncryptionSettings.html)   
 您可以使用 [AWS KMS 條件金鑰](https://docs.aws.amazon.com//kms/latest/developerguide/policy-conditions.html#conditions-kms)搭配 IAM 政策，根據[密碼編譯操作](https://docs.aws.amazon.com//kms/latest/developerguide/concepts.html#cryptographic-operations)請求中使用的加密內容來控制對對稱加密 AWS KMS 金鑰的存取。如需加密內容政策範例，請參閱 [AWS KMS 加密內容政策](https://docs.aws.amazon.com//transcribe/latest/dg/security_iam_id-based-policy-examples.html#kms-context-policy)。  
 加密內容是選用項目，但建議使用。如需詳細資訊，請參閱[加密內容](https://docs.aws.amazon.com//kms/latest/developerguide/concepts.html#encrypt_context)。

### AWS HealthScribe 加密內容
<a name="hscribe-context-details"></a>

AWS HealthScribe 在所有 AWS Key Management Service 密碼編譯操作中使用相同的加密內容。加密內容是字串對字串的映射，可以自訂為您想要的任何項目。

```
"encryptionContext": {
   "ECKey": "ECValue"
   ...
}
```

對於 AWS HealthScribe 串流，以下是服務產生的預設加密內容。它會將此內容套用到您提供的任何加密內容上。

```
"encryptionContext": {
  "aws:<region>:transcribe:medical-scribe:session-id": "1234abcd-12ab-34cd-56ef-123456SAMPLE"
}
```

對於 AWS HealthScribe 轉錄任務，以下是服務產生的預設加密內容。它會將此內容套用到您提供的任何加密內容上。

```
"encryptionContext": {
  "aws:<region>:transcribe:medical-scribe:job-name": "<job-name>",
  "aws:<region>:transcribe:medical-scribe:start-time-epoch-ms": "<job-start-time>"
}
```

如果您不提供任何加密內容，則所有 AWS KMS 密碼編譯操作只會使用服務產生的加密內容。

**使用加密內容監控 AWS HealthScribe **

當您使用對稱客戶受管金鑰來加密靜態 in AWS HealthScribe 中的資料時，您也可以使用稽核記錄和日誌中的加密內容來識別客戶受管金鑰的使用方式。加密內容也會出現在 AWS CloudTrail 或 CloudWatch Logs 產生的日誌中。

**使用加密內容控制對客戶受管金鑰的存取**

 您也可以在金鑰政策和 IAM 政策中，使用加密內容來控制對對稱客戶受管金鑰的存取。

 以下是授予特定加密內容之客戶受管金鑰存取權的金鑰政策陳述式範例。此政策陳述式中的 條件要求 KMS 金鑰使用具有指定加密內容的加密內容限制條件。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "AllowAccessToResourceAccessRoleForMedicalScribe",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::{{111122223333}}:role/{{ResourceAccessRole}}"
            },
            "Action": [
                "kms:Encrypt",
                "kms:Decrypt",
                "kms:GenerateDataKey*"
            ],
            "Resource": "arn:aws:kms:{{us-west-2}}:{{111122223333}}:key/{{KMS-Example-KeyId}}",
            "Condition": {
                "StringEquals": {
                    "kms:EncryptionContext:aws:us-east-1:transcribe:medical-scribe:session-id": "{{1234abcd-12ab-34cd-56ef-123456SAMPLE}}",
                    "kms:EncryptionContext:{{ECKey}}": "{{ECValue}}"
                }
            }
        },
        {
            "Sid": "AllowAccessToResourceAccessRoleForDescribeKey",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::{{111122223333}}:role/{{ResourceAccessRole}}"
            },
            "Action": "kms:DescribeKey",
            "Resource": "arn:aws:kms:{{us-west-2}}:{{111122223333}}:key/{{KMS-Example-KeyId}}"
        }
    ]
}
```

------

## 監控 AWS HealthScribe 的加密金鑰
<a name="hscribe-monitoring-keys"></a>

當您搭配 AWS HealthScribe 使用 AWS Key Management Service 客戶受管金鑰時，您可以使用 AWS CloudTrail 或 CloudWatch 日誌來追蹤 AWS HealthScribe 傳送的請求 AWS KMS。

下列範例是 CloudTrail Encrypt 和 Decrypt 事件，您可以使用這些事件來監控 AWS HealthScribe 如何使用您的客戶受管金鑰。

**加密**

```
{
   "eventVersion":"1.09",
   "userIdentity":{
      "type":"AssumedRole",
      "principalId":"AROAIGDTESTANDEXAMPLE:Sampleuser01",
      "arn":"arn:aws:sts::{{123456789012}}:assumed-role/Admin/Sampleuser01",
      "accountId":"{{123456789012}}",
      "accessKeyId":"AKIAIOSFODNN7EXAMPLE3",
      "sessionContext":{
         "sessionIssuer":{
            "type":"Role",
            "principalId":"AROAIGDTESTANDEXAMPLE:Sampleuser01",
            "arn":"arn:aws:sts::{{123456789012}}:assumed-role/Admin/Sampleuser01",
            "accountId":"{{123456789012}}",
            "userName":"Admin"
         },
         "attributes":{
            "creationDate":"2024-08-16T01:10:05Z",
            "mfaAuthenticated":"false"
         }
      },
      "invokedBy":"transcribe.streaming.amazonaws.com"
   },
   "eventTime":"2024-08-16T01:10:05Z",
   "eventSource":"kms.amazonaws.com",
   "eventName":"Encrypt",
   "awsRegion":"us-east-1",
   "sourceIPAddress":"transcribe.streaming.amazonaws.com",
   "userAgent":"transcribe.streaming.amazonaws.com",
   "requestParameters":{
      "encryptionContext":{
         "aws:us-east-1:transcribe:medical-scribe:session-id":"1234abcd-12ab-34cd-56ef-123456SAMPLE"
      },
      "encryptionAlgorithm":"SYMMETRIC_DEFAULT",
      "keyId":"{{1234abcd-12ab-34cd-56ef-1234567890ab}}"
   },
   "responseElements":null,
   "requestID":"cbe0ac33-8cca-49e5-9bb5-dc2b8dfcb389",
   "eventID":"1b9fedde-aa96-48cc-9dd9-a2cce2964b3c",
   "readOnly":true,
   "resources":[
      {
         "accountId":"{{123456789012}}",
         "type":"AWS::KMS::Key",
         "ARN":"arn:aws:kms:us-west-2:{{123456789012}}:key/{{1234abcd-12ab-34cd-56ef-123456SAMPLE}}"
      }
   ],
   "eventType":"AwsApiCall",
   "managementEvent":true,
   "recipientAccountId":"{{123456789012}}",
   "eventCategory":"Management"
}
```

**解密**

```
{
   "eventVersion":"1.09",
   "userIdentity":{
      "type":"AssumedRole",
      "principalId":"AROAIGDTESTANDEXAMPLE:Sampleuser01",
      "arn":"arn:aws:sts::{{123456789012}}:assumed-role/Admin/Sampleuser01",
      "accountId":"{{123456789012}}",
      "accessKeyId":"AKIAIOSFODNN7EXAMPLE3",
      "sessionContext":{
         "sessionIssuer":{
            "type":"Role",
            "principalId":"AROAIGDTESTANDEXAMPLE:Sampleuser01",
            "arn":"arn:aws:sts::{{123456789012}}:assumed-role/Admin/Sampleuser01",
            "accountId":"{{123456789012}}",
            "userName":"Admin"
         },
         "attributes":{
            "creationDate":"2024-08-16T20:47:04Z",
            "mfaAuthenticated":"false"
         }
      },
      "invokedBy":"transcribe.streaming.amazonaws.com"
   },
   "eventTime":"2024-08-16T20:47:04Z",
   "eventSource":"kms.amazonaws.com",
   "eventName":"Decrypt",
   "awsRegion":"us-east-1",
   "sourceIPAddress":"transcribe.streaming.amazonaws.com",
   "userAgent":"transcribe.streaming.amazonaws.com",
   "requestParameters":{
      "keyId":"mrk-de27f019178f4fbf86512ab03ba860be",
      "encryptionAlgorithm":"SYMMETRIC_DEFAULT",
      "encryptionContext":{
         "aws:us-east-1:transcribe:medical-scribe:session-id":"1234abcd-12ab-34cd-56ef-123456SAMPLE"
      }
   },
   "responseElements":null,
   "requestID":"8b7fb865-48be-4e03-ac3d-e7bee3ba30a1",
   "eventID":"68b7a263-d410-4701-9e2b-20c196628966",
   "readOnly":true,
   "resources":[
      {
         "accountId":"{{123456789012}}",
         "type":"AWS::KMS::Key",
         "ARN":"arn:aws:kms:us-west-2:{{123456789012}}:key/{{1234abcd-12ab-34cd-56ef-123456SAMPLE}}"
      }
   ],
   "eventType":"AwsApiCall",
   "managementEvent":true,
   "recipientAccountId":"{{123456789012}}",
   "eventCategory":"Management"
}
```