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] [Sourcerer] [Feature Branch] Update to use Kibana Data Views #114806

Merged
merged 243 commits into from
Nov 4, 2021

Conversation

stephmilovic
Copy link
Contributor

@stephmilovic stephmilovic commented Oct 13, 2021

Summary

Closing #111461 in favor of this PR to create a "feature branch", they are essentially the same PR

Kibana Index Patterns Data Views & Runtime Fields in Security Solution Sourcerer

Issue: https:/elastic/security-team/issues/772

  • Removes config index patterns and only use Kibana index patterns. Create a special security-solution KIP from the config index patterns. PR Reviewed: [Security Solution] [Sourcerer] KIP Feature Branch Kickoff, remove config index patterns #106460
  • Changes to the config index patterns to update the security-solution Kibana data view
  • Add signals index to default Kibana data view
  • Updates requestIndexFieldSearch in timelines to take a dataViewId
  • Switch to get fields directly from Kibana data view
  • Enable sourcerer to break up indices on each Kibana data view once selected
  • Update timeline sourcerer ui (pick_events.tsx)
  • Add dataViewId property to timeline, stored in references on the saved object

Quirks

  • data view titles allow for duplicate indices, so we need to allow for duplicates to display accurate data view titles. For example: auditbeat-*,auditbeat-*,auditbeat-*,auditbeat-* and auditbeat-*,auditbeat-* are both valid. We're only going to allow them to select one instance of auditbeat from our combo box, but the select needs the full name so the user can distinguish between the data views and know where they put their runtime fields
    • there is another spot where i know you'll be like, why check for duplicates here? its in case something wonky is in the url state
  • the data view gets updated when the Advanced Settings default index is updated securitySolution:defaultIndex. A page refresh is required for updates to take place
  • the siem signals index is appended to the end of the security-solution data view. on initial app load, or if the signals index gets deleted, signalIndexName is null and quickly set. We have a call to update the security-solution data view when the signalIndexName is updated
  • when the data view gets deleted and you navigate back to the security solution, a page refresh will be forced to regenerate the data view
  • to check if an index pattern is valid, we are now using esClient.fieldCaps instead of esClient.search or esClient.count as both of those methods require there to be data on the index pattern. When .siem-signals-default is initially created, it will not immediately have data. So using esClient.fieldCaps will tell us if the index exists even without data

UI Updates coming in a follow up PR. See Monina's excellent design direction in the original issue: https:/elastic/security-team/issues/772

Sourcerer Updates to KIP/Data Views:
sourcerer_demo

Runtime Fields in Security Solution:
rtf_demo

Checklist

@angorayc
Copy link
Contributor

angorayc commented Nov 1, 2021

@elasticmachine merge upstream

@stephmilovic stephmilovic removed the request for review from dasansol92 November 4, 2021 18:46
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
securitySolution 1318 1328 +10
timelines 848 861 +13
total +23

Async chunks

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

id before after diff
observability 375.7KB 375.7KB +19.0B
securitySolution 4.5MB 4.5MB +6.8KB
timelines 236.0KB 236.2KB +194.0B
total +7.0KB

Page load bundle

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

id before after diff
securitySolution 246.6KB 248.9KB +2.2KB
timelines 156.8KB 157.0KB +147.0B
total +2.4KB
Unknown metric groups

API count

id before after diff
securitySolution 1372 1377 +5
timelines 969 977 +8
total +13

References to deprecated APIs

id before after diff
securitySolution 1012 542 -470
timelines 84 52 -32
total -502

History

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

@stephmilovic stephmilovic merged commit fb6fe9b into main Nov 4, 2021
jloleysens added a commit to jloleysens/kibana that referenced this pull request Nov 5, 2021
…ink-to-kibana-app

* 'main' of github.com:elastic/kibana: (290 commits)
  [Connectors][ServiceNow] Remove SN flags (elastic#117511)
  [ML] Functional tests - stabilize and re-enable feature importance tests (elastic#117503)
  [RAC] Disable the actions button if the user has inadequate privileges (elastic#117488)
  [Visualize] [xyChart] filter labels by default (elastic#117288)
  Fix warning when setting description to undefined (elastic#117338)
  [build] Set monitoring.ui.container.elasticsearch.enabled for all containers (elastic#115087)
  fix types
  [Alerting] UX fixes for execution duration chart (elastic#117193)
  [CI] Delete node_modules in between bootstrap attempts (elastic#117588)
  Flaky test fixes (elastic#117028)
  [Security Solution] [Sourcerer] [Feature Branch] Update to use Kibana Data Views  (elastic#114806)
  [ML] Hide anomaly entity filter button tooltips when clicked (elastic#117493)
  adjust the synthetics journey type (elastic#117316)
  Refines hasAnyData check for alerts (elastic#117499)
  [Fleet] Default to APM tutorial (elastic#117421)
  [Maps] update docs for index pattern -> data view rename (elastic#117400)
  [Logs UI][Metrics UI] Remove deprecated config fields from APIs and SavedObjects (elastic#116821)
  [Fleet] Fix agent logs not reading query from URL (elastic#117286)
  Fixing Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout·ts - Actions and Triggers app create alert should successfully test valid es_query alert (elastic#114917)
  [Metrics UI] Add docs link to redundant groupBy detection (elastic#116822)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap
#	x-pack/plugins/reporting/public/shared_imports.ts
#	x-pack/plugins/reporting/server/routes/management/jobs.ts
stephmilovic added a commit to stephmilovic/kibana that referenced this pull request Nov 5, 2021
stephmilovic added a commit that referenced this pull request Nov 8, 2021
…Kibana Data Views (#114806) (#117670)

* [Security Solution] [Sourcerer] [Feature Branch] Update to use Kibana Data Views  (#114806)

* fix type

Co-authored-by: Kibana Machine <[email protected]>
@spalger spalger deleted the sourcerer_kip_as branch May 8, 2022 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants