[aws.cloudtrail] Backport ingest pipeline improvements and bugfixes to backport-aws-7.1 - #21129
brijesh-elastic wants to merge 4 commits into
Conversation
This commit updates the aws.cloudtrail ingest pipeline with the following enhancements and bug fixes: 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. 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.
|
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. |
🚀 Benchmarks reportPackage
|
| Data stream | Previous EPS | New EPS | Diff (%) | Result |
|---|---|---|---|---|
firewall_logs |
4464.29 | 3571.43 | -892.86 (-20%) | 💔 |
lambda_logs |
10000 | 8130.08 | -1869.92 (-18.7%) | 💔 |
rds |
33333.33 | 27777.78 | -5555.55 (-16.67%) | 💔 |
s3access |
4830.92 | 3508.77 | -1322.15 (-27.37%) | 💔 |
apigateway_logs |
28571.43 | 15384.62 | -13186.81 (-46.15%) | 💔 |
ec2_logs |
41666.67 | 33333.33 | -8333.34 (-20%) | 💔 |
To see the full report comment with /test benchmark fullreport
Review summaryIssues found across the latest commits 00af686 — 1 mediumPackage-level:
🤖 AI-Generated Review | Vera Review Bot - v0.3.0 | 📚 Knowledge base: integration-skills
|
|
✅ All changelog entries have the correct PR link. |
|
✅ Package owners are in sync with |
The reason for adding |
💚 Build Succeeded
History
|
efd6
left a comment
There was a problem hiding this comment.
This backport is wider than justified. It should only include the bugfixes.
I've been asked to backport the entire change related to the ingest pipeline quality work. I've already raised a PR targeting the So, this change also addresses the SDH alongside the other work. |
| - append: | ||
| tag: append_error_message_extract_session_name_from_arn | ||
| field: error.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)
We are in default.
What
Backport of #20403 to
backport-aws-7.1so that users on the 9.4.x–9.5.x Kibanastacks (AWS package
7.1.xline,kibana: ^9.4.0) receive the CloudTrail ingestpipeline improvements and bugfixes. This brings the
cloudtraildata stream toparity with
main.Why
mainhas moved on to the7.2+/8.xline (kibana: ^9.6.0), and the6.xbackport (#20972) covers Kibana
8.19.4/9.2–9.3. Users pinned to the7.1.xline — Kibana
9.4.xand9.5.x— currently resolve to7.1.2, which predates#20403, so they do not get these CloudTrail fixes. This PR closes that gap.
What this includes vs.
maincloudtrailingest pipeline,fields.yml,sample_event.json, data-streammanifest, docs, and pipeline test fixtures are byte-identical to the merged
mainchange (a3291a9/ [aws.cloudtrail] Ingest Pipeline Improvments and Bugfixes #20403).versionbumped to7.1.3(format_versionkept at3.6.1).SVR00009kept excluded invalidation.yml(pre-existing pipeline predatesthat check).
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), the assumed-role session-name change ([aws] cloudtrail: move assumed-role session name from user.changes.* to related.user #20318)is not folded in here — it was already released on this line in
7.1.0, sothe code already contains it and no extra changelog entry is needed.
Enhancements
ignore_failure: truewith anignore_missingflag, a conditionguard, or an explicit
on_failurehandler reporting toerror.message, so realfaults surface instead of being silently swallowed.
cloud.provider,cloud.service.nameandrelated.*ECS fields.Bugfixes
file.hash.sha256on digest records, where it held the hash ofthe previous digest file while
file.pathpointed at the current one. The valueis 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. They nowuse
info,startandinforespectively.retain: nonebehaving likeretain: all. It now drops both the keyword andthe flattened copies as documented.
retain: keywordandretain: minimaldiscarding digest and Insights records.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