No description
Find a file
Frank Hassanabad 6d2c1da2ba
[Security Solutions][Detection Engine] Adds exception lists to the saved object references when created or modified (part 1) (#107064)
## Summary

This is part 1 to addressing the issue seen here: https://github.com/elastic/kibana/issues/101975

This part 1 wires up our rules to be able to `inject` and `extract` parameters from the saved object references. Follow up part 2 (not included here) will do the saved object migrations of existing rules to have the saved object references.

The way the code is written it shouldn't interfere or blow up anything even though the existing rules have not been migrated since we do fallbacks and only log errors when we detect that the saved object references have not been migrated or have been deleted.

Therefore this PR should be migration friendly in that you will only see an occasional error as it serializes and deserializes a non migrated rule without object references but still work both ways. Non-migrated rules or rules with deleted saved object references will self correct during the serialization phase when you edit a rule and save out the modification. This should be migration bug friendly as well in case something does not work out with migrations, we can still have users edit an existing rule to correct the bug.

For manual testing, see the `README.md` in the folder. You should be able to create and modify existing rules and then see in their saved objects that they have `references` pointing to the top level exception list containers with this PR.

* Adds the new folder in `detection_engine/signals/saved_object_references` with all the code needed
* Adds a top level `README.md` about the functionality and tips for new programmers to add their own references 
* Adds a generic pattern for adding more saved object references within our rule set
* Adds ~40 unit tests
* Adds additional migration safe logic to de-couple this from required saved object migrations and hopefully helps mitigates any existing bugs within the stack or previous migration bugs a bit for us.

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-08-11 09:45:36 -06:00
.buildkite [api-docs] raise memory limit again (#107065) 2021-07-28 16:45:04 -04:00
.ci [api-docs] raise memory limit again (#107065) 2021-07-28 16:45:04 -04:00
.github [Maps] fix code owners (#108106) 2021-08-10 16:36:04 -06:00
api_docs [Data cleanup] unify serializable state (#107745) 2021-08-10 13:03:48 +02:00
config Support authenticating to Elasticsearch via service account tokens (#102121) 2021-07-12 14:18:35 -04:00
dev_docs Sharing saved objects developer guide (#107099) 2021-08-10 16:02:45 -04:00
docs [Reporting] Added docs about the new ILM kibana-reporting policy (#108018) 2021-08-11 12:43:13 +02:00
examples include and fix hello world example test (#108072) 2021-08-11 11:14:58 +02:00
licenses Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
packages chore(NA): moving @kbn/rule-data-utils to babel transpiler (#107573) 2021-08-11 15:59:21 +01:00
plugins
rfcs [SO Migration] fix reindex race on multi-instance mode (#104516) 2021-07-07 22:10:37 +02:00
scripts [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
src [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
tasks/config [Es query] Move to package (#103530) 2021-07-21 17:10:55 +02:00
test include and fix hello world example test (#108072) 2021-08-11 11:14:58 +02:00
typings [Fleet] Replace usages of EuiCodeEditor by CodeEditor (#107434) 2021-08-05 11:40:40 -04:00
utilities Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
vars [APM] Add new ftr_e2e to kibana CI and remove current e2e tests. (#107593) 2021-08-10 23:40:20 -04:00
x-pack [Security Solutions][Detection Engine] Adds exception lists to the saved object references when created or modified (part 1) (#107064) 2021-08-11 09:45:36 -06:00
.backportrc.json chore(NA): adds 7.14 branch and bumps 7.x on backportrc (#103914) 2021-06-30 18:40:26 +01:00
.bazelignore chore(NA): stop grouping bazel out symlink folders (#96066) 2021-04-01 14:16:14 -05:00
.bazeliskversion chore(NA): bump bazelisk to v1.7.5 (#92905) 2021-02-26 00:48:47 +00:00
.bazelrc chore(NA): manage npm dependencies within bazel (#92864) 2021-03-03 12:37:20 -05:00
.bazelrc.common chore(NA): enable exports_directories_only on rules nodejs to improve performance (#104180) 2021-07-02 00:14:40 +01:00
.bazelversion chore(NA): bazel machinery installation on kbn bootstrap (#89469) 2021-01-28 00:51:01 +00:00
.browserslistrc [browserslist] remove unnecessary browsers (#89186) 2021-01-25 16:30:18 -07:00
.editorconfig .editorconfig MDX files should follow the same rules as MD (#96942) 2021-04-13 11:40:42 -04:00
.eslintignore [packages] Move @kbn/interpreter to Bazel (#101089) 2021-06-22 09:59:20 -05:00
.eslintrc.js Allow optional OSS to X-Pack dependencies (#107432) 2021-08-05 13:58:24 -04:00
.fossa.yml
.gitattributes
.gitignore [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
.i18nrc.json [index patterns] index pattern create modal (#101853) 2021-08-05 22:58:57 -05:00
.node-version Upgrade from Node.js v14.17.2 to v14.17.3 (#104417) 2021-07-08 07:26:37 -04:00
.npmrc chore(NA): assure puppeteer_skip_chromium_download is applied across every yarn install situation (#88346) 2021-01-14 18:00:23 +00:00
.nvmrc Upgrade from Node.js v14.17.2 to v14.17.3 (#104417) 2021-07-08 07:26:37 -04:00
.prettierignore [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
.prettierrc
.stylelintignore chore(NA): stop grouping bazel out symlink folders (#96066) 2021-04-01 14:16:14 -05:00
.stylelintrc Amsterdam helpers (#93701) 2021-03-10 10:27:16 -06:00
.telemetryrc.json [Usage collection] Collect non-default kibana configs (#97368) 2021-04-20 11:02:27 -04:00
.yarnrc chore(NA): manage npm dependencies within bazel (#92864) 2021-03-03 12:37:20 -05:00
api-documenter.json
BUILD.bazel [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md (#87439) 2021-02-23 09:01:51 +01:00
CONTRIBUTING.md
FAQ.md
github_checks_reporter.json
Gruntfile.js Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
Jenkinsfile chore(NA): remove KBN_ES_SNAPSHOT_USE_UNVERIFIED var from Jenkinsfile 2021-07-14 17:16:57 +01:00
jest.config.integration.js chore(NA): introduce preset for jest-integration tests on @kbn/test (#105144) 2021-07-14 20:53:12 +01:00
jest.config.js Remove /src/legacy (#95510) 2021-04-06 09:25:36 +02:00
kibana.d.ts Remove /src/legacy (#95510) 2021-04-06 09:25:36 +02:00
LICENSE.txt Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
NOTICE.txt [Detections] Adds automatic updating for Prebuilt Security Detection Rules package (#101846) 2021-06-24 15:31:25 -06:00
package.json Update dependency @elastic/charts to v33.2.2 (#107939) 2021-08-10 16:43:57 -05:00
preinstall_check.js Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
README.md STYLEGUIDE reference .md => .mdx (#107440) 2021-08-02 14:05:58 -05:00
renovate.json5 Add auto-backport by default to ech renovate bot prs (#102208) 2021-06-16 12:05:56 -05:00
RISK_MATRIX.mdx Add "Risk Matrix" section to the PR template (#100649) 2021-06-02 14:43:47 +02:00
SECURITY.md
STYLEGUIDE.mdx Update Styleguide path to .mdx (#107890) 2021-08-10 13:15:43 +02:00
tsconfig.base.json [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
tsconfig.bazel.json [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
tsconfig.browser.json
tsconfig.browser_bazel.json [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
tsconfig.json [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
tsconfig.types.json [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
TYPESCRIPT.md
WORKSPACE.bazel chore(NA): upgrades bazel rules nodejs into v3.7.0 (#105764) 2021-07-15 22:35:56 +01:00
yarn.lock Update dependency @elastic/charts to v33.2.2 (#107939) 2021-08-10 16:43:57 -05:00

Kibana

Kibana is your window into the Elastic Stack. Specifically, it's a browser-based analytics and search dashboard for Elasticsearch.

Getting Started

If you just want to try Kibana out, check out the Elastic Stack Getting Started Page to give it a whirl.

If you're interested in diving a bit deeper and getting a taste of Kibana's capabilities, head over to the Kibana Getting Started Page.

Using a Kibana Release

If you want to use a Kibana release in production, give it a test run, or just play around:

Building and Running Kibana, and/or Contributing Code

You might want to build Kibana locally to contribute some code, test out the latest features, or try out an open PR:

Documentation

Visit Elastic.co for the full Kibana documentation.

For information about building the documentation, see the README in elastic/docs.

Version Compatibility with Elasticsearch

Ideally, you should be running Elasticsearch and Kibana with matching version numbers. If your Elasticsearch has an older version number or a newer major number than Kibana, then Kibana will fail to run. If Elasticsearch has a newer minor or patch number than Kibana, then the Kibana Server will log a warning.

Note: The version numbers below are only examples, meant to illustrate the relationships between different types of version numbers.

Situation Example Kibana version Example ES version Outcome
Versions are the same. 5.1.2 5.1.2 💚 OK
ES patch number is newer. 5.1.2 5.1.5 ⚠️ Logged warning
ES minor number is newer. 5.1.2 5.5.0 ⚠️ Logged warning
ES major number is newer. 5.1.2 6.0.0 🚫 Fatal error
ES patch number is older. 5.1.2 5.1.0 ⚠️ Logged warning
ES minor number is older. 5.1.2 5.0.0 🚫 Fatal error
ES major number is older. 5.1.2 4.0.0 🚫 Fatal error

Questions? Problems? Suggestions?

  • If you've found a bug or want to request a feature, please create a GitHub Issue. Please check to make sure someone else hasn't already created an issue for the same topic.
  • Need help using Kibana? Ask away on our Kibana Discuss Forum and a fellow community member or Elastic engineer will be glad to help you out.