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 Solution] Possible bug when using preconfigured OpenAI Connector #163394

Closed
WildDogOne opened this issue Aug 8, 2023 · 8 comments
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Security Assistant Security Assistant fixed QA:Validated Issue has been validated by QA Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.10.0

Comments

@WildDogOne
Copy link

Describe the bug:
I have added an OpenAI connector to my Kibana as described in the documentation
As far as I can judge, this connector has been configured correctly and if I press test on it, it works.
However when I then try to use this connector in elastic security alerts, I am unable to select it.
When I make the connector manually it works no problem, and is also displayed differently (see screenshot).
Now either I am doing something wrong in the config, or it might be a bug. Config:

xpack.actions.preconfigured:
  my-gen-ai:
    name: OpenAI
    actionTypeId: .gen-ai
    config:
      apiUrl: https://api.openai.com/v1/chat/completions
      apiProvider: 'OpenAI'
    secrets:
      apiKey: OpenAI_API_Key

Kibana/Elasticsearch Stack version: 8.9.0

Server OS version: Ubuntu 22.04

Browser and Browser OS versions: Firefox 116.0.1

Original install method (e.g. download page, yum, from source, etc.): From official repo

Functional Area (e.g. Endpoint management, timelines, resolver, etc.): Elastic Security / OpenAI

Steps to reproduce:

  1. Configure OpenAI Connector via kibana.yml
  2. Reload/Restart kibana
  3. Try using configured OpenAI Connector in Elastic Security Chat function

Screenshots (if relevant):
grafik
grafik

@WildDogOne WildDogOne added bug Fixes for quality problems that affect the customer experience Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed labels Aug 8, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@jamesspi
Copy link

jamesspi commented Aug 8, 2023

Thanks for raising this @WildDogOne , we'll look into it.

@stephmilovic stephmilovic self-assigned this Aug 8, 2023
@spong
Copy link
Member

spong commented Aug 8, 2023

++ James, thanks for reporting this @WildDogOne! 🙂

Looks like this was recently identified as an issue with preconfigured connectors and a fix was pushed for 8.10 as part of #162754. Will keep this issue open so we can validate as part of our testing cycle for this next release 👍

@spong spong added the v8.1.0 label Aug 8, 2023
@WildDogOne
Copy link
Author

@spong thanks for your reply!
Very odd, the github search does not find the other issue when I search for it. Would not have opened a duplicate issue ;)

@spong
Copy link
Member

spong commented Aug 8, 2023

No worries @WildDogOne, it looks like this issue was found as part of another effort, so there wasn't a dedicated issue for this exact thing. So all good that you went ahead and created this 🙂

@spong spong added the Feature:Security Assistant Security Assistant label Aug 8, 2023
@jamesspi
Copy link

@spong , just to follow up on this and document the decision here. As we discussed on slack, let's go ahead and enable the use of preconfigured connectors by disallowing model selection within the assistant for those specifically, as well as showing the preconfigured badge.

@spong
Copy link
Member

spong commented Aug 28, 2023

Resolved in #164900, reopening and tagging as fixed so it can be validated.

