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

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

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

marshallmain
Copy link
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 enabled auto-merge (squash) August 5, 2021 22:26
@kibanamachine
Copy link
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
@@ -58,7 +58,7 @@ describe('Alert details with unmapped fields', () => {

it('Displays the unmapped field on the table', () => {
const expectedUnmmappedField = {
row: 56,
row: 89,
Copy link
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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants