[9.1] [EDR Workflows][Bug] Show artifact links without endpoint list privilege (#226561)#229057
Merged
kibanamachine merged 1 commit intoelastic:9.1from Jul 23, 2025
Merged
Conversation
…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)
31d5723 to
49093a3
Compare
2 tasks
Contributor
💚 Build Succeeded
Metrics [docs]Page load bundle
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.1:Questions ?
Please refer to the Backport tool documentation