-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cases] Handle undefined connectors config field #120686
[Cases] Handle undefined connectors config field #120686
Conversation
Pinging @elastic/security-threat-hunting-cases (Team:Threat Hunting:Cases) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@@ -203,17 +203,10 @@ async function get( | |||
} | |||
} | |||
|
|||
async function getConnectors({ | |||
export async function getConnectors({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm exporting this so I can test it directly 😬 I could test via the createConfigurationSubClient
but it's a little more difficult.
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
* Marking config as optional * Filtering out preconfigured connectors Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Marking config as optional * Filtering out preconfigured connectors Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Marking config as optional * Filtering out preconfigured connectors Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
* Marking config as optional * Filtering out preconfigured connectors Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
This fixes an issue where Cases will crash the UI when determining if a connector is deprecated. This is because we attempt to read from the
config
property on a connector and the property might beundefined
.config
isundefined
when the connector is pre-configured. If a connector doesn't leverage theconfig
field it will be an empty object.For more details see: #119696
I filter out the connectors do not have the
config
field defined or are marked asPreConfigured: true
.Cases will not show the connectors as options to select.
Slack has an empty config
Cases doesn't show the preconfigured connectors
To test this you can define the following in your
config/kibana.dev.yml
Release Notes
Pre-configured connectors cannot be used within Cases.
cc: @YulNaumenko