本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
Amazon Macie 与AWS CloudTrail集成,后者是一项服务,可记录用户、角色或角色所采取的操作。 AWS 服务 CloudTrail将 Macie 的所有 API 调用捕获为管理事件。捕获的调用中包括通过 Amazon Macie 控制台的调用和对 Amazon Macie API 操作的编程调用。通过使用收集的信息 CloudTrail,您可以确定向 Macie 发出的请求、发出请求的 IP 地址、发出请求的时间以及其他详细信息。
每个事件或日志条目都包含有关生成请求的人员信息。身份信息有助于您确定以下内容:
-
请求是使用根用户凭证还是用户凭证发出的。
-
请求是否代表 AWS IAM Identity Center 用户发出。
-
请求是使用角色还是联合用户的临时安全凭证发出的。
-
请求是否由其他 AWS 服务发出。
CloudTrail 在您创建账户 AWS 账户 时在您的账户中处于活动状态,并且您自动可以访问 CloudTrail 活动历史记录。 CloudTrail 事件历史记录提供了过去 90 天中记录的管理事件的可查看、可搜索、可下载且不可变的记录。 AWS 区域有关更多信息,请参阅《AWS CloudTrail 用户指南》中的 “使用 CloudTrail 事件历史记录”。查看活动历史记录不 CloudTrail收取任何费用。
要持续记录 AWS 账户 过去 90 天内的事件,请创建跟踪或 CloudTrail Lake 事件数据存储。
- CloudTrail 步道
-
跟踪允许 CloudTrail 将日志文件传输到 Amazon S3 存储桶。使用创建的所有跟踪 AWS Management Console 都是多区域的。您可以通过使用 AWS CLI创建单区域或多区域跟踪。建议创建多区域跟踪,因为您可以捕获账户 AWS 区域 中的所有活动。如果您创建单区域跟踪,则只能查看跟踪的 AWS 区域中记录的事件。有关跟踪的更多信息,请参阅《AWS CloudTrail 用户指南》中的为您的 AWS 账户创建跟踪和为组织创建跟踪。
通过创建跟踪,您可以免费将正在进行的管理事件的一份副本传送到您的 Amazon S3 存储桶,但会收取 Amazon S3 存储费用。 CloudTrail 有关 CloudTrail 定价的更多信息,请参阅AWS CloudTrail 定价
。有关 Amazon S3 定价的信息,请参阅 Amazon S3 定价 。 - CloudTrail 湖泊事件数据存储
-
CloudTrail L@@ ak e 允许你对自己的事件运行基于 SQL 的查询。 CloudTrail Lake 将基于行的 JSON 格式的现有事件转换为 Apache ORC
格式。ORC 是一种针对快速检索数据进行优化的列式存储格式。事件将被聚合到事件数据存储中,它是基于您通过应用高级事件选择器选择的条件的不可变的事件集合。应用于事件数据存储的选择器用于控制哪些事件持续存在并可供您查询。有关 CloudTrail Lake 的更多信息,请参阅AWS CloudTrail 用户指南中的使用 AWS CloudTrail Lake。 CloudTrail 湖泊事件数据存储和查询会产生费用。创建事件数据存储时,您可以选择要用于事件数据存储的定价选项。定价选项决定了摄取和存储事件的成本,以及事件数据存储的默认和最长保留期。有关 CloudTrail 定价的更多信息,请参阅AWS CloudTrail 定价
。
在 Macie 管理活动中 AWS CloudTrail
管理事件提供有关对中的资源执行的管理操作的信息 AWS 账户。这些也称为控制面板操作。默认情况下, CloudTrail 记录管理事件。
Amazon Macie 将所有 Macie 控制平面操作记录为管理事件。 CloudTrail例如,对ListFindings
DescribeBuckets
、和CreateClassificationJob
操作的调用会在中生成管理事件 CloudTrail。每个事件都包含 eventSource
字段。此字段 AWS 服务 表示已向发出请求。对于 Macie 事件,此字段的值为:macie2.amazonaws.com
。
有关 Macie 登录的控制平面操作列表 CloudTrail,请参阅《亚马逊 Macie API 参考》中的操作。
Macie 事件的示例 AWS CloudTrail
事件代表来自任何来源的单个请求,包括有关所请求的 API 操作、操作的日期和时间、请求参数等的信息。 CloudTrail 日志文件不是公共 API 调用的有序堆栈跟踪,因此事件不会按任何特定顺序出现。
以下示例显示了演示 Amazon Macie 操作 CloudTrail 的事件。有关事件可能包含的信息的详细信息,请参阅《AWS CloudTrail 用户指南》中的CloudTrail记录内容。
示例:列出调查发现
以下示例显示了亚马逊 Macie ListFindings操作 CloudTrail 的事件。在此示例中,一个 AWS Identity and Access Management (IAM) 用户 (Mary_Major
) 使用 Amazon Macie 控制台检索了有关其账户当前政策调查结果的部分信息。
{
"eventVersion": "1.08",
"userIdentity": {
"type": "IAMUser",
"principalId": "123456789012",
"arn": "arn:aws:iam::123456789012:user/Mary_Major",
"accountId": "123456789012",
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"userName": "Mary_Major",
"sessionContext":{
"attributes": {
"creationdate": "2023-11-14T15:49:57Z",
"mfaAuthenticated": "false"
}
}
},
"eventTime": "2023-11-14T16:09:56Z",
"eventSource": "macie2.amazonaws.com",
"eventName": "ListFindings",
"awsRegion": "us-east-1",
"sourceIPAddress": "198.51.100.1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
"requestParameters": {
"sortCriteria": {
"attributeName": "updatedAt",
"orderBy": "DESC"
},
"findingCriteria": {
"criterion": {
"archived": {
"eq": [
"false"
]
},
"category": {
"eq": [
"POLICY"
]
}
}
},
"maxResults": 25,
"nextToken": ""
},
"responseElements": null,
"requestID": "d58af6be-1115-4a41-91f8-ace03example",
"eventID": "ad97fac5-f7cf-4ff9-9cf2-d0676example",
"readOnly": true,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "123456789012",
"eventCategory": "Management"
}
示例:检索调查发现的敏感数据样本
此示例显示了用于检索和泄露 Amazon Macie 在调查结果中报告的敏感数据样本 CloudTrail 的事件。在此示例中,一个 AWS Identity and Access Management (IAM) 用户 (JohnDoe
) 使用 Amazon Macie 控制台检索和显示敏感数据样本。该用户的账户被配置为代入 IAM 角色(MacieReveal
)来检索和显示受影响的 Amazon Simple Storage Service (Amazon S3) 对象中的敏感数据样本。
以下事件显示了有关用户请求通过执行 Amazon Macie GetSensitiveDataOccurrences操作来检索和泄露敏感数据样本的详细信息。
{
"eventVersion": "1.08",
"userIdentity": {
"type": "AssumedRole",
"principalId": "UU4MH7OYK5ZCOAEXAMPLE:JohnDoe",
"arn": "arn:aws:sts::111122223333:assumed-role/Admin/JohnDoe",
"accountId": "111122223333",
"accessKeyId": "AKIAI44QH8DHBEXAMPLE",
"sessionContext": {
"sessionIssuer": {
"type": "Role",
"principalId": "UU4MH7OYK5ZCOAEXAMPLE",
"arn": "arn:aws:iam::111122223333:role/Admin",
"accountId": "111122223333",
"userName": "Admin"
},
"webIdFederationData": {},
"attributes": {
"creationDate": "2023-12-12T14:40:23Z",
"mfaAuthenticated": "false"
}
}
},
"eventTime": "2023-12-12T17:04:47Z",
"eventSource": "macie2.amazonaws.com",
"eventName": "GetSensitiveDataOccurrences",
"awsRegion": "us-east-1",
"sourceIPAddress": "198.51.100.252",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
"requestParameters": {
"findingId": "3ad9d8cd61c5c390bede45cd2example"
},
"responseElements": null,
"requestID": "c30cb760-5102-47e7-88d8-ff2e8example",
"eventID": "baf52d92-f9c3-431a-bfe8-71c81example",
"readOnly": true,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "111122223333",
"eventCategory": "Management"
}
下一个事件显示有关 Macie 然后通过执行 () AssumeRole操作担任指定的 IAM 角色 AWS Security Token Service (MacieReveal
AWS STS) 的详细信息。
{
"eventVersion": "1.08",
"userIdentity": {
"type": "AWSService",
"invokedBy": "reveal-samples.macie.amazonaws.com"
},
"eventTime": "2023-12-12T17:04:47Z",
"eventSource": "sts.amazonaws.com",
"eventName": "AssumeRole",
"awsRegion": "us-east-1",
"sourceIPAddress": "reveal-samples.macie.amazonaws.com",
"userAgent": "reveal-samples.macie.amazonaws.com",
"requestParameters": {
"roleArn": "arn:aws:iam::111122223333:role/MacieReveal",
"roleSessionName": "RevealCrossAccount"
},
"responseElements": {
"credentials": {
"accessKeyId": "AKIAI44QH8DHBEXAMPLE",
"sessionToken": "XXYYaz...
EXAMPLE_SESSION_TOKEN
XXyYaZAz",
"expiration": "Dec 12, 2023, 6:04:47 PM"
},
"assumedRoleUser": {
"assumedRoleId": "AROAXOTKAROCSNEXAMPLE:RevealCrossAccount",
"arn": "arn:aws:sts::111122223333:assumed-role/MacieReveal/RevealCrossAccount"
}
},
"requestID": "d905cea8-2dcb-44c1-948e-19419example",
"eventID": "74ee4d0c-932d-3332-87aa-8bcf3example",
"readOnly": true,
"resources": [
{
"accountId": "111122223333",
"type": "AWS::IAM::Role",
"ARN": "arn:aws:iam::111122223333:role/MacieReveal"
}
],
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "111122223333",
"eventCategory": "Management"
}
有关 CloudTrail 事件内容的信息,请参阅《AWS CloudTrail 用户指南》中的CloudTrail记录内容。