[aws.cloudtrail] Backport ingest pipeline improvements and bugfixes to backport-aws-7.0 - #21393
Conversation
Backport of elastic#20403 (and the assumed-role session-name change elastic#20318) to backport-aws-7.0 so users on the 7.0.x package line receive the CloudTrail ingest pipeline improvements and bugfixes. The cloudtrail data stream is brought to parity with main (a3291a9), except the aws-s3 input template and policy tests, which keep the 7.0 credential model. external_id is intentionally retained here: it was removed in 7.2.0 (elastic#20527) and must not be backported to the 7.0.x line. Enhancements: - Replace every `ignore_failure: true` with an `ignore_missing` flag, a condition guard, or an explicit `on_failure` handler reporting to `error.message`, so real faults surface instead of being silently swallowed. - Add support for CloudTrail fields that were previously dropped. - Populate the `cloud.provider`, `cloud.service.name` and `related.*` ECS fields. - Stop storing the assumed-role ARN session name in `user.changes.*`; the session name is now added to `related.user` for cross-source correlation, and `user.name` continues to hold the IAM role name (elastic#20318). Bugfixes: - Stop populating `file.hash.sha256` on digest records, where it held the hash of the previous digest file while `file.path` pointed at the current one. The value is still available as `aws.cloudtrail.digest.previous_hash_value` and in `related.hash`. - Fix `DeleteObject` using `event.type: delete`, which is not a valid ECS value. It is now `deletion`. - Fix `Publish`, `SendCommand` and `Converse` producing no `event.type`. They now use `info`, `start` and `info` respectively. - Fix `retain: none` behaving like `retain: all`. It now drops both the keyword and the flattened copies as documented. - Fix `retain: keyword` and `retain: minimal` discarding digest and Insights records. The setting governs API call payloads and no longer affects either record type. - Fix `aws.cloudtrail.service_event_details` surviving `retain: flattened` and `retain: none`. It is now governed like the other payload fields. Package version bumped to 7.0.1; format_version kept at 3.6.1; SVR00009 excluded in validation.yml (the pre-existing pipeline predates that check).
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
| Processor '{{{ _ingest.on_failure_processor_type }}}' | ||
| {{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}' | ||
| {{/_ingest.on_failure_processor_tag}}failed with message '{{{ _ingest.on_failure_message }}}' | ||
| value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.on_failure_pipeline}}} failed with message: {{{_ingest.on_failure_message}}}' |
There was a problem hiding this comment.
| value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.on_failure_pipeline}}} failed with message: {{{_ingest.on_failure_message}}}' | |
| value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.pipeline}}} failed with message: {{{_ingest.on_failure_message}}}' |
(throughout)
🚀 Benchmarks reportTo see the full report comment with |
|
✅ All changelog entries have the correct PR link. |
|
✅ Package owners are in sync with |
Review summaryIssues found across the latest commits 446ad6a — 1 mediumPackage-level:
Issues found across earlier commits 8287d11 — 1 lowPackage-level:
🤖 AI-Generated Review | Vera Review Bot - v0.4.2 | 📚 Knowledge base: integration-skills
|
💚 Build Succeeded
History
|
|
Tick the box to add this pull request to the merge queue (same as
|
|
Changelog sync PR created: #21444 |
|
Package aws - 7.0.1 containing this change is available at https://epr.elastic.co/package/aws/7.0.1/ |
Proposed commit message
What
Backport of #20403 to
backport-aws-7.0so users on the AWS package7.0.xline receive the CloudTrail ingest pipeline improvements and bugfixes. This
brings the
cloudtraildata stream to parity withmain.Why
Per #20040, the CloudTrail ingest-pipeline quality work (#20403) is being
backported across every maintained
awsline. The6.x(#20972) and7.1.x(#21129) backports are already in place; this PR closes the gap for the
7.0.xline.What this includes vs.
maincloudtrailingest pipeline,fields.yml,sample_event.json,data-stream manifest, docs, and pipeline test fixtures are byte-identical to
the merged
mainchange (a3291a9/ [aws.cloudtrail] Ingest Pipeline Improvments and Bugfixes #20403).versionbumped to7.0.1(format_versionkept at3.6.1).Scope
cloudtraildata stream and package-level files (changelog,manifest, validation). No other data streams are modified.
6.xbackport ([aws.cloudtrail] Backport ingest pipeline improvements and bugfixes to backport-aws-6.x #20972) — and unlike7.1.x([aws.cloudtrail] Backport ingest pipeline improvements and bugfixes to backport-aws-7.1 #21129) — theassumed-role session-name change ([aws] cloudtrail: move assumed-role session name from user.changes.* to related.user #20318) is folded in here, because it
was never released on the
7.0.xline. It gets its own changelog entry.external_idis intentionally retained in theaws-s3input template.It was only removed in
7.2.0([aws] Enable Identity Federation for all remaining policy templates #20527), so it must remain on7.0.x. Theinput templates and policy tests are deliberately left at their
7.0state;everything else in the data stream matches
main.Enhancements
ignore_failure: truewith anignore_missingflag, acondition guard, or an explicit
on_failurehandler reporting toerror.message, so real faults surface instead of being silently swallowed.cloud.provider,cloud.service.nameandrelated.*ECS fields.user.changes.*; thesession name is now added to
related.userfor cross-source correlation (whenit is an email, both the full email and the local-part prefix are added), and
user.namecontinues to hold the IAM role name for detection rules ([aws] cloudtrail: move assumed-role session name from user.changes.* to related.user #20318).Bugfixes
file.hash.sha256on digest records, where it held the hashof the previous digest file while
file.pathpointed at the current one. Thevalue is still available as
aws.cloudtrail.digest.previous_hash_valueand inrelated.hash.DeleteObjectusingevent.type: delete, which is not a valid ECS value.It is now
deletion.Publish,SendCommandandConverseproducing noevent.type. Theynow use
info,startandinforespectively.retain: nonebehaving likeretain: all. It now drops both the keywordand the flattened copies as documented.
retain: keywordandretain: minimaldiscarding digest and Insightsrecords. The setting governs API call payloads and no longer affects either
record type.
aws.cloudtrail.service_event_detailssurvivingretain: flattenedandretain: none. It is now governed like the other payload fields.How to test this PR locally
elastic-package stack up -d --version 9.4.0.packages/aws, run:elastic-package test pipeline --data-streams cloudtrail -vRelated