Commit graph

2477 commits

Author SHA1 Message Date
Jean-Louis Leysens d23d8f0afd
Restore 200 OK + response payload for save and delete endpoints (#55535) 2020-01-22 13:52:53 +01:00
Devin W. Hurley e828a12954
[SIEM] [Detection Engine] Log time gaps as failures for now (#55515)
* log a failure to failure history if time gap is detected. stop-gap solution until a feature is fully fleshed out to report this and future messaging / monitoring.

* write date the gap warning occurred in the last_failure_at field, along with the status_date field.
2020-01-22 07:50:32 -05:00
Shahzad c6f9eff9f6
[Uptime] Ping List Disable expand row if no body present (#54898)
* update ping list

* update snap

* updated body

* update snaps

* fix i18n

* updated translation

* updated tests
2020-01-22 10:55:04 +01:00
Sébastien Loix 1f10da865a
[Mappings editor] Add missing relations parameter (#55003) 2020-01-22 15:02:39 +05:30
Ben Skelker 34333aa1fd
fixes typos (#55521) 2020-01-22 10:29:54 +02:00
Dima Arnautov 5e711e423a
[ML] Fix counters and percentages for array fields on the Data visualizer page (#55209)
* [ML] update data visualizer endpoint to check doc counts

* [ML] fix mock for cardinality tests

* [ML] use actual field name for agg filtering instead of safeFieldName

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-22 07:08:58 +01:00
Frank Hassanabad b5c6c9a3e3
[SIEM][Detection Engine] Tags being turned into null
## Summary

Test:

1.) Add a tag to a new rule
2.) Activate the rule
3.) Ensure the tag does not go away

### 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~~

~~- [ ] [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)
2020-01-21 21:56:35 -07:00
The SpaceCake Project 31e6a3b75a
rules part deux (#55507)
cuts and metadata additions
2020-01-21 22:59:33 -05:00
Frank Hassanabad 8f0c413ef5
[SIEM][Detection Engine] Critical blocker, fixes schema accepting values it should not (#55488)
## Summary

* This fixes the schema accepting values the UI cannot handle at this point with severity. It's best to just set it to a small fixed enumeration of values.
* From feedback from people the values should have more defaults and be more consistent in the schema so gave defaults for `from`, `to`, and `interval`.
* Removed dead query examples that cannot happen because immutable cannot be set by end users anymore
* Changes the version and other sections to be integer only and not allow floats
* Added unit tests

### 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)
2020-01-21 19:02:28 -07:00
Xavier Mouligneau 5344702246
[SIEM] Detections create prepackage rules (#55403)
* update extra action on rule detail to match design

* remove experimental label

* allow pre-package to be deleted + do not allow wrong user to create pre-packages rules

* Additional look back minimum value to 1

* fix flow with edit rule

* add success toaster when rule is created or updated

* Fix Timeline selector loading

* review ben doc + change detectin engine to detection even in url

* Succeeded text size consistency in rule details page

* fix description of threats

* fix test

* fix type

* fix internatinalization

* adding pre-packaged rules

* fix bug + enhance ux

* unified icon

* fix i18n

* fix bugs

* review I

* review II

* add border back
2020-01-21 20:31:11 -05:00
Tim Sullivan c531eb477b
[Reporting] Convert CSV Export libs to Typescript (#55117)
* [Reporting] Convert CSV Export libs to Typescript

* fix jest tests

* more ts conversion

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-21 17:39:03 -07:00
Nathan Reese 04374e665c
[Maps] show field type icons in data driven styling field select (#55166)
* [Maps] show field icons in data driven styling field select

* only show origin group label when there is more then one origin

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-21 18:52:13 -05:00
Patrick Mueller b78c1b1042
Adds event log for actions and alerting (#45081)
initial code for event log

see issue https://github.com/elastic/kibana/issues/45083
2020-01-21 18:00:08 -05:00
Frank Hassanabad db1a64da76
[SIEM][Detection Engine] Fixes critical blocker where signals on signals are not operating
## Summary

This fixes halting, infinite creation of signals, and cyclic issues with signals when they are reflected on their own index. Without this fix, you could get a user who looks back at a signals index as both their input and output index and forever generates new signals forever and ever and ever until the heath death of the universe. 

* Changes the data structure to support parent and ancestors
* Adds a check for the parent and ancestors
* Adds README.md and in-depth testing of cyclic concepts
* Adds README.md and in-depth testing of depth levels of signal concepts
* Added unit tests for both use cases
* Removed extra console.log statement found in the code base

Follow the two README.md's included for testing and explanation of how it works.

See `test_cases/signals_on_signals/depth_test`
See `test_cases/signals_on_signals/halting_test`

### 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)
2020-01-21 15:29:43 -07:00
Frank Hassanabad 31d3821598
[SIEM][Detection Engine] Critical blocker, adds need REST prefix for cloud
## Summary

* Adds needed `/` to the beginning of cloud requests from Kibana -> ES

### 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~~

~~- [ ] [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)
2020-01-21 15:28:49 -07:00
Matt Bargar 884560806c
Retain pinned filters when loading and clearing saved queries (#54307)
When we originally implemented Saved Queries we had them overwrite pinned filters on load and on clear. This caused the issue in #53258. If you have a saved query loaded in Discover for example and you navigate to a different app and then back to Discover, that saved query will get get reloaded since app state is retained when navigating back and forth between apps. If you created a pinned filter in between visits to Discover, it will get removed when the saved query is reloaded.

This issue made me reconsider our previous decision. I think pinned filters should not be affected by loading or clearing a saved query, since they are pinned they should only be removed if the user explicitly asks for it. This solves the reported issue and I also think it makes the UI more intuitive.
2020-01-21 16:33:53 -05:00
Felix Stürmer 85edc66125
[Logs UI] Use the correct icons and labels in the feature cont… (#55292)
This fixes logs and metrics icons as well as the metrics label in the feature control lists which were missed during the renaming.

fixes #55283
2020-01-21 19:42:22 +01:00
Justin Kambic 16b5fd7e04
[Uptime] Handle locations with names but no geo data (#55234)
* Handle locations with names but no geo data.

* Fix broken types, add a comment explaining some weird ts-related code.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-21 13:41:36 -05:00
Thomas Neirynck 740d4d1afa
[File upload] Enforce file-type check in file dialog (#55063) 2020-01-21 13:23:49 -05:00
patrykkopycinski fc21c49c35
[SIEM] Fix Detections page breadcrumbs (#55173) 2020-01-21 19:20:53 +01:00
Michail Yasonik da54657b91
Grouped Kibana nav (#53545)
Adds concept of `category` to nav links, grouping them by this in the side nav
2020-01-21 12:48:07 -05:00
James Gowdy 01fe8afb98
[ML] Fixing categorization wizard example results (#54924)
* [ML] Fixing categorization wizard example results

* moving validation results to class

* cleaning up category analyzer types

* small tweaks

* removing commented out code

* fixing string ids

* small refactor

* improving validation messages

* fixing types

* updating message text

* fixing typo

* adding privileges error

* updating privilege message

* changes based on review

* removing old warning message

* fixing translations

* renaming enum
2020-01-21 17:35:47 +00:00
Joe Portner 5aa85dc751
Update Monitoring plugin's Elasticsearch configuration (#55119)
* Fix Monitoring plugin Elasticsearch SSL config

Plugin now allows "keystore" and "truststore" values in its
config schema as the documentation currently states.
Plugin also now reads PEM and PKCS12 files off of the filesystem
before attempting to create an Elasticsearch client.

* Add missing Elasticsearch config deprecations

Several Elasticsearch config deprecations were overlooked for
monitoring-specific Elasticsearch settings.
2020-01-21 12:35:02 -05:00
Liza Katz f26596145e
Clean up search service (#53766)
* deprecate msearch

* Missing export

* adjust tests, revert loading method of esaggs/boot

* getInjectedMetadata

* Fix jest tests

* update default strategy abort test

* notice update

* Allow running discover errors test independently

* Remove batchSearches

* Detect painless script error

* don't show notifications for aborted requests

* Fix jest tests

* Restore loader indicator

* Decreace loading count on error

* update search test

* Trigger digest after fetching fresh index patterns

* Revert isEqual

* accurate revert

* Return full error details to client from search endpoint

* Re-throw AbortError from http when user aborts request.

* fix typo

* typo

* Adjust routes jest test

* Restore msearch using a separate es connection

* typescript fixes

* set http service mock

* Move es client to dat aplugin, for follow up PR

* Add karma mock

* krma mock

* fix tests

* ts

* Pass in version dynamically

* add headers to esClient host

* Restored fetch soon test
Use tap for loadingCount side effects

* Cleanup search params

* Cleanup search params test

* Revert "Cleanup search params"

This reverts commit ca9dea01d5.

* Revert "Cleanup search params test"

This reverts commit 30b9478612.

* Revert code to use old es client until  #44302 is resolved

* Revert changes to getPainlessError

* Fix jest test

* Refactor esClient to trigger loadingIndicator

* fixing tests

* use esClient from searchService

* git remove comment

* fix jest

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-21 18:49:57 +02:00
James Gowdy ce286f543e
[ML] Adding missing job groups to recognizer wizard (#55392) 2020-01-21 15:25:58 +00:00
Nathan Reese d3cef4791e
[Maps] fix warning about missing key in react element (#55372) 2020-01-21 08:54:42 -05:00
Joe Reuter c88aa5a505
Migration: Separate legacy and index entrypoint (#54124) 2020-01-21 14:49:30 +01:00
patrykkopycinski c196058350
[SIEM] Update ml_conditional_links cypress tests (#55373) 2020-01-21 14:04:52 +01:00
Dima Arnautov a131f1dbcf
[ML] Formatting for additional timing and model size stats (#55062)
* [ML] formatting for additional timing and model size stats

* [ML] roundToDecimalPlace only average search time

* [ML] adjust functional tests

* [ML] remove debug tag, fix assert value

* [ML] check for no decimal place

* [ML] fix functional tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-21 13:50:18 +01:00
Aleh Zasypkin 9d3d3cdc67
Migrate Management views to Kibana Platform plugin (#53880) 2020-01-21 13:40:39 +01:00
Sébastien Loix a20ac0d710
[Mappings editor] Add missing max_shingle_size parameter to search_as_you_type (#55161) 2020-01-21 14:27:51 +05:30
Alejandro Fernández cdb0021ac6
[Logs UI] Fix z-index of logs page toolbar (#54469)
* Fix z-index of logs page toolbar

* Extract `FixedDatePicker` from log setup page, and use it in the stream page

* Clean unused import

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-20 18:28:55 +01:00
James Gowdy bf0bcfe703
[ML] Fixing missing job_type in job messages search (#55330) 2020-01-20 16:12:25 +00:00
Walter Rafelsberger 3e567b5cf2
[ML] Correctly pass on severity value to anomaly explorer charts. (#55207)
- Fixes passing on the severity value correctly to anomaly explorer charts. The wrong value of undefined being passed down caused anomaly markers not showing up.
- This bug surfaced that the severity value was never applied to filter multi-bucket anomalies which is now also fixed by this PR.
- Adds a check if topInfluencers is an array.
2020-01-20 15:43:22 +01:00
Walter Rafelsberger bd7f7ab48a
[ML] Single Metric Viewer: Fix job check. (#55191)
Fixes switching via navigation to Single Metric Viewer from Anomaly Explorer for a job which isn't supported in the Single Metric Viewer.
2020-01-20 15:37:41 +01:00
James Gowdy 82ab1a604f
[ML] Improving job wizards with datafeed aggregations (#55180)
* [ML] Improving job wizards with datafeed aggregations

* picking all agg keys for fields

* function move and rename
2020-01-20 13:24:48 +00:00
Shahzad 6c420b7d86
fix commonly used ranges uptime (#54930) 2020-01-20 12:19:30 +01:00
patrykkopycinski 4328265c5d
[SIEM] Use proper icons on Detections view (#55215) 2020-01-20 12:06:17 +01:00
Devin W. Hurley 9567cca7d0
[SIEM] [Detection Engine] Update status on rule details page (#55201)
* adds logic for returning / updating status when a rule is switched from enabled to disabled and vice versa.

* update response for find rules statuses to include current status and failures

* update status on demand and on enable/disable

* adds ternary to allow removal of 'let'

* adds savedObjectsClient to the add and upate prepackaged rules and import rules route.

* fix bug where convertToSnakeCase would throw error 'cannot convert null or undefined to object' if passed null

* genericize snake_case converter and updates isAuthorized to snake_case (different situation)

* renaming to 'going to run' instead of executing because when task manager exits because of api key error it won't write the error status so the actual status is 'going to run' on the next interval. This is more accurate than being stuck on 'executing' because of an error we don't control and can't write a status for.

* fix missed merge conflict

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
2020-01-18 12:41:47 -05:00
Xavier Mouligneau 13c648b47a
[SIEM] Detection engine cleanup for rule details/creation/edit page (#55069)
* update extra action on rule detail to match design

* remove experimental label

* allow pre-package to be deleted + do not allow wrong user to create pre-packages rules

* Additional look back minimum value to 1

* fix flow with edit rule

* add success toaster when rule is created or updated

* Fix Timeline selector loading

* review ben doc + change detectin engine to detection even in url

* Succeeded text size consistency in rule details page

* fix description of threats

* fix test

* fix type

* fix internatinalization

* Update x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/translations.ts

Co-Authored-By: Garrett Spong <spong@users.noreply.github.com>

* Update x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/edit/translations.ts

Co-Authored-By: Garrett Spong <spong@users.noreply.github.com>

* Update x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_schedule_rule/schema.tsx

Co-Authored-By: Garrett Spong <spong@users.noreply.github.com>

* review I

* fix type

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
2020-01-18 07:49:31 -05:00
Tim Sullivan 2598d15ea1
[Reporting/Migration] ReportingSetup, LegacySetup (#54198)
* ReportingSetup, LegacySetup

* fix ts
2020-01-17 21:47:01 -07:00
Garrett Spong dfb3578793
[SIEM] [Detection Engine] Fixes duplicate rule action (#55252)
## Summary

This PR fixes the duplication of rules. The DE backend was updated to not allow `immutable` when creating a rule, so this broke the `Duplicate Rule` action as we were creating a new rule with `immutable: false`.

This PR also switches rule duplication over to use the bulk `create` API introduced in https://github.com/elastic/kibana/pull/53543, so now we can duplicate multiple rules.

And lastly, this PR removes the limitation of not being able to delete immutable rules. So long as you have the appropriate `write` permissions the delete action is now always available.

![duplicate_batch](https://user-images.githubusercontent.com/2946766/72652638-cee69a00-3944-11ea-9e15-cce3f2b8cefe.gif)


### 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)~
- [x] 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~
- [ ] ~[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)~
- [ ] ~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)~
2020-01-17 18:41:00 -07:00
Xavier Mouligneau 6760c3394d
[SIEM] Detections add alert & signal tab (#55127)
* add alert on detections

* review I + fix unit test

* review II

* review III

* review IV + bug fixes found during review

* review VI
2020-01-17 19:22:22 -05:00
Frank Hassanabad 6cfd1d48b3
[SIEM][Detection Engine] Fixes critical regression on the backend with immutable and tags
## Summary

Fixes regression with immutable caused from:
https://github.com/elastic/kibana/pull/55004

* Updated types of Prepackaged 
* Updated unit tests
* Fixed unit test for it

Testing:

```
./post_rule.sh 
{
  "created_at": "2020-01-17T19:11:31.813Z",
  "updated_at": "2020-01-17T19:11:31.813Z",
  "created_by": "elastic_kibana",
  "description": "Query with a rule_id that acts like an external id",
  "enabled": true,
  "false_positives": [],
  "from": "now-6m",
  "id": "41ef6309-ef98-4c9f-8d2d-90a070361fb7",
  "immutable": false,
  "interval": "5m",
  "rule_id": "query-rule-id",
  "language": "kuery",
  "output_index": ".siem-signals-frank-hassanabad-default",
  "max_signals": 100,
  "risk_score": 1,
  "name": "Query with a rule id",
  "query": "user.name: root or user.name: admin",
  "references": [],
  "severity": "high",
  "updated_by": "elastic_kibana",
  "tags": [],
  "to": "now",
  "type": "query",
  "threats": [],
  "version": 1
}
```

Then get the saved object using whatever the id is comes back from above. In this example it is 41ef6309-ef98-4c9f-8d2d-90a070361fb7, yours will be different

```
./get_saved_objects.sh alert 41ef6309-ef98-4c9f-8d2d-90a070361fb7
{
  "id": "41ef6309-ef98-4c9f-8d2d-90a070361fb7",
  "type": "alert",
  "updated_at": "2020-01-17T19:11:32.844Z",
  "version": "WzY5NTQsMV0=",
  "attributes": {
    "name": "Query with a rule id",
    "tags": [
      "__internal_rule_id:query-rule-id",
      "__internal_immutable:false"
    ],
    "alertTypeId": "siem.signals",
    "consumer": "siem",
    "params": {
      "createdAt": "2020-01-17T19:11:31.813Z",
      "description": "Query with a rule_id that acts like an external id",
      "ruleId": "query-rule-id",
      "index": null,
      "falsePositives": [],
      "from": "now-6m",
      "immutable": false,
      "query": "user.name: root or user.name: admin",
      "language": "kuery",
      "outputIndex": ".siem-signals-frank-hassanabad-default",
      "savedId": null,
      "timelineId": null,
      "timelineTitle": null,
      "meta": null,
      "filters": null,
      "maxSignals": 100,
      "riskScore": 1,
      "severity": "high",
      "threats": [],
      "to": "now",
      "type": "query",
      "updatedAt": "2020-01-17T19:11:31.813Z",
      "references": [],
      "version": 1
    },
    "schedule": {
      "interval": "5m"
    },
    "enabled": true,
    "actions": [],
    "throttle": null,
    "apiKeyOwner": "elastic_kibana",
    "createdBy": "elastic_kibana",
    "updatedBy": "elastic_kibana",
    "createdAt": "2020-01-17T19:11:32.245Z",
    "muteAll": false,
    "mutedInstanceIds": [],
    "scheduledTaskId": "2c5cc340-395d-11ea-9276-d3c1c264ca9a"
  },
  "references": []
}
```

Ensure you have the internal immutable of "__internal_immutable:false" In your tags


Next test is to do a find filter of non-packaged rules:

```
./find_rule_by_filter.sh "alert.attributes.tags:%20%22__internal_immutable:false%22"
```

You should get back the above rule any others you created.

### 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)
2020-01-17 16:53:04 -07:00
Shahzad 81bcaed7ae
update local (#55177) 2020-01-18 00:24:34 +01:00
Ryland Herrick 27103bd4a5
[SIEM] Fix mocks for kibana context (#54996)
* Use our internal uiSettings mock in all context mocks

We were previously only using our internal uiSettings mock (which
returns real values) in our TestProviders component, as
all tests either needed:

* specific mocks, in which case we'd call jest.mock() ourselves
* broad mocks, for which platform's kibana_react mocks were usually
sufficient

However, a recent addition in the Timeline component added a usage of
uiSettings that could not use the default mock.

With this change, one can either jest.mock('lib/kibana') or use the
TestProviders wrapper to get real values for UI settings in test.

* Remove production code guarding against tests

This coalescence was due to the service not being properly mocked in
test, which is now fixed.
2020-01-17 16:28:38 -06:00
Joel Griffith e8b859bf2f
[Reporting] Fix map tiles not loading by using Chrome's Remote Protocol (#55137)
* WIP Fixing map tiles and such

* Small comment and importing map from dolash

* Better destructuring and comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-17 12:18:24 -08:00
Alexey Antonov 801302e3ce
[Data Plugin] combine autocomplete provider and suggestions provider (#54451)
* [Data Plugin] combine autocomplete provider and suggestions provider

Closes: #52843

* [Data Plugin] combine autocomplete provider and suggestions provider - add skeleton for SuggestionsProvider

* autocomplete_provider -> autocomplete

* value_suggestions.ts - change getSuggestions method

* remove suggestions_provider folder

* fix PR comments

* fix PR comments

* fix CI

* fix CI

* getFieldSuggestions -> getValueSuggestions

* update Jest snaphots

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-17 22:42:51 +03:00
Mike Côté 9c2d778d1c
Fix enable API to schedule task after alert is updated (#55095) 2020-01-17 10:48:48 -05:00
Pete Harverson d740ec34b3
[ML] Accessibility fix for structural markup on table rows (#55075)
* [ML] Accessibility fix for structural markup on table rows

* [ML] Fix type error on Transforms table cell for scope property
2020-01-17 13:48:31 +00:00