Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

opauloh
Copy link
Contributor

@opauloh opauloh commented Mar 29, 2024

Summary

It fixes elastic/kibana#178904

This PR updates the Findings Ingest Pipeline to remove empty cloud.account.id and cloud.account.name fields in a Findings document. This fixes issues in Kibana when those fields are empty.

This PR also introduces Ingest Pipelines tests and adds tests to cover pipeline processors in a findings document. It can be tested following the documentation here

Screenshot

Pipeline Tests

image

Kibana Tests

Before changes:

Fields with empty cloud.account.name
image

Bug in group by cloud account visualization, result is hidden due to empty field #178904

image

After changes:

No more fields with empty cloud.account.name
image

Fields are instead missing (expected behaviour)
image

Group by cloud account visualization shows "No cloud account" (expected behaviour)
image

@opauloh opauloh changed the title Remove empty fields from the findings document [Cloud Security] [Findings Ingest Pipeline] Remove all empty fields from the document Mar 29, 2024
@opauloh opauloh added the Team:Cloud Security Cloud Security team [elastic/cloud-security-posture] label Mar 29, 2024
@opauloh opauloh changed the title [Cloud Security] [Findings Ingest Pipeline] Remove all empty fields from the document [Cloud Security] [Findings Ingest Pipeline] Remove cloud.account.id and cloud.account.name empty fields from the latest findings document Apr 4, 2024
@elasticmachine
Copy link

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@opauloh opauloh marked this pull request as ready for review April 5, 2024 00:47
@opauloh opauloh requested a review from a team as a code owner April 5, 2024 00:47
Copy link
Contributor

@seanrathier seanrathier left a comment

Choose a reason for hiding this comment

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

Look good to me! Just a nit in the change log.

description: 'Backward compatibility cloudbeat version < 8.8'
ignore_empty_value: true
if: ctx.orchestrator?.cluster?.id == null
- remove:
Copy link
Contributor

Choose a reason for hiding this comment

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

:aha moment
So the integration for cloud security posture handles the transformation of data collected from cloudbeat to the latest findings index.

:knowledge question
Is this rule in the ingestion pipeline removing the field from the document before it ends up the in the findings?
I am assuming this because the expected test results shows an empty object for the account

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the integration for cloud security posture handles the transformation of data collected from cloudbeat to the latest findings index.

:knowledge question
Is this rule in the ingestion pipeline removing the field from the document before it ends up the in the findings?
I am assuming this because the expected test results shows an empty object for the account

Yes, and It's directly on the data stream index logs-cloud_security_posture.findings-* actually, (so it's before the transform runs to that aggregates the data into the logs-cloud_security_posture.findings_latest-* index.

The Ingest pipeline runs at the moment the data going to be inserted into the findings index

image

And how it's knows that it needs to run this pipeline for that index is defined with Index Templates, it's where the findings mappings are defined as well the default pipeline:

image image

@Omolola-Akinleye Omolola-Akinleye self-requested a review April 5, 2024 17:31
Co-authored-by: seanrathier <[email protected]>
@elasticmachine
Copy link

💚 Build Succeeded

History

Copy link

@opauloh opauloh merged commit 77955fe into main Apr 8, 2024
@elasticmachine
Copy link

Package cloud_security_posture - 1.9.0-preview03 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

@elasticmachine
Copy link

Package cloud_security_posture - 1.9.0 containing this change is available at https://epr.elastic.co/search?package=cloud_security_posture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:cloud_security_posture Security Posture Management Team:Cloud Security Cloud Security team [elastic/cloud-security-posture]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Cloud Security] [Bug] Grouping row is hidden in the Findings page when the grouped key is an empty string
5 participants