-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
Motivation
We changed the CSP Misconfiguration index pattern as part of this PR changes, however, we discovered that long running environments still reference the deprecated Data View (with stale index patterns like logs-*_latest_misconfigurations_cdr,logs-cloud_security_posture.findings_latest-default) while the latest index pattern is now security_solution-cloud_security_posture.misconfiguration_latest-*.
Because the CSP initialization don't migrate the Data View ID, existing spaces/environments keep the stale Data View indefinitely unless manually deleted. This affects:
- “no data” checks that rely on the Data View.
- Available fields in Data Table visualizations being limited to the old Data View.
Creating a new Data View identifier (security_solution_cdr_latest_misconfigurations_v2) will ensures all upgraded environments get the right index pattern and mapping configuration without requiring users to delete or manually fix the old Data View.
Removing the old index pattern will also lead to a better the experience to avoid any confusions about displaying 2 dataviews (old and new) for the users .
Definition of done
- Introduce a new constant (e.g.,
CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX_V1) and update theCDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIXconstant with the v2 suffix (security_solution_cdr_latest_misconfigurations_v2). - The new data view (
security_solution_cdr_latest_misconfigurations_v2) is created if missing whenever the Findings page is accessed. - The old dataview (
security_solution_cdr_latest_misconfigurations) is removed if present (once during the CSP initialization). - Add a lightweight guideline: whenever we have changes to the CSP data view, we create a new Data View ID.
- Backport to all applicable 8.x and 9.x branches that can still receive an update (8.18., 8.19., 9.0., 9.1.)
Related tasks/epics