将赛 Amazon Secrets Manager 事与 Amazon 进行匹配 EventBridge - Amazon Secrets Manager
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

将赛 Amazon Secrets Manager 事与 Amazon 进行匹配 EventBridge

在亚马逊中 EventBridge,您可以匹配 CloudTrail 日志条目中的 Secrets Manager 事件。您可以配置 EventBridge 规则来查找这些事件,然后将新生成的事件发送到目标以采取行动。有关 Secrets Manager 记录的 CloudTrail 条目列表,请参阅CloudTrail 条目。有关设置说明 EventBridge,请参阅《EventBridge 用户指南》 EventBridge中的 “入门”。

将所有更改与指定密钥匹配

以下示例显示了一种 EventBridge 事件模式,该模式与密钥更改的日志条目相匹配。

{ "source": ["aws.secretsmanager"], "detail-type": ["AWS API Call via CloudTrail"], "detail": { "eventSource": ["secretsmanager.amazonaws.com"], "eventName": ["DeleteResourcePolicy", "PutResourcePolicy", "RotateSecret", "TagResource", "UntagResource", "UpdateSecret"], "responseElements": { "arn": ["arn:aws:secretsmanager:us-west-2:012345678901:secret:mySecret-a1b2c3"] } } }

在轮换密钥值时匹配事件

以下示例显示了一种 EventBridge 事件模式,该模式与因手动更新或自动轮换而发生的机密值更改的 CloudTrail 日志条目相匹配。由于有些事件来自 Secrets Manager 操作,有些则由 Secrets Manager 服务生成,因此两者都必须包含 detail-type

{ "source": ["aws.secretsmanager"], "$or": [ { "detail-type": ["AWS API Call via CloudTrail"] }, { "detail-type": ["AWS Service Event via CloudTrail"] } ], "detail": { "eventSource": ["secretsmanager.amazonaws.com"], "eventName": ["PutSecretValue", "UpdateSecret", "RotationSucceeded"] } }