pub const CLOUDTRAIL: &str = "# AWS CloudTrail management events, as CloudTrail delivers them to S3: a\n# file holding `{\"Records\": [...]}`, which the definition unwraps. Events\n# one after another, as CloudWatch Logs exports them, are read too.\n#\n# A console sign-in becomes an OCSF Authentication; every other call an API\n# Activity, Read when CloudTrail marks it read-only and Other when it\n# changes something, since which change it makes is in the operation\'s\n# name, such as `CreateUser` or `DeleteBucket`, not in a field.\n#\n# Where an AWS service made the call, CloudTrail writes the service\'s name,\n# such as `ec2.amazonaws.com`, in `sourceIPAddress`: such calls write it as\n# the source\'s domain, and every other call as its address, which is\n# checked to be one.\n#\n# Every top-level member not mapped below is kept under `unmapped` by its\n# CloudTrail name, whole, including `userIdentity`, `requestParameters`,\n# `responseElements`, and `resources`, which rules compare as CloudTrail\n# writes them.\n\nname: cloudtrail\nversion: 1\nframing: json-values\ndecoding: json\nunwrap: Records\n\ncommon:\n time: { from: eventTime, as: timestamp }\n severity_id: { value: 1 }\n metadata.version: { value: \"1.5.0\" }\n metadata.product.name: { value: AWS CloudTrail }\n metadata.product.vendor_name: { value: AWS }\n metadata.uid: eventID\n metadata.log_name: eventCategory\n metadata.event_code: eventType\n cloud.provider: { value: AWS }\n cloud.region: awsRegion\n cloud.account.uid: recipientAccountId\n actor.user.type: userIdentity.type\n actor.user.uid: userIdentity.principalId\n actor.user.uid_alt: userIdentity.arn\n actor.user.name: userIdentity.userName\n actor.user.account.uid: userIdentity.accountId\n actor.user.credential_uid: userIdentity.accessKeyId\n actor.session.issuer: userIdentity.sessionContext.sessionIssuer.arn\n actor.invoked_by: userIdentity.invokedBy\n http_request.user_agent: userAgent\n\nkinds:\n - name: console_login\n when:\n eventName: ConsoleLogin\n # Authentication: Logon.\n class: { class_uid: 3002, activity_id: 1 }\n fields:\n src_endpoint.ip: { from: sourceIPAddress, as: ip }\n status: responseElements.ConsoleLogin\n status_id:\n from: responseElements.ConsoleLogin\n map: { Success: 1, Failure: 2 }\n otherwise: 99\n status_detail: errorMessage\n service.name: eventSource\n unmapped: [\".\"]\n\n - name: service_read\n when:\n userIdentity.type: AWSService\n readOnly: true\n # API Activity: Read, by an AWS service.\n class: { class_uid: 6003, activity_id: 2 }\n fields: &service\n src_endpoint.domain: sourceIPAddress\n api.operation: eventName\n api.service.name: eventSource\n api.request.uid: requestID\n api.response.error: errorCode\n api.response.message: errorMessage\n unmapped: [\".\"]\n\n - name: service_write\n when:\n userIdentity.type: AWSService\n readOnly: false\n # API Activity: Other, by an AWS service.\n class: { class_uid: 6003, activity_id: 99 }\n fields: *service\n unmapped: [\".\"]\n\n - name: service_event\n when:\n eventType: AwsServiceEvent\n # API Activity: Other: an event AWS itself raised, such as a Health\n # notice, which names no caller and has no `readOnly`.\n class: { class_uid: 6003, activity_id: 99 }\n fields: *service\n unmapped: [\".\"]\n\n - name: read\n when:\n readOnly: true\n # API Activity: Read.\n class: { class_uid: 6003, activity_id: 2 }\n fields: &call\n src_endpoint.ip: { from: sourceIPAddress, as: ip }\n api.operation: eventName\n api.service.name: eventSource\n api.request.uid: requestID\n api.response.error: errorCode\n api.response.message: errorMessage\n unmapped: [\".\"]\n\n - name: write\n when:\n readOnly: false\n # API Activity: Other: a change, named by the operation.\n class: { class_uid: 6003, activity_id: 99 }\n fields: *call\n unmapped: [\".\"]\n";Expand description
The definition for AWS CloudTrail shipped with this crate: console sign-ins
and API calls.