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

Move connector types into own plugin and split ownership #90931

Closed
mikecote opened this issue Feb 10, 2021 · 16 comments
Closed

Move connector types into own plugin and split ownership #90931

mikecote opened this issue Feb 10, 2021 · 16 comments
Assignees
Labels
estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Actions/ConnectorTypes Issues related to specific Connector Types on the Actions Framework Feature:Actions Meta Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Threat Hunting Security Solution Threat Hunting Team

Comments

@mikecote
Copy link
Contributor

It feels like a good time to split the ownership of the existing connector types, so the alerting team doesn't sit in the middle of the case team's efforts to develop their suite of connector types. After @pmuellr wrote some great guidelines, it feels they are in good hands.

Things to consider:

  • Action validators should be passed allow-list config utils [Alerting] action validators should be passed allow-list config utils #64659
  • Move connector types to the new plugin
  • Split test suites
  • Split CODEOWNERS, so the alerting team isn't an owner of anything related to the case connector types
  • Come up with a list of connector types that will transition to the case team
  • Move issues from our roadmap related to those connector types and re-assign to the case team
@mikecote mikecote added Meta Feature:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Threat Hunting Security Solution Threat Hunting Team labels Feb 10, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@mikecote
Copy link
Contributor Author

We will need an owner on alerting side for this meta issue as it makes sense to start work on this soon and have this broken down. Maybe in a few weeks once we are caught up with our documentation.

@mikecote mikecote changed the title Move connector types into own plugin and split ownership Move case connector types into own plugin and split ownership Feb 16, 2021
@mikecote
Copy link
Contributor Author

mikecote commented Mar 5, 2021

The same will probably apply to SDHs for the first point of contact.

@gmmorris gmmorris added the Feature:Actions/ConnectorTypes Issues related to specific Connector Types on the Actions Framework label Jul 1, 2021
@gmmorris gmmorris added the loe:needs-research This issue requires some research before it can be worked on or estimated label Jul 14, 2021
@gmmorris gmmorris added the estimate:needs-research Estimated as too large and requires research to break down into workable issues label Aug 18, 2021
@gmmorris gmmorris removed the loe:needs-research This issue requires some research before it can be worked on or estimated label Sep 2, 2021
@gmmorris
Copy link
Contributor

Hey @mikecote and @cnasikas ,
Given our conversation from Monday, is there any reason we don't move the issues relating to the incident management connectors to be under the Cases team?

I'm thinking of these issues:

  1. [Alerting] JIRA connector to append comments to existing tickets #77319
  2. [Actions] Jira action fails when newline symbol is in summary #104932
  3. [Alerting] Jira and ServiceNow connectors UI should display API connection errors #105264
  4. [Actions] ServiceNow implement support for adding custom incident fields. #78237
  5. [Connectors] Add ServiceNow connector for Event Manger #94376

I do not think this should be moved to Cases though, as I suspect work is needed by us here:

  1. Ability to resolve ServiceNow, IBM Resilient and Jira incidents #83221

Any objections?

@cnasikas
Copy link
Member

Hey @gmmorris! About the issues:

  1. This is a feature not related to the Jira connector. The user asks if it is possible to update the incident in Jira when a second alert of the same rule fires. To my understanding, an alert needs to save some kind of state to provide that functionality, right?
  2. This can be fixed on the connector's level. I moved it to Cases.
  3. This can be fixed on the connector's level. I moved it to Cases.
  4. This can be owned by Cases. It is a challenging request 😄
  5. This can be owned by Cases. Again a challenging request 🙂

You are right about #83221

Thanks!

@gmmorris
Copy link
Contributor

Ah, fair point about #77319!

We can keep that, thanks :D

@mikecote
Copy link
Contributor Author

mikecote commented Sep 22, 2021

Regarding #83221, I'm not sure what platform enhancements would be needed to support such capabilities. It feels like the connector needs a linked list between "dedupKey" and external incident ID. Some R&D will find out the options but may be solvable without changing the platform.

The same mechanism could solve #77319.

@gmmorris
Copy link
Contributor

I think @YulNaumenko looked into ServiceNow at the time and couldn't find a way to do this without some kind of state that carries across the reaction executions, but I'm not sure.

Definitely worth a detailed investigation... and I guess, ideally, we'd verify SN, IBM and Jira can't do it before we change the platform. Any thoughts @cnasikas ?

@pmuellr
Copy link
Member

pmuellr commented Sep 22, 2021

Trying to solve the following in alerting will be hard:

Hard because we need to invent a mechanism to capture and persist the output of a connector execution somehow with the rule. And then make it available to the user creating the rule to somehow reuse it. All based on a particular alert instance, because of course a rule could schedule actions for multiple instances. It's also possible that you could add two Jira connectors (or same connector twice) to the same action group / alert instance (not sure of the use case for this, but ... maybe?), so the persisted state is actually alert instance / instance of action, and we don't even have a concept of "instance of action" to differentiate two Jira actions used in the same action group).

OTOH, in theory this could be done in cases, where they could capture that status and persist it in the case. Hopefully we could reuse our existing connector code, perhaps with some small tweaks to return the appropriate data if we're not already, and assuming we can already reuse the connector executors like that.

This would leave us in a world where these connectors used outside of connectors would not be auto-resolvable, or be able to "post to the same issue" kind of thing. You'd need to use cases for that. That seems fine to me technically, not sure what the product concerns would be though.

@cnasikas
Copy link
Member

I think @YulNaumenko looked into ServiceNow at the time and couldn't find a way to do this without some kind of state that carries across the reaction executions, but I'm not sure.

Definitely worth a detailed investigation... and I guess, ideally, we'd verify SN, IBM and Jira can't do it before we change the platform. Any thoughts @cnasikas ?

With our new ServiceNow application, we could update an incident in ServiceNow by using the correlation_id. When you push an incident, the application will check if there is an issue with the provided correlation_id. If there is, the incident will be updated. So if we put correlation_id: {{ruleID}} then every time an alert fires it will update the incident (assuming the ruleID is unique and the same on every alert execution). @gmmorris @mikecote @pmuellr Do you want me to support it in our new integration?

I do not think there is a way to do it for Jira & IBM resilient without platform changes.

OTOH, in theory this could be done in cases, where they could capture that status and persist it in the case. Hopefully we could reuse our existing connector code, perhaps with some small tweaks to return the appropriate data if we're not already, and assuming we can already reuse the connector executors like that.

I think this is possible.

@mikecote
Copy link
Contributor Author

mikecote commented Sep 23, 2021

So if we put correlation_id: {{ruleID}} then every time an alert fires it will update the incident (assuming the ruleID is unique and the same on every alert execution).

I would recommend something like {rule.id}:{alert.id} (what we do for PagerDuty's dedupKey) as a default, so the incidents are unique per alert. We also make this configurable in the rule action params for PagerDuty, so if the user wishes to have a single incident, they can change it to {rule.id}.

@cnasikas
Copy link
Member

Thanks, @mikecote! So if I have it as {rule.id}:{alert.id} it will create an incident every time. If I have it as {rule.id} it will update the incident, right? I can do that. Are you ok with having this feature?

@mikecote
Copy link
Contributor Author

So if I have it as {rule.id}:{alert.id} it will create an incident every time. If I have it as {rule.id} it will update the incident, right? I can do that. Are you ok with having this feature?

Yup that makes sense to me, it's important to have default behaviour of incident per alert ({rule.id}:{alert.id}) until we bring in the concept of the incident for the entire rule ({rule.id}) (#68828). But giving the users the ability to change it to {rule.id} manually works in the interim 👍 You can see how we did it for PagerDuty's dedupKey, it would be the same concept.

@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
@mikecote mikecote moved this from Todo to Blocked / On hold in AppEx: ResponseOps - Execution & Connectors Jul 25, 2022
@mikecote
Copy link
Contributor Author

Blocked on #64659.

@ymao1 ymao1 removed the blocked label Aug 30, 2022
@ymao1 ymao1 moved this from Blocked / On hold to Todo in AppEx: ResponseOps - Execution & Connectors Aug 30, 2022
@mikecote mikecote changed the title Move case connector types into own plugin and split ownership Move connector types into own plugin and split ownership Aug 30, 2022
@ymao1 ymao1 self-assigned this Aug 31, 2022
@ymao1 ymao1 moved this from Todo to In Progress in AppEx: ResponseOps - Execution & Connectors Aug 31, 2022
@ymao1
Copy link
Contributor

ymao1 commented Sep 7, 2022

This should probably be split up into several steps:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Actions/ConnectorTypes Issues related to specific Connector Types on the Actions Framework Feature:Actions Meta Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Threat Hunting Security Solution Threat Hunting Team
Projects
No open projects
Development

No branches or pull requests

7 participants