本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
在 EventBridge AWS KMS 中使用 加密事件匯流排日誌
傳送日誌時,EventBridge 會使用為事件匯流排指定的 KMS 金鑰來加密每個日誌記錄的 detail
和 error
區段。如果您已為事件匯流排指定客戶受管金鑰,EventBridge 會使用該金鑰進行傳輸中的加密。交付後,記錄會解密,然後使用為日誌目的地指定的 KMS 金鑰重新加密。
事件匯流排日誌加密內容
加密內容是一組金鑰/值對,其中包含任意非私密資料。在加密資料的請求中包含加密內容時, AWS KMS 會以密碼編譯方式將加密內容繫結至加密的資料。若要解密資料,您必須傳遞相同的加密內容。
您也可以使用加密內容做為政策和授權的條件。
如果您使用客戶受管金鑰來保護 EventBridge 資源,您可以使用加密內容來識別稽核記錄和日誌 KMS key 中 的使用。它也會以純文字顯示在日誌中,例如 AWS CloudTrail 和 Amazon CloudWatch Logs。
對於事件匯流排日誌, EventBridge 會在所有 AWS KMS 密碼編譯操作中使用相同的加密內容。
"encryptionContext": { "kms:EncryptionContext:SourceArn": "arn:
partition
:logs:region
:account
:*" }
AWS KMS 事件匯流排記錄的金鑰政策許可
對於使用客戶受管金鑰的事件匯流排,您必須將下列許可新增至金鑰政策。
-
允許 EventBridge 使用客戶受管金鑰加密日誌。
{ "Sid": "Enable log service encryption", "Effect": "Allow", "Principal": { "Service": "events.amazonaws.com" }, "Action": [ "kms:GenerateDataKey" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:SourceArn": "arn:
partition
:logs:region
:account
:*" } } } -
允許記錄服務解密 EventBridge 傳送的日誌。
{ "Sid": "Enable log delivery decryption", "Effect": "Allow", "Principal": { "Service": "delivery.logs.amazonaws.com" }, "Action": [ "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:SourceArn": "arn:
partition
:logs:region
:account
:*" } } }