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

[Security Solutions][Case] Settings per case per connector #77327

Merged
merged 175 commits into from
Oct 6, 2020

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Sep 14, 2020

Summary

This PR allows users to specify connector incident fields when cases are being sent to them. Specifically:

  • Jira: issue type, priority, and parent issue in the case of a subtask.
  • IBM Resilient: issue types, and severity.
  • ServiceNow: urgency, severity, and impact.

Screenshot 2020-10-06 at 8 10 05 PM

Screenshot 2020-10-06 at 8 04 56 PM

Screenshot 2020-10-06 at 8 05 05 PM

Screenshot 2020-10-06 at 8 04 32 PM

Screenshot 2020-10-06 at 8 04 42 PM

Screenshot 2020-10-06 at 8 09 49 PM

Screenshot 2020-10-06 at 8 11 38 PM

Ref: #76222, #76212, #75622

Dev docs

  • To create a case (POST <kibana host>:<port>/api/cases) you need to provide a connector. Requests without a connector response to 400 Bad Request.
  • To update the connector of a case (PATCH <kibana host>:<port>/api/cases) you need to provide the connector. The previously connector_id attribute has been removed in favor of the connector attribute.
  • To sets the default connector (POST <kibana host>:<port>/api/cases/configure) you need to provide a connector. The previously connector_id and connector_name attributes have been removed in favor of the connector attribute.
  • To update the connector’s case closure settings (PATCH <kibana host>:<port>/api/cases/configure) you need to provide a connector. The previously connector_id and connector_name attributes have been removed in favor of the connector attribute.

Connector schema:

connector

Property Description Type
id ID of the connector used for pushing case updates to external systems. string
name The connector name. string
type The type of the connector. Must be one of these: .servicenow, jira, .resilient, and .none string
fields Object containing the connector’s fields. fields

fields

For ServiceNow connectors:

Property Description Type
urgency The urgency of the incident. string
severity The severity of the incident. string
impact The impact of the incident. string

For Jira connectors:

Property Description Type
issueType The issue type of the issue. string
priority The priority of the issue. string
parent The key of the parent issue (Valid when the issue type is Sub-task). string

For IBM Resilient connectors:

Property Description Type
issueTypes The issue types of the issue. string[]
severityCode The severity code of the issue. string

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cnasikas cnasikas self-assigned this Sep 14, 2020
@cnasikas cnasikas added v7.10.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:SIEM labels Sep 14, 2020
@cnasikas cnasikas changed the title [Security Solutions][Case] Settings per case per connector [Security Solutions][Case][skip-ci] Settings per case per connector Sep 14, 2020
@cnasikas cnasikas force-pushed the cases_settings branch 7 times, most recently from ccc076d to f292f95 Compare September 18, 2020 22:06
@cnasikas cnasikas force-pushed the cases_settings branch 2 times, most recently from 81347fc to 027e8c6 Compare September 22, 2020 10:53
Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

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

I tested locally, migration has been working as expected. I was able to create/update cases with these new settings fields. I review the code and I thought the fields registry is a great way of implementation. It will be easy to add new connectors and features on top of it.

@stephmilovic did also a good job by refactoring code and spending time fixing bugs and clean up the code. Great teamwork here!!! never easy when you have the pressure of feature freeze.

I think we can all feel like Christos today ;)

image

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.

LGTM! LTFF!
giphy (1)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

@kbn/optimizer bundle module count

id before after diff
securitySolution 1998 2027 +29

async chunks size

id before after diff
securitySolution 10.3MB 10.4MB +103.4KB

distributable file count

id before after diff
default 48094 48104 +10

page load bundle size

id before after diff
securitySolution 587.2KB 592.9KB +5.7KB

Saved Objects .kibana field count

id before after diff
cases 32 38 +6
cases-configure 14 19 +5
total +11

History

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

@gchaps
Copy link
Contributor

gchaps commented Oct 16, 2020

@cnasikas For this PR to be included in the breaking changes doc, I need a write up that includes the details and impact of the change. See this breaking changes doc for an example.

@cnasikas
Copy link
Member Author

@gchaps This PR updates our docs to accommodate the breaking changes. Is that enough or do you want me to post the details here?

@gchaps gchaps mentioned this pull request Nov 3, 2020
1 task
@cjcenizal
Copy link
Contributor

@cnasikas Ideally, there would be a section in the PR description that identifies the breaking changes for people who want to understand the changes encapsulated by the PR. Here are some good examples: #80766, #65467, #42353

@cnasikas cnasikas added release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. and removed release_note:breaking labels Nov 7, 2020
@cnasikas
Copy link
Member Author

cnasikas commented Nov 7, 2020

@cjcenizal Thanks for your feedback. I updated the description accordingly and improve the labeling for the release note.

@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:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM Team:Threat Hunting Security Solution Threat Hunting Team v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants