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][CASES] Configure cases: Final #59358

Merged
merged 81 commits into from
Mar 13, 2020

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Mar 4, 2020

Summary

The PR implements all the needed functionality of the configuration page.

Depends on: #58894

Will be refactored when #59265 is merged with master. (Done)

Fixes: #59316 , #57864

Ref: #57866, #50103

Routes:

Get connectors

Get all connectors supported by the Case Management System.

Endpoint: /api/cases/configure/connectors/_find
Method: GET

Example parameters:

{}

Example response:

{
    "page": 1,
    "perPage": 20,
    "total": 1,
    "data": [
        {
            "id": "60b4bd83-c93f-4652-88f6-2bbeb1d80440",
            "actionTypeId": ".servicenow",
            "name": "ServiceNow Connector",
            "config": {
                "casesConfiguration": {
                    "mapping": [
                        {
                            "action_type": "overwrite",
                            "source": "title",
                            "target": "short_description"
                        },
                        {
                            "action_type": "overwrite",
                            "source": "description",
                            "target": "description"
                        },
                        {
                            "action_type": "append",
                            "source": "comments",
                            "target": "comments"
                        }
                    ]
                },
                "apiUrl": "https://<instance>.service-now.com"
            },
            "referencedByCount": 0
        }
    ]
}

Patch connector

Update a connector supported by the Case Management System.

Endpoint: /api/cases/configure/connectors/{connector_id}
Method: PATCH

Example payload:

{
    "cases_configuration": {
        "mapping": [
            {
                "action_type": "overwrite",
                "source": "title",
                "target": "short_description"
            },
            {
                "action_type": "overwrite",
                "source": "description",
                "target": "description"
            },
            {
                "action_type": "overwrite",
                "source": "comments",
                "target": "comments"
            }
        ]
    }
}

Example response:

{
    "cases_configuration": {
        "mapping": [
            {
                "action_type": "overwrite",
                "source": "title",
                "target": "short_description"
            },
            {
                "action_type": "overwrite",
                "source": "description",
                "target": "description"
            },
            {
                "action_type": "overwrite",
                "source": "comments",
                "target": "comments"
            }
        ]
    }
}

Get configuration

Get configuration of Case Management System.

Endpoint: /api/cases/configure
Method: GET

Example parameters:

{}

Example response:

{
    "connector_id": "60b4bd83-c93f-4652-88f6-2bbeb1d80440",
    "closure_type": "close-by-user",
    "created_at": "2020-03-08T16:14:03.228Z",
    "created_by": {
        "full_name": "Elastic",
        "username": "elastic"
    },
    "updated_at": "2020-03-08T16:23:13.289Z",
    "updated_by": {
        "full_name": "Elastic",
        "username": "elastic"
    },
    "version": "WzM3NCwxXQ=="
}

Post configuration

Create a configuration for the Case Management System.

Endpoint: /api/cases/configure
Method: POST

Example payload:

{
    "connector_id": "60b4bd83-c93f-4652-88f6-2bbeb1d80440",
    "closure_type": "close-by-user"
}

Example response:

{
    "connector_id": "60b4bd83-c93f-4652-88f6-2bbeb1d80440",
    "closure_type": "close-by-user",
    "created_at": "2020-03-09T10:27:41.635Z",
    "created_by": {
        "full_name": "Elastic",
        "username": "elastic"
    },
    "updated_at": null,
    "updated_by": null,
    "version": "WzM4MiwxXQ=="
}

Patch configuration

Update a configuration of the Case Management System.

Endpoint: /api/cases/configure
Method: PATCH

Example payload:

{
    "closure_type": "close-by-pushing",
    "version": "WzM4MiwxXQ=="
}

Example response:

{
    "connector_id": "60b4bd83-c93f-4652-88f6-2bbeb1d80440",
    "closure_type": "close-by-pushing",
    "created_at": "2020-03-09T10:27:41.635Z",
    "created_by": {
        "full_name": "Elastic",
        "username": "elastic"
    },
    "updated_at": "2020-03-09T10:34:55.603Z",
    "updated_by": {
        "full_name": "Elastic",
        "username": "elastic"
    },
    "version": "WzM4MywxXQ=="
}

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@cnasikas cnasikas added the release_note:skip Skip the PR/issue when compiling release notes label Mar 9, 2020
@cnasikas cnasikas marked this pull request as ready for review March 10, 2020 21:29
@cnasikas cnasikas requested a review from a team as a code owner March 10, 2020 21:29
@cnasikas cnasikas changed the title [SIEM][CASES][skip-ci] Configure cases: Final [SIEM][CASES] Configure cases: Final Mar 10, 2020
@stephmilovic
Copy link
Contributor

We need to have defaults selected in this view:
Screen Shot 2020-03-10 at 7 51 18 PM
Otherwise this 400 happens on save:
Screen Shot 2020-03-10 at 7 52 08 PM

@cnasikas cnasikas force-pushed the configure_cases_all branch 2 times, most recently from ee35958 to bda81be Compare March 12, 2020 21:06
@cnasikas cnasikas requested a review from a team March 12, 2020 21:06
@cnasikas cnasikas requested review from a team as code owners March 12, 2020 21:06
x-pack/test/functional/config.js Outdated Show resolved Hide resolved
Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

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

Thanks for the hard work! LGTM once we have a green build 🚀 🎸

@cnasikas cnasikas requested a review from spalger March 13, 2020 18:25
@spalger
Copy link
Contributor

spalger commented Mar 13, 2020

#60137 has been merged

@cnasikas
Copy link
Member Author

cnasikas commented Mar 13, 2020

#60137 has been merged

Thank you. I removed the lines from the config.js file. Commit: f45a343

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM from an operations perspective

@cnasikas cnasikas merged commit 5fb747e into elastic:master Mar 13, 2020
cnasikas added a commit to cnasikas/kibana that referenced this pull request Mar 13, 2020
* Create action schema

* Create createRequestHandler util function

* Add actions plugins

* Create action

* Validate actionTypeId

* [SIEM][CASE] Add find actions schema

* Create find actions route

* Create HttpRequestError

* Support http status codes

* Create check action health types

* Create check action health route

* Show field mapping

* Leave spaces between sections

* Export CasesConfiguration from servicenow action type

* Create IdSchema

* Create UpdateCaseConfiguration interface

* Create update action route

* Add constants

* Create fetchConnectors api function

* Create useConnector

* Create reducer

* Dynamic connectors

* Fix conflicts

* Create servicenow connector

* Register servicenow connector

* Add ServiceNow logo

* Create connnectors mapping

* Create validators in utils

* Use validators in connectors

* Validate URL

* Use connectors from config

* Enable triggers_aciton_ui plugin

* Show flyout

* Add closures options

* cleanup configure api

* simplify UI + add configure API

* Add mapping to flyout

* Fix error

* add all plumbing and main functionality to get configure working

* Fix naming

* Fix tests

* Show error when failed

* Remove version from query

* Disable when loading connectors

* fix config update

* Fix flyout

* fix two bugs

* Change defaults

* Disable closure options when no connector is selected

* Use default mappings from lib

* Set mapping if empty

* Reset connector to none if deleted from settings

* Change lib structure

* fix type

* review with christos

* Do not patch connector with id none

* Fix bug

* Show icon in dropdown

* Rename variable

* Show callout when connectors does not exists

* Adapt to new error handling

* Fix rebase wrong resolve

* Improve errors

* Remove async

* Fix spelling

* Refactor hooks

* Fix naming

* Better translation

* Fix bug with different action type attributes

* Fix linting errors

* Remove unnecessary comment

* Fix translation

* Normalized mapping before updating connector

* Fix type

* Memoized capitalized

* Dynamic data-subj-test variable

* Fix routes

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
cnasikas added a commit that referenced this pull request Mar 14, 2020
* Create action schema

* Create createRequestHandler util function

* Add actions plugins

* Create action

* Validate actionTypeId

* [SIEM][CASE] Add find actions schema

* Create find actions route

* Create HttpRequestError

* Support http status codes

* Create check action health types

* Create check action health route

* Show field mapping

* Leave spaces between sections

* Export CasesConfiguration from servicenow action type

