[SecuritySolution] Onboarding hub with Fleet integration#194028
[SecuritySolution] Onboarding hub with Fleet integration#194028angorayc merged 19 commits intoelastic:mainfrom
Conversation
8ad9b24 to
2725c8d
Compare
|
/ci |
|
Pinging @elastic/security-threat-hunting-explore (Team:Threat Hunting:Explore) |
|
Pinging @elastic/fleet (Team:Fleet) |
kpollich
left a comment
There was a problem hiding this comment.
Thanks so much for taking the time to put this together @angorayc - it looks great!
As we discussed in our call, one suggestions I have is to put the search bar query for the onboarding UI into the URL via URLSearchParams like we do elsewhere in Fleet/Kibana. This could probably be behind a ?q= query parameter, so when a user types a search query like "elastic" the URL would update to include ?q=elastic. This should hopefully be a relatively straightforward refactor, but if this presents problems I'm happy to take another look.
|
/ci |
criamico
left a comment
There was a problem hiding this comment.
Thanks for making those changes! LGTM
💛 Build succeeded, but was flaky
Failed CI Steps
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11166268091 |
) ## Summary This is the Fleet relevant changes from elastic#193131 1. Add an option to display installation status on package cards. 2. Add options to display spacer in grid, card height, line clamps for card title and description. 3. On the integration details page, if `onboardingLink` and `onboardingAppId` are appended as url params, they will be used as the redirect link after clicking `cancel` or `save and continue` on the installation form page. Please run from this branch and visit Security Solution to test: elastic#193131 https://github.com/user-attachments/assets/40fc155f-d07c-460f-ab70-372e3b43bfc0 https://github.com/user-attachments/assets/06bd0c5e-14b2-4074-b5a1-932a88a1cc6a https://github.com/user-attachments/assets/1ed4ace9-20a7-42ab-9082-4536d6cd643a ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [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 3d932e1)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…) (#194863) # Backport This will backport the following commits from `main` to `8.x`: - [[SecuritySolution] Onboarding hub with Fleet integration (#194028)](#194028) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Angela Chuang","email":"6295984+angorayc@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-03T16:56:11Z","message":"[SecuritySolution] Onboarding hub with Fleet integration (#194028)\n\n## Summary\r\nThis is the Fleet relevant changes from\r\nhttps://github.com//pull/193131\r\n1. Add an option to display installation status on package cards.\r\n2. Add options to display spacer in grid, card height, line clamps for\r\ncard title and description.\r\n3. On the integration details page, if `onboardingLink` and\r\n`onboardingAppId` are appended as url params, they will be used as the\r\nredirect link after clicking `cancel` or `save and continue` on the\r\ninstallation form page.\r\n\r\nPlease run from this branch and visit Security Solution to test:\r\nhttps://github.com//pull/193131\r\n\r\n\r\nhttps://github.com/user-attachments/assets/40fc155f-d07c-460f-ab70-372e3b43bfc0\r\n\r\n\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/06bd0c5e-14b2-4074-b5a1-932a88a1cc6a\r\n\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/1ed4ace9-20a7-42ab-9082-4536d6cd643a\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\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":"3d932e18e88a5b093c5be38da27139785d572061","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","Team:Fleet","v9.0.0","Team:Threat Hunting:Explore","v8.16.0"],"title":"[SecuritySolution] Onboarding hub with Fleet integration","number":194028,"url":"https://github.com/elastic/kibana/pull/194028","mergeCommit":{"message":"[SecuritySolution] Onboarding hub with Fleet integration (#194028)\n\n## Summary\r\nThis is the Fleet relevant changes from\r\nhttps://github.com//pull/193131\r\n1. Add an option to display installation status on package cards.\r\n2. Add options to display spacer in grid, card height, line clamps for\r\ncard title and description.\r\n3. On the integration details page, if `onboardingLink` and\r\n`onboardingAppId` are appended as url params, they will be used as the\r\nredirect link after clicking `cancel` or `save and continue` on the\r\ninstallation form page.\r\n\r\nPlease run from this branch and visit Security Solution to test:\r\nhttps://github.com//pull/193131\r\n\r\n\r\nhttps://github.com/user-attachments/assets/40fc155f-d07c-460f-ab70-372e3b43bfc0\r\n\r\n\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/06bd0c5e-14b2-4074-b5a1-932a88a1cc6a\r\n\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/1ed4ace9-20a7-42ab-9082-4536d6cd643a\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\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":"3d932e18e88a5b093c5be38da27139785d572061"}},"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/194028","number":194028,"mergeCommit":{"message":"[SecuritySolution] Onboarding hub with Fleet integration (#194028)\n\n## Summary\r\nThis is the Fleet relevant changes from\r\nhttps://github.com//pull/193131\r\n1. Add an option to display installation status on package cards.\r\n2. Add options to display spacer in grid, card height, line clamps for\r\ncard title and description.\r\n3. On the integration details page, if `onboardingLink` and\r\n`onboardingAppId` are appended as url params, they will be used as the\r\nredirect link after clicking `cancel` or `save and continue` on the\r\ninstallation form page.\r\n\r\nPlease run from this branch and visit Security Solution to test:\r\nhttps://github.com//pull/193131\r\n\r\n\r\nhttps://github.com/user-attachments/assets/40fc155f-d07c-460f-ab70-372e3b43bfc0\r\n\r\n\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/06bd0c5e-14b2-4074-b5a1-932a88a1cc6a\r\n\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/1ed4ace9-20a7-42ab-9082-4536d6cd643a\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\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":"3d932e18e88a5b093c5be38da27139785d572061"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Angela Chuang <6295984+angorayc@users.noreply.github.com>
) ## Summary This is the Fleet relevant changes from elastic#193131 1. Add an option to display installation status on package cards. 2. Add options to display spacer in grid, card height, line clamps for card title and description. 3. On the integration details page, if `onboardingLink` and `onboardingAppId` are appended as url params, they will be used as the redirect link after clicking `cancel` or `save and continue` on the installation form page. Please run from this branch and visit Security Solution to test: elastic#193131 https://github.com/user-attachments/assets/40fc155f-d07c-460f-ab70-372e3b43bfc0 https://github.com/user-attachments/assets/06bd0c5e-14b2-4074-b5a1-932a88a1cc6a https://github.com/user-attachments/assets/1ed4ace9-20a7-42ab-9082-4536d6cd643a ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [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
| onboardingLink: | ||
| // Users from Security Solution onboarding page will have onboardingLink to redirect back to the onboarding page | ||
| queryParams.get('observabilityOnboardingLink') || queryParams.get('onboardingLink'), |
| onCancelNavigateTo: [onboardingAppId, { path: onboardingLink }], | ||
| onCancelUrl: onboardingLink, | ||
| onSaveNavigateTo: [onboardingAppId, { path: onboardingLink }], |
There was a problem hiding this comment.
Fleet stores their save and cancel links in their route states, so I override it to
back to given page if onboardingAppId && onboardingLink are provided on integration saved or cancelled.
| const onboardingLink = useMemo(() => queryParams.get('onboardingLink'), [queryParams]); | ||
| const onboardingAppId = useMemo(() => queryParams.get('onboardingAppId'), [queryParams]); | ||
|
|
There was a problem hiding this comment.
We append the appId and onboardingLink as query parameters to specify the save and cancel link. https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/onboarding/components/onboarding_body/cards/integrations/use_integration_card_list.ts#L30
…te custom fleet onboarding logic (#215561) ## Summary Updated fleet custom navigation logic to be more generic and consistent between security and observability onboarding flows. ## Details When attempting to start using the custom logic for routing back to onboarding pages for another project, I noticed inconsistencies in how we were linking back to the onboarding pages for the `Back to selection` button on the Integrations overview page and the `Cancel` and `Save and continue` on the Add integration page. Due to these inconsistencies, both custom routing mechanisms couldn't both work at the same time. I re-worked the implementation of the back button to match the cancel/save buttons and utilize `navigateToApp` to fix. Now instead of observability utilizing the `observabilityOnboardingLink` query param, and security utilizing both `observabilityOnboardingLink` and `onboardingAppId`, both solutions will use `returnAppId` and `returnPath` (or different names if we don't love these) to route back to their sourcing locations. Note: Observability onboarding will also now inherit logic the security onboarding team added where the same query parameters route back to the source when a user cancels or saves from the Add integration page (item 3 from [this PR](#194028)) ## Screen recordings Regular integrations page https://github.com/user-attachments/assets/0f306bec-657f-4a7a-b2da-25557899b629 Security onboarding https://github.com/user-attachments/assets/d2a161a0-62ee-40b1-9dd9-5165aea6a65a Observability onboarding https://github.com/user-attachments/assets/89f6b9a3-a348-4488-8688-1d5c96716185 Relates: - #181520 - elastic/security-team#11789 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…te custom fleet onboarding logic (elastic#215561) ## Summary Updated fleet custom navigation logic to be more generic and consistent between security and observability onboarding flows. ## Details When attempting to start using the custom logic for routing back to onboarding pages for another project, I noticed inconsistencies in how we were linking back to the onboarding pages for the `Back to selection` button on the Integrations overview page and the `Cancel` and `Save and continue` on the Add integration page. Due to these inconsistencies, both custom routing mechanisms couldn't both work at the same time. I re-worked the implementation of the back button to match the cancel/save buttons and utilize `navigateToApp` to fix. Now instead of observability utilizing the `observabilityOnboardingLink` query param, and security utilizing both `observabilityOnboardingLink` and `onboardingAppId`, both solutions will use `returnAppId` and `returnPath` (or different names if we don't love these) to route back to their sourcing locations. Note: Observability onboarding will also now inherit logic the security onboarding team added where the same query parameters route back to the source when a user cancels or saves from the Add integration page (item 3 from [this PR](elastic#194028)) ## Screen recordings Regular integrations page https://github.com/user-attachments/assets/0f306bec-657f-4a7a-b2da-25557899b629 Security onboarding https://github.com/user-attachments/assets/d2a161a0-62ee-40b1-9dd9-5165aea6a65a Observability onboarding https://github.com/user-attachments/assets/89f6b9a3-a348-4488-8688-1d5c96716185 Relates: - elastic#181520 - elastic/security-team#11789 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…te custom fleet onboarding logic (elastic#215561) ## Summary Updated fleet custom navigation logic to be more generic and consistent between security and observability onboarding flows. ## Details When attempting to start using the custom logic for routing back to onboarding pages for another project, I noticed inconsistencies in how we were linking back to the onboarding pages for the `Back to selection` button on the Integrations overview page and the `Cancel` and `Save and continue` on the Add integration page. Due to these inconsistencies, both custom routing mechanisms couldn't both work at the same time. I re-worked the implementation of the back button to match the cancel/save buttons and utilize `navigateToApp` to fix. Now instead of observability utilizing the `observabilityOnboardingLink` query param, and security utilizing both `observabilityOnboardingLink` and `onboardingAppId`, both solutions will use `returnAppId` and `returnPath` (or different names if we don't love these) to route back to their sourcing locations. Note: Observability onboarding will also now inherit logic the security onboarding team added where the same query parameters route back to the source when a user cancels or saves from the Add integration page (item 3 from [this PR](elastic#194028)) ## Screen recordings Regular integrations page https://github.com/user-attachments/assets/0f306bec-657f-4a7a-b2da-25557899b629 Security onboarding https://github.com/user-attachments/assets/d2a161a0-62ee-40b1-9dd9-5165aea6a65a Observability onboarding https://github.com/user-attachments/assets/89f6b9a3-a348-4488-8688-1d5c96716185 Relates: - elastic#181520 - elastic/security-team#11789 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 6967952)
Summary
This is the Fleet relevant changes from #193131
onboardingLinkandonboardingAppIdare appended as url params, they will be used as the redirect link after clickingcancelorsave and continueon the installation form page.Please run from this branch and visit Security Solution to test: #193131
Screen.Recording.2024-09-24.at.18.36.20.mov
Screen.Recording.2024-09-24.at.17.48.50.mov
Screen.Recording.2024-09-30.at.15.49.12.mov
Checklist
Delete any items that are not applicable to this PR.