Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [SecuritySolution][Onboarding] Catch completion check failure (#…
…196389) (#197034) # Backport This will backport the following commits from `main` to `8.x`: - [[SecuritySolution][Onboarding] Catch completion check failure (#196389)](#196389) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Angela Chuang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-21T10:56:50Z","message":"[SecuritySolution][Onboarding] Catch completion check failure (#196389)\n\n## Summary\r\n\r\nFixes: #196091 |\r\n~https://github.com/elastic/kibana/issues/196649~\r\n\r\n1. Add the error handling when an error occurred during check complete.\r\n2. Update the AI assistant capabilities to\r\n`[['securitySolutionAssistant.ai-assistant', 'actions.show']]`\r\n\r\n**Steps to verify:**\r\n\r\n\r\nhttps://p.elstc.co/paste/+6OYqx41#tZxjvqXgQJ2uRlCSqZH8ADMEAvR1+qnXe-5kEbt+bro\r\nLogin with the user without indices privilege. It should display the tab\r\ncontent without the completion information.\r\n\r\nWhen completion check failed - it should display and error `toast`,\r\nregard the card as `incomplete` and `show the content`:\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/30b1654e-99cc-4582-8beb-c4a5fb005e6f\r\n\r\nAI assistant should not show connectors options as `add integration` is\r\nregarded as incomplete:\r\n\r\n<img width=\"1761\" alt=\"Screenshot 2024-10-17 at 15 02 42\"\r\nsrc=\"https://github.com/user-attachments/assets/07fb317e-57d6-4980-aae3-7eb2d0fce12a\">\r\n\r\n\r\nThen add the index privilege:\r\n<img width=\"2208\" alt=\"Screenshot 2024-10-17 at 15 07 36\"\r\nsrc=\"https://github.com/user-attachments/assets/bb879964-e31b-4ee3-8eb3-dff0381be287\">\r\n\r\nWhen completion check success: it should display the completion results:\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2a27a042-c634-4f44-bfd0-2ae503f396a2\r\n\r\n\r\n\r\nSet `actions and connectors` to read only:\r\n<img width=\"779\" alt=\"Screenshot 2024-10-17 at 15 04 28\"\r\nsrc=\"https://github.com/user-attachments/assets/098b0c90-30a9-4e82-ad16-10d2cd64a9cc\">\r\n\r\n\r\n<img width=\"1250\" alt=\"Screenshot 2024-10-17 at 16 40 18\"\r\nsrc=\"https://github.com/user-attachments/assets/5e677d5a-32b8-4cea-b240-207a3f055f9c\">\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"10ec204128776930c48376a848fe20b1301569f9","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","backport","v9.0.0","Team:Threat Hunting:Explore","ci:cloud-deploy","v8.16.0"],"title":"[SecuritySolution][Onboarding] Catch completion check failure","number":196389,"url":"https://github.com/elastic/kibana/pull/196389","mergeCommit":{"message":"[SecuritySolution][Onboarding] Catch completion check failure (#196389)\n\n## Summary\r\n\r\nFixes: #196091 |\r\n~https://github.com/elastic/kibana/issues/196649~\r\n\r\n1. Add the error handling when an error occurred during check complete.\r\n2. Update the AI assistant capabilities to\r\n`[['securitySolutionAssistant.ai-assistant', 'actions.show']]`\r\n\r\n**Steps to verify:**\r\n\r\n\r\nhttps://p.elstc.co/paste/+6OYqx41#tZxjvqXgQJ2uRlCSqZH8ADMEAvR1+qnXe-5kEbt+bro\r\nLogin with the user without indices privilege. It should display the tab\r\ncontent without the completion information.\r\n\r\nWhen completion check failed - it should display and error `toast`,\r\nregard the card as `incomplete` and `show the content`:\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/30b1654e-99cc-4582-8beb-c4a5fb005e6f\r\n\r\nAI assistant should not show connectors options as `add integration` is\r\nregarded as incomplete:\r\n\r\n<img width=\"1761\" alt=\"Screenshot 2024-10-17 at 15 02 42\"\r\nsrc=\"https://github.com/user-attachments/assets/07fb317e-57d6-4980-aae3-7eb2d0fce12a\">\r\n\r\n\r\nThen add the index privilege:\r\n<img width=\"2208\" alt=\"Screenshot 2024-10-17 at 15 07 36\"\r\nsrc=\"https://github.com/user-attachments/assets/bb879964-e31b-4ee3-8eb3-dff0381be287\">\r\n\r\nWhen completion check success: it should display the completion results:\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2a27a042-c634-4f44-bfd0-2ae503f396a2\r\n\r\n\r\n\r\nSet `actions and connectors` to read only:\r\n<img width=\"779\" alt=\"Screenshot 2024-10-17 at 15 04 28\"\r\nsrc=\"https://github.com/user-attachments/assets/098b0c90-30a9-4e82-ad16-10d2cd64a9cc\">\r\n\r\n\r\n<img width=\"1250\" alt=\"Screenshot 2024-10-17 at 16 40 18\"\r\nsrc=\"https://github.com/user-attachments/assets/5e677d5a-32b8-4cea-b240-207a3f055f9c\">\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"10ec204128776930c48376a848fe20b1301569f9"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196389","number":196389,"mergeCommit":{"message":"[SecuritySolution][Onboarding] Catch completion check failure (#196389)\n\n## Summary\r\n\r\nFixes: #196091 |\r\n~https://github.com/elastic/kibana/issues/196649~\r\n\r\n1. Add the error handling when an error occurred during check complete.\r\n2. Update the AI assistant capabilities to\r\n`[['securitySolutionAssistant.ai-assistant', 'actions.show']]`\r\n\r\n**Steps to verify:**\r\n\r\n\r\nhttps://p.elstc.co/paste/+6OYqx41#tZxjvqXgQJ2uRlCSqZH8ADMEAvR1+qnXe-5kEbt+bro\r\nLogin with the user without indices privilege. It should display the tab\r\ncontent without the completion information.\r\n\r\nWhen completion check failed - it should display and error `toast`,\r\nregard the card as `incomplete` and `show the content`:\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/30b1654e-99cc-4582-8beb-c4a5fb005e6f\r\n\r\nAI assistant should not show connectors options as `add integration` is\r\nregarded as incomplete:\r\n\r\n<img width=\"1761\" alt=\"Screenshot 2024-10-17 at 15 02 42\"\r\nsrc=\"https://github.com/user-attachments/assets/07fb317e-57d6-4980-aae3-7eb2d0fce12a\">\r\n\r\n\r\nThen add the index privilege:\r\n<img width=\"2208\" alt=\"Screenshot 2024-10-17 at 15 07 36\"\r\nsrc=\"https://github.com/user-attachments/assets/bb879964-e31b-4ee3-8eb3-dff0381be287\">\r\n\r\nWhen completion check success: it should display the completion results:\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2a27a042-c634-4f44-bfd0-2ae503f396a2\r\n\r\n\r\n\r\nSet `actions and connectors` to read only:\r\n<img width=\"779\" alt=\"Screenshot 2024-10-17 at 15 04 28\"\r\nsrc=\"https://github.com/user-attachments/assets/098b0c90-30a9-4e82-ad16-10d2cd64a9cc\">\r\n\r\n\r\n<img width=\"1250\" alt=\"Screenshot 2024-10-17 at 16 40 18\"\r\nsrc=\"https://github.com/user-attachments/assets/5e677d5a-32b8-4cea-b240-207a3f055f9c\">\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"10ec204128776930c48376a848fe20b1301569f9"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Angela Chuang <[email protected]>
- Loading branch information