

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Macie の検出結果の Amazon EventBridge イベントスキーマ
<a name="findings-publish-event-schemas"></a>

モニタリングやイベント管理システムなど、他のアプリケーション、サービス、およびシステムとの統合をサポートするために、Amazon Macie は調査結果をイベントとして Amazon EventBridge に自動的に発行します。以前の Amazon CloudWatch Events である EventBridge は、アプリケーションやその他の から 関数、Amazon Simple Notification Service トピック、Amazon Kinesis ストリームなどの AWS Lambda ターゲット AWS のサービス にリアルタイムデータのストリームを配信するサーバーレスイベントバスサービスです。EventBridge の詳細については、[Amazon EventBridge ユーザーガイド](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html)を参照してください。

**注記**  
CloudWatch Events を現在使用している場合は、EventBridge イベントと CloudWatch イベントは同じ基盤となるサービスと API であることに注意してください。ただし、EventBridge には、SaaS (software as a service) アプリケーションやユーザー独自のアプリケーションからイベントを受け取ることができる追加機能が含まれています。基盤となるサービスと API が同じであるため、Macie の調査結果のイベントスキーマも同じです。

Macie は、新しい検出結果と既存のポリシーの検出結果のその後の出現に関するイベントを自動的に発行しますが、[抑制ルール](findings-suppression.md)を使用して自動的にアーカイブされた検出結果は含まれません。イベントは、 AWS イベントの EventBridge スキーマに準拠する JSON オブジェクトです。各イベントには、特定の検出結果の 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>

次の例は、Macie の調査結果について、[EventBridge イベント](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html) のスキーマを示します。調査結果イベントに含めることができるフィールドの詳細な説明については、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` フィールドは異なる値を持ちます。これは、イベントが既存のポリシーの調査結果のその後の出現をレポートする指標の 1 つです。イベントで新しい調査結果がレポートされた場合、これらのフィールドの値は同じになります。
+ `count` フィールドは `2` に設定されます。これは、それが調査結果の 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
    }
}
```