Skip to content

[aws.cloudtrail] Ingest Pipeline Improvments and Bugfixes - #20403

Merged
brijesh-elastic merged 12 commits into
elastic:mainfrom
brijesh-elastic:aws_cloudtrail-ingest_pipeline-improvements
Aug 25, 2026
Merged

brijesh-elastic merged 12 commits into
elastic:mainfrom
brijesh-elastic:aws_cloudtrail-ingest_pipeline-improvements

Conversation

@brijesh-elastic

@brijesh-elastic brijesh-elastic commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

aws.cloudtrail: ingest pipeline improvements and fixes

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.

Note

  • These changes aren't classified as breaking because fixing a feature that never worked correctly is considered a bugfix, not a breaking-change. With that in mind, none of the changes above fall into the breaking-change category.

To Reviewers:

  • This PR is best reviewed commit-by-commit.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

How to test this PR locally

  • Clone integrations repo.
  • Install elastic package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/aws directory.
  • Run the following command to run tests.

elastic-package test -v

Related issues

…r condition guard where failure was expected and an explicit `on_failure` handler reporting to `error.message` where it wasn't, so routine cases no longer throw per document and real faults surface instead of being silently swallowed
@brijesh-elastic brijesh-elastic self-assigned this Jul 30, 2026
@brijesh-elastic brijesh-elastic added documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request Integration:aws AWS Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:SDE-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] labels Jul 30, 2026
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

Package aws 👍(8) 💚(8) 💔(6)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
firewall_logs 3937.01 3289.47 -647.54 (-16.45%) 💔
inspector 1763.67 1356.85 -406.82 (-23.07%) 💔
rds 29411.76 24390.24 -5021.52 (-17.07%) 💔
route53_public_logs 15873.02 12195.12 -3677.9 (-23.17%) 💔
route53_resolver_logs 10309.28 7299.27 -3010.01 (-29.2%) 💔
securityhub_insights 1114.83 904.98 -209.85 (-18.82%) 💔

To see the full report comment with /test benchmark fullreport

@brijesh-elastic
brijesh-elastic force-pushed the aws_cloudtrail-ingest_pipeline-improvements branch from a46b662 to fb56839 Compare August 10, 2026 12:41
@brijesh-elastic brijesh-elastic added the bugfix Pull request that fixes a bug issue label Aug 11, 2026
@brijesh-elastic
brijesh-elastic marked this pull request as ready for review August 11, 2026 05:56
@brijesh-elastic
brijesh-elastic requested review from a team as code owners August 11, 2026 05:56
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

Comment thread packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/aws/data_stream/cloudtrail/sample_event.json
Comment thread packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml Outdated
@brijesh-elastic brijesh-elastic changed the title [aws.cloudtrail] Ingest Pipeline Improvments [aws.cloudtrail] Ingest Pipeline Improvments and Bugfixes Aug 12, 2026
@brijesh-elastic
brijesh-elastic requested a review from efd6 August 12, 2026 07:34
Comment thread packages/aws/changelog.yml
Comment thread packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml Outdated
@efd6

efd6 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

/test

1 similar comment
@brijesh-elastic

Copy link
Copy Markdown
Contributor Author

/test

Comment thread packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml Outdated

@efd6 efd6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits then LGTM

Comment thread packages/aws/validation.yml Outdated
errors:
exclude_checks:
- SVR00004 # References in dashboards.
- SVR00009

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment for this.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

✅ All changelog entries have the correct PR link.

@vera-review-bot

Copy link
Copy Markdown

🟢 Reviewed the latest commits 75bf34c — nothing new beyond already posted comments.

Review summary

Issues found across earlier commits 039d3b84b0b230 (120 commits) — 1 medium

Package-level:

  • 🟡 Eleven of the newly mapped CloudTrail fields have no pipeline test fixture, so a wrong JSON path in one of the new nested renames would silently no-op forever
Issues found across earlier commits aa0d611, 33d0044 — 1 medium, 1 low
  • 🟡 Dropping file.hash.sha256 from digest records removes a field users may query on, so it should be its own changelog entry with type breaking-change rather than being bundled into the bugfix list. (link) (Resolved)
  • 🔵 The on_failure message template uses {{{_ingest.pipeline}}}, which is not an ingest metadata field and renders empty (link) (Resolved)
Issues found across earlier commits fb56839 — 2 medium
  • 🟡 The new append_related_hosts_source_address processor puts AWS service principal names such as config.amazonaws.com into related.hosts (link) (Resolved)
  • 🟡 file.hash.sha256 is now populated from previousDigestHashValue, which hashes the previous digest file, while file.path is set from digestS3Object, the current one (link) (Resolved)

A new commit triggers another review — at most once every 15 minutes. I skip the PR while it's approved or has merge conflicts.

🤖 AI-Generated Review | Vera Review Bot - v0.2.6 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @brijesh-elastic

@efd6 efd6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but please wait for @kcreddy

@mergify

mergify Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@kcreddy kcreddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brijesh-elastic
brijesh-elastic merged commit a3291a9 into elastic:main Aug 25, 2026
10 checks passed
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package aws - 7.4.0 containing this change is available at https://epr.elastic.co/package/aws/7.4.0/

@brijesh-elastic brijesh-elastic added the Category: Integration quality Category: Quality used for SI planning label Aug 27, 2026
brijesh-elastic added a commit that referenced this pull request Sep 8, 2026
Backport of #20403 to `backport-aws-6.x` so that users on the 8.x Kibana
stack (package 6.x, Kibana `^8.19.4 || ^9.2.1`) receive the CloudTrail
ingest pipeline improvements. This brings the `cloudtrail` data stream to
parity with `main`.

Because `backport-aws-6.x` did not have the intermediate CloudTrail change
from #20318, that change is included here as well (it is a prerequisite for
the #20403 pipeline and is part of the same CloudTrail quality effort).

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; when it is an
  email, both the full email and the local-part prefix are added. `user.name`
  continues to hold the IAM role name for detection rules. (#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Category: Integration quality Category: Quality used for SI planning documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request Integration:aws AWS Team:SDE-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants