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

[7.8] Prevent removal of actions via the UI from breaking rule AAD (#68184) #68300

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Jun 4, 2020

Backports the following commits to 7.8:

…#68184)

This fixes elastic#64870 _for real_.

The issue ended up being caused by a
conditional form field that mapped to a nested field on the rule's
params: when a rule is created with an action, it has a
meta.kibana_siem_app_url field. When the rule's actions were removed via
the UI, that field was _also_ removed, which broke AAD and thus rule
execution.

This fixes the issue by making that field unconditional, and also
removes the previous workaround.
# Conflicts:
#	x-pack/plugins/security_solution/public/alerts/components/rules/step_rule_actions/index.tsx
#	x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules_notifications.ts
@rylnd rylnd added the backport label Jun 4, 2020
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / X-Pack API Integration Tests.x-pack/test/api_integration/apis/endpoint/metadata·ts.apis Endpoint plugin test metadata api POST /api/endpoint/metadata when index is not empty metadata api should return one entry for each host with default paging

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:11:33]           └-: Endpoint plugin
[00:11:33]             └-> "before all" hook
[00:11:33]             └-> "before all" hook
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding component template [logs-settings]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding component template [metrics-mappings]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding component template [metrics-settings]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding component template [logs-mappings]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding component template [events-settings]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding component template [events-mappings]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [logs]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [events]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-endpoint.telemetry]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-endpoint.policy]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-endpoint.metadata]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [events-endpoint]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.diskio]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.cpu]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.entropy]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [logs-system.auth]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.core]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.fsstat]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.filesystem]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.load]
[00:11:34]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.memory]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.network]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.network_summary]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.process_summary]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.process]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.raid]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.service]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.socket_summary]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.socket]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.uptime]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [logs-system.syslog]
[00:11:35]               │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] adding index template [metrics-system.users]
[00:11:40]             └-: test metadata api
[00:11:40]               └-> "before all" hook
[00:11:40]               └-: POST /api/endpoint/metadata when index is not empty
[00:11:40]                 └-> "before all" hook
[00:11:40]                 └-> "before all" hook
[00:11:40]                   │ info [endpoint/metadata/api_feature] Loading "mappings.json"
[00:11:40]                   │ info [endpoint/metadata/api_feature] Loading "data.json"
[00:11:40]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] [metrics-endpoint-default-1] creating index, cause [api], templates [metrics], shards [1]/[1], mappings [_doc]
[00:11:40]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] moving index [metrics-endpoint-default-1] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [metrics-default]
[00:11:40]                   │ info [endpoint/metadata/api_feature] Created index "metrics-endpoint-default-1"
[00:11:40]                   │ debg [endpoint/metadata/api_feature] "metrics-endpoint-default-1" settings {"index":{"mapping":{"total_fields":{"limit":10000}},"refresh_interval":"5s"}}
[00:11:40]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] moving index [metrics-endpoint-default-1] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [metrics-default]
[00:11:40]                   │ info [endpoint/metadata/api_feature] Indexed 9 docs into "metrics-endpoint-default-1"
[00:11:40]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xl-1591296280794062879] moving index [metrics-endpoint-default-1] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [metrics-default]
[00:11:40]                 └-> metadata api should return one entry for each host with default paging
[00:11:40]                   └-> "before each" hook: global before each
[00:11:40]                   └- ✖ fail: "apis Endpoint plugin test metadata api POST /api/endpoint/metadata when index is not empty metadata api should return one entry for each host with default paging"
[00:11:40]                   │

Stack Trace

{ Error: expected 0 to sort of equal 3
    at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.it (test/api_integration/apis/endpoint/metadata.ts:42:31) actual: '0', expected: '3', showDiff: true }

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

@rylnd rylnd merged commit f70447f into elastic:7.8 Jun 5, 2020
@rylnd rylnd deleted the backport/7.8/pr-68184 branch June 5, 2020 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants