

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

# Macie 調查結果的 Amazon EventBridge 事件結構描述
<a name="findings-publish-event-schemas"></a>

為了支援與其他應用程式、服務和系統整合，例如監控或事件管理系統，Amazon Macie 會自動將調查結果發佈至 Amazon EventBridge 做為事件。EventBridge 前身為 Amazon CloudWatch Events，是一種無伺服器事件匯流排服務，可從應用程式和其他 將即時資料串流交付 AWS 服務 至 函數、Amazon Simple Notification Service 主題和 Amazon Kinesis 串流等 AWS Lambda 目標。若要進一步了解 EventBridge，請參閱 [Amazon EventBridge 使用者指南](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html)。

**注意**  
如果您目前使用 CloudWatch Events，請注意 EventBridge 和 CloudWatch Events 是相同的基礎服務和 API。不過，EventBridge 包含其他功能，可讓您從軟體即服務 (SaaS) 應用程式和您自己的應用程式接收事件。由於基礎服務和 API 相同，Macie 調查結果的事件結構描述也相同。

Macie 會自動發佈所有新問題清單和現有政策問題清單後續出現的事件，但由[禁止規則](findings-suppression.md)自動封存的問題清單除外。這些事件是符合事件 EventBridge 結構描述的 JSON 物件 AWS 。每個事件都包含特定調查結果的 JSON 表示法。由於資料結構為 EventBridge 事件，因此您可以使用其他應用程式、服務和工具，更輕鬆地監控、處理問題清單並對其採取行動。如需有關 Macie 如何和何時發佈問題清單事件的詳細資訊，請參閱 [設定問題清單的發佈設定](findings-publish-frequency.md)。

**Topics**
+ [Macie 調查結果的事件結構描述](#findings-publish-event-schema)
+ [政策調查結果的事件範例](#findings-publish-event-example-policy)
+ [敏感資料調查結果的事件範例](#findings-publish-event-example-classification)

## Macie 調查結果的事件結構描述
<a name="findings-publish-event-schema"></a>

下列範例顯示 [Amazon Macie 調查結果的 Amazon EventBridge 事件](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html)結構描述。 Amazon Macie 如需問題清單事件中可包含之欄位的詳細說明，請參閱《*Amazon Macie API 參考*》中的[問題清單](https://docs.aws.amazon.com/macie/latest/APIReference/findings-describe.html)。調查結果事件的結構和欄位會與 Amazon Macie API 的`Finding`物件緊密對應。

```
{
    "version": "0",
    "id": "event ID",
    "detail-type": "Macie Finding",
    "source": "aws.macie",
    "account": "AWS 帳戶 ID (string)",
    "time": "event timestamp (string)",
    "region": "AWS 區域 (string)",
    "resources": [
        <-- ARNs of the resources involved in the event -->
    ],
    "detail": { 
        <-- Details of a policy or sensitive data finding -->
    },
    "policyDetails": null, <-- Additional details of a policy finding or null for a sensitive data finding -->
    "sample": Boolean,
    "archived": Boolean
}
```

## 政策調查結果的事件範例
<a name="findings-publish-event-example-policy"></a>

下列範例使用範例資料來示範[政策調查結果](findings-types.md#findings-policy-types)的 Amazon EventBridge 事件中物件和欄位的結構和性質。在此範例中，事件會報告後續出現的現有政策調查結果：Amazon Macie 偵測到封鎖 S3 儲存貯體的公開存取設定已停用。下列欄位和值可協助您判斷此情況：
+ `type` 欄位設定為 `Policy:IAMUser/S3BlockPublicAccessDisabled`。
+ `createdAt` 和 `updatedAt` 欄位有不同的值。這是事件報告後續出現現有政策調查結果的一個指標。如果事件報告了新的問題清單，則這些欄位的值會相同。
+ `count` 欄位設定為 `2`，表示這是問題清單的第二次出現。
+ `category` 欄位設定為 `POLICY`。
+ `classificationDetails` 欄位的值為 `null`，有助於區分政策調查結果的此事件與敏感資料調查結果的事件。對於敏感資料調查結果，此值會是一組物件和欄位，提供如何和找到哪些敏感資料的相關資訊。

另請注意， `sample` 欄位的值為 `true`。此值強調這是用於 文件的範例事件。

```
{
    "version": "0",
    "id": "0948ba87-d3b8-c6d4-f2da-732a1example",
    "detail-type": "Macie Finding",
    "source": "aws.macie",
    "account": "123456789012",
    "time": "2024-04-30T23:12:15Z",
    "region":"us-east-1",
    "resources": [],
    "detail": {
        "schemaVersion": "1.0",
        "id": "64b917aa-3843-014c-91d8-937ffexample",
        "accountId": "123456789012",
        "partition": "aws",
        "region": "us-east-1",
        "type": "Policy:IAMUser/S3BlockPublicAccessDisabled",
        "title": "Block public access settings are disabled for the S3 bucket",
        "description": "All bucket-level block public access settings were disabled for the S3 bucket. Access to the bucket is controlled by account-level block public access settings, access control lists (ACLs), and the bucket’s bucket policy.",
        "severity": {
            "score": 3,
            "description": "High"
        },
        "createdAt": "2024-04-29T15:46:02Z",
        "updatedAt": "2024-04-30T23:12:15Z",
        "count": 2,
        "resourcesAffected": {
            "s3Bucket": {
                "arn": "arn:aws:s3:::amzn-s3-demo-bucket1",
                "name": "amzn-s3-demo-bucket1",
                "createdAt": "2020-04-03T20:46:56.000Z",
                "owner":{
                    "displayName": "johndoe",
                    "id": "7009a8971cd538e11f6b6606438875e7c86c5b672f46db45460ddcd08example"
                },
                "tags": [
                    {
                        "key": "Division",
                        "value": "HR"
                    },
                    {
                        "key": "Team",
                        "value": "Recruiting"
                    }
                ],                
                "defaultServerSideEncryption": {
                    "encryptionType": "aws:kms",
                    "kmsMasterKeyId": "arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab"
                },
                "publicAccess": {
                    "permissionConfiguration": {
                        "bucketLevelPermissions": {
                            "accessControlList": {
                                "allowsPublicReadAccess": false,
                                "allowsPublicWriteAccess": false
                            },
                            "bucketPolicy": {
                                "allowsPublicReadAccess": false,
                                "allowsPublicWriteAccess": false
                            },
                            "blockPublicAccess": {
                                "ignorePublicAcls": false,
                                "restrictPublicBuckets": false,
                                "blockPublicAcls": false,
                                "blockPublicPolicy": false
                            }
                        },
                        "accountLevelPermissions": {
                            "blockPublicAccess": {
                                "ignorePublicAcls": true,
                                "restrictPublicBuckets": true,
                                "blockPublicAcls": true,
                                "blockPublicPolicy": true
                            }
                        }
                    },
                    "effectivePermission": "NOT_PUBLIC"
                },
                "allowsUnencryptedObjectUploads": "FALSE"
            },
            "s3Object": null
        },
        "category": "POLICY",
        "classificationDetails": null,
        "policyDetails": {
            "action": {
                "actionType": "AWS_API_CALL",
                "apiCallDetails": {
                    "api": "PutBucketPublicAccessBlock",
                    "apiServiceName": "s3.amazonaws.com",
                    "firstSeen": "2024-04-29T15:46:02.401Z",
                    "lastSeen": "2024-04-30T23:12:15.401Z"
                }
            },
            "actor": {
                "userIdentity": {
                    "type": "AssumedRole",
                    "assumedRole": {
                        "principalId": "AROA1234567890EXAMPLE:AssumedRoleSessionName",
                        "arn": "arn:aws:sts::123456789012:assumed-role/RoleToBeAssumed/MySessionName",
                        "accountId": "111122223333",
                        "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
                        "sessionContext": {
                            "attributes": {
                                "mfaAuthenticated": false,
                                "creationDate": "2024-04-29T10:25:43.511Z"
                            },
                            "sessionIssuer": {
                                "type": "Role",
                                "principalId": "AROA1234567890EXAMPLE",
                                "arn": "arn:aws:iam::123456789012:role/RoleToBeAssumed",
                                "accountId": "123456789012",
                                "userName": "RoleToBeAssumed"
                            }
                        }
                    },
                    "root": null,
                    "iamUser": null,
                    "federatedUser": null,
                    "awsAccount": null,
                    "awsService": null
                },
                "ipAddressDetails":{
                    "ipAddressV4": "192.0.2.0",
                    "ipOwner": {
                        "asn": "-1",
                        "asnOrg": "ExampleFindingASNOrg",
                        "isp": "ExampleFindingISP",
                        "org": "ExampleFindingORG"
                    },
                    "ipCountry": {
                        "code": "US",
                        "name": "United States"
                    },
                    "ipCity": {
                        "name": "Ashburn"
                    },
                    "ipGeoLocation": {
                        "lat": 39.0481,
                        "lon": -77.4728
                    }
                },
                "domainDetails": null
            }
        },
        "sample": true,
        "archived": false
    }
}
```

## 敏感資料調查結果的事件範例
<a name="findings-publish-event-example-classification"></a>

下列範例使用範例資料來示範[敏感資料調查結果](findings-types.md#findings-sensitive-data-types)的 Amazon EventBridge 事件中物件和欄位的結構和性質。在此範例中，事件會報告新的敏感資料調查結果：Amazon Macie 在 S3 物件中找到多個敏感資料的類別和類型。下列欄位和值可協助您判斷此情況：
+ `type` 欄位設定為 `SensitiveData:S3Object/Multiple`。
+ `createdAt` 和 `updatedAt` 欄位具有相同的值。與政策調查結果不同，敏感資料調查結果一律如此。所有敏感資料調查結果都會被視為新的。
+ `count` 欄位設定為 `1`，表示這是新的問題清單。與政策調查結果不同，敏感資料調查結果一律如此。所有敏感資料調查結果都視為唯一 （新）。
+ `category` 欄位設定為 `CLASSIFICATION`。
+ `policyDetails` 欄位的值為 `null`，這有助於將此敏感資料調查結果的事件與政策調查結果的事件區分開來。對於政策調查結果，此值會是一組物件和欄位，提供有關潛在政策違規或 S3 儲存貯體安全性或隱私權問題的資訊。

另請注意， `sample` 欄位的值為 `true`。此值強調這是用於 文件的範例事件。

```
{
    "version": "0",
    "id": "14ddd0b1-7c90-b9e3-8a68-6a408example",
    "detail-type": "Macie Finding",
    "source": "aws.macie",
    "account": "123456789012",
    "time": "2024-04-20T08:19:10Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "schemaVersion": "1.0",
        "id": "4ed45d06-c9b9-4506-ab7f-18a57example",
        "accountId": "123456789012",
        "partition": "aws",
        "region": "us-east-1",
        "type": "SensitiveData:S3Object/Multiple",
        "title": "The S3 object contains multiple categories of sensitive data",
        "description": "The S3 object contains more than one category of sensitive data.",
        "severity": {
            "score": 3,
            "description": "High"
        },
        "createdAt": "2024-04-20T18:19:10Z",
        "updatedAt": "2024-04-20T18:19:10Z",
        "count": 1,
        "resourcesAffected": {
            "s3Bucket": {
                "arn": "arn:aws:s3:::amzn-s3-demo-bucket2",
                "name": "amzn-s3-demo-bucket2",
                "createdAt": "2020-05-15T20:46:56.000Z",
                "owner": {
                    "displayName": "johndoe",
                    "id": "7009a8971cd538e11f6b6606438875e7c86c5b672f46db45460ddcd08example"
                },
                "tags":[
                    {
                        "key":"Division",
                        "value":"HR"
                    },
                    {
                        "key":"Team",
                        "value":"Recruiting"
                    }
                ],
                "defaultServerSideEncryption": {
                    "encryptionType": "aws:kms",
                    "kmsMasterKeyId": "arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab"
                },
                "publicAccess": {
                    "permissionConfiguration": {
                        "bucketLevelPermissions": {
                            "accessControlList": {
                                "allowsPublicReadAccess": false,
                                "allowsPublicWriteAccess": false
                            },
                            "bucketPolicy":{
                                "allowsPublicReadAccess": false,
                                "allowsPublicWriteAccess": false
                            },
                            "blockPublicAccess": {
                                "ignorePublicAcls": true,
                                "restrictPublicBuckets": true,
                                "blockPublicAcls": true,
                                "blockPublicPolicy": true
                            }
                        },
                        "accountLevelPermissions": {
                            "blockPublicAccess": {
                                "ignorePublicAcls": false,
                                "restrictPublicBuckets": false,
                                "blockPublicAcls": false,
                                "blockPublicPolicy": false
                            }
                        }
                    },
                    "effectivePermission": "NOT_PUBLIC"
                },
                "allowsUnencryptedObjectUploads": "TRUE"
            },
            "s3Object":{
                "bucketArn": "arn:aws:s3:::amzn-s3-demo-bucket2",
                "key": "2024 Sourcing.csv",
                "path": "amzn-s3-demo-bucket2/2024 Sourcing.csv",
                "extension": "csv",
                "lastModified": "2024-04-19T22:08:25.000Z",
                "versionId": "",
                "serverSideEncryption": {
                    "encryptionType": "aws:kms",
                    "kmsMasterKeyId": "arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab"
                },
                "size": 4750,
                "storageClass": "STANDARD",
                "tags":[
                    {
                        "key":"Division",
                        "value":"HR"
                    },
                    {
                        "key":"Team",
                        "value":"Recruiting"
                    }
                ],
                "publicAccess": false,
                "etag": "6bb7fd4fa9d36d6b8fb8882caexample" 
            }
        },
        "category": "CLASSIFICATION",
        "classificationDetails": {
            "jobArn": "arn:aws:macie2:us-east-1:123456789012:classification-job/3ce05dbb7ec5505def334104bexample",
            "jobId": "3ce05dbb7ec5505def334104bexample",
            "result": {
                "status": {
                    "code": "COMPLETE",
                    "reason": null
                },
                "sizeClassified": 4750,
                "mimeType": "text/csv",
                "additionalOccurrences": true,
                "sensitiveData": [
                    {
                        "category": "PERSONAL_INFORMATION",
                        "totalCount": 65,
                        "detections": [
                            {
                                "type": "USA_SOCIAL_SECURITY_NUMBER",
                                "count": 30,
                                "occurrences": {
                                    "lineRanges": null,
                                    "offsetRanges": null,
                                    "pages": null,
                                    "records": null,
                                    "cells": [
                                        {
                                            "row": 2,
                                            "column": 1,
                                            "columnName": "SSN",
                                            "cellReference": null
                                        },
                                        {
                                            "row": 3,
                                            "column": 1,
                                            "columnName": "SSN",
                                            "cellReference": null
                                        },
                                        {
                                            "row": 4,
                                            "column": 1,
                                            "columnName": "SSN",
                                            "cellReference": null
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "NAME",
                                "count": 35,
                                "occurrences": {
                                    "lineRanges": null,
                                    "offsetRanges": null,
                                    "pages": null,
                                    "records": null,
                                    "cells": [
                                        {
                                            "row": 2,
                                            "column": 3,
                                            "columnName": "Name",
                                            "cellReference": null
                                        },
                                        {
                                            "row": 3,
                                            "column": 3,
                                            "columnName": "Name",
                                            "cellReference": null
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    {
                        "category": "FINANCIAL_INFORMATION",
                        "totalCount": 30,
                        "detections": [
                            {
                                "type": "CREDIT_CARD_NUMBER",
                                "count": 30,
                                "occurrences": {
                                    "lineRanges": null,
                                    "offsetRanges": null,
                                    "pages": null,
                                    "records": null,
                                    "cells": [
                                        {
                                            "row": 2,
                                            "column": 14,
                                            "columnName": "CCN",
                                            "cellReference": null
                                        },
                                        {
                                            "row": 3,
                                            "column": 14,
                                            "columnName": "CCN",
                                            "cellReference": null
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                ],
                "customDataIdentifiers": {
                    "totalCount": 0,
                    "detections": []
                }
            },
            "detailedResultsLocation": "s3://macie-data-discovery-results/AWSLogs/123456789012/Macie/us-east-1/3ce05dbb7ec5505def334104bexample/d48bf16d-0deb-3e49-9d8c-d407cexample.jsonl.gz",
            "originType": "SENSITIVE_DATA_DISCOVERY_JOB"
        },
        "policyDetails": null,
        "sample": true,
        "archived": false
    }
}
```