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

[SIEM] Add license checks for ML Rules on the backend #61023

Merged
merged 4 commits into from
Mar 24, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Mar 24, 2020

Summary

Rejects creation/update/importing of ML Rules if the license is insufficient.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

rylnd added 2 commits March 23, 2020 19:49
We'll add this to the rest of the routes momentarily.
This ensures that you cannot create nor update an ML Rule if your
license is not Platinum (or Trial).
@rylnd rylnd added Team:SIEM v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.7.0 labels Mar 24, 2020
@rylnd rylnd requested a review from spong March 24, 2020 02:12
@rylnd rylnd requested a review from a team as a code owner March 24, 2020 02:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@rylnd rylnd mentioned this pull request Mar 24, 2020
11 tasks
@rylnd
Copy link
Contributor Author

rylnd commented Mar 24, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/context/_discover_navigation·js.context app context link in discover should open the context view with the selected document as anchor

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 3 times on tracked branches: https://github.com/elastic/kibana/issues/53308

[00:00:00]       │
[00:00:12]         └-: context app
[00:00:12]           └-> "before all" hook
[00:00:12]           └-> "before all" hook
[00:00:13]             │ info [logstash_functional] Loading "mappings.json"
[00:00:13]             │ info [logstash_functional] Loading "data.json.gz"
[00:00:13]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:13]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]]).
[00:00:13]             │ info [logstash_functional] Created index "logstash-2015.09.22"
[00:00:13]             │ debg [logstash_functional] "logstash-2015.09.22" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:13]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:13]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]]).
[00:00:13]             │ info [logstash_functional] Created index "logstash-2015.09.20"
[00:00:13]             │ debg [logstash_functional] "logstash-2015.09.20" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:13]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:13]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]]).
[00:00:13]             │ info [logstash_functional] Created index "logstash-2015.09.21"
[00:00:13]             │ debg [logstash_functional] "logstash-2015.09.21" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:23]             │ info progress: 12336
[00:00:24]             │ info [logstash_functional] Indexed 4633 docs into "logstash-2015.09.22"
[00:00:24]             │ info [logstash_functional] Indexed 4757 docs into "logstash-2015.09.20"
[00:00:24]             │ info [logstash_functional] Indexed 4614 docs into "logstash-2015.09.21"
[00:00:24]             │ info [visualize] Loading "mappings.json"
[00:00:24]             │ info [visualize] Loading "data.json"
[00:00:25]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana_1/Q8yhNTBqScKetZzBNyQqZA] deleting index
[00:00:25]             │ info [visualize] Deleted existing index [".kibana_1"]
[00:00:25]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:25]             │ info [visualize] Created index ".kibana"
[00:00:25]             │ debg [visualize] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana/myGcf08RRZay7xJef-e2eQ] update_mapping [_doc]
[00:00:25]             │ info [visualize] Indexed 7 docs into ".kibana"
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana/myGcf08RRZay7xJef-e2eQ] update_mapping [_doc]
[00:00:25]             │ debg Migrating saved objects
[00:00:25]             │ proc [kibana]   log   [18:45:18.989] [info][savedobjects-service] Creating index .kibana_2.
[00:00:25]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:25]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] updating number_of_replicas to [0] for indices [.kibana_2]
[00:00:25]             │ proc [kibana]   log   [18:45:19.070] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:00:25]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:25]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] updating number_of_replicas to [0] for indices [.kibana_1]
[00:00:25]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1], mappings [_doc]
[00:00:25]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] updating number_of_replicas to [0] for indices [.tasks]
[00:00:25]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] 863 finished with response BulkByScrollResponse[took=72.8ms,timed_out=false,sliceId=null,updated=0,created=7,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:25]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana/myGcf08RRZay7xJef-e2eQ] deleting index
[00:00:25]             │ proc [kibana]   log   [18:45:19.492] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana_2/5EmVDzudTV29O3Xjn2CsJg] update_mapping [_doc]
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana_2/5EmVDzudTV29O3Xjn2CsJg] update_mapping [_doc]
[00:00:25]             │ proc [kibana]   log   [18:45:19.618] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:00:25]             │ proc [kibana]   log   [18:45:19.662] [info][savedobjects-service] Finished in 677ms.
[00:00:25]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:00:26]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana_2/5EmVDzudTV29O3Xjn2CsJg] update_mapping [_doc]
[00:00:27]             │ debg replacing kibana config doc: {"defaultIndex":"logstash-*"}
[00:00:27]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1585074445917590132] [.kibana_2/5EmVDzudTV29O3Xjn2CsJg] update_mapping [_doc]
[00:00:28]             │ debg navigating to discover url: http://localhost:6111/app/kibana#/discover
[00:00:28]             │ debg Navigate to: http://localhost:6111/app/kibana#/discover
[00:00:28]             │ debg ... sleep(700) start
[00:00:28]             │ debg browser[INFO] http://localhost:6111/app/kibana?_t=1585075522095#/discover 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:28]             │
[00:00:28]             │ debg browser[INFO] http://localhost:6111/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:29]             │ debg ... sleep(700) end
[00:00:29]             │ debg returned from get, calling refresh
[00:00:29]             │ debg browser[INFO] http://localhost:6111/app/kibana?_t=1585075522095#/discover 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:29]             │
[00:00:29]             │ debg browser[INFO] http://localhost:6111/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:29]             │ debg currentUrl = http://localhost:6111/app/kibana#/discover
[00:00:29]             │          appUrl = http://localhost:6111/app/kibana#/discover
[00:00:29]             │ debg TestSubjects.find(kibanaChrome)
[00:00:29]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:33]             │ debg TestSubjects.find(kibanaChrome)
[00:00:33]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:00:33]             │ debg browser[INFO] http://localhost:6111/bundles/plugin/data/data.plugin.js 96:139970 "INFO: 2020-03-24T18:45:25Z
[00:00:33]             │        Adding connection to http://localhost:6111/elasticsearch
[00:00:33]             │
[00:00:33]             │      "
[00:00:33]             │ debg ... sleep(501) start
[00:00:33]             │ debg ... sleep(501) end
[00:00:33]             │ debg in navigateTo url = http://localhost:6111/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:00:33]             │ debg --- retry.try error: URL changed, waiting for it to settle
[00:00:34]             │ debg ... sleep(501) start
[00:00:34]             │ debg ... sleep(501) end
[00:00:34]             │ debg in navigateTo url = http://localhost:6111/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:00:34]             │ debg TestSubjects.exists(statusPageContainer)
[00:00:34]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:37]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:37]           └-: context link in discover
[00:00:37]             └-> "before all" hook
[00:00:37]             └-> "before all" hook
[00:00:37]               │ debg navigating to discover url: http://localhost:6111/app/kibana#/discover
[00:00:37]               │ debg Navigate to: http://localhost:6111/app/kibana#/discover
[00:00:38]               │ debg ... sleep(700) start
[00:00:38]               │ debg browser[INFO] http://localhost:6111/app/kibana?_t=1585075531669#/discover 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:38]               │
[00:00:38]               │ debg browser[INFO] http://localhost:6111/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:38]               │ debg ... sleep(700) end
[00:00:38]               │ debg returned from get, calling refresh
[00:00:39]               │ debg browser[INFO] http://localhost:6111/bundles/plugin/data/data.plugin.js 96:139970 "INFO: 2020-03-24T18:45:33Z
[00:00:39]               │        Adding connection to http://localhost:6111/elasticsearch
[00:00:39]               │
[00:00:39]               │      "
[00:00:39]               │ERROR browser[SEVERE] http://localhost:6111/bundles/commons.bundle.js 0:1397368 TypeError: Failed to fetch
[00:00:39]               │          at Fetch._callee3$ (http://localhost:6111/bundles/commons.bundle.js:1:1424525)
[00:00:39]               │          at l (http://localhost:6111/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:338:1046209)
[00:00:39]               │          at Generator._invoke (http://localhost:6111/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:338:1045962)
[00:00:39]               │          at Generator.forEach.e.<computed> [as throw] (http://localhost:6111/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:338:1046566)
[00:00:39]               │          at asyncGeneratorStep (http://localhost:6111/bundles/commons.bundle.js:1:1419022)
[00:00:39]               │          at _throw (http://localhost:6111/bundles/commons.bundle.js:1:1419419)
[00:00:39]               │ debg browser[INFO] http://localhost:6111/app/kibana?_t=1585075531669#/discover 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:39]               │
[00:00:39]               │ debg browser[INFO] http://localhost:6111/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:40]               │ debg currentUrl = http://localhost:6111/app/kibana#/discover
[00:00:40]               │          appUrl = http://localhost:6111/app/kibana#/discover
[00:00:40]               │ debg TestSubjects.find(kibanaChrome)
[00:00:40]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:41]               │ debg TestSubjects.find(kibanaChrome)
[00:00:41]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:00:41]               │ debg browser[INFO] http://localhost:6111/bundles/plugin/data/data.plugin.js 96:139970 "INFO: 2020-03-24T18:45:35Z
[00:00:41]               │        Adding connection to http://localhost:6111/elasticsearch
[00:00:41]               │
[00:00:41]               │      "
[00:00:41]               │ debg ... sleep(501) start
[00:00:42]               │ debg ... sleep(501) end
[00:00:42]               │ debg in navigateTo url = http://localhost:6111/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:00:42]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:00:43]               │ debg ... sleep(501) start
[00:00:43]               │ debg ... sleep(501) end
[00:00:43]               │ debg in navigateTo url = http://localhost:6111/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:00:43]               │ debg TestSubjects.exists(statusPageContainer)
[00:00:43]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:46]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:46]               │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:00:46]               │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:00:46]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:00:46]               │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:00:46]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:00:46]               │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:00:46]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:00:46]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:00:46]               │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:00:46]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:00:46]               │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:00:46]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:00:46]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:00:46]               │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:00:46]               │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:00:46]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:46]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:47]               │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:47]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:47]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:47]               │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:00:47]               │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:47]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:47]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:47]               │ debg ... sleep(500) start
[00:00:48]               │ debg ... sleep(500) end
[00:00:48]               │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:00:48]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:00:48]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:00:48]               │ debg Find.waitForElementStale with timeout=10000
[00:00:48]               │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:00:48]               │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:00:48]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:48]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:48]               │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:48]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:48]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:48]               │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:00:48]               │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:48]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:48]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:49]               │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:00:49]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:00:52]               │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:00:52]               │ debg TestSubjects.click(querySubmitButton)
[00:00:52]               │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:00:52]               │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:00:52]               │ debg Find.waitForElementStale with timeout=10000
[00:00:53]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:00:53]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:00:54]               │ debg TestSubjects.moveMouseTo(field-@message)
[00:00:54]               │ debg TestSubjects.find(field-@message)
[00:00:54]               │ debg Find.findByCssSelector('[data-test-subj="field-@message"]') with timeout=10000
[00:00:56]               │ debg TestSubjects.click(fieldToggle-@message)
[00:00:56]               │ debg Find.clickByCssSelector('[data-test-subj="fieldToggle-@message"]') with timeout=10000
[00:00:56]               │ debg Find.findByCssSelector('[data-test-subj="fieldToggle-@message"]') with timeout=10000
[00:00:56]               │ debg TestSubjects.click(field-extension)
[00:00:56]               │ debg Find.clickByCssSelector('[data-test-subj="field-extension"]') with timeout=10000
[00:00:56]               │ debg Find.findByCssSelector('[data-test-subj="field-extension"]') with timeout=10000
[00:00:57]               │ debg TestSubjects.click(plus-extension-jpg)
[00:00:57]               │ debg Find.clickByCssSelector('[data-test-subj="plus-extension-jpg"]') with timeout=10000
[00:00:57]               │ debg Find.findByCssSelector('[data-test-subj="plus-extension-jpg"]') with timeout=10000
[00:00:57]               │ debg isGlobalLoadingIndicatorVisible
[00:00:57]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:00:57]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:00:57]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:00:57]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:00:57]               │ debg TestSubjects.click(field-geo.src)
[00:00:57]               │ debg Find.clickByCssSelector('[data-test-subj="field-geo.src"]') with timeout=10000
[00:00:57]               │ debg Find.findByCssSelector('[data-test-subj="field-geo.src"]') with timeout=10000
[00:00:57]               │ debg TestSubjects.click(plus-geo.src-IN)
[00:00:57]               │ debg Find.clickByCssSelector('[data-test-subj="plus-geo.src-IN"]') with timeout=10000
[00:00:57]               │ debg Find.findByCssSelector('[data-test-subj="plus-geo.src-IN"]') with timeout=10000
[00:00:58]               │ debg isGlobalLoadingIndicatorVisible
[00:00:58]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:00:58]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:00:58]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:00:58]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:00:58]             └-> should open the context view with the selected document as anchor
[00:00:58]               └-> "before each" hook: global before each
[00:00:58]               │ debg TestSubjects.find(docTable)
[00:00:58]               │ debg Find.findByCssSelector('[data-test-subj="docTable"]') with timeout=10000
[00:00:58]               │ debg TestSubjects.find(docTable)
[00:00:58]               │ debg Find.findByCssSelector('[data-test-subj="docTable"]') with timeout=10000
[00:00:58]               │ debg TestSubjects.find(docTable)
[00:00:58]               │ debg Find.findByCssSelector('[data-test-subj="docTable"]') with timeout=10000
[00:01:09]               │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/context app context link in discover should open the context view with the selected document as anchor.png"
[00:01:09]               │ info Current URL is: http://localhost:6111/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272015-09-19T06:31:44.000Z%27,to:%272015-09-23T18:31:44.000Z%27))&_a=(columns:!(%27@message%27),filters:!((%27$state%27:(store:appState),meta:(alias:!n,disabled:!f,index:%27logstash-*%27,key:extension,negate:!f,params:(query:jpg),type:phrase),query:(match_phrase:(extension:jpg))),(%27$state%27:(store:appState),meta:(alias:!n,disabled:!f,index:%27logstash-*%27,key:geo.src,negate:!f,params:(query:IN),type:phrase),query:(match_phrase:(geo.src:IN)))),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:01:09]               │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/context app context link in discover should open the context view with the selected document as anchor.html
[00:01:09]               └- ✖ fail: "context app context link in discover should open the context view with the selected document as anchor"
[00:01:09]               │

Stack Trace

TypeError: Cannot read property 'click' of undefined
    at Context.<anonymous> (test/functional/apps/context/_discover_navigation.js:54:64)
    at process._tickCallback (internal/process/next_tick.js:68:7)

History

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

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out, tested locally, and performed code review. Thanks for the clean documented code and for adding tests to each area impacted -- greatly appreciated @rylnd! LGTM 👍

@rylnd rylnd merged commit 64a5734 into elastic:master Mar 24, 2020
@rylnd rylnd deleted the backend_ml_license_check branch March 24, 2020 21:49
rylnd added a commit that referenced this pull request Mar 24, 2020
* WIP: Check license on simple rule creation

We'll add this to the rest of the routes momentarily.

* Add license checks around all rule-modifying endpoints

This ensures that you cannot create nor update an ML Rule if your
license is not Platinum (or Trial).

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants