Skip to content

[8.14] [Security Solution] action not allowed (405) is shown for Duplicating Shared Exception Lists (#177814) (#178674)#181738

Merged
e40pud merged 1 commit intoelastic:8.14from
e40pud:backport/8.14/pr-178674
Apr 25, 2024
Merged

[8.14] [Security Solution] action not allowed (405) is shown for Duplicating Shared Exception Lists (#177814) (#178674)#181738
e40pud merged 1 commit intoelastic:8.14from
e40pud:backport/8.14/pr-178674

Conversation

@e40pud
Copy link
Copy Markdown
Contributor

@e40pud e40pud commented Apr 25, 2024

Backport

This will backport the following commits from main to 8.14:

Questions ?

Please refer to the Backport tool documentation

… Shared Exception Lists (elastic#177814) (elastic#178674)

## Summary

Addresses elastic#177814

This PR fixes the issue where user is able to import Endpoint lists.
Right now endpoint lists (with `endpoint_trusted_apps`,
`endpoint_event_filters`, `endpoint_host_isolation_exceptions` or
`endpoint_blocklists` id) are not allowed to be imported. [Here we
check](https://github.com/elastic/kibana/blob/main/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_import_handler.ts#L17)
lists and throw an exception if user tries to import one of the
mentioned lists.

However, it is possible to import container endpoint lists with
`endpoint_list` id. This leads to the issue that user can import such a
list with the newly generated ID and thus we will treat it as a
detection engine list. Since the type of the list is still says
`endpoint` we would not allow to duplicate such a list later
[here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/lists/server/services/exception_lists/duplicate_exception_list.ts#L46).

To fix the issue, I added addition list id check to prevent users from
importing lists with the `endpoint_list` id.

**UPDATE**: As discussed below, we will disable the "Create new list"
checkbox when user tries to import Endpoint Security Exception List and
will show a tooltip saying "We only allow one Exception List for
Endpoint Security."

**NOTE**: as part of this PR, I also added a fix for missing version
header in `importExceptionList` API call.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
(cherry picked from commit 7cbd396)
@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

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 17.3MB 17.3MB +1.9KB

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@e40pud e40pud requested a review from yctercero April 25, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants