No description
Find a file
Frank Hassanabad 9d8c93158c
[SIEM][Detection Engine] Adds signal to ECS event.kind and fixes status in signals (#51772)
## Summary

* Adds signal to the ECS event.kind when it copies over a signal
* Creates a `original_event` if needed within signal so additional look ups don't have to happen
* Fixes a bug with `signal.status` where it was not plumbed correctly
* Adds extra unit tests around the filter
* Adds missing unit tests around utils I didn't add before
* Fixes a typing issue with output of a signal

Example signal output:

Original event turns into this:
```ts
  "event" : {
    "dataset" : "socket",
    "kind" : "signal",
    "action" : "existing_socket",
    "id" : "ffec6797-b92f-4436-bb40-69bac2c21874",
    "module" : "system"
  },
```

Signal amplification turns into this where it contains original_event looks like this:

```ts
  "signal" : {
    "parent" : {
      "id" : "xNRlqW4BHe9nqdOi2358",
      "type" : "event",
      "index" : "auditbeat",
      "depth" : 1
    },
    "original_time" : "2019-11-26T20:27:11.169Z",
    "status" : "open",
    "rule" : {
      "id" : "643fbd2f-a3c9-449e-ba95-e3d89000a72a",
      "rule_id" : "rule-1",
      "false_positives" : [ ],
      "max_signals" : 100,
      "risk_score" : 1,
      "description" : "Detecting root and admin users",
      "from" : "now-6m",
      "immutable" : false,
      "interval" : "5m",
      "language" : "kuery",
      "name" : "Detect Root/Admin Users",
      "query" : "user.name: root or user.name: admin",
      "references" : [
        "http://www.example.com",
        "https://ww.example.com"
      ],
      "severity" : "high",
      "tags" : [ ],
      "type" : "query",
      "to" : "now",
      "enabled" : true,
      "created_by" : "elastic_some_user",
      "updated_by" : "elastic_some_user"
    },
    "original_event" : {
      "dataset" : "socket",
      "kind" : "state",
      "action" : "existing_socket",
      "id" : "ffec6797-b92f-4436-bb40-69bac2c21874",
      "module" : "system"
    }
  }
```
### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2019-11-26 16:19:13 -07:00
.ci add serverMocha config for flaky job (#51508) 2019-11-25 14:54:28 -07:00
.github Document @kbn/config-schema. (#50307) 2019-11-26 12:56:31 +01:00
bin
common/graphql
config
data
docs [DOCS] Fixes broken links (#51634) 2019-11-26 12:36:35 -08:00
licenses
packages Move @kbn/es-query into data plugin (#51014) 2019-11-26 13:28:04 -07:00
rfcs Update deprecated React.SFC and React.StatelessComponent types (#50852) 2019-11-21 20:53:54 +01:00
scripts Typescriptify and shim kbn_tp_run_pipeline test plugin (#50645) 2019-11-26 14:22:34 +01:00
src Move @kbn/es-query into data plugin (#51014) 2019-11-26 13:28:04 -07:00
style_guides
tasks Move @kbn/es-query into data plugin (#51014) 2019-11-26 13:28:04 -07:00
test Typescriptify and shim kbn_tp_run_pipeline test plugin (#50645) 2019-11-26 14:22:34 +01:00
typings Update deprecated React.SFC and React.StatelessComponent types (#50852) 2019-11-21 20:53:54 +01:00
utilities
vars Add labels to shell scripts in Jenkins (#49657) 2019-11-15 10:59:05 -05:00
webpackShims
x-pack [SIEM][Detection Engine] Adds signal to ECS event.kind and fixes status in signals (#51772) 2019-11-26 16:19:13 -07:00
.backportrc.json
.browserslistrc
.editorconfig
.eslintignore Move @kbn/es-query into data plugin (#51014) 2019-11-26 13:28:04 -07:00
.eslintrc.js [Console] Refactoring more legacy code and implementing minor fixes (#51312) 2019-11-25 18:28:49 +01:00
.gitattributes
.gitignore
.i18nrc.json Move @kbn/es-query into data plugin (#51014) 2019-11-26 13:28:04 -07:00
.node-version
.nvmrc
.prettierrc
.sass-lint.yml
.yarnrc
CONTRIBUTING.md docs: improve CONTRIBUTING docs for how to run Kibana tests (#51285) 2019-11-22 14:05:00 +01:00
FAQ.md
github_checks_reporter.json
Gruntfile.js
Jenkinsfile Change pipeline timeout from 3 hours to 2 hours (#51098) 2019-11-20 14:32:48 -05:00
kibana.d.ts
LICENSE.txt
NOTICE.txt
package.json Move @kbn/es-query into data plugin (#51014) 2019-11-26 13:28:04 -07:00
preinstall_check.js
README.md
renovate.json5 Swap renovate codeowners with assignee configuration (#48987) 2019-11-25 09:38:49 -06:00
STYLEGUIDE.md Upgrade to TypeScript 3.7.2 (#47188) 2019-11-15 10:33:29 +01:00
tsconfig.browser.json
tsconfig.json
tsconfig.types.json
TYPESCRIPT.md Update deprecated React.SFC and React.StatelessComponent types (#50852) 2019-11-21 20:53:54 +01:00
yarn.lock Upgrade typescript-eslint to 2.9.0 (#51737) 2019-11-26 18:21:02 +01: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.