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] Address guided onboarding feedback for the rules area #145223

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

xcrzx
Copy link
Contributor

@xcrzx xcrzx commented Nov 15, 2022

Related to: #144016

Summary

This follow-up PR addresses guided onboarding feedback mentioned here and here.

To summarize:

  • We're keeping the first step (install prebuilt rules) intact, but most users wouldn't see it as the rules are installed automatically during previous stages. This step is needed to cover edge cases when rules were deleted for some reason.
  • We're splitting the second step into two: 1) search the first rule and 2) activate it.
  • We're adding "Next" buttons to these steps.
  • For the search step, the "Next" button will automatically filter the rules table, so the first rule becomes visible.
  • For the activate step, the "Next" button automatically activates the first rule.
  • The "Next" button stays optional; we still automatically progress the guide once user actions satisfy certain conditions, like the user filtered the rules table manually or activated the first rule by clicking its toggle.

Find rule step

Screenshot 2022-11-15 at 11 14 05

Enable rule step

Screenshot 2022-11-15 at 11 14 16

Testing instructions

  1. Add feature flag to kibana.dev.yml: xpack.securitySolution.enableExperimental: ['guidedOnboarding']
  2. Add also cloud ID to mimic a cloud environment: xpack.cloud.id: "x"
  3. Run kibana with examples: yarn start --run-examples
  4. Go to /app/guidedOnboardingExample
  5. Use the "Set guide state" section to set Guide to security and Step ID to rules
  6. The Setup guide menu will automatically open. Hit the "Start" button
  7. You will be redirected to the rules management page with tour steps active.

@xcrzx xcrzx added release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team v8.6.0 labels Nov 15, 2022
@xcrzx xcrzx marked this pull request as ready for review November 15, 2022 10:15
@xcrzx xcrzx requested a review from a team as a code owner November 15, 2022 10:15
@xcrzx xcrzx requested a review from maximpn November 15, 2022 10:15
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@xcrzx xcrzx self-assigned this Nov 15, 2022
Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

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

@xcrzx The changes LGTM

There is a comment for improvement.

false
);

const { data: onboardingRules } = useFindRulesQuery(
Copy link
Contributor

Choose a reason for hiding this comment

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

The idea that only demoRule is needed so it's possible to check if that rule is loaded. So the functionality can be moved to a separate hook like useDemoRule() which returns demoRule and isLoading which should be enough to properly determine the tourStatus.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I like that idea 👍 We could improve that in a follow-up if you don't mind.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good

};

