Skip to content

[EDR Workflows][Bug] Show artifact links without endpoint list privilege#226561

Merged
gergoabraham merged 10 commits intoelastic:mainfrom
gergoabraham:show-artifact-links-without-endpoint-list-privilege
Jul 22, 2025
Merged

[EDR Workflows][Bug] Show artifact links without endpoint list privilege#226561
gergoabraham merged 10 commits intoelastic:mainfrom
gergoabraham:show-artifact-links-without-endpoint-list-privilege

Conversation

@gergoabraham
Copy link
Contributor

@gergoabraham gergoabraham commented Jul 4, 2025

Summary

In Serverless, Security solution, under Assets/Endpoints, if user didn't have access to Endpoints (endpoint_list_read|all), the whole Endpoints group was filtered without showing any other subpage. This can occur only with custom roles as no pre-built roles exist with these conditions.

This PR fixes this by simply removing the link from the group, so it won't be filtered when Endpoint access is missing.

image

A small side effect is that on the breadcrumb, Endpoints won't be clickable.

Before After
image image

Note

The added cypress test does not test this issue actually, as custom roles cannot be used in cypress tests at the moment. Hopefully this can be improved in the future.

How to test

To do some manual tests, you can add the following custom roles to the file below before starting up the local serverless instance:
src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml

Custom roles
endpoint_list_NONE_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
      resources: '*'
  run_as: []

endpoint_list_NONE_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
      resources: '*'
  run_as: []

Todo

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@gergoabraham gergoabraham self-assigned this Jul 4, 2025
@gergoabraham gergoabraham requested review from a team as code owners July 4, 2025 10:22
@gergoabraham gergoabraham added release_note:fix backport:skip This PR does not require backporting labels Jul 4, 2025
@gergoabraham gergoabraham requested a review from pzl July 4, 2025 10:22
@gergoabraham gergoabraham added the Team:Defend Workflows “EDR Workflows�� sub-team of Security Solution label Jul 4, 2025
@gergoabraham gergoabraham requested a review from joeypoon July 4, 2025 10:22
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

Copy link
Member

@joeypoon joeypoon left a comment

Choose a reason for hiding this comment

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

🙆‍♂️

A small side effect is that on the breadcrumb, Endpoints won't be clickable.

assuming we're cool with this on a product level.

@gergoabraham
Copy link
Contributor Author

A small side effect is that on the breadcrumb, Endpoints won't be clickable.

Before After
image image

@caitlinbetz, do you think this change is acceptable?
i think it is reasonable, as the artifact pages are not subpages of the Endpoint list page, so i'd say we are even better by not suggesting this relation with the breadcrumbs. especially for users who don't have Endpoint list access. also, the navigation sidebar framework doesn't allow an easy fix otherwise, so i hope this is fine :)

@gergoabraham
Copy link
Contributor Author

A small side effect is that on the breadcrumb, Endpoints won't be clickable.

Before After
image image

✅ this is acceptable, confirmed offline by @roxana-gheorghe

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #126 / input controls input control options updateFiltersOnChange is false should replace existing filter pill(s) when new item is selected
  • [job] [logs] FTR Configs #70 / ObservabilityApp o11y sidenav sidenav & breadcrumbs renders the correct nav and navigate to links

Metrics [docs]

Page load bundle

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

id before after diff
securitySolutionEss 30.6KB 30.6KB -22.0B
securitySolutionServerless 44.1KB 44.1KB -29.0B
total -51.0B

History

cc @gergoabraham

@gergoabraham gergoabraham merged commit 4b9d2c5 into elastic:main Jul 22, 2025
12 checks passed
tiansivive pushed a commit to tiansivive/kibana that referenced this pull request Jul 22, 2025
…ege (elastic#226561)

## Summary

In Serverless, Security solution, under Assets/Endpoints, if user didn't
have access to Endpoints (`endpoint_list_read|all`), the whole Endpoints
group was filtered without showing any other subpage. This can occur
only with custom roles as no pre-built roles exist with these
conditions.

This PR fixes this by simply removing the `link` from the group, so it
won't be filtered when Endpoint access is missing.

<img width="492" alt="image"
src="https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453"
/>

A small side effect is that on the breadcrumb, Endpoints won't be
clickable.

| Before | After |
|-|-|
| <img width="422" alt="image"
src="https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018"
/> | <img width="434" alt="image"
src="https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59"
/> |

> [!NOTE]
> The added cypress test does not test this issue actually, as custom
roles cannot be used in cypress tests at the moment. Hopefully this can
be improved in the future.

### How to test

To do some manual tests, you can add the following custom roles to the
file below **before starting up the local serverless instance**:

src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml

<details><summary>Custom roles</summary>


```yml
endpoint_list_NONE_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
      resources: '*'
  run_as: []

endpoint_list_NONE_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
      resources: '*'
  run_as: []

```


</details> 


### Todo
- [x] run on MKI before merge

https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
@gergoabraham gergoabraham removed the backport:skip This PR does not require backporting label Jul 23, 2025
@gergoabraham gergoabraham added the backport:all-open Backport to all branches that could still receive a release label Jul 23, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.18, 8.19, 9.0, 9.1

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

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.18, 8.19, 9.0, 9.1

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 23, 2025
…ege (elastic#226561)

## Summary

In Serverless, Security solution, under Assets/Endpoints, if user didn't
have access to Endpoints (`endpoint_list_read|all`), the whole Endpoints
group was filtered without showing any other subpage. This can occur
only with custom roles as no pre-built roles exist with these
conditions.

This PR fixes this by simply removing the `link` from the group, so it
won't be filtered when Endpoint access is missing.

<img width="492" alt="image"
src="https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453"
/>

A small side effect is that on the breadcrumb, Endpoints won't be
clickable.

| Before | After |
|-|-|
| <img width="422" alt="image"
src="https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018"
/> | <img width="434" alt="image"
src="https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59"
/> |

> [!NOTE]
> The added cypress test does not test this issue actually, as custom
roles cannot be used in cypress tests at the moment. Hopefully this can
be improved in the future.

### How to test

To do some manual tests, you can add the following custom roles to the
file below **before starting up the local serverless instance**:

src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml

<details><summary>Custom roles</summary>

```yml
endpoint_list_NONE_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
      resources: '*'
  run_as: []

endpoint_list_NONE_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
      resources: '*'
  run_as: []

```

</details>

### Todo
- [x] run on MKI before merge

https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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

(cherry picked from commit 4b9d2c5)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 23, 2025
…ege (elastic#226561)

## Summary

In Serverless, Security solution, under Assets/Endpoints, if user didn't
have access to Endpoints (`endpoint_list_read|all`), the whole Endpoints
group was filtered without showing any other subpage. This can occur
only with custom roles as no pre-built roles exist with these
conditions.

This PR fixes this by simply removing the `link` from the group, so it
won't be filtered when Endpoint access is missing.

<img width="492" alt="image"
src="https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453"
/>

A small side effect is that on the breadcrumb, Endpoints won't be
clickable.

| Before | After |
|-|-|
| <img width="422" alt="image"
src="https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018"
/> | <img width="434" alt="image"
src="https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59"
/> |

> [!NOTE]
> The added cypress test does not test this issue actually, as custom
roles cannot be used in cypress tests at the moment. Hopefully this can
be improved in the future.

### How to test

To do some manual tests, you can add the following custom roles to the
file below **before starting up the local serverless instance**:

src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml

<details><summary>Custom roles</summary>

```yml
endpoint_list_NONE_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
      resources: '*'
  run_as: []

endpoint_list_NONE_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
      resources: '*'
  run_as: []

```

</details>

### Todo
- [x] run on MKI before merge

https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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

(cherry picked from commit 4b9d2c5)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 23, 2025
…ege (elastic#226561)

## Summary

In Serverless, Security solution, under Assets/Endpoints, if user didn't
have access to Endpoints (`endpoint_list_read|all`), the whole Endpoints
group was filtered without showing any other subpage. This can occur
only with custom roles as no pre-built roles exist with these
conditions.

This PR fixes this by simply removing the `link` from the group, so it
won't be filtered when Endpoint access is missing.

<img width="492" alt="image"
src="https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453"
/>

A small side effect is that on the breadcrumb, Endpoints won't be
clickable.

| Before | After |
|-|-|
| <img width="422" alt="image"
src="https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018"
/> | <img width="434" alt="image"
src="https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59"
/> |

> [!NOTE]
> The added cypress test does not test this issue actually, as custom
roles cannot be used in cypress tests at the moment. Hopefully this can
be improved in the future.

### How to test

To do some manual tests, you can add the following custom roles to the
file below **before starting up the local serverless instance**:

src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml

<details><summary>Custom roles</summary>

```yml
endpoint_list_NONE_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
      resources: '*'
  run_as: []

endpoint_list_NONE_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
      resources: '*'
  run_as: []

```

</details>

### Todo
- [x] run on MKI before merge

https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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

(cherry picked from commit 4b9d2c5)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 23, 2025
…ege (elastic#226561)

## Summary

In Serverless, Security solution, under Assets/Endpoints, if user didn't
have access to Endpoints (`endpoint_list_read|all`), the whole Endpoints
group was filtered without showing any other subpage. This can occur
only with custom roles as no pre-built roles exist with these
conditions.

This PR fixes this by simply removing the `link` from the group, so it
won't be filtered when Endpoint access is missing.

<img width="492" alt="image"
src="https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453"
/>

A small side effect is that on the breadcrumb, Endpoints won't be
clickable.

| Before | After |
|-|-|
| <img width="422" alt="image"
src="https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018"
/> | <img width="434" alt="image"
src="https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59"
/> |

> [!NOTE]
> The added cypress test does not test this issue actually, as custom
roles cannot be used in cypress tests at the moment. Hopefully this can
be improved in the future.

### How to test

To do some manual tests, you can add the following custom roles to the
file below **before starting up the local serverless instance**:

src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml

<details><summary>Custom roles</summary>

```yml
endpoint_list_NONE_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
      resources: '*'
  run_as: []

endpoint_list_NONE_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
      resources: '*'
  run_as: []

```

</details>

### Todo
- [x] run on MKI before merge

https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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

(cherry picked from commit 4b9d2c5)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.17 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.17:
- [Lens] Fix Firefox inline editor scroll (#228625)
8.18 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.18:
- [Console] Fix different error code in status badge (#228889)
- [UA] Remove flaky test (#227809)
- [Ingest Pipelines] Fix empty string bug (#228717)
- [Discover] Fix "Body cell lines" display option handling when default value is -1 (#228697)
- [Lens] Fix Firefox inline editor scroll (#228625)
8.19
9.0 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.0:
- [Discover] Fix "Body cell lines" display option handling when default value is -1 (#228697)
9.1

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 226561

Questions ?

Please refer to the Backport tool documentation

1 similar comment
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.17 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.17:
- [Lens] Fix Firefox inline editor scroll (#228625)
8.18 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.18:
- [Console] Fix different error code in status badge (#228889)
- [UA] Remove flaky test (#227809)
- [Ingest Pipelines] Fix empty string bug (#228717)
- [Discover] Fix "Body cell lines" display option handling when default value is -1 (#228697)
- [Lens] Fix Firefox inline editor scroll (#228625)
8.19
9.0 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.0:
- [Discover] Fix "Body cell lines" display option handling when default value is -1 (#228697)
9.1

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 226561

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 23, 2025
…privilege (#226561) (#229057)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[EDR Workflows][Bug] Show artifact links without endpoint list
privilege (#226561)](#226561)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Gergő
Ábrahám","email":"gergo.abraham@elastic.co"},"sourceCommit":{"committedDate":"2025-07-22T15:39:18Z","message":"[EDR
Workflows][Bug] Show artifact links without endpoint list privilege
(#226561)\n\n## Summary\n\nIn Serverless, Security solution, under
Assets/Endpoints, if user didn't\nhave access to Endpoints
(`endpoint_list_read|all`), the whole Endpoints\ngroup was filtered
without showing any other subpage. This can occur\nonly with custom
roles as no pre-built roles exist with these\nconditions.\n\nThis PR
fixes this by simply removing the `link` from the group, so it\nwon't be
filtered when Endpoint access is missing.\n\n<img width=\"492\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453\"\n/>\n\nA
small side effect is that on the breadcrumb, Endpoints won't
be\nclickable.\n\n| Before | After |\n|-|-|\n| <img width=\"422\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018\"\n/>
| <img width=\"434\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59\"\n/>
|\n\n> [!NOTE]\n> The added cypress test does not test this issue
actually, as custom\nroles cannot be used in cypress tests at the
moment. Hopefully this can\nbe improved in the future.\n\n### How to
test\n\nTo do some manual tests, you can add the following custom roles
to the\nfile below **before starting up the local serverless
instance**:\n\nsrc/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml\n\n<details><summary>Custom
roles</summary>\n\n\n```yml\nendpoint_list_NONE_artifacts_NONE:\n
cluster: []\n indices:\n - names:\n - '.lists-*'\n - '.items-*'\n -
'.alerts-security.alerts-*'\n - '.siem-signals*'\n privileges:\n -
'read'\n - 'view_index_metadata'\n allow_restricted_indices: false\n
applications:\n - application: 'kibana-.kibana'\n privileges:\n -
feature_siemV3.minimal_all\n resources: '*'\n run_as:
[]\n\nendpoint_list_NONE_artifacts_READ:\n cluster: []\n indices:\n -
names:\n - '.lists-*'\n - '.items-*'\n - '.alerts-security.alerts-*'\n -
'.siem-signals*'\n privileges:\n - 'read'\n - 'view_index_metadata'\n
allow_restricted_indices: false\n applications:\n - application:
'kibana-.kibana'\n privileges:\n - feature_siemV3.minimal_all\n -
feature_siemV3.trusted_applications_read\n -
feature_siemV3.event_filters_read\n -
feature_siemV3.host_isolation_exceptions_read\n -
feature_siemV3.blocklist_read\n resources: '*'\n run_as:
[]\n\nendpoint_list_READ_artifacts_READ:\n cluster: []\n indices:\n -
names:\n - '.lists-*'\n - '.items-*'\n - '.alerts-security.alerts-*'\n -
'.siem-signals*'\n privileges:\n - 'read'\n - 'view_index_metadata'\n
allow_restricted_indices: false\n applications:\n - application:
'kibana-.kibana'\n privileges:\n - feature_siemV3.minimal_all\n -
feature_siemV3.endpoint_list_read\n -
feature_siemV3.trusted_applications_read\n -
feature_siemV3.event_filters_read\n -
feature_siemV3.host_isolation_exceptions_read\n -
feature_siemV3.blocklist_read\n resources: '*'\n run_as:
[]\n\nendpoint_list_READ_artifacts_NONE:\n cluster: []\n indices:\n -
names:\n - '.lists-*'\n - '.items-*'\n - '.alerts-security.alerts-*'\n -
'.siem-signals*'\n privileges:\n - 'read'\n - 'view_index_metadata'\n
allow_restricted_indices: false\n applications:\n - application:
'kibana-.kibana'\n privileges:\n - feature_siemV3.minimal_all\n -
feature_siemV3.endpoint_list_read\n resources: '*'\n run_as:
[]\n\n```\n\n\n</details> \n\n\n### Todo\n- [x] run on MKI before
merge\n\nhttps://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\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","sha":"4b9d2c50d070ef18d709270c79cf4a1b7f98de14","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Defend
Workflows","backport:all-open","v9.2.0"],"title":"[EDR Workflows][Bug]
Show artifact links without endpoint list
privilege","number":226561,"url":"https://github.com/elastic/kibana/pull/226561","mergeCommit":{"message":"[EDR
Workflows][Bug] Show artifact links without endpoint list privilege
(#226561)\n\n## Summary\n\nIn Serverless, Security solution, under
Assets/Endpoints, if user didn't\nhave access to Endpoints
(`endpoint_list_read|all`), the whole Endpoints\ngroup was filtered
without showing any other subpage. This can occur\nonly with custom
roles as no pre-built roles exist with these\nconditions.\n\nThis PR
fixes this by simply removing the `link` from the group, so it\nwon't be
filtered when Endpoint access is missing.\n\n<img width=\"492\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453\"\n/>\n\nA
small side effect is that on the breadcrumb, Endpoints won't
be\nclickable.\n\n| Before | After |\n|-|-|\n| <img width=\"422\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018\"\n/>
| <img width=\"434\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59\"\n/>
|\n\n> [!NOTE]\n> The added cypress test does not test this issue
actually, as custom\nroles cannot be used in cypress tests at the
moment. Hopefully this can\nbe improved in the future.\n\n### How to
test\n\nTo do some manual tests, you can add the following custom roles
to the\nfile below **before starting up the local serverless
instance**:\n\nsrc/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml\n\n<details><summary>Custom
roles</summary>\n\n\n```yml\nendpoint_list_NONE_artifacts_NONE:\n
cluster: []\n indices:\n - names:\n - '.lists-*'\n - '.items-*'\n -
'.alerts-security.alerts-*'\n - '.siem-signals*'\n privileges:\n -
'read'\n - 'view_index_metadata'\n allow_restricted_indices: false\n
applications:\n - application: 'kibana-.kibana'\n privileges:\n -
feature_siemV3.minimal_all\n resources: '*'\n run_as:
[]\n\nendpoint_list_NONE_artifacts_READ:\n cluster: []\n indices:\n -
names:\n - '.lists-*'\n - '.items-*'\n - '.alerts-security.alerts-*'\n -
'.siem-signals*'\n privileges:\n - 'read'\n - 'view_index_metadata'\n
allow_restricted_indices: false\n applications:\n - application:
'kibana-.kibana'\n privileges:\n - feature_siemV3.minimal_all\n -
feature_siemV3.trusted_applications_read\n -
feature_siemV3.event_filters_read\n -
feature_siemV3.host_isolation_exceptions_read\n -
feature_siemV3.blocklist_read\n resources: '*'\n run_as:
[]\n\nendpoint_list_READ_artifacts_READ:\n cluster: []\n indices:\n -
names:\n - '.lists-*'\n - '.items-*'\n - '.alerts-security.alerts-*'\n -
'.siem-signals*'\n privileges:\n - 'read'\n - 'view_index_metadata'\n
allow_restricted_indices: false\n applications:\n - application:
'kibana-.kibana'\n privileges:\n - feature_siemV3.minimal_all\n -
feature_siemV3.endpoint_list_read\n -
feature_siemV3.trusted_applications_read\n -
feature_siemV3.event_filters_read\n -
feature_siemV3.host_isolation_exceptions_read\n -
feature_siemV3.blocklist_read\n resources: '*'\n run_as:
[]\n\nendpoint_list_READ_artifacts_NONE:\n cluster: []\n indices:\n -
names:\n - '.lists-*'\n - '.items-*'\n - '.alerts-security.alerts-*'\n -
'.siem-signals*'\n privileges:\n - 'read'\n - 'view_index_metadata'\n
allow_restricted_indices: false\n applications:\n - application:
'kibana-.kibana'\n privileges:\n - feature_siemV3.minimal_all\n -
feature_siemV3.endpoint_list_read\n resources: '*'\n run_as:
[]\n\n```\n\n\n</details> \n\n\n### Todo\n- [x] run on MKI before
merge\n\nhttps://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\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","sha":"4b9d2c50d070ef18d709270c79cf4a1b7f98de14"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226561","number":226561,"mergeCommit":{"message":"[EDR
Workflows][Bug] Show artifact links without endpoint list privilege
(#226561)\n\n## Summary\n\nIn Serverless, Security solution, under
Assets/Endpoints, if user didn't\nhave access to Endpoints
(`endpoint_list_read|all`), the whole Endpoints\ngroup was filtered
without showing any other subpage. This can occur\nonly with custom
roles as no pre-built roles exist with these\nconditions.\n\nThis PR
fixes this by simply removing the `link` from the group, so it\nwon't be
filtered when Endpoint access is missing.\n\n<img width=\"492\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453\"\n/>\n\nA
small side effect is that on the breadcrumb, Endpoints won't
be\nclickable.\n\n| Before | After |\n|-|-|\n| <img width=\"422\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018\"\n/>
| <img width=\"434\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59\"\n/>
|\n\n> [!NOTE]\n> The added cypress test does not test this issue
actually, as custom\nroles cannot be used in cypress tests at the
moment. Hopefully this can\nbe improved in the future.\n\n### How to
test\n\nTo do some manual tests, you can add the following custom roles
to the\nfile below **before starting up the local serverless
instance**:\n\nsrc/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml\n\n<details><summary>Custom
roles</summary>\n\n\n```yml\nendpoint_list_NONE_artifacts_NONE:\n
cluster: []\n indices:\n - names:\n - '.lists-*'\n - '.items-*'\n -
'.alerts-security.alerts-*'\n - '.siem-signals*'\n privileges:\n -
'read'\n - 'view_index_metadata'\n allow_restricted_indices: false\n
applications:\n - application: 'kibana-.kibana'\n privileges:\n -
feature_siemV3.minimal_all\n resources: '*'\n run_as:
[]\n\nendpoint_list_NONE_artifacts_READ:\n cluster: []\n indices:\n -
names:\n - '.lists-*'\n - '.items-*'\n - '.alerts-security.alerts-*'\n -
'.siem-signals*'\n privileges:\n - 'read'\n - 'view_index_metadata'\n
allow_restricted_indices: false\n applications:\n - application:
'kibana-.kibana'\n privileges:\n - feature_siemV3.minimal_all\n -
feature_siemV3.trusted_applications_read\n -
feature_siemV3.event_filters_read\n -
feature_siemV3.host_isolation_exceptions_read\n -
feature_siemV3.blocklist_read\n resources: '*'\n run_as:
[]\n\nendpoint_list_READ_artifacts_READ:\n cluster: []\n indices:\n -
names:\n - '.lists-*'\n - '.items-*'\n - '.alerts-security.alerts-*'\n -
'.siem-signals*'\n privileges:\n - 'read'\n - 'view_index_metadata'\n
allow_restricted_indices: false\n applications:\n - application:
'kibana-.kibana'\n privileges:\n - feature_siemV3.minimal_all\n -
feature_siemV3.endpoint_list_read\n -
feature_siemV3.trusted_applications_read\n -
feature_siemV3.event_filters_read\n -
feature_siemV3.host_isolation_exceptions_read\n -
feature_siemV3.blocklist_read\n resources: '*'\n run_as:
[]\n\nendpoint_list_READ_artifacts_NONE:\n cluster: []\n indices:\n -
names:\n - '.lists-*'\n - '.items-*'\n - '.alerts-security.alerts-*'\n -
'.siem-signals*'\n privileges:\n - 'read'\n - 'view_index_metadata'\n
allow_restricted_indices: false\n applications:\n - application:
'kibana-.kibana'\n privileges:\n - feature_siemV3.minimal_all\n -
feature_siemV3.endpoint_list_read\n resources: '*'\n run_as:
[]\n\n```\n\n\n</details> \n\n\n### Todo\n- [x] run on MKI before
merge\n\nhttps://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\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","sha":"4b9d2c50d070ef18d709270c79cf4a1b7f98de14"}}]}]
BACKPORT-->

Co-authored-by: Gergő Ábrahám <gergo.abraham@elastic.co>
kdelemme pushed a commit to kdelemme/kibana that referenced this pull request Jul 23, 2025
…ege (elastic#226561)

## Summary

In Serverless, Security solution, under Assets/Endpoints, if user didn't
have access to Endpoints (`endpoint_list_read|all`), the whole Endpoints
group was filtered without showing any other subpage. This can occur
only with custom roles as no pre-built roles exist with these
conditions.

This PR fixes this by simply removing the `link` from the group, so it
won't be filtered when Endpoint access is missing.

<img width="492" alt="image"
src="https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453"
/>

A small side effect is that on the breadcrumb, Endpoints won't be
clickable.

| Before | After |
|-|-|
| <img width="422" alt="image"
src="https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018"
/> | <img width="434" alt="image"
src="https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59"
/> |

> [!NOTE]
> The added cypress test does not test this issue actually, as custom
roles cannot be used in cypress tests at the moment. Hopefully this can
be improved in the future.

### How to test

To do some manual tests, you can add the following custom roles to the
file below **before starting up the local serverless instance**:

src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml

<details><summary>Custom roles</summary>


```yml
endpoint_list_NONE_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
      resources: '*'
  run_as: []

endpoint_list_NONE_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
      resources: '*'
  run_as: []

```


</details> 


### Todo
- [x] run on MKI before merge

https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…ege (elastic#226561)

## Summary

In Serverless, Security solution, under Assets/Endpoints, if user didn't
have access to Endpoints (`endpoint_list_read|all`), the whole Endpoints
group was filtered without showing any other subpage. This can occur
only with custom roles as no pre-built roles exist with these
conditions.

This PR fixes this by simply removing the `link` from the group, so it
won't be filtered when Endpoint access is missing.

<img width="492" alt="image"
src="https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453"
/>

A small side effect is that on the breadcrumb, Endpoints won't be
clickable.

| Before | After |
|-|-|
| <img width="422" alt="image"
src="https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018"
/> | <img width="434" alt="image"
src="https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59"
/> |

> [!NOTE]
> The added cypress test does not test this issue actually, as custom
roles cannot be used in cypress tests at the moment. Hopefully this can
be improved in the future.

### How to test

To do some manual tests, you can add the following custom roles to the
file below **before starting up the local serverless instance**:

src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml

<details><summary>Custom roles</summary>


```yml
endpoint_list_NONE_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
      resources: '*'
  run_as: []

endpoint_list_NONE_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
      resources: '*'
  run_as: []

```


</details> 


### Todo
- [x] run on MKI before merge

https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Jul 25, 2025
…ege (elastic#226561)

## Summary

In Serverless, Security solution, under Assets/Endpoints, if user didn't
have access to Endpoints (`endpoint_list_read|all`), the whole Endpoints
group was filtered without showing any other subpage. This can occur
only with custom roles as no pre-built roles exist with these
conditions.

This PR fixes this by simply removing the `link` from the group, so it
won't be filtered when Endpoint access is missing.

<img width="492" alt="image"
src="https://github.com/user-attachments/assets/14af8a2f-2b60-497a-96c7-d6c6da91b453"
/>

A small side effect is that on the breadcrumb, Endpoints won't be
clickable.

| Before | After |
|-|-|
| <img width="422" alt="image"
src="https://github.com/user-attachments/assets/a97d8d0e-81ad-4faa-87fe-e48f038f6018"
/> | <img width="434" alt="image"
src="https://github.com/user-attachments/assets/b9a3cbe4-dc06-4c77-899a-7c020b553c59"
/> |

> [!NOTE]
> The added cypress test does not test this issue actually, as custom
roles cannot be used in cypress tests at the moment. Hopefully this can
be improved in the future.

### How to test

To do some manual tests, you can add the following custom roles to the
file below **before starting up the local serverless instance**:

src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml

<details><summary>Custom roles</summary>


```yml
endpoint_list_NONE_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
      resources: '*'
  run_as: []

endpoint_list_NONE_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_READ:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
        - feature_siemV3.trusted_applications_read
        - feature_siemV3.event_filters_read
        - feature_siemV3.host_isolation_exceptions_read
        - feature_siemV3.blocklist_read
      resources: '*'
  run_as: []

endpoint_list_READ_artifacts_NONE:
  cluster: []
  indices:
    - names:
        - '.lists-*'
        - '.items-*'
        - '.alerts-security.alerts-*'
        - '.siem-signals*'
      privileges:
        - 'read'
        - 'view_index_metadata'
      allow_restricted_indices: false
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - feature_siemV3.minimal_all
        - feature_siemV3.endpoint_list_read
      resources: '*'
  run_as: []

```


</details> 


### Todo
- [x] run on MKI before merge

https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-defend-workflows/builds/3027/steps/canvas?jid=0197d5be-7b77-44a0-85f2-8f4a37657980

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
@gergoabraham gergoabraham deleted the show-artifact-links-without-endpoint-list-privilege branch October 16, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release release_note:fix Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v9.1.0 v9.2.0

7 participants