-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add related.entity to cloudtrail integration #11115
Add related.entity to cloudtrail integration #11115
Conversation
🚀 Benchmarks reportTo see the full report comment with |
...aws/data_stream/cloudtrail/_dev/test/pipeline/test-create-db-instance-json.log-expected.json
Fixed
Show fixed
Hide fixed
...aws/data_stream/cloudtrail/_dev/test/pipeline/test-create-db-instance-json.log-expected.json
Fixed
Show fixed
Hide fixed
...ages/aws/data_stream/cloudtrail/_dev/test/pipeline/test-create-lambda-json.log-expected.json
Fixed
Show fixed
Hide fixed
...ages/aws/data_stream/cloudtrail/_dev/test/pipeline/test-create-lambda-json.log-expected.json
Fixed
Show fixed
Hide fixed
packages/aws/data_stream/cloudtrail/_dev/test/pipeline/test-disable-key-json.log-expected.json
Fixed
Show fixed
Hide fixed
packages/aws/data_stream/cloudtrail/_dev/test/pipeline/test-disable-key-json.log-expected.json
Fixed
Show fixed
Hide fixed
...ages/aws/data_stream/cloudtrail/_dev/test/pipeline/test-run-instances-json.log-expected.json
Fixed
Show fixed
Hide fixed
...ages/aws/data_stream/cloudtrail/_dev/test/pipeline/test-run-instances-json.log-expected.json
Fixed
Show fixed
Hide fixed
...data_stream/cloudtrail/_dev/test/pipeline/test-stop-configuration-recorder.log-expected.json
Fixed
Show fixed
Hide fixed
...data_stream/cloudtrail/_dev/test/pipeline/test-stop-configuration-recorder.log-expected.json
Fixed
Show fixed
Hide fixed
Leaked access key has been revoked! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a link to the ECS related.entity
PR in the description.
Can you post before/after results of the benchmark for this pipeline (see elastic-package benchmark pipeline -d cloudtrail -v
, although I'm not sure how stable / repeatable these are at such low event counts).
packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/entity.yml
Outdated
Show resolved
Hide resolved
packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/entity.yml
Outdated
Show resolved
Hide resolved
packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/entity.yml
Outdated
Show resolved
Hide resolved
I'm surprised in the amount of variance the benchmark command gives. Running it many times yields less deviation. It seems like this will cause about a 20% decrease in throughput for the pipeline. I think it would be worth running another comparison where we use
MethodologyAdd config file to use more events in each simulation.
Run the benchmark a few times.
Copy the EPS rate from the results.
Cleanup.
Paste data into spreadsheet. (edit 1: added another column to the table where processors were inlined) |
510a09b
to
8d85643
Compare
Thanks a lot for the contributions and tips @andrewkroh! I ran the benchmarks with 100 cycles, because 15 was still not giving consistent results, with 100 I could get it (and it's fast enough to reproduce). On this spreadsheet you can find the raw data and stats. The results:
With that, we can see that the painless script has less impact on performance. I committed the fastest solution to this PR. Obs: Right now, I'm sorting the entities list only for tests purposes, there is no need to do so on production data. That consumes a some processing and it's unfortunate to have it for testing purposes only. What I usually do is to sort data on the test layer, but on this case that's not possible. Let me know if you have other ideas about it @andrewkroh . |
@romulets Can you please perform one more test where you inline the processors into
We could propose a change to |
8d85643
to
367974d
Compare
packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/entity.yml
Outdated
Show resolved
Hide resolved
packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/entity.yml
Outdated
Show resolved
Hide resolved
@andrewkroh Indeed, the gains are relevant. I committed the changes. Updated benchmarks:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for going to the performance testing to get to an optimized version.
0947aa6
to
fe9ef09
Compare
fe9ef09
to
325ab7c
Compare
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml
Outdated
Show resolved
Hide resolved
packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of comments. Rest looks good to me.
packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml
Outdated
Show resolved
Hide resolved
packages/aws/data_stream/cloudtrail/elasticsearch/ingest_pipeline/default.yml
Show resolved
Hide resolved
💚 Build Succeeded
History
cc @romulets |
Quality Gate failedFailed conditions |
Package aws - 2.25.0-preview01 containing this change is available at https://epr.elastic.co/search?package=aws |
I think this should have been 2.26.0-preview01. |
Package aws - 2.26.0-preview01 containing this change is available at https://epr.elastic.co/search?package=aws |
tldr; Adding
related.entity
to cloudtrail is part of the initial steps of CDR (epic overview). That enables our customers to better correlate events based on entities and enhances the investigation workflows for the Cloud Security use case.ECS
related.entity
PRBackground
Elastic Cloud Security Team has been focusing, this past year, on Cloud Detection and Response (CDR). One of the first steps towards the CDR vision is to enhance investigation workflows for the Cloud Security use-case in SIEM.
As part of enhancing investigation workflows it's necessary to be able to correlate events and entities. Meaning, if an alert is triggered on the ec2 instance
i-000000000
, it is of great value to easily be able to search all the events related to that entity, across multiple indices, with one query. Therefore we are working on extracting entities and enabling them to be correlated.Why
related.entity
With this background, we've researched a few options on what would be the best approach to enable such feature (discussions https://github.com/elastic/security-team/issues/10026 and https://github.com/elastic/security-team/issues/9798, and outcomes https://github.com/elastic/security-team/issues/10152), and arrived at the ecs field
related
.Based on the
related
description:To add a broad
related.entity
field that can hold any needed identifier to pivot data on seems to be well fitted. This would enable customers to simply runrelated.entity: "i-000000000"
and get all the hits to that specific cloud resource.What is an
entity
?An "entity" in our context refers to any discrete component within an IT environment that can be uniquely identified and monitored. This broad term encompasses both managed and unmanaged elements.
The term "entity" is broader than the current set of available fields under
related
. Althoughip
,user
andhosts
can be identities, there is a lack of space to represent messaging queues, load balancers, storage systems, databases and others. Therefore the proposal to add a new field.Related issues