Skip to content

[7.x] [Security Solution] Siem signals -> alerts as data field and index aliases (#106049)#107817

Merged
marshallmain merged 1 commit intoelastic:7.xfrom
marshallmain:backport/7.x/pr-106049
Aug 6, 2021
Merged

[7.x] [Security Solution] Siem signals -> alerts as data field and index aliases (#106049)#107817
marshallmain merged 1 commit intoelastic:7.xfrom
marshallmain:backport/7.x/pr-106049

Conversation

@marshallmain
Copy link
Copy Markdown
Contributor

Backports the following commits to 7.x:

…iases (elastic#106049)

* Add aliases mapping signal fields to alerts as data fields

* Add aliases mapping alerts as data fields to signal fields

* Replace siem signals templates per space and add AAD index aliases to siem signals indices

* Remove first version of new mapping json file

* Convert existing legacy siem-signals templates to new ES templates

* Catch 404 if siem signals templates were already updated

* Enhance error message when index exists but is not write index for alias

* Check if alias write index exists before creating new write index

* More robust write target creation logic

* Add RBAC required fields for AAD to siem signals indices

* Fix index name in index mapping update

* Throw errors if bulk retry fails or existing indices are not writeable

* Add new template to routes even without experimental rule registry flag enabled

* Check template version before updating template

* First pass at modifying routes to handle inserting field aliases

* Always insert field aliases when create_index_route is called

* Update snapshot test

* Remove template update logic from plugin setup

* Use aliases_version field to detect if aliases need update

* Fix bugs

* oops update snapshot

* Use internal user for PUT alias to fix perms issue

* Update comment

* Disable new resource creation if ruleRegistryEnabled

* Only attempt to add aliases if siem-signals index already exists

* Fix types, add aliases to aad indices, use package field names

* Undo adding aliases to AAD indices

* Remove unused import

* Update test and snapshot oops

* Filter out kibana.* fields from generated signals

* Update cypress test to account for new fields in table

* Properly handle space ids with dashes in them

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/security_solution/cypress/ccs_integration/detection_alerts/alerts_details.spec.ts
#	x-pack/plugins/security_solution/cypress/integration/detection_alerts/alerts_details.spec.ts
@marshallmain marshallmain added the backport This PR is a backport of another PR label Aug 5, 2021
@marshallmain marshallmain enabled auto-merge (squash) August 5, 2021 22:26
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 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
observability 509.6KB 509.7KB +160.0B
securitySolution 6.5MB 6.5MB +160.0B
total +320.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
apm 44.4KB 44.5KB +160.0B
infra 149.2KB 149.3KB +160.0B
uptime 34.7KB 34.9KB +160.0B
total +480.0B
Unknown metric groups

API count

id before after diff
securitySolution 1300 1301 +1

API count missing comments

id before after diff
securitySolution 1249 1250 +1

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

@marshallmain marshallmain merged commit d089b3c into elastic:7.x Aug 6, 2021
it('Displays the unmapped field on the table', () => {
const expectedUnmmappedField = {
row: 56,
row: 89,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@marshallmain In your original PR this is 88, any idea why there's a difference between master and this: https://github.com/elastic/kibana/pull/106049/files#r687374268?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, I saw that this PR adjusted the row by 1 so applied the same change to mine to get it to pass. Not sure where the difference comes from.

@marshallmain marshallmain deleted the backport/7.x/pr-106049 branch April 4, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants