Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `8.x`: - [[EDR Workflows] Workflow Insights - RBAC (#205088)](#205088) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Konrad Szwarc","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-07T09:33:25Z","message":"[EDR Workflows] Workflow Insights - RBAC (#205088)\n\n## Access Control for Endpoint Workflow Insights\r\n\r\nThis PR adds access control to the Endpoint Workflow Insights\r\nfunctionality. Both the UI and API are gated based on the following\r\nconditions. If these conditions are not met, the content will not\r\nrender, and direct API calls will return errors.\r\n\r\nAccess Conditions\r\n```\r\n1. Serverless: Requires the Endpoint Complete Tier.\r\n2. ESS: Requires an Enterprise License.\r\n3. User Privileges:\r\n 3.1 Endpoint Insights Privilege must be enabled:\r\n 3.1.1 Endpoint Insights All: Grants full access.\r\n\t3.1.2 Endpoint Insights Read:\r\n\t 3.1.2.1 Allows users to view generated insights but prevents triggering new scans.\r\n\t 3.1.2.2 With Trusted Applications privilege: Users can remediate already generated insights.\r\n\t 3.1.2.3 Without Trusted Applications privilege: No actions can be taken.\r\n\t3.1.3Endpoint Insights None: The section is not rendered.\r\n```\r\n\r\nPredefined serverless roles that should include endpoint insights\r\nprivilege(as defined\r\n[here](https://github.com/elastic/security-team/issues/11460)):\r\n- Tier 3 analyst\r\n- Rule Author\r\n- SOC Manager\r\n- Endpoint Operations Analyst\r\n- Endpoint Policy Manager\r\n- Platform Engineer\r\n\r\nOnce this PR is merged and changes make it to canary release, [this\r\nfollow-up\r\nPR](elastic/elasticsearch-controller#816) should\r\nbe merged.\r\n\r\nNote on Testing and Local Setup\r\n\r\nTo test these changes locally, the `defendInsights` assistant feature\r\nmust be enabled. You can do this by updating the following line in the\r\ncode: [Enable defendInsights\r\nhere](https://github.com/elastic/kibana/blob/2ae68bdaac180c62750798c148bed4fd01de07fe/x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/capabilities/index.ts#L23).\r\n\r\nCypress Tests\r\n\r\nCypress tests in this PR are currently skipped because the\r\n`defendInsights` feature is not enabled by default. These tests should\r\nbe enabled once the feature is turned on in the main branch. Successful\r\nrun with all cypress tests enabled can be found\r\n[here](https://buildkite.com/elastic/kibana-pull-request/builds/262774#0193f3c2-eddd-48b6-9103-fb7338304f15).\r\n\r\n<details>\r\n<summary>Screenshots</summary>\r\n\r\n\r\n![396870292-b5bbedad-330f-4ef5-8281-29699cf01a98](https://github.com/user-attachments/assets/586745d4-9e8d-42b4-8d70-e32737285f5c)\r\n\r\n![b](https://github.com/user-attachments/assets/0926b696-37ef-48e8-9dfb-d6f735033583)\r\n\r\n![a](https://github.com/user-attachments/assets/afa799bd-7e07-4a1a-b63e-6448ae56b21a)\r\n\r\n![c](https://github.com/user-attachments/assets/cc3a2e07-0955-4348-a954-1914c5a85e81)\r\n![Screenshot 2024-12-23 at 13 32\r\n57](https://github.com/user-attachments/assets/fbb28bce-eedd-4a6e-85c3-b2a07f40ab27)\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"2f61892e84b31ebd4774cae2686ebd6c4c2cab89","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","Team:Defend Workflows","backport:prev-minor","v8.18.0"],"title":"[EDR Workflows] Workflow Insights - RBAC ","number":205088,"url":"https://github.com/elastic/kibana/pull/205088","mergeCommit":{"message":"[EDR Workflows] Workflow Insights - RBAC (#205088)\n\n## Access Control for Endpoint Workflow Insights\r\n\r\nThis PR adds access control to the Endpoint Workflow Insights\r\nfunctionality. Both the UI and API are gated based on the following\r\nconditions. If these conditions are not met, the content will not\r\nrender, and direct API calls will return errors.\r\n\r\nAccess Conditions\r\n```\r\n1. Serverless: Requires the Endpoint Complete Tier.\r\n2. ESS: Requires an Enterprise License.\r\n3. User Privileges:\r\n 3.1 Endpoint Insights Privilege must be enabled:\r\n 3.1.1 Endpoint Insights All: Grants full access.\r\n\t3.1.2 Endpoint Insights Read:\r\n\t 3.1.2.1 Allows users to view generated insights but prevents triggering new scans.\r\n\t 3.1.2.2 With Trusted Applications privilege: Users can remediate already generated insights.\r\n\t 3.1.2.3 Without Trusted Applications privilege: No actions can be taken.\r\n\t3.1.3Endpoint Insights None: The section is not rendered.\r\n```\r\n\r\nPredefined serverless roles that should include endpoint insights\r\nprivilege(as defined\r\n[here](https://github.com/elastic/security-team/issues/11460)):\r\n- Tier 3 analyst\r\n- Rule Author\r\n- SOC Manager\r\n- Endpoint Operations Analyst\r\n- Endpoint Policy Manager\r\n- Platform Engineer\r\n\r\nOnce this PR is merged and changes make it to canary release, [this\r\nfollow-up\r\nPR](elastic/elasticsearch-controller#816) should\r\nbe merged.\r\n\r\nNote on Testing and Local Setup\r\n\r\nTo test these changes locally, the `defendInsights` assistant feature\r\nmust be enabled. You can do this by updating the following line in the\r\ncode: [Enable defendInsights\r\nhere](https://github.com/elastic/kibana/blob/2ae68bdaac180c62750798c148bed4fd01de07fe/x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/capabilities/index.ts#L23).\r\n\r\nCypress Tests\r\n\r\nCypress tests in this PR are currently skipped because the\r\n`defendInsights` feature is not enabled by default. These tests should\r\nbe enabled once the feature is turned on in the main branch. Successful\r\nrun with all cypress tests enabled can be found\r\n[here](https://buildkite.com/elastic/kibana-pull-request/builds/262774#0193f3c2-eddd-48b6-9103-fb7338304f15).\r\n\r\n<details>\r\n<summary>Screenshots</summary>\r\n\r\n\r\n![396870292-b5bbedad-330f-4ef5-8281-29699cf01a98](https://github.com/user-attachments/assets/586745d4-9e8d-42b4-8d70-e32737285f5c)\r\n\r\n![b](https://github.com/user-attachments/assets/0926b696-37ef-48e8-9dfb-d6f735033583)\r\n\r\n![a](https://github.com/user-attachments/assets/afa799bd-7e07-4a1a-b63e-6448ae56b21a)\r\n\r\n![c](https://github.com/user-attachments/assets/cc3a2e07-0955-4348-a954-1914c5a85e81)\r\n![Screenshot 2024-12-23 at 13 32\r\n57](https://github.com/user-attachments/assets/fbb28bce-eedd-4a6e-85c3-b2a07f40ab27)\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"2f61892e84b31ebd4774cae2686ebd6c4c2cab89"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205088","number":205088,"mergeCommit":{"message":"[EDR Workflows] Workflow Insights - RBAC (#205088)\n\n## Access Control for Endpoint Workflow Insights\r\n\r\nThis PR adds access control to the Endpoint Workflow Insights\r\nfunctionality. Both the UI and API are gated based on the following\r\nconditions. If these conditions are not met, the content will not\r\nrender, and direct API calls will return errors.\r\n\r\nAccess Conditions\r\n```\r\n1. Serverless: Requires the Endpoint Complete Tier.\r\n2. ESS: Requires an Enterprise License.\r\n3. User Privileges:\r\n 3.1 Endpoint Insights Privilege must be enabled:\r\n 3.1.1 Endpoint Insights All: Grants full access.\r\n\t3.1.2 Endpoint Insights Read:\r\n\t 3.1.2.1 Allows users to view generated insights but prevents triggering new scans.\r\n\t 3.1.2.2 With Trusted Applications privilege: Users can remediate already generated insights.\r\n\t 3.1.2.3 Without Trusted Applications privilege: No actions can be taken.\r\n\t3.1.3Endpoint Insights None: The section is not rendered.\r\n```\r\n\r\nPredefined serverless roles that should include endpoint insights\r\nprivilege(as defined\r\n[here](https://github.com/elastic/security-team/issues/11460)):\r\n- Tier 3 analyst\r\n- Rule Author\r\n- SOC Manager\r\n- Endpoint Operations Analyst\r\n- Endpoint Policy Manager\r\n- Platform Engineer\r\n\r\nOnce this PR is merged and changes make it to canary release, [this\r\nfollow-up\r\nPR](elastic/elasticsearch-controller#816) should\r\nbe merged.\r\n\r\nNote on Testing and Local Setup\r\n\r\nTo test these changes locally, the `defendInsights` assistant feature\r\nmust be enabled. You can do this by updating the following line in the\r\ncode: [Enable defendInsights\r\nhere](https://github.com/elastic/kibana/blob/2ae68bdaac180c62750798c148bed4fd01de07fe/x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/capabilities/index.ts#L23).\r\n\r\nCypress Tests\r\n\r\nCypress tests in this PR are currently skipped because the\r\n`defendInsights` feature is not enabled by default. These tests should\r\nbe enabled once the feature is turned on in the main branch. Successful\r\nrun with all cypress tests enabled can be found\r\n[here](https://buildkite.com/elastic/kibana-pull-request/builds/262774#0193f3c2-eddd-48b6-9103-fb7338304f15).\r\n\r\n<details>\r\n<summary>Screenshots</summary>\r\n\r\n\r\n![396870292-b5bbedad-330f-4ef5-8281-29699cf01a98](https://github.com/user-attachments/assets/586745d4-9e8d-42b4-8d70-e32737285f5c)\r\n\r\n![b](https://github.com/user-attachments/assets/0926b696-37ef-48e8-9dfb-d6f735033583)\r\n\r\n![a](https://github.com/user-attachments/assets/afa799bd-7e07-4a1a-b63e-6448ae56b21a)\r\n\r\n![c](https://github.com/user-attachments/assets/cc3a2e07-0955-4348-a954-1914c5a85e81)\r\n![Screenshot 2024-12-23 at 13 32\r\n57](https://github.com/user-attachments/assets/fbb28bce-eedd-4a6e-85c3-b2a07f40ab27)\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"2f61892e84b31ebd4774cae2686ebd6c4c2cab89"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Konrad Szwarc <[email protected]>
- Loading branch information