@spong spong reopened this Aug 28, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Aug 28, 2023
…ssistant (elastic#164900)

## Summary

Fixes Preconfigured Connectors not working with the Assistant, and also
ensures default `model` from connector will be used first if available
(instead of defaulting to `gpt-3.5-turbo`).

<p align="center">
<img width="500"
src="https://github.com/elastic/kibana/assets/2946766/637f5919-7560-40b0-a8db-681096e77ac0"
/>
</p>

Note how `Model` is not displayed even though this is an OpenAI
connector:
<p align="center">
<img width="500"
src="https://github.com/elastic/kibana/assets/2946766/2c4bbe91-2851-48d7-8bfe-20e07db52155"
/>
</p>

Additionally, resolves issue with Detection Rule Assistant CTA not
displaying correctly on some platforms/browsers. It now shows as a
`Chat` button to the right of the table tabs, matching the other
assistant CTA's throughout the application.

<p align="center">
<img width="500"
src="https://github.com/elastic/kibana/assets/2946766/9fcecd54-8e1a-423a-be05-7137632acbc4"
/>
</p>

And lastly removes `Beta` title from callout since we're going GA in
`8.10` 🎉

<p align="center">
<img width="500"
src="https://github.com/elastic/kibana/assets/2946766/5beb379a-1bc7-4afc-b4bc-09f1d6085211"
/>
</p>

Resolves:
elastic#163394 (comment)
Resolves: elastic#164819

### Checklist

Delete any items that are not applicable to this PR.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

(cherry picked from commit 5f9651e)
kibanamachine added a commit that referenced this issue Aug 28, 2023
… with Assistant (#164900) (#165046)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Security Solution] Fixes Preconfigured Connectors not working with
Assistant (#164900)](#164900)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Garrett
Spong","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-28T20:46:33Z","message":"[Security
Solution] Fixes Preconfigured Connectors not working with Assistant
(#164900)\n\n## Summary\r\n\r\nFixes Preconfigured Connectors not
working with the Assistant, and also\r\nensures default `model` from
connector will be used first if available\r\n(instead of defaulting to
`gpt-3.5-turbo`).\r\n\r\n<p align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/637f5919-7560-40b0-a8db-681096e77ac0\"\r\n/>\r\n</p>
\r\n\r\nNote how `Model` is not displayed even though this is an
OpenAI\r\nconnector:\r\n<p align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/2c4bbe91-2851-48d7-8bfe-20e07db52155\"\r\n/>\r\n</p>
\r\n\r\nAdditionally, resolves issue with Detection Rule Assistant CTA
not\r\ndisplaying correctly on some platforms/browsers. It now shows as
a\r\n`Chat` button to the right of the table tabs, matching the
other\r\nassistant CTA's throughout the application.\r\n\r\n<p
align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/9fcecd54-8e1a-423a-be05-7137632acbc4\"\r\n/>\r\n</p>
\r\n\r\nAnd lastly removes `Beta` title from callout since we're going
GA in\r\n`8.10` 🎉\r\n\r\n<p align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/5beb379a-1bc7-4afc-b4bc-09f1d6085211\"\r\n/>\r\n</p>
\r\n\r\nResolves:\r\nhttps://github.com//issues/163394#issuecomment-1693431066\r\nResolves:
https://github.com/elastic/kibana/issues/164819\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [X] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or
tutorials","sha":"5f9651e0ef99e35e9a4a3b5dfbd7e40160038f07","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:
SecuritySolution","Feature:Elastic AI
Assistant","v8.10.0","v8.11.0"],"number":164900,"url":"https://github.com/elastic/kibana/pull/164900","mergeCommit":{"message":"[Security
Solution] Fixes Preconfigured Connectors not working with Assistant
(#164900)\n\n## Summary\r\n\r\nFixes Preconfigured Connectors not
working with the Assistant, and also\r\nensures default `model` from
connector will be used first if available\r\n(instead of defaulting to
`gpt-3.5-turbo`).\r\n\r\n<p align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/637f5919-7560-40b0-a8db-681096e77ac0\"\r\n/>\r\n</p>
\r\n\r\nNote how `Model` is not displayed even though this is an
OpenAI\r\nconnector:\r\n<p align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/2c4bbe91-2851-48d7-8bfe-20e07db52155\"\r\n/>\r\n</p>
\r\n\r\nAdditionally, resolves issue with Detection Rule Assistant CTA
not\r\ndisplaying correctly on some platforms/browsers. It now shows as
a\r\n`Chat` button to the right of the table tabs, matching the
other\r\nassistant CTA's throughout the application.\r\n\r\n<p
align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/9fcecd54-8e1a-423a-be05-7137632acbc4\"\r\n/>\r\n</p>
\r\n\r\nAnd lastly removes `Beta` title from callout since we're going
GA in\r\n`8.10` 🎉\r\n\r\n<p align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/5beb379a-1bc7-4afc-b4bc-09f1d6085211\"\r\n/>\r\n</p>
\r\n\r\nResolves:\r\nhttps://github.com//issues/163394#issuecomment-1693431066\r\nResolves:
https://github.com/elastic/kibana/issues/164819\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [X] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or
tutorials","sha":"5f9651e0ef99e35e9a4a3b5dfbd7e40160038f07"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164900","number":164900,"mergeCommit":{"message":"[Security
Solution] Fixes Preconfigured Connectors not working with Assistant
(#164900)\n\n## Summary\r\n\r\nFixes Preconfigured Connectors not
working with the Assistant, and also\r\nensures default `model` from
connector will be used first if available\r\n(instead of defaulting to
`gpt-3.5-turbo`).\r\n\r\n<p align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/637f5919-7560-40b0-a8db-681096e77ac0\"\r\n/>\r\n</p>
\r\n\r\nNote how `Model` is not displayed even though this is an
OpenAI\r\nconnector:\r\n<p align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/2c4bbe91-2851-48d7-8bfe-20e07db52155\"\r\n/>\r\n</p>
\r\n\r\nAdditionally, resolves issue with Detection Rule Assistant CTA
not\r\ndisplaying correctly on some platforms/browsers. It now shows as
a\r\n`Chat` button to the right of the table tabs, matching the
other\r\nassistant CTA's throughout the application.\r\n\r\n<p
align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/9fcecd54-8e1a-423a-be05-7137632acbc4\"\r\n/>\r\n</p>
\r\n\r\nAnd lastly removes `Beta` title from callout since we're going
GA in\r\n`8.10` 🎉\r\n\r\n<p align=\"center\">\r\n<img
width=\"500\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2946766/5beb379a-1bc7-4afc-b4bc-09f1d6085211\"\r\n/>\r\n</p>
\r\n\r\nResolves:\r\nhttps://github.com//issues/163394#issuecomment-1693431066\r\nResolves:
https://github.com/elastic/kibana/issues/164819\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [X] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or
tutorials","sha":"5f9651e0ef99e35e9a4a3b5dfbd7e40160038f07"}}]}]
BACKPORT-->

Co-authored-by: Garrett Spong <[email protected]>
@vgomez-el vgomez-el added the QA:Validated Issue has been validated by QA label Sep 6, 2023
@vgomez-el
Copy link

Bug has been validated in 8.10 BC4. I will mark it as validated and close it.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Security Assistant Security Assistant fixed QA:Validated Issue has been validated by QA Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.10.0
Projects
None yet
Development

No branches or pull requests

7 participants