* Create IdSchema

* Create UpdateCaseConfiguration interface

* Create update action route

* Add constants

* Create fetchConnectors api function

* Create useConnector

* Create reducer

* Dynamic connectors

* Fix conflicts

* Create servicenow connector

* Register servicenow connector

* Add ServiceNow logo

* Create connnectors mapping

* Create validators in utils

* Use validators in connectors

* Validate URL

* Use connectors from config

* Enable triggers_aciton_ui plugin

* Show flyout

* Add closures options

* cleanup configure api

* simplify UI + add configure API

* Add mapping to flyout

* Fix error

* add all plumbing and main functionality to get configure working

* Fix naming

* Fix tests

* Show error when failed

* Remove version from query

* Disable when loading connectors

* fix config update

* Fix flyout

* fix two bugs

* Change defaults

* Disable closure options when no connector is selected

* Use default mappings from lib

* Set mapping if empty

* Reset connector to none if deleted from settings

* Change lib structure

* fix type

* review with christos

* Do not patch connector with id none

* Fix bug

* Show icon in dropdown

* Rename variable

* Show callout when connectors does not exists

* Adapt to new error handling

* Fix rebase wrong resolve

* Improve errors

* Remove async

* Fix spelling

* Refactor hooks

* Fix naming

* Better translation

* Fix bug with different action type attributes

* Fix linting errors

* Remove unnecessary comment

* Fix translation

* Normalized mapping before updating connector

* Fix type

* Memoized capitalized

* Dynamic data-subj-test variable

* Fix routes

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 16, 2020
…o alerting/view-in-app