export enum GuidedOnboardingRulesStatus {
'inactive' = 'inactive',
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm just curious why enum keys are string literals while it can be started with capital case keys as in the TypeScript docs? So it could be

export enum GuidedOnboardingRulesStatus {
  Inactive = 'inactive',
  InstallRules = 'installRules',
  ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, no intention here, to be honest. FWIW, in security solution, enum formats are not very consistent, but the most widespread one is CamelCase for names and snake_case for members:

Screenshot 2022-11-15 at 12 19 34

I'd stick to it for consistency.

@kibana-ci
Copy link
Collaborator

💚 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 9.6MB 9.6MB +1.4KB
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 108 113 +5
securitySolution 441 447 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 67 73 +6
osquery 109 115 +6
securitySolution 518 524 +6
total +20

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

cc @xcrzx

@xcrzx xcrzx merged commit 5ad2a36 into elastic:main Nov 15, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 15, 2022
@xcrzx xcrzx deleted the guided-onboarding-followup branch November 15, 2022 12:16
benakansara pushed a commit to benakansara/kibana that referenced this pull request Nov 17, 2022
…area (elastic#145223)

**Related to: elastic#144016

## Summary

This follow-up PR addresses guided onboarding feedback mentioned
[here](elastic/security-team#5386) and
[here](elastic#144458).

To summarize:

- We're keeping the first step (install prebuilt rules) intact, but most
users wouldn't see it as the rules are installed automatically during
previous stages. This step is needed to cover edge cases when rules were
deleted for some reason.
- We're splitting the second step into two: 1) search the first rule and
2) activate it.
- We're adding "Next" buttons to these steps.
- For the search step, the "Next" button will automatically filter the
rules table, so the first rule becomes visible.
- For the activate step, the "Next" button automatically activates the
first rule.
- The "Next" button stays optional; we still automatically progress the
guide once user actions satisfy certain conditions, like the user
filtered the rules table manually or activated the first rule by
clicking its toggle.
marshallmain added a commit that referenced this pull request Nov 28, 2022
…ression and new terms multi fields (#145775)

## Summary

Adds new tour highlighting new rule capabilities in 8.6 - new terms
multi fields (#143943) and alert
suppression (#142686).

I tried using the generic `RulesFeatureTour` again
(main...marshallmain:kibana:failed-tour)
but it still crashes the page.

I also looked at integrating this tour with the Guided onboarding tour
for rules management (#145223),
but concluded that they should be separate since guided onboarding is
experimental and this tour should be displayed to users even if they are
not new users.

This PR is essentially a copy of the new terms tour in 8.4
(#138469).
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 28, 2022
…ression and new terms multi fields (elastic#145775)

## Summary

Adds new tour highlighting new rule capabilities in 8.6 - new terms
multi fields (elastic#143943) and alert
suppression (elastic#142686).

I tried using the generic `RulesFeatureTour` again
(elastic/kibana@main...marshallmain:kibana:failed-tour)
but it still crashes the page.

I also looked at integrating this tour with the Guided onboarding tour
for rules management (elastic#145223),
but concluded that they should be separate since guided onboarding is
experimental and this tour should be displayed to users even if they are
not new users.

This PR is essentially a copy of the new terms tour in 8.4
(elastic#138469).

(cherry picked from commit 13c1b0b)
kibanamachine added a commit that referenced this pull request Nov 29, 2022
…r suppression and new terms multi fields (#145775) (#146479)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[Security Solution][Alerts] Add tour to rule management page for
suppression and new terms multi fields
(#145775)](#145775)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Marshall
Main","email":"55718608+marshallmain@users.noreply.github.com"},"sourceCommit":{"committedDate":"2022-11-28T21:35:02Z","message":"[Security
Solution][Alerts] Add tour to rule management page for suppression and
new terms multi fields (#145775)\n\n## Summary\r\n\r\nAdds new tour
highlighting new rule capabilities in 8.6 - new terms\r\nmulti fields
(#143943) and alert\r\nsuppression
(#142686 tried using
the generic `RulesFeatureTour`
again\r\n(https://github.com/elastic/kibana/compare/main...marshallmain:kibana:failed-tour)\r\nbut
it still crashes the page.\r\n\r\nI also looked at integrating this tour
with the Guided onboarding tour\r\nfor rules management
(#145223 concluded that
they should be separate since guided onboarding is\r\nexperimental and
this tour should be displayed to users even if they are\r\nnot new
users.\r\n\r\nThis PR is essentially a copy of the new terms tour in
8.4\r\n(#138469:
SecuritySolution","Team:Detection
Alerts","v8.6.0","v8.7.0"],"number":145775,"url":"#145775
Solution][Alerts] Add tour to rule management page for suppression and
new terms multi fields (#145775)\n\n## Summary\r\n\r\nAdds new tour
highlighting new rule capabilities in 8.6 - new terms\r\nmulti fields
(#143943) and alert\r\nsuppression
(#142686 tried using
the generic `RulesFeatureTour`
again\r\n(https://github.com/elastic/kibana/compare/main...marshallmain:kibana:failed-tour)\r\nbut
it still crashes the page.\r\n\r\nI also looked at integrating this tour
with the Guided onboarding tour\r\nfor rules management
(#145223 concluded that
they should be separate since guided onboarding is\r\nexperimental and
this tour should be displayed to users even if they are\r\nnot new
users.\r\n\r\nThis PR is essentially a copy of the new terms tour in
8.4\r\n(#138469
Solution][Alerts] Add tour to rule management page for suppression and
new terms multi fields (#145775)\n\n## Summary\r\n\r\nAdds new tour
highlighting new rule capabilities in 8.6 - new terms\r\nmulti fields
(#143943) and alert\r\nsuppression
(#142686 tried using
the generic `RulesFeatureTour`
again\r\n(https://github.com/elastic/kibana/compare/main...marshallmain:kibana:failed-tour)\r\nbut
it still crashes the page.\r\n\r\nI also looked at integrating this tour
with the Guided onboarding tour\r\nfor rules management
(#145223 concluded that
they should be separate since guided onboarding is\r\nexperimental and
this tour should be displayed to users even if they are\r\nnot new
users.\r\n\r\nThis PR is essentially a copy of the new terms tour in
8.4\r\n(#138469"}}]}]
BACKPORT-->

Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants