Skip to content
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

[Security Solution][Alerts] Detection alerts indices are missing data_stream ECS field mappings #129946

Open
Tracked by #165878
marshallmain opened this issue Apr 11, 2022 · 12 comments
Labels
bug Fixes for quality problems that affect the customer experience consider-next Feature:Detection Alerts Security Solution Detection Alerts Feature impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. sdh-linked Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@marshallmain
Copy link
Contributor

In #123486 we removed the constant_keyword data stream fields to avoid situations where alerts became un-indexable if they had varying values for those fields. However, we didn't add regular keyword field mappings to replace them similar to how we did for the legacy .siem-signals mappings. The result is that queries on data_stream.* fields don't work for alerts in 8.0+.

@marshallmain marshallmain added bug Fixes for quality problems that affect the customer experience Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Detection Alerts Security Solution Detection Alerts Feature Team:Detection Alerts Security Detection Alerts Area Team 8.2 candidate considered, but not committed, for 8.2 release labels Apr 11, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@marshallmain marshallmain added impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. 8.3 candidate and removed 8.2 candidate considered, but not committed, for 8.2 release labels Apr 14, 2022
@marshallmain marshallmain self-assigned this Jun 23, 2022
@marshallmain
Copy link
Contributor Author

We're looking at resolving this for 8.4 now. The 2 options we have considered are:

  1. Add the data_stream.* fields as keyword to alerts indices. This deviates from the ECS standard slightly and also means that the fields will not conform to the data stream naming scheme in which the data_stream fields are supposed to correspond to the actual name of the ES data stream the document lives in. However, the fields will be queryable in the same ways and with the same queries that customers use on their source data.
  2. Add data_stream.* fields in a nested location to avoid any possibility of conflicting with ECS or actual data stream usages. The fields might be something like kibana.data_stream.*. However, user queries will need to account for the different location of this field since we'd be copying data_stream.* fields in source documents to kibana.data_stream.* in alerts.

Re: option 1, @kobelb mentioned that more of ECS may become a first-class concept in the future. If we populate data_stream.* fields in non-data stream indices (the alerts indices) and map them as keyword instead of constant_keyword, could that cause conflicts with future ECS related features, e.g. enforcing the data stream naming scheme? @jpountz @javanna

In addition, the Security alerts indices use large portions of the ECS mappings. The solutions in elastic/ecs#1869 sound like they could reduce the burden (both in code and in the cluster state) of maintaining those ECS mappings by building them in to ES. If we map these fields as keyword now, would that be likely to prevent us from adopting ES built-in ECS mappings?

cc @elastic/response-ops @elastic/observability @MikePaquette @jethr0null

@matschaffer
Copy link
Contributor

matschaffer commented Jul 14, 2022

Drive-by here, but it seems to me that data_stream for a given data stream (index, mapping, etc) should stay consistent with the data stream that's storing the documents.

What #123420 seems to be highlighting is a need for something like (source).data_stream.* which could deviate from the name of the destination data stream for the document.

Since source is already used in a network context, it might make sense to introduce to introduce another field set (like option 2).

Naming is hard but maybe derivative or from which is a field set expected to contain a copy of an original ECS document from another data stream?

@dgieselaar
Copy link
Member

@marshallmain for future reference, you'll probably want to tag @elastic/observability-ui rather than @elastic/observability.

@michaelhyatt
Copy link

bumping it, a customer is looking for a fix for it.

@JAndritsch
Copy link

bumping it, a customer is looking for a fix for it.

+1

@michaelhyatt
Copy link

Any news? Apologies for bumping it again.

@acumen-kevinr
Copy link

Is this still being tracked and worked on? We've implemented a workaround with runtime fields but this is still not perfect.

@LaZyDK
Copy link

LaZyDK commented Jul 12, 2023

We would love this working also. We have the biggest issues where we have a single cluster SIEM polling multiple other cluster alert indexes over CCS.

@yctercero yctercero added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Oct 13, 2023
@yctercero
Copy link
Contributor

@elastic/response-ops-ram would it be ok to move this ticket over to your team?

@yctercero yctercero removed Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Engine Security Solution Detection Engine Area labels Mar 21, 2024
@vulnerabivoro
Copy link

  • 1 to this, we need to manually modify alerts-security* template and reindex every time elastic is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience consider-next Feature:Detection Alerts Security Solution Detection Alerts Feature impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. sdh-linked Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

No branches or pull requests