* 'alerting/view-in-app' of github.com:gmmorris/kibana: (33 commits)
  [SIEM] Adds 'Closes and opens signals' Cypress test (elastic#59950)
  [NP] Graph migration (elastic#59409)
  [ML] Clone analytics job  (elastic#59791)
  Move VALUE_CLICK_TRIGGER and APPLY_FILTER_TRIGGER to ui_action… (elastic#60202)
  Handle improperly defined Watcher Logging Action text parameter. (elastic#60169)
  Move select range trigger to uiActions (elastic#60168)
  [SIEM][CASES] Configure cases: Final (elastic#59358)
  Closes elastic#59784. Sets xpack.apm.serviceMapEnabled default value true. (elastic#60153)
  [siem/cypress] update junit filename to be picked up by runbld (elastic#60156)
  OSS logic added to test environment  (elastic#60134)
  Move canvas setup into app mount (elastic#59926)
  enable triggers_actions_ui plugin by default (elastic#60137)
  Expose Elasticsearch from start and deprecate from setup (elastic#59886)
  [SIEM] [Case] Insert timeline bugfix and limit 25 cases (elastic#60136)
  [ML] Client side cut over (elastic#60100)
  Disable query bar on service map routes (elastic#60118)
  Move subscribe_with_scope to kibana_legacy (elastic#59781)
  [Ingest] Agent Config create with sys monitoring (elastic#60111)
  [Watcher UI] Not possible to edit a watch that was created with the API if the ID contains a dot (elastic#59383)
  Actually fetch functionbeat fields needed for telemetry (elastic#60054)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 16, 2020
* master: (40 commits)
  skips 'config_open.ts' files from linter check (elastic#60248)
  [Searchprofiler] Spacing between rendered shards (elastic#60238)
  Add UiSettings validation & Kibana default route redirection (elastic#59694)
  [SIEM][CASE] Change configuration button (elastic#60229)
  [Step 1][App Arch] Saved object migrations from kibana plugin to new platform  (elastic#59044)
  adds new test (elastic#60064)
  [Uptime] Index Status API to Rest (elastic#59657)
  [SIEM] Adds 'Closes and opens signals' Cypress test (elastic#59950)
  [NP] Graph migration (elastic#59409)
  [ML] Clone analytics job  (elastic#59791)
  Move VALUE_CLICK_TRIGGER and APPLY_FILTER_TRIGGER to ui_action… (elastic#60202)
  Handle improperly defined Watcher Logging Action text parameter. (elastic#60169)
  Move select range trigger to uiActions (elastic#60168)
  [SIEM][CASES] Configure cases: Final (elastic#59358)
  Closes elastic#59784. Sets xpack.apm.serviceMapEnabled default value true. (elastic#60153)
  [siem/cypress] update junit filename to be picked up by runbld (elastic#60156)
  OSS logic added to test environment  (elastic#60134)
  Move canvas setup into app mount (elastic#59926)
  enable triggers_actions_ui plugin by default (elastic#60137)
  Expose Elasticsearch from start and deprecate from setup (elastic#59886)
  ...
@kibanamachine
Copy link
Contributor

💔 Build Failed


Test Failures

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/discover/_errors·js.discover app errors invalid scripted field error is rendered

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://dryrun

[00:00:00]       │
[00:01:39]         └-: discover app
[00:01:39]           └-> "before all" hook
[00:01:39]           └-> "before all" hook
[00:09:23]           └-: errors
[00:09:23]             └-> "before all" hook
[00:09:23]             └-> "before all" hook
[00:09:23]               │ info [logstash_functional] Loading "mappings.json"
[00:09:23]               │ info [logstash_functional] Loading "data.json.gz"
[00:09:23]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:09:23]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:09:23]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:09:24]               │ info [invalid_scripted_field] Loading "mappings.json"
[00:09:24]               │ info [invalid_scripted_field] Loading "data.json.gz"
[00:09:24]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_1/KlB35O43TL60DveJSuEUOA] deleting index
[00:09:24]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2/OxkFJTuwTQizefpGjKoraw] deleting index
[00:09:24]               │ info [invalid_scripted_field] Deleted existing index [".kibana_2",".kibana_1"]
[00:09:24]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] applying create index request using v1 templates []
[00:09:24]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:09:24]               │ info [invalid_scripted_field] Created index ".kibana"
[00:09:24]               │ debg [invalid_scripted_field] ".kibana" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:09:24]               │ info [invalid_scripted_field] Indexed 2 docs into ".kibana"
[00:09:24]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana/6COlE3YjQx-dSRWJoVnEiw] update_mapping [_doc]
[00:09:24]               │ debg Migrating saved objects
[00:09:24]               │ proc [kibana]   log   [12:55:51.157] [info][savedobjects-service] Creating index .kibana_2.
[00:09:24]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] applying create index request using v1 templates []
[00:09:24]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:24]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] updating number_of_replicas to [0] for indices [.kibana_2]
[00:09:24]               │ proc [kibana]   log   [12:55:51.201] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:09:24]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] applying create index request using v1 templates []
[00:09:24]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:24]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] updating number_of_replicas to [0] for indices [.kibana_1]
[00:09:25]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] 8405 finished with response BulkByScrollResponse[took=14.1ms,timed_out=false,sliceId=null,updated=0,created=2,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:09:25]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana/6COlE3YjQx-dSRWJoVnEiw] deleting index
[00:09:25]               │ proc [kibana]   log   [12:55:51.516] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:09:25]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2/0uB7yBp0QKCHenAdM3YfMw] update_mapping [_doc]
[00:09:25]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2/0uB7yBp0QKCHenAdM3YfMw] update_mapping [_doc]
[00:09:25]               │ proc [kibana]   log   [12:55:51.566] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:09:25]               │ proc [kibana]   log   [12:55:51.591] [info][savedobjects-service] Finished in 435ms.
[00:09:25]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:09:25]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2/0uB7yBp0QKCHenAdM3YfMw] update_mapping [_doc]
[00:09:26]               │ debg navigating to discover url: http://localhost:6161/app/kibana#/discover
[00:09:26]               │ debg Navigate to: http://localhost:6161/app/kibana#/discover
[00:09:27]               │ debg ... sleep(700) start
[00:09:27]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1587128153204#/discover 340 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:09:27]               │
[00:09:27]               │ debg browser[INFO] http://localhost:6161/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:27]               │ debg ... sleep(700) end
[00:09:27]               │ debg returned from get, calling refresh
[00:09:27]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1587128153204#/discover 340 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:09:27]               │
[00:09:27]               │ debg browser[INFO] http://localhost:6161/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:28]               │ debg currentUrl = http://localhost:6161/app/kibana#/discover
[00:09:28]               │          appUrl = http://localhost:6161/app/kibana#/discover
[00:09:28]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:09:30]               │ debg TestSubjects.find(kibanaChrome)
[00:09:30]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:09:30]               │ debg browser[INFO] http://localhost:6161/bundles/plugin/data/data.plugin.js 96:139970 "INFO: 2020-04-17T12:55:56Z
[00:09:30]               │        Adding connection to http://localhost:6161/elasticsearch
[00:09:30]               │
[00:09:30]               │      "
[00:09:30]               │ debg ... sleep(501) start
[00:09:31]               │ debg ... sleep(501) end
[00:09:31]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:09:31]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:09:31]               │ debg ... sleep(501) start
[00:09:32]               │ debg ... sleep(501) end
[00:09:32]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:09:32]               │ debg TestSubjects.exists(statusPageContainer)
[00:09:32]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:09:34]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:09:35]             └-: invalid scripted field error
[00:09:35]               └-> "before all" hook
[00:09:35]               └-> is rendered
[00:09:35]                 └-> "before each" hook: global before each
[00:09:35]                 │ debg TestSubjects.exists(discoverFetchError)
[00:09:35]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="discoverFetchError"]') with timeout=2500
[00:09:37]                 │ debg --- retry.tryForTime error: [data-test-subj="discoverFetchError"] is not displayed
[00:09:38]                 │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/discover app errors invalid scripted field error is rendered.png"
[00:09:38]                 │ info Current URL is: http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:09:38]                 │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/discover app errors invalid scripted field error is rendered.html
[00:09:38]                 └- ✖ fail: "discover app errors invalid scripted field error is rendered"
[00:09:38]                 │

Stack Trace

Error: expected false to equal true
    at Assertion.assert (packages/kbn-expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (packages/kbn-expect/expect.js:227:8)
    at Assertion.be (packages/kbn-expect/expect.js:69:22)
    at Context.it (test/functional/apps/discover/_errors.js:41:40)

Kibana Pipeline / kibana-intake-agent / Jest Integration Tests.packages/kbn-plugin-generator/integration_tests.running the plugin-generator via 'node scripts/generate_plugin.js plugin-name' with default config then running with es instance 'yarn start' should result in the spec plugin being initialized on kibana's stdout

Link to Jenkins

Standard Out

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


Stack Trace

Error: Command failed with exit code 126: ./bin/elasticsearch-keystore create
    at makeError (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/execa/lib/error.js:56:11)
    at handlePromise (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/execa/index.js:114:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/discover/_errors·js.discover app errors invalid scripted field error is rendered

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:01:46]         └-: discover app
[00:01:46]           └-> "before all" hook
[00:01:46]           └-> "before all" hook
[00:09:56]           └-: errors
[00:09:56]             └-> "before all" hook
[00:09:56]             └-> "before all" hook
[00:09:56]               │ info [logstash_functional] Loading "mappings.json"
[00:09:56]               │ info [logstash_functional] Loading "data.json.gz"
[00:09:56]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:09:56]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:09:56]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:09:58]               │ info [invalid_scripted_field] Loading "mappings.json"
[00:09:58]               │ info [invalid_scripted_field] Loading "data.json.gz"
[00:09:58]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_1/XXqXHK-bQH-mRP-G3J9GFw] deleting index
[00:09:58]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2/OfwKyYdlR6GT235C5lJB7w] deleting index
[00:09:58]               │ info [invalid_scripted_field] Deleted existing index [".kibana_2",".kibana_1"]
[00:09:58]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] applying create index request using v1 templates []
[00:09:58]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:09:58]               │ info [invalid_scripted_field] Created index ".kibana"
[00:09:58]               │ debg [invalid_scripted_field] ".kibana" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:09:58]               │ info [invalid_scripted_field] Indexed 2 docs into ".kibana"
[00:09:58]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana/qYAL2GnhTlaRwBKhiCV2fg] update_mapping [_doc]
[00:09:58]               │ debg Migrating saved objects
[00:09:58]               │ proc [kibana]   log   [12:44:30.190] [info][savedobjects-service] Creating index .kibana_2.
[00:09:58]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] applying create index request using v1 templates []
[00:09:58]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:58]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] updating number_of_replicas to [0] for indices [.kibana_2]
[00:09:58]               │ proc [kibana]   log   [12:44:30.241] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:09:58]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] applying create index request using v1 templates []
[00:09:58]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:58]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] updating number_of_replicas to [0] for indices [.kibana_1]
[00:09:58]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] 8472 finished with response BulkByScrollResponse[took=24ms,timed_out=false,sliceId=null,updated=0,created=2,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:09:58]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana/qYAL2GnhTlaRwBKhiCV2fg] deleting index
[00:09:58]               │ proc [kibana]   log   [12:44:30.576] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:09:58]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2/SCABkwWVRvOJe6eSFtI-jQ] update_mapping [_doc]
[00:09:58]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2/SCABkwWVRvOJe6eSFtI-jQ] update_mapping [_doc]
[00:09:58]               │ proc [kibana]   log   [12:44:30.641] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:09:58]               │ proc [kibana]   log   [12:44:30.689] [info][savedobjects-service] Finished in 501ms.
[00:09:58]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:09:59]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587125714248462284] [.kibana_2/SCABkwWVRvOJe6eSFtI-jQ] update_mapping [_doc]
[00:10:00]               │ debg navigating to discover url: http://localhost:6161/app/kibana#/discover
[00:10:00]               │ debg Navigate to: http://localhost:6161/app/kibana#/discover
[00:10:00]               │ debg ... sleep(700) start
[00:10:00]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1587127472248#/discover 340 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:10:00]               │
[00:10:00]               │ debg browser[INFO] http://localhost:6161/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:01]               │ debg ... sleep(700) end
[00:10:01]               │ debg returned from get, calling refresh
[00:10:01]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1587127472248#/discover 340 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:10:01]               │
[00:10:01]               │ debg browser[INFO] http://localhost:6161/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:01]               │ debg currentUrl = http://localhost:6161/app/kibana#/discover
[00:10:01]               │          appUrl = http://localhost:6161/app/kibana#/discover
[00:10:01]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:04]               │ debg TestSubjects.find(kibanaChrome)
[00:10:04]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:10:04]               │ debg browser[INFO] http://localhost:6161/bundles/plugin/data/data.plugin.js 96:139970 "INFO: 2020-04-17T12:44:35Z
[00:10:04]               │        Adding connection to http://localhost:6161/elasticsearch
[00:10:04]               │
[00:10:04]               │      "
[00:10:04]               │ debg ... sleep(501) start
[00:10:05]               │ debg ... sleep(501) end
[00:10:05]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:05]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:10:06]               │ debg ... sleep(501) start
[00:10:06]               │ debg ... sleep(501) end
[00:10:06]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:06]               │ debg TestSubjects.exists(statusPageContainer)
[00:10:06]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:10:09]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:10:09]             └-: invalid scripted field error
[00:10:09]               └-> "before all" hook
[00:10:09]               └-> is rendered
[00:10:09]                 └-> "before each" hook: global before each
[00:10:09]                 │ debg TestSubjects.exists(discoverFetchError)
[00:10:09]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="discoverFetchError"]') with timeout=2500
[00:10:12]                 │ debg --- retry.tryForTime error: [data-test-subj="discoverFetchError"] is not displayed
[00:10:12]                 │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/discover app errors invalid scripted field error is rendered.png"
[00:10:12]                 │ info Current URL is: http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:12]                 │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/discover app errors invalid scripted field error is rendered.html
[00:10:12]                 └- ✖ fail: "discover app errors invalid scripted field error is rendered"
[00:10:12]                 │

Stack Trace

Error: expected false to equal true
    at Assertion.assert (packages/kbn-expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (packages/kbn-expect/expect.js:227:8)
    at Assertion.be (packages/kbn-expect/expect.js:69:22)
    at Context.it (test/functional/apps/discover/_errors.js:41:40)

History

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

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:SIEM v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SIEM][CASE] Disable form controls when no connector is selected [SIEM] [Case] Configure Cases Page
6 participants