Skip to content

[RAC,Security Solution]Update alerts mappings to ECS 1.12#118812

Merged
rylnd merged 10 commits intoelastic:mainfrom
rylnd:update_alerts_mappings
Nov 29, 2021
Merged

[RAC,Security Solution]Update alerts mappings to ECS 1.12#118812
rylnd merged 10 commits intoelastic:mainfrom
rylnd:update_alerts_mappings

Conversation

@rylnd
Copy link
Copy Markdown
Contributor

@rylnd rylnd commented Nov 16, 2021

Summary

This updates the ECS mappings used by the ECS component template with the latest from the 1.12 branch. In Security Solution's switch to using alerts-as-data indices, the lack of mappings for threat fieldsets were causing UI bugs related to CTI features.

For maintainers

These files were moved in elastic#98935 but the script has become out of date.
This fieldmap was missing fields from ECS 1.11+. Notable ommissions were
the threat.indicator and threat.enrichments fieldsets.
@rylnd rylnd added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Alerts Security Detection Alerts Area Team labels Nov 16, 2021
@rylnd rylnd self-assigned this Nov 16, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@rylnd rylnd requested a review from jasonrhodes November 16, 2021 23:19
These are incompatible with the current alerts framework.
This could probably be pared down further, as most of these fields are
not critical for CTI features. Additionally, these additions now exceed
the limit of 1000 fields and is causing an error in the ruleRegistry
bootstrapping.
@rylnd
Copy link
Copy Markdown
Contributor Author

rylnd commented Nov 17, 2021

@jasonrhodes pinging you here as it appeared that these mappings were out of date (< ECS 1.11) and their absence was causing bugs in the Security Solution's CTI features.

I initially added all the fields from the 1.12 branch (seen in the branch history), but that included non-additive changes (keywords becoming wildcards, etc). I've since limited this to a subset of the threat.* fields that we need, but even now the rule registry is failing to bootstrap due to their now being > 1000 fields.

I can probably limit the additions here to not exceed that threshold, but that feels like a temporary solution at best. The non-additive changes, and ECS updates here in general, are outstanding questions and I'm not sure what the expected workflow is supposed to be here. Curious to hear your thoughts.

Copy link
Copy Markdown
Contributor

@ecezalp ecezalp left a comment

Choose a reason for hiding this comment

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

LGTM - haven't tested it with the CTI features, but it conceptually makes sense to have the mappings in place

@rylnd
Copy link
Copy Markdown
Contributor Author

rylnd commented Nov 17, 2021

I removed all of the irrelevant threat.indicator fields to get below the 1000 field limit, but there still appears to be an error on write when the index is first created; theres some kind of conflict between the different component templates. I expect this build to fail, but process questions are still outstanding.

@marshallmain
Copy link
Copy Markdown
Contributor

It looks like the combination of the additional ECS fields with the Security Solution fields is pushing the combined index template over the limit of 1100, defined here https://github.com/elastic/kibana/blob/main/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.ts#L319. We can bump that limit up more to accommodate these fields.

@ecezalp
Copy link
Copy Markdown
Contributor

ecezalp commented Nov 23, 2021

@elasticmachine merge upstream

@ecezalp
Copy link
Copy Markdown
Contributor

ecezalp commented Nov 29, 2021

@elasticmachine merge upstream

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 2.7MB 2.7MB +6.6KB
observability 351.8KB 358.4KB +6.6KB
total +13.3KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @rylnd

@rylnd rylnd merged commit 57ae8db into elastic:main Nov 29, 2021
@rylnd rylnd deleted the update_alerts_mappings branch November 29, 2021 18:40
rylnd added a commit to rylnd/kibana that referenced this pull request Nov 29, 2021
…8812)

* Update output directory for generative script

These files were moved in elastic#98935 but the script has become out of date.

* Update ECS fieldmap with ECS 1.12

This fieldmap was missing fields from ECS 1.11+. Notable ommissions were
the threat.indicator and threat.enrichments fieldsets.

* Remove non-additive mappings changes

These are incompatible with the current alerts framework.

* Add only necessary threat fields for CTI features

This could probably be pared down further, as most of these fields are
not critical for CTI features. Additionally, these additions now exceed
the limit of 1000 fields and is causing an error in the ruleRegistry
bootstrapping.

* Remove file.pe threat fields

* Remove geo threat indicator fields

* Remove all threat.indicator mappings

These are not relevant for alerts, which will only have enrichments.

* increments index mappings total fields limit to 1200

Co-authored-by: Ece Ozalp <ozale272@newschool.edu>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
rylnd added a commit that referenced this pull request Nov 29, 2021
…119874)

* Update output directory for generative script

These files were moved in #98935 but the script has become out of date.

* Update ECS fieldmap with ECS 1.12

This fieldmap was missing fields from ECS 1.11+. Notable ommissions were
the threat.indicator and threat.enrichments fieldsets.

* Remove non-additive mappings changes

These are incompatible with the current alerts framework.

* Add only necessary threat fields for CTI features

This could probably be pared down further, as most of these fields are
not critical for CTI features. Additionally, these additions now exceed
the limit of 1000 fields and is causing an error in the ruleRegistry
bootstrapping.

* Remove file.pe threat fields

* Remove geo threat indicator fields

* Remove all threat.indicator mappings

These are not relevant for alerts, which will only have enrichments.

* increments index mappings total fields limit to 1200

Co-authored-by: Ece Ozalp <ozale272@newschool.edu>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Ece Ozalp <ozale272@newschool.edu>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
…8812)

* Update output directory for generative script

These files were moved in elastic#98935 but the script has become out of date.

* Update ECS fieldmap with ECS 1.12

This fieldmap was missing fields from ECS 1.11+. Notable ommissions were
the threat.indicator and threat.enrichments fieldsets.

* Remove non-additive mappings changes

These are incompatible with the current alerts framework.

* Add only necessary threat fields for CTI features

This could probably be pared down further, as most of these fields are
not critical for CTI features. Additionally, these additions now exceed
the limit of 1000 fields and is causing an error in the ruleRegistry
bootstrapping.

* Remove file.pe threat fields

* Remove geo threat indicator fields

* Remove all threat.indicator mappings

These are not relevant for alerts, which will only have enrichments.

* increments index mappings total fields limit to 1200

Co-authored-by: Ece Ozalp <ozale272@newschool.edu>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Detection Alerts Security Detection Alerts Area Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants