Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution][Endpoint] Add validation to artifact create/update APIs for management of ownerSpaceId #211325

Conversation

paul-tavares
Copy link
Contributor

@paul-tavares paul-tavares commented Feb 14, 2025

Summary

Changes in support of space awareness

currently behind feature flag: endpointManagementSpaceAwarenessEnabled

  • Add logic to the server-side Lists plugin extension points for endpoint artifacts to ensure that only a user with the new Global Artifact Management privilege can update/change/add ownerSpaceId tags on an artifact
  • Added validation to all endpoint artifacts (Trusted Apps, Event Filters, Blocklists, Host Isolation Exceptions and Endpoint Exceptions)

Other changes:

  • Fix UI bug that failed to display artifact submit API failures. API errors are now displayed in the artifact's respective edit/create forms if encountered
  • Fixed a bug where "unknown" artifact tags were being dropped whenever the artifact assignment (global, per-policy) was updated in the UI

Checklist

@paul-tavares paul-tavares added release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) v9.1.0 labels Feb 14, 2025
@paul-tavares paul-tavares self-assigned this Feb 14, 2025
@paul-tavares paul-tavares force-pushed the task/olm-11873-spaces-restrict-artifact-space-tag-management branch from 44217ee to 18a4a2c Compare February 14, 2025 21:02
@paul-tavares paul-tavares force-pushed the task/olm-11873-spaces-restrict-artifact-space-tag-management branch from 18a4a2c to 56deafc Compare February 19, 2025 15:17
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

Fleet change LGTM

@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Feb 21, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@paul-tavares paul-tavares requested a review from a team as a code owner February 21, 2025 20:39
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

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 8.9MB 8.9MB -8.0KB

Page load bundle

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

id before after diff
fleet 156.5KB 156.6KB +143.0B
securitySolution 85.3KB 85.3KB +34.0B
total +177.0B

History

cc @paul-tavares

@paul-tavares paul-tavares merged commit 1ee97c3 into elastic:main Feb 25, 2025
9 checks passed
@paul-tavares paul-tavares deleted the task/olm-11873-spaces-restrict-artifact-space-tag-management branch February 25, 2025 19:52
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.0

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
9.0 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.0:
- SKA: Relocate "platform" packages that remain on /packages (#208704)

Manual backport

To create the backport manually run:

node scripts/backport --pr 211325

Questions ?

Please refer to the Backport tool documentation

@paul-tavares
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.0

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

Questions ?

Please refer to the Backport tool documentation

paul-tavares added a commit to paul-tavares/kibana that referenced this pull request Feb 25, 2025
…e APIs for management of `ownerSpaceId` (elastic#211325)

## Summary

#### Changes in support of space awareness

> currently behind feature flag:
`endpointManagementSpaceAwarenessEnabled`

- Add logic to the server-side Lists plugin extension points for
endpoint artifacts to ensure that only a user with the new Global
Artifact Management privilege can update/change/add `ownerSpaceId` tags
on an artifact
- Added validation to all endpoint artifacts (Trusted Apps, Event
Filters, Blocklists, Host Isolation Exceptions and Endpoint Exceptions)

#### Other changes:

- Fix UI bug that failed to display artifact submit API failures. API
errors are now displayed in the artifact's respective edit/create forms
if encountered
- Fixed a bug where "unknown" artifact `tags` were being dropped
whenever the artifact assignment (global, per-policy) was updated in the
UI

## Checklist

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

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 1ee97c3)

# Conflicts:
#	x-pack/test/security_solution_api_integration/tsconfig.json
paul-tavares added a commit that referenced this pull request Feb 26, 2025
…/update APIs for management of `ownerSpaceId` (#211325) (#212446)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Solution][Endpoint] Add validation to artifact
create/update APIs for management of `ownerSpaceId`
(#211325)](#211325)

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

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

<!--BACKPORT [{"author":{"name":"Paul
Tavares","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-25T19:52:08Z","message":"[Security
Solution][Endpoint] Add validation to artifact create/update APIs for
management of `ownerSpaceId` (#211325)\n\n## Summary\n\n\n#### Changes
in support of space awareness\n\n> currently behind feature
flag:\n`endpointManagementSpaceAwarenessEnabled`\n\n- Add logic to the
server-side Lists plugin extension points for\nendpoint artifacts to
ensure that only a user with the new Global\nArtifact Management
privilege can update/change/add `ownerSpaceId` tags\non an artifact\n-
Added validation to all endpoint artifacts (Trusted Apps,
Event\nFilters, Blocklists, Host Isolation Exceptions and Endpoint
Exceptions)\n\n\n#### Other changes:\n\n- Fix UI bug that failed to
display artifact submit API failures. API\nerrors are now displayed in
the artifact's respective edit/create forms\nif encountered\n- Fixed a
bug where \"unknown\" artifact `tags` were being dropped\nwhenever the
artifact assignment (global, per-policy) was updated in
the\nUI\n\n\n\n\n\n\n\n\n## Checklist\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\n\n---------\n\nCo-authored-by: kibanamachine
<[email protected]>","sha":"1ee97c3c8f3780cde8c23edb03b37738b506aefa","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","Team:Defend
Workflows","backport:prev-minor","v9.1.0"],"title":"[Security
Solution][Endpoint] Add validation to artifact create/update APIs for
management of
`ownerSpaceId`","number":211325,"url":"https://github.com/elastic/kibana/pull/211325","mergeCommit":{"message":"[Security
Solution][Endpoint] Add validation to artifact create/update APIs for
management of `ownerSpaceId` (#211325)\n\n## Summary\n\n\n#### Changes
in support of space awareness\n\n> currently behind feature
flag:\n`endpointManagementSpaceAwarenessEnabled`\n\n- Add logic to the
server-side Lists plugin extension points for\nendpoint artifacts to
ensure that only a user with the new Global\nArtifact Management
privilege can update/change/add `ownerSpaceId` tags\non an artifact\n-
Added validation to all endpoint artifacts (Trusted Apps,
Event\nFilters, Blocklists, Host Isolation Exceptions and Endpoint
Exceptions)\n\n\n#### Other changes:\n\n- Fix UI bug that failed to
display artifact submit API failures. API\nerrors are now displayed in
the artifact's respective edit/create forms\nif encountered\n- Fixed a
bug where \"unknown\" artifact `tags` were being dropped\nwhenever the
artifact assignment (global, per-policy) was updated in
the\nUI\n\n\n\n\n\n\n\n\n## Checklist\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\n\n---------\n\nCo-authored-by: kibanamachine
<[email protected]>","sha":"1ee97c3c8f3780cde8c23edb03b37738b506aefa"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211325","number":211325,"mergeCommit":{"message":"[Security
Solution][Endpoint] Add validation to artifact create/update APIs for
management of `ownerSpaceId` (#211325)\n\n## Summary\n\n\n#### Changes
in support of space awareness\n\n> currently behind feature
flag:\n`endpointManagementSpaceAwarenessEnabled`\n\n- Add logic to the
server-side Lists plugin extension points for\nendpoint artifacts to
ensure that only a user with the new Global\nArtifact Management
privilege can update/change/add `ownerSpaceId` tags\non an artifact\n-
Added validation to all endpoint artifacts (Trusted Apps,
Event\nFilters, Blocklists, Host Isolation Exceptions and Endpoint
Exceptions)\n\n\n#### Other changes:\n\n- Fix UI bug that failed to
display artifact submit API failures. API\nerrors are now displayed in
the artifact's respective edit/create forms\nif encountered\n- Fixed a
bug where \"unknown\" artifact `tags` were being dropped\nwhenever the
artifact assignment (global, per-policy) was updated in
the\nUI\n\n\n\n\n\n\n\n\n## Checklist\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\n\n---------\n\nCo-authored-by: kibanamachine
<[email protected]>","sha":"1ee97c3c8f3780cde8c23edb03b37738b506aefa"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Fleet Team label for Observability Data Collection Fleet team v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants