Skip to content

[Security Solution] [Ai Assistant] Enable the Global Security AI assistant#226556

Merged
KDKHD merged 43 commits intoelastic:mainfrom
KDKHD:bug/security_ai_assistant_global_setting-4
Jul 14, 2025
Merged

[Security Solution] [Ai Assistant] Enable the Global Security AI assistant#226556
KDKHD merged 43 commits intoelastic:mainfrom
KDKHD:bug/security_ai_assistant_global_setting-4

Conversation

@KDKHD
Copy link
Member

@KDKHD KDKHD commented Jul 4, 2025

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.

Modify AI assistant visibility settings to allow for the Security AI assistant to be global.

This fixes an issue in the product that several users have raised. It is very unintuitive for them that when in the Security Solution view, they can not open the AI assistant when in the Discover page.

Users couldn’t add the AI Assistant to the Discover flyout and hadn’t been able to resolve it for weeks

Changes:

  • Add "Security" as an option in the aiAssistant:preferredAIAssistantType setting (this is the setting used in stateful Kibana to determine assistant visibility).
  • Modify setting labels and options inside of serverless oblt and serverless security to be relevant to the project type.

Screenshots

Stateful

The same setting is used across all solution views in stateful Kibana. This is not a perfect solution, as when a user is in the Security solution, they can technically still select the Oblt assistant (in this case no assistant will be shown). In the next minor release, this will be fixed with a new AI assistant settings page.

Classic

image

Oblt

image

Security

image image

ES

image
Serverless Security

image

image

Serverless Oblt image
Serverless ES

In serverless ES there is no ability to change the visibility of the AI assistant. This is the current behaviour and this has not changed in this PR.

image

How to test:

Stateful

  • Start Kibana (in classic/traditional flavour)
// Start ES
yarn es snapshot --license trial -E xpack.security.authc.api_key.enabled=true
// Start Kibana
yarn start --no-base-path
  • Create spaces for Classic, Security, Oblt and Search
  • In Classic, go to Stack Management > Advanced Settings and search for AI Assistant visibility
  • Verify that when selecting:
    • Only in their solutions -> only displays the Search/Oblt and Security Assistants in their respective solutions.
    • Observability and Search AI Assistants in other apps -> Shows the Oblt and Search assistant on the Discover page.
    • Security AI Assistants in other apps -> Shows the Security assistant on the Discover page.
    • Hide all assistants -> Does not show assistants anywhere

Stateless

  • Start Kibana (in serverless)
// Start ES
node scripts/es serverless --projectType security
// Start Kibana
node --no-experimental-require-module scripts/kibana --dev --serverless=security --no-base-path

(please try try different project types too. Instead of security you can use oblt or es )

  • Go to stack management > advanced settings and search for AI Assistant visibility
  • Check that the options you have available look like this:

image

  • Verify that when you select security, the Security assistant appears everywhere (including Discover)

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

1 similar comment
@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 4, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 5, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 7, 2025

/ci

@KDKHD KDKHD force-pushed the bug/security_ai_assistant_global_setting-4 branch from 2d03dcc to 58e3ef9 Compare July 7, 2025 09:50
@KDKHD
Copy link
Member Author

KDKHD commented Jul 7, 2025

/ci

@KDKHD
Copy link
Member Author

KDKHD commented Jul 7, 2025

/ci

Comment on lines +29 to +31
defaultMessage:
'Choose where and which AI Assistants are available. You can limit the AI Assistants to their own solutions, show either the Observability and Search AI Assistants or the Security AI Assistant in other Kibana apps, or hide AI Assistants entirely.',
}
Copy link
Contributor

Choose a reason for hiding this comment

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

should we clarify here what happens when a solution has been selected for the current space?

import { securitySolutionSetting } from './src/settings/security_setting';
import { AIAssistantManagementSelectionPlugin } from './plugin';

describe('plugin', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

total nit and ignore it for this PR, but the amount of mocking in this test files and others are probably an indication that the readability/testability of this would improve by moving the logic into a separate function

@KDKHD
Copy link
Member Author

KDKHD commented Jul 13, 2025

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 14, 2025

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: ca7d014
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-226556-ca7d014528f8

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #2 / Embeddable Alerts Table Embeddable alerts panel "before all" hook for "should only show alerts from the observability area (o11y+stack) when selecting it"
  • [job] [logs] FTR Configs #2 / Embeddable Alerts Table Embeddable alerts panel "before all" hook for "should only show alerts from the observability area (o11y+stack) when selecting it"

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.8MB 9.8MB -635.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
aiAssistantManagementSelection 5.4KB 5.4KB +22.0B
elasticAssistant 262.7KB 263.1KB +369.0B
observabilityAIAssistantApp 16.5KB 16.5KB +21.0B
securitySolution 94.4KB 94.3KB -42.0B
total +370.0B

History

Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

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

Rule Management Area LGTM

@KDKHD KDKHD added the v9.2.0 label Jul 14, 2025
@KDKHD KDKHD merged commit 6536c76 into elastic:main Jul 14, 2025
14 of 15 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16263072230

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 226556

Questions ?

Please refer to the Backport tool documentation

KDKHD added a commit to KDKHD/kibana that referenced this pull request Jul 14, 2025
…stant (elastic#226556)

## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

Modify AI assistant visibility settings to allow for the Security AI
assistant to be global.

This fixes an issue in the product that several users have raised. It is
very unintuitive for them that when in the Security Solution view, they
can not open the AI assistant when in the Discover page.

> Users couldn’t add the AI Assistant to the Discover flyout and hadn’t
been able to resolve it for weeks

Changes:
- Add "Security" as an option in the
`aiAssistant:preferredAIAssistantType` setting (this is the setting used
in stateful Kibana to determine assistant visibility).
- Modify setting labels and options inside of serverless oblt and
serverless security to be relevant to the project type.

### Screenshots

<details>

<summary>Stateful</summary>

The same setting is used across all solution views in stateful Kibana.
This is not a perfect solution, as when a user is in the Security
solution, they can technically still select the Oblt assistant (in this
case no assistant will be shown). In the next minor release, this will
be fixed with a new AI assistant settings page.

### Classic

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70"
/>

### Oblt

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf"
/>

### Security

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf"
/>

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9"
/>

### ES

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378"
/>

</details>

<details>

<summary>Serverless Security</summary>

![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)

![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)

</details>

<details>

<summary>Serverless Oblt</summary>

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268"
/>

</details>

<details>

<summary>Serverless ES</summary>

In serverless ES there is no ability to change the visibility of the AI
assistant. This is the current behaviour and this has not changed in
this PR.

![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)

</details>

### How to test:

#### Stateful
- Start Kibana (in classic/traditional flavour)
```
// Start ES
yarn es snapshot --license trial -E xpack.security.authc.api_key.enabled=true
// Start Kibana
yarn start --no-base-path
```
- Create spaces for Classic, Security, Oblt and Search
- In Classic, go to Stack Management > Advanced Settings and search for
AI Assistant visibility
- Verify that when selecting:
- Only in their solutions -> only displays the Search/Oblt and Security
Assistants in their respective solutions.
- Observability and Search AI Assistants in other apps -> Shows the Oblt
and Search assistant on the Discover page.
- Security AI Assistants in other apps -> Shows the Security assistant
on the Discover page.
  - Hide all assistants -> Does not show assistants anywhere

#### Stateless
- Start Kibana (in serverless)
```
// Start ES
node scripts/es serverless --projectType security
// Start Kibana
node --no-experimental-require-module scripts/kibana --dev --serverless=security --no-base-path
```
(please try try different project types too. Instead of security you can
use `oblt` or `es` )
- Go to stack management > advanced settings and search for AI Assistant
visibility
- Check that the options you have available look like this:

![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)

- Verify that when you select security, the Security assistant appears
everywhere (including Discover)

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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/src/platform/packages/shared/kbn-i18n/README.md)
- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [X] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [X] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [X] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [X] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [X] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ievgen Sorokopud <e40pud@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
(cherry picked from commit 6536c76)

# Conflicts:
#	src/platform/plugins/shared/ai_assistant_management/selection/server/plugin.ts
@KDKHD
Copy link
Member Author

KDKHD commented Jul 14, 2025

💚 All backports created successfully

Status Branch Result
9.1
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

KDKHD added a commit to KDKHD/kibana that referenced this pull request Jul 14, 2025
…stant (elastic#226556)

## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

Modify AI assistant visibility settings to allow for the Security AI
assistant to be global.

This fixes an issue in the product that several users have raised. It is
very unintuitive for them that when in the Security Solution view, they
can not open the AI assistant when in the Discover page.

> Users couldn’t add the AI Assistant to the Discover flyout and hadn’t
been able to resolve it for weeks

Changes:
- Add "Security" as an option in the
`aiAssistant:preferredAIAssistantType` setting (this is the setting used
in stateful Kibana to determine assistant visibility).
- Modify setting labels and options inside of serverless oblt and
serverless security to be relevant to the project type.

### Screenshots

<details>

<summary>Stateful</summary>

The same setting is used across all solution views in stateful Kibana.
This is not a perfect solution, as when a user is in the Security
solution, they can technically still select the Oblt assistant (in this
case no assistant will be shown). In the next minor release, this will
be fixed with a new AI assistant settings page.

### Classic

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70"
/>

### Oblt

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf"
/>

### Security

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf"
/>

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9"
/>

### ES

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378"
/>

</details>

<details>

<summary>Serverless Security</summary>

![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)

![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)

</details>

<details>

<summary>Serverless Oblt</summary>

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268"
/>

</details>

<details>

<summary>Serverless ES</summary>

In serverless ES there is no ability to change the visibility of the AI
assistant. This is the current behaviour and this has not changed in
this PR.

![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)

</details>

### How to test:

#### Stateful
- Start Kibana (in classic/traditional flavour)
```
// Start ES
yarn es snapshot --license trial -E xpack.security.authc.api_key.enabled=true
// Start Kibana
yarn start --no-base-path
```
- Create spaces for Classic, Security, Oblt and Search
- In Classic, go to Stack Management > Advanced Settings and search for
AI Assistant visibility
- Verify that when selecting:
- Only in their solutions -> only displays the Search/Oblt and Security
Assistants in their respective solutions.
- Observability and Search AI Assistants in other apps -> Shows the Oblt
and Search assistant on the Discover page.
- Security AI Assistants in other apps -> Shows the Security assistant
on the Discover page.
  - Hide all assistants -> Does not show assistants anywhere

#### Stateless
- Start Kibana (in serverless)
```
// Start ES
node scripts/es serverless --projectType security
// Start Kibana
node --no-experimental-require-module scripts/kibana --dev --serverless=security --no-base-path
```
(please try try different project types too. Instead of security you can
use `oblt` or `es` )
- Go to stack management > advanced settings and search for AI Assistant
visibility
- Check that the options you have available look like this:

![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)

- Verify that when you select security, the Security assistant appears
everywhere (including Discover)

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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/src/platform/packages/shared/kbn-i18n/README.md)
- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [X] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [X] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [X] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [X] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [X] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ievgen Sorokopud <e40pud@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
(cherry picked from commit 6536c76)

# Conflicts:
#	config/serverless.security.yml
#	src/platform/packages/shared/serverless/settings/security_project/index.ts
#	src/platform/plugins/shared/ai_assistant_management/selection/server/plugin.ts
KDKHD added a commit that referenced this pull request Jul 14, 2025
…I assistant (#226556) (#227772)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Security Solution] [Ai Assistant] Enable the Global Security AI
assistant (#226556)](#226556)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Kenneth
Kreindler","email":"42113355+KDKHD@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-14T09:23:41Z","message":"[Security
Solution] [Ai Assistant] Enable the Global Security AI assistant
(#226556)\n\n## Summary\n\nSummarize your PR. If it involves visual
changes include a screenshot or\ngif.\n\nModify AI assistant visibility
settings to allow for the Security AI\nassistant to be global.\n\nThis
fixes an issue in the product that several users have raised. It
is\nvery unintuitive for them that when in the Security Solution view,
they\ncan not open the AI assistant when in the Discover page.\n\n>
Users couldn’t add the AI Assistant to the Discover flyout and
hadn’t\nbeen able to resolve it for weeks\n\nChanges:\n- Add
\"Security\" as an option in the\n`aiAssistant:preferredAIAssistantType`
setting (this is the setting used\nin stateful Kibana to determine
assistant visibility).\n- Modify setting labels and options inside of
serverless oblt and\nserverless security to be relevant to the project
type.\n\n###
Screenshots\n\n<details>\n\n<summary>Stateful</summary>\n\nThe same
setting is used across all solution views in stateful Kibana.\nThis is
not a perfect solution, as when a user is in the Security\nsolution,
they can technically still select the Oblt assistant (in this\ncase no
assistant will be shown). In the next minor release, this will\nbe fixed
with a new AI assistant settings page.\n\n### Classic\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70\"\n/>\n\n###
Oblt\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf\"\n/>\n\n###
Security\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf\"\n/>\n\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9\"\n/>\n\n###
ES\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378\"\n/>\n\n\n</details>\n\n\n<details>\n\n<summary>Serverless
Security</summary>\n\n\n![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)\n\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n</details>\n\n<details>\n\n<summary>Serverless
Oblt</summary>\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268\"\n/>\n\n</details>\n\n<details>\n\n<summary>Serverless
ES</summary>\n\nIn serverless ES there is no ability to change the
visibility of the AI\nassistant. This is the current behaviour and this
has not changed in\nthis
PR.\n\n\n![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)\n\n</details>\n\n###
How to test:\n\n#### Stateful\n- Start Kibana (in classic/traditional
flavour) \n```\n// Start ES\nyarn es snapshot --license trial -E
xpack.security.authc.api_key.enabled=true\n// Start Kibana\nyarn start
--no-base-path\n```\n- Create spaces for Classic, Security, Oblt and
Search \n- In Classic, go to Stack Management > Advanced Settings and
search for\nAI Assistant visibility\n- Verify that when selecting:\n-
Only in their solutions -> only displays the Search/Oblt and
Security\nAssistants in their respective solutions.\n- Observability and
Search AI Assistants in other apps -> Shows the Oblt\nand Search
assistant on the Discover page.\n- Security AI Assistants in other apps
-> Shows the Security assistant\non the Discover page.\n - Hide all
assistants -> Does not show assistants anywhere\n\n#### Stateless\n-
Start Kibana (in serverless) \n```\n// Start ES\nnode scripts/es
serverless --projectType security\n// Start Kibana\nnode
--no-experimental-require-module scripts/kibana --dev
--serverless=security --no-base-path\n``` \n(please try try different
project types too. Instead of security you can\nuse `oblt` or `es` )\n-
Go to stack management > advanced settings and search for AI
Assistant\nvisibility\n- Check that the options you have available look
like
this:\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n-
Verify that when you select security, the Security assistant
appears\neverywhere (including Discover)\n\n### Checklist\n\nCheck the
PR satisfies following conditions. \n\nReviewers should verify this PR
satisfies this list as well.\n\n- [X] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[X]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [X] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [X] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[X] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [X] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [X] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[X] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: Ievgen
Sorokopud <e40pud@gmail.com>\nCo-authored-by: Dario Gieselaar
<dario.gieselaar@elastic.co>","sha":"6536c766d7470b1f754803a303fdca9a068e2b7b","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","ci:project-deploy-observability","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security
Solution] [Ai Assistant] Enable the Global Security AI
assistant","number":226556,"url":"https://github.com/elastic/kibana/pull/226556","mergeCommit":{"message":"[Security
Solution] [Ai Assistant] Enable the Global Security AI assistant
(#226556)\n\n## Summary\n\nSummarize your PR. If it involves visual
changes include a screenshot or\ngif.\n\nModify AI assistant visibility
settings to allow for the Security AI\nassistant to be global.\n\nThis
fixes an issue in the product that several users have raised. It
is\nvery unintuitive for them that when in the Security Solution view,
they\ncan not open the AI assistant when in the Discover page.\n\n>
Users couldn’t add the AI Assistant to the Discover flyout and
hadn’t\nbeen able to resolve it for weeks\n\nChanges:\n- Add
\"Security\" as an option in the\n`aiAssistant:preferredAIAssistantType`
setting (this is the setting used\nin stateful Kibana to determine
assistant visibility).\n- Modify setting labels and options inside of
serverless oblt and\nserverless security to be relevant to the project
type.\n\n###
Screenshots\n\n<details>\n\n<summary>Stateful</summary>\n\nThe same
setting is used across all solution views in stateful Kibana.\nThis is
not a perfect solution, as when a user is in the Security\nsolution,
they can technically still select the Oblt assistant (in this\ncase no
assistant will be shown). In the next minor release, this will\nbe fixed
with a new AI assistant settings page.\n\n### Classic\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70\"\n/>\n\n###
Oblt\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf\"\n/>\n\n###
Security\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf\"\n/>\n\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9\"\n/>\n\n###
ES\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378\"\n/>\n\n\n</details>\n\n\n<details>\n\n<summary>Serverless
Security</summary>\n\n\n![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)\n\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n</details>\n\n<details>\n\n<summary>Serverless
Oblt</summary>\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268\"\n/>\n\n</details>\n\n<details>\n\n<summary>Serverless
ES</summary>\n\nIn serverless ES there is no ability to change the
visibility of the AI\nassistant. This is the current behaviour and this
has not changed in\nthis
PR.\n\n\n![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)\n\n</details>\n\n###
How to test:\n\n#### Stateful\n- Start Kibana (in classic/traditional
flavour) \n```\n// Start ES\nyarn es snapshot --license trial -E
xpack.security.authc.api_key.enabled=true\n// Start Kibana\nyarn start
--no-base-path\n```\n- Create spaces for Classic, Security, Oblt and
Search \n- In Classic, go to Stack Management > Advanced Settings and
search for\nAI Assistant visibility\n- Verify that when selecting:\n-
Only in their solutions -> only displays the Search/Oblt and
Security\nAssistants in their respective solutions.\n- Observability and
Search AI Assistants in other apps -> Shows the Oblt\nand Search
assistant on the Discover page.\n- Security AI Assistants in other apps
-> Shows the Security assistant\non the Discover page.\n - Hide all
assistants -> Does not show assistants anywhere\n\n#### Stateless\n-
Start Kibana (in serverless) \n```\n// Start ES\nnode scripts/es
serverless --projectType security\n// Start Kibana\nnode
--no-experimental-require-module scripts/kibana --dev
--serverless=security --no-base-path\n``` \n(please try try different
project types too. Instead of security you can\nuse `oblt` or `es` )\n-
Go to stack management > advanced settings and search for AI
Assistant\nvisibility\n- Check that the options you have available look
like
this:\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n-
Verify that when you select security, the Security assistant
appears\neverywhere (including Discover)\n\n### Checklist\n\nCheck the
PR satisfies following conditions. \n\nReviewers should verify this PR
satisfies this list as well.\n\n- [X] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[X]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [X] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [X] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[X] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [X] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [X] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[X] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: Ievgen
Sorokopud <e40pud@gmail.com>\nCo-authored-by: Dario Gieselaar
<dario.gieselaar@elastic.co>","sha":"6536c766d7470b1f754803a303fdca9a068e2b7b"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226556","number":226556,"mergeCommit":{"message":"[Security
Solution] [Ai Assistant] Enable the Global Security AI assistant
(#226556)\n\n## Summary\n\nSummarize your PR. If it involves visual
changes include a screenshot or\ngif.\n\nModify AI assistant visibility
settings to allow for the Security AI\nassistant to be global.\n\nThis
fixes an issue in the product that several users have raised. It
is\nvery unintuitive for them that when in the Security Solution view,
they\ncan not open the AI assistant when in the Discover page.\n\n>
Users couldn’t add the AI Assistant to the Discover flyout and
hadn’t\nbeen able to resolve it for weeks\n\nChanges:\n- Add
\"Security\" as an option in the\n`aiAssistant:preferredAIAssistantType`
setting (this is the setting used\nin stateful Kibana to determine
assistant visibility).\n- Modify setting labels and options inside of
serverless oblt and\nserverless security to be relevant to the project
type.\n\n###
Screenshots\n\n<details>\n\n<summary>Stateful</summary>\n\nThe same
setting is used across all solution views in stateful Kibana.\nThis is
not a perfect solution, as when a user is in the Security\nsolution,
they can technically still select the Oblt assistant (in this\ncase no
assistant will be shown). In the next minor release, this will\nbe fixed
with a new AI assistant settings page.\n\n### Classic\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70\"\n/>\n\n###
Oblt\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf\"\n/>\n\n###
Security\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf\"\n/>\n\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9\"\n/>\n\n###
ES\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378\"\n/>\n\n\n</details>\n\n\n<details>\n\n<summary>Serverless
Security</summary>\n\n\n![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)\n\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n</details>\n\n<details>\n\n<summary>Serverless
Oblt</summary>\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268\"\n/>\n\n</details>\n\n<details>\n\n<summary>Serverless
ES</summary>\n\nIn serverless ES there is no ability to change the
visibility of the AI\nassistant. This is the current behaviour and this
has not changed in\nthis
PR.\n\n\n![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)\n\n</details>\n\n###
How to test:\n\n#### Stateful\n- Start Kibana (in classic/traditional
flavour) \n```\n// Start ES\nyarn es snapshot --license trial -E
xpack.security.authc.api_key.enabled=true\n// Start Kibana\nyarn start
--no-base-path\n```\n- Create spaces for Classic, Security, Oblt and
Search \n- In Classic, go to Stack Management > Advanced Settings and
search for\nAI Assistant visibility\n- Verify that when selecting:\n-
Only in their solutions -> only displays the Search/Oblt and
Security\nAssistants in their respective solutions.\n- Observability and
Search AI Assistants in other apps -> Shows the Oblt\nand Search
assistant on the Discover page.\n- Security AI Assistants in other apps
-> Shows the Security assistant\non the Discover page.\n - Hide all
assistants -> Does not show assistants anywhere\n\n#### Stateless\n-
Start Kibana (in serverless) \n```\n// Start ES\nnode scripts/es
serverless --projectType security\n// Start Kibana\nnode
--no-experimental-require-module scripts/kibana --dev
--serverless=security --no-base-path\n``` \n(please try try different
project types too. Instead of security you can\nuse `oblt` or `es` )\n-
Go to stack management > advanced settings and search for AI
Assistant\nvisibility\n- Check that the options you have available look
like
this:\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n-
Verify that when you select security, the Security assistant
appears\neverywhere (including Discover)\n\n### Checklist\n\nCheck the
PR satisfies following conditions. \n\nReviewers should verify this PR
satisfies this list as well.\n\n- [X] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[X]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [X] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [X] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[X] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [X] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [X] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[X] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: Ievgen
Sorokopud <e40pud@gmail.com>\nCo-authored-by: Dario Gieselaar
<dario.gieselaar@elastic.co>","sha":"6536c766d7470b1f754803a303fdca9a068e2b7b"}}]}]
BACKPORT-->
KDKHD added a commit that referenced this pull request Jul 14, 2025
…AI assistant (#226556) (#227775)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Security Solution] [Ai Assistant] Enable the Global Security AI
assistant (#226556)](#226556)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Kenneth
Kreindler","email":"42113355+KDKHD@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-14T09:23:41Z","message":"[Security
Solution] [Ai Assistant] Enable the Global Security AI assistant
(#226556)\n\n## Summary\n\nSummarize your PR. If it involves visual
changes include a screenshot or\ngif.\n\nModify AI assistant visibility
settings to allow for the Security AI\nassistant to be global.\n\nThis
fixes an issue in the product that several users have raised. It
is\nvery unintuitive for them that when in the Security Solution view,
they\ncan not open the AI assistant when in the Discover page.\n\n>
Users couldn’t add the AI Assistant to the Discover flyout and
hadn’t\nbeen able to resolve it for weeks\n\nChanges:\n- Add
\"Security\" as an option in the\n`aiAssistant:preferredAIAssistantType`
setting (this is the setting used\nin stateful Kibana to determine
assistant visibility).\n- Modify setting labels and options inside of
serverless oblt and\nserverless security to be relevant to the project
type.\n\n###
Screenshots\n\n<details>\n\n<summary>Stateful</summary>\n\nThe same
setting is used across all solution views in stateful Kibana.\nThis is
not a perfect solution, as when a user is in the Security\nsolution,
they can technically still select the Oblt assistant (in this\ncase no
assistant will be shown). In the next minor release, this will\nbe fixed
with a new AI assistant settings page.\n\n### Classic\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70\"\n/>\n\n###
Oblt\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf\"\n/>\n\n###
Security\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf\"\n/>\n\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9\"\n/>\n\n###
ES\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378\"\n/>\n\n\n</details>\n\n\n<details>\n\n<summary>Serverless
Security</summary>\n\n\n![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)\n\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n</details>\n\n<details>\n\n<summary>Serverless
Oblt</summary>\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268\"\n/>\n\n</details>\n\n<details>\n\n<summary>Serverless
ES</summary>\n\nIn serverless ES there is no ability to change the
visibility of the AI\nassistant. This is the current behaviour and this
has not changed in\nthis
PR.\n\n\n![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)\n\n</details>\n\n###
How to test:\n\n#### Stateful\n- Start Kibana (in classic/traditional
flavour) \n```\n// Start ES\nyarn es snapshot --license trial -E
xpack.security.authc.api_key.enabled=true\n// Start Kibana\nyarn start
--no-base-path\n```\n- Create spaces for Classic, Security, Oblt and
Search \n- In Classic, go to Stack Management > Advanced Settings and
search for\nAI Assistant visibility\n- Verify that when selecting:\n-
Only in their solutions -> only displays the Search/Oblt and
Security\nAssistants in their respective solutions.\n- Observability and
Search AI Assistants in other apps -> Shows the Oblt\nand Search
assistant on the Discover page.\n- Security AI Assistants in other apps
-> Shows the Security assistant\non the Discover page.\n - Hide all
assistants -> Does not show assistants anywhere\n\n#### Stateless\n-
Start Kibana (in serverless) \n```\n// Start ES\nnode scripts/es
serverless --projectType security\n// Start Kibana\nnode
--no-experimental-require-module scripts/kibana --dev
--serverless=security --no-base-path\n``` \n(please try try different
project types too. Instead of security you can\nuse `oblt` or `es` )\n-
Go to stack management > advanced settings and search for AI
Assistant\nvisibility\n- Check that the options you have available look
like
this:\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n-
Verify that when you select security, the Security assistant
appears\neverywhere (including Discover)\n\n### Checklist\n\nCheck the
PR satisfies following conditions. \n\nReviewers should verify this PR
satisfies this list as well.\n\n- [X] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[X]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [X] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [X] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[X] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [X] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [X] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[X] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: Ievgen
Sorokopud <e40pud@gmail.com>\nCo-authored-by: Dario Gieselaar
<dario.gieselaar@elastic.co>","sha":"6536c766d7470b1f754803a303fdca9a068e2b7b","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","ci:project-deploy-observability","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security
Solution] [Ai Assistant] Enable the Global Security AI
assistant","number":226556,"url":"https://github.com/elastic/kibana/pull/226556","mergeCommit":{"message":"[Security
Solution] [Ai Assistant] Enable the Global Security AI assistant
(#226556)\n\n## Summary\n\nSummarize your PR. If it involves visual
changes include a screenshot or\ngif.\n\nModify AI assistant visibility
settings to allow for the Security AI\nassistant to be global.\n\nThis
fixes an issue in the product that several users have raised. It
is\nvery unintuitive for them that when in the Security Solution view,
they\ncan not open the AI assistant when in the Discover page.\n\n>
Users couldn’t add the AI Assistant to the Discover flyout and
hadn’t\nbeen able to resolve it for weeks\n\nChanges:\n- Add
\"Security\" as an option in the\n`aiAssistant:preferredAIAssistantType`
setting (this is the setting used\nin stateful Kibana to determine
assistant visibility).\n- Modify setting labels and options inside of
serverless oblt and\nserverless security to be relevant to the project
type.\n\n###
Screenshots\n\n<details>\n\n<summary>Stateful</summary>\n\nThe same
setting is used across all solution views in stateful Kibana.\nThis is
not a perfect solution, as when a user is in the Security\nsolution,
they can technically still select the Oblt assistant (in this\ncase no
assistant will be shown). In the next minor release, this will\nbe fixed
with a new AI assistant settings page.\n\n### Classic\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70\"\n/>\n\n###
Oblt\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf\"\n/>\n\n###
Security\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf\"\n/>\n\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9\"\n/>\n\n###
ES\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378\"\n/>\n\n\n</details>\n\n\n<details>\n\n<summary>Serverless
Security</summary>\n\n\n![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)\n\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n</details>\n\n<details>\n\n<summary>Serverless
Oblt</summary>\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268\"\n/>\n\n</details>\n\n<details>\n\n<summary>Serverless
ES</summary>\n\nIn serverless ES there is no ability to change the
visibility of the AI\nassistant. This is the current behaviour and this
has not changed in\nthis
PR.\n\n\n![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)\n\n</details>\n\n###
How to test:\n\n#### Stateful\n- Start Kibana (in classic/traditional
flavour) \n```\n// Start ES\nyarn es snapshot --license trial -E
xpack.security.authc.api_key.enabled=true\n// Start Kibana\nyarn start
--no-base-path\n```\n- Create spaces for Classic, Security, Oblt and
Search \n- In Classic, go to Stack Management > Advanced Settings and
search for\nAI Assistant visibility\n- Verify that when selecting:\n-
Only in their solutions -> only displays the Search/Oblt and
Security\nAssistants in their respective solutions.\n- Observability and
Search AI Assistants in other apps -> Shows the Oblt\nand Search
assistant on the Discover page.\n- Security AI Assistants in other apps
-> Shows the Security assistant\non the Discover page.\n - Hide all
assistants -> Does not show assistants anywhere\n\n#### Stateless\n-
Start Kibana (in serverless) \n```\n// Start ES\nnode scripts/es
serverless --projectType security\n// Start Kibana\nnode
--no-experimental-require-module scripts/kibana --dev
--serverless=security --no-base-path\n``` \n(please try try different
project types too. Instead of security you can\nuse `oblt` or `es` )\n-
Go to stack management > advanced settings and search for AI
Assistant\nvisibility\n- Check that the options you have available look
like
this:\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n-
Verify that when you select security, the Security assistant
appears\neverywhere (including Discover)\n\n### Checklist\n\nCheck the
PR satisfies following conditions. \n\nReviewers should verify this PR
satisfies this list as well.\n\n- [X] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[X]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [X] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [X] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[X] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [X] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [X] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[X] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: Ievgen
Sorokopud <e40pud@gmail.com>\nCo-authored-by: Dario Gieselaar
<dario.gieselaar@elastic.co>","sha":"6536c766d7470b1f754803a303fdca9a068e2b7b"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226556","number":226556,"mergeCommit":{"message":"[Security
Solution] [Ai Assistant] Enable the Global Security AI assistant
(#226556)\n\n## Summary\n\nSummarize your PR. If it involves visual
changes include a screenshot or\ngif.\n\nModify AI assistant visibility
settings to allow for the Security AI\nassistant to be global.\n\nThis
fixes an issue in the product that several users have raised. It
is\nvery unintuitive for them that when in the Security Solution view,
they\ncan not open the AI assistant when in the Discover page.\n\n>
Users couldn’t add the AI Assistant to the Discover flyout and
hadn’t\nbeen able to resolve it for weeks\n\nChanges:\n- Add
\"Security\" as an option in the\n`aiAssistant:preferredAIAssistantType`
setting (this is the setting used\nin stateful Kibana to determine
assistant visibility).\n- Modify setting labels and options inside of
serverless oblt and\nserverless security to be relevant to the project
type.\n\n###
Screenshots\n\n<details>\n\n<summary>Stateful</summary>\n\nThe same
setting is used across all solution views in stateful Kibana.\nThis is
not a perfect solution, as when a user is in the Security\nsolution,
they can technically still select the Oblt assistant (in this\ncase no
assistant will be shown). In the next minor release, this will\nbe fixed
with a new AI assistant settings page.\n\n### Classic\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70\"\n/>\n\n###
Oblt\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf\"\n/>\n\n###
Security\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf\"\n/>\n\n\n<img
width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9\"\n/>\n\n###
ES\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378\"\n/>\n\n\n</details>\n\n\n<details>\n\n<summary>Serverless
Security</summary>\n\n\n![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)\n\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n</details>\n\n<details>\n\n<summary>Serverless
Oblt</summary>\n\n<img width=\"1840\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268\"\n/>\n\n</details>\n\n<details>\n\n<summary>Serverless
ES</summary>\n\nIn serverless ES there is no ability to change the
visibility of the AI\nassistant. This is the current behaviour and this
has not changed in\nthis
PR.\n\n\n![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)\n\n</details>\n\n###
How to test:\n\n#### Stateful\n- Start Kibana (in classic/traditional
flavour) \n```\n// Start ES\nyarn es snapshot --license trial -E
xpack.security.authc.api_key.enabled=true\n// Start Kibana\nyarn start
--no-base-path\n```\n- Create spaces for Classic, Security, Oblt and
Search \n- In Classic, go to Stack Management > Advanced Settings and
search for\nAI Assistant visibility\n- Verify that when selecting:\n-
Only in their solutions -> only displays the Search/Oblt and
Security\nAssistants in their respective solutions.\n- Observability and
Search AI Assistants in other apps -> Shows the Oblt\nand Search
assistant on the Discover page.\n- Security AI Assistants in other apps
-> Shows the Security assistant\non the Discover page.\n - Hide all
assistants -> Does not show assistants anywhere\n\n#### Stateless\n-
Start Kibana (in serverless) \n```\n// Start ES\nnode scripts/es
serverless --projectType security\n// Start Kibana\nnode
--no-experimental-require-module scripts/kibana --dev
--serverless=security --no-base-path\n``` \n(please try try different
project types too. Instead of security you can\nuse `oblt` or `es` )\n-
Go to stack management > advanced settings and search for AI
Assistant\nvisibility\n- Check that the options you have available look
like
this:\n\n\n![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)\n\n-
Verify that when you select security, the Security assistant
appears\neverywhere (including Discover)\n\n### Checklist\n\nCheck the
PR satisfies following conditions. \n\nReviewers should verify this PR
satisfies this list as well.\n\n- [X] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[X]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [X] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [X] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[X] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [X] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [X] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[X] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\nCo-authored-by: Ievgen
Sorokopud <e40pud@gmail.com>\nCo-authored-by: Dario Gieselaar
<dario.gieselaar@elastic.co>","sha":"6536c766d7470b1f754803a303fdca9a068e2b7b"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Bluefinger pushed a commit to Bluefinger/kibana that referenced this pull request Jul 22, 2025
…stant (elastic#226556)

## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

Modify AI assistant visibility settings to allow for the Security AI
assistant to be global.

This fixes an issue in the product that several users have raised. It is
very unintuitive for them that when in the Security Solution view, they
can not open the AI assistant when in the Discover page.

> Users couldn’t add the AI Assistant to the Discover flyout and hadn’t
been able to resolve it for weeks

Changes:
- Add "Security" as an option in the
`aiAssistant:preferredAIAssistantType` setting (this is the setting used
in stateful Kibana to determine assistant visibility).
- Modify setting labels and options inside of serverless oblt and
serverless security to be relevant to the project type.

### Screenshots

<details>

<summary>Stateful</summary>

The same setting is used across all solution views in stateful Kibana.
This is not a perfect solution, as when a user is in the Security
solution, they can technically still select the Oblt assistant (in this
case no assistant will be shown). In the next minor release, this will
be fixed with a new AI assistant settings page.

### Classic

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70"
/>

### Oblt

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf"
/>

### Security

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf"
/>


<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9"
/>

### ES

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378"
/>


</details>


<details>

<summary>Serverless Security</summary>


![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)



![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)

</details>

<details>

<summary>Serverless Oblt</summary>

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268"
/>

</details>

<details>

<summary>Serverless ES</summary>

In serverless ES there is no ability to change the visibility of the AI
assistant. This is the current behaviour and this has not changed in
this PR.


![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)

</details>

### How to test:

#### Stateful
- Start Kibana (in classic/traditional flavour) 
```
// Start ES
yarn es snapshot --license trial -E xpack.security.authc.api_key.enabled=true
// Start Kibana
yarn start --no-base-path
```
- Create spaces for Classic, Security, Oblt and Search 
- In Classic, go to Stack Management > Advanced Settings and search for
AI Assistant visibility
- Verify that when selecting:
- Only in their solutions -> only displays the Search/Oblt and Security
Assistants in their respective solutions.
- Observability and Search AI Assistants in other apps -> Shows the Oblt
and Search assistant on the Discover page.
- Security AI Assistants in other apps -> Shows the Security assistant
on the Discover page.
  - Hide all assistants -> Does not show assistants anywhere

#### Stateless
- Start Kibana (in serverless) 
```
// Start ES
node scripts/es serverless --projectType security
// Start Kibana
node --no-experimental-require-module scripts/kibana --dev --serverless=security --no-base-path
``` 
(please try try different project types too. Instead of security you can
use `oblt` or `es` )
- Go to stack management > advanced settings and search for AI Assistant
visibility
- Check that the options you have available look like this:


![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)

- Verify that when you select security, the Security assistant appears
everywhere (including Discover)

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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/src/platform/packages/shared/kbn-i18n/README.md)
- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [X] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [X] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [X] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [X] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [X] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ievgen Sorokopud <e40pud@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…stant (elastic#226556)

## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

Modify AI assistant visibility settings to allow for the Security AI
assistant to be global.

This fixes an issue in the product that several users have raised. It is
very unintuitive for them that when in the Security Solution view, they
can not open the AI assistant when in the Discover page.

> Users couldn’t add the AI Assistant to the Discover flyout and hadn’t
been able to resolve it for weeks

Changes:
- Add "Security" as an option in the
`aiAssistant:preferredAIAssistantType` setting (this is the setting used
in stateful Kibana to determine assistant visibility).
- Modify setting labels and options inside of serverless oblt and
serverless security to be relevant to the project type.

### Screenshots

<details>

<summary>Stateful</summary>

The same setting is used across all solution views in stateful Kibana.
This is not a perfect solution, as when a user is in the Security
solution, they can technically still select the Oblt assistant (in this
case no assistant will be shown). In the next minor release, this will
be fixed with a new AI assistant settings page.

### Classic

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/d601eb42-60a9-40ff-922c-0369249f2b70"
/>

### Oblt

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/04a167f3-d55a-4ff7-bdfe-10cc21b0a9cf"
/>

### Security

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/23d055e6-c1dc-4335-8e9e-0d805215cadf"
/>


<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/20d37509-73da-4f23-9020-b089ee249af9"
/>

### ES

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/21b34bb7-d540-4411-84f8-7e2f95942378"
/>


</details>


<details>

<summary>Serverless Security</summary>


![image](https://github.com/user-attachments/assets/45111617-ddcc-4b77-93f5-47131175c530)



![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)

</details>

<details>

<summary>Serverless Oblt</summary>

<img width="1840" alt="image"
src="https://github.com/user-attachments/assets/53c14d2c-3f78-430b-8198-139f59c3a268"
/>

</details>

<details>

<summary>Serverless ES</summary>

In serverless ES there is no ability to change the visibility of the AI
assistant. This is the current behaviour and this has not changed in
this PR.


![image](https://github.com/user-attachments/assets/6f79a349-9530-4278-821d-38240c001b2a)

</details>

### How to test:

#### Stateful
- Start Kibana (in classic/traditional flavour) 
```
// Start ES
yarn es snapshot --license trial -E xpack.security.authc.api_key.enabled=true
// Start Kibana
yarn start --no-base-path
```
- Create spaces for Classic, Security, Oblt and Search 
- In Classic, go to Stack Management > Advanced Settings and search for
AI Assistant visibility
- Verify that when selecting:
- Only in their solutions -> only displays the Search/Oblt and Security
Assistants in their respective solutions.
- Observability and Search AI Assistants in other apps -> Shows the Oblt
and Search assistant on the Discover page.
- Security AI Assistants in other apps -> Shows the Security assistant
on the Discover page.
  - Hide all assistants -> Does not show assistants anywhere

#### Stateless
- Start Kibana (in serverless) 
```
// Start ES
node scripts/es serverless --projectType security
// Start Kibana
node --no-experimental-require-module scripts/kibana --dev --serverless=security --no-base-path
``` 
(please try try different project types too. Instead of security you can
use `oblt` or `es` )
- Go to stack management > advanced settings and search for AI Assistant
visibility
- Check that the options you have available look like this:


![image](https://github.com/user-attachments/assets/85dcc3dd-30d2-4c3f-b624-f57032f532ae)

- Verify that when you select security, the Security assistant appears
everywhere (including Discover)

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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/src/platform/packages/shared/kbn-i18n/README.md)
- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [X] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [X] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [X] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [X] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [X] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ievgen Sorokopud <e40pud@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes v8.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.