Skip to content

[awslogsencodingextension] Enhance CloudTrail log unmarshaler by adding missing fields and supporting Digest file content #43403

@Kavindu-Dodan

Description

@Kavindu-Dodan

Component(s)

extension/awslogs_encoding

Is your feature request related to a problem? Please describe.

The current CloudTrail logs unmarshaler 1 supports parsing a fair amount of fields from CloudTrail logs. However, several fields can further enhance the parsed log message. I have noticed the following,

  • apiVersion : "Identifies the API version associated with the AwsApiCall eventType value" 2
  • userIdentity.sessionContext : Extended details about user identity & session 3
  • userIdentity.invokedBy : "The invokedBy field in the userIdentity element identifies the AWS service that made the API call" 3
  • additionalEventData : May get omitted 4 but when present convey insights such as console sign in details 5

Along with the above, extension must add support for parsing of the Digest file structure 6. Digest files enable the validation of file integrity and are valuable for monitoring systems to interpret ingested data.

As a minor remark, it would be nice to preserve the TLSVersion as is without extracting the version part 7

Describe the solution you'd like

The improvements can be delivered in multiple PRs,

  • Include missing fields & preserve TLS version as is
  • Add support for CloudTrail Digest file format

Describe alternatives you've considered

None - Parsing and adding missing attributes is necessary.

Additional context

I am willing to contribute on this effort.

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Footnotes

  1. https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/encoding/awslogsencodingextension/internal/unmarshaler/cloudtraillog/unmarshaler.go#L57-L82

  2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html

  3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html 2

  4. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html#context-event-truncation-order

  5. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-aws-console-sign-in-events.html

  6. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-log-file-validation-digest-file-structure.html

  7. https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/encoding/awslogsencodingextension/internal/unmarshaler/cloudtraillog/unmarshaler.go#L227-L230

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions