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]Enable the Export option under Bulk if there is Custom Rule under Selection #127746

Closed
ghost opened this issue Mar 15, 2022 · 10 comments
Labels
8.4 candidate bug Fixes for quality problems that affect the customer experience enhancement New value added to drive a business result Feature:Rule Management Security Solution Detection Rule Management area fixed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA 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.4.0

Comments

@ghost
Copy link

ghost commented Mar 15, 2022

Describe the bug
Enable the Export action under bulk for Elastic Rule if there is Custom Rule under selection

Build Details

Version:8.2.0 SNAPSHOT
Commit:e1578ee2b5b4dfbab59113a9c58854799f4f7b42
Build:51037

Steps

  • Login to Kibana
  • Navigate to Alert page and make a duplicate rule from the Endpoint Security
  • Search for Endpoint Security in Rule Details page search bar
  • Now select two rule for Bulk Action
    • Endpoint Security (Built in Elastic Rule) : Export Action disabled for it
    • Endpoint Security [ Duplicate ] (Custom Rule): Export Rule work on it
  • Now click on Bulk actions and check the Export action
  • Observed that Export action should be Enabled so that user can at least Export the Custom which is permit-able to do and for the Elastic Rule selection Warning of Operation not permit-able can display Just like Tag, Add Index Bulk Action work flow

Screen-Cast

Export-Action.mp4
@ghost ghost added bug Fixes for quality problems that affect the customer experience triage_needed Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Mar 15, 2022
@elasticmachine
Copy link
Contributor

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

@ghost ghost added enhancement New value added to drive a business result and removed bug Fixes for quality problems that affect the customer experience labels Mar 15, 2022
@MadameSheema MadameSheema added Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team labels Mar 15, 2022
@elasticmachine
Copy link
Contributor

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

@banderror banderror added bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management area impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed triage_needed labels Mar 24, 2022
@banderror banderror removed their assignment Mar 24, 2022
@vitaliidm
Copy link
Contributor

vitaliidm commented Jun 24, 2022

@yiyangliu9286 , @jethr0null can you please look at this one. What should be expected behaviour in this case?

Currently, for export action, if not all rules selected and any of rule is prebuilt, export button is disabled.
If users select all rules: export is always enabled.

It seems too restirctive condition for disabling export.

I would suggest:

  • let's disable export only in case if: not all rules selected, and all of the selected are prebuilt
  • if users try to export rules, they will see message something like

Screenshot 2022-06-24 at 17 09 05

Successfully exported 5 of 10 rules.

I propose this approach, instead of one described in ticket(make it similar to edit actions):

Observed that Export action should be Enabled so that user can at least Export the Custom which is permit-able to do and for the Elastic Rule selection Warning of Operation not permit-able can display Just like Tag, Add Index Bulk Action work flow
because

@yiyangliu9286
Copy link

@yiyangliu9286 , @jethr0null can you please look at this one. What should be expected behaviour in this case?

Currently, for export action, if not all rules selected and any of rule is prebuilt, export button is disabled. If users select all rules: export is always enabled.

It seems too restirctive condition for disabling export.

I would suggest:

  • let's disable export only in case if: not all rules selected, and all of the selected are prebuilt
  • if users try to export rules, they will see message something like
Screenshot 2022-06-24 at 17 09 05

Successfully exported 5 of 10 rules.

I propose this approach, instead of one described in ticket(make it similar to edit actions):

Observed that Export action should be Enabled so that user can at least Export the Custom which is permit-able to do and for the Elastic Rule selection Warning of Operation not permit-able can display Just like Tag, Add Index Bulk Action work flow
because

Thanks for giving suggestion for this improvement @vitaliidm! I'd say we should keep the bulk action experience consistent with other bulk actions like what it describes in this GH for export as well. So when users select bulk export not all rules selected and any of rule is prebuilt, we'll populate the same modal for them:
Screen Shot 2022-06-29 at 9 42 58 AM
and that the number of selected custom rules will be edited if users agree on this action, so that the behaviour for bulk actions are consistent.

@vitaliidm
Copy link
Contributor

per discussion with @elastic/security-detections-response-rules:

  1. we won't need dry run action here, because export doesn't nutate state
  2. once user click on export, we download file in browser, read it, and display message to user how many rules can/can't be exported
  3. since all failed export are immutable rules, we can safely display immutable message error to users in modal window
  4. user can proceed with download of exported rules OR cancel export action, thus experience will become consistent with bulk edit

@vitaliidm
Copy link
Contributor

vitaliidm commented Jul 18, 2022

@yiyangliu9286, should we also change a behaviour for a single rule export?
Currently, if this rule is immutable, export option is disabled.

In my opinion, it's looks good, as user don't need to do extra click on menu item to know this rule can't be exported.
But it would be slightly inconsistent with bulk export experience.
Here is, how it's working with the recent changes:

Screen.Recording.2022-07-18.at.17.36.08.mov

What do you think can be the best solution?

  1. Leave it as it is
  2. Add dialog for a single rule export
  3. Do not show dialog for bulk export, if all selected rules are immutabe

@yiyangliu9286
Copy link

@yiyangliu9286, should we also change a behaviour for a single rule export? Currently, if this rule is immutable, export option is disabled.

In my opinion, it's looks good, as user don't need to do extra click on menu item to know this rule can't be exported. But it would be slightly inconsistent with bulk export experience. Here is, how it's working with the recent changes:

Screen.Recording.2022-07-18.at.17.36.08.mov
What do you think can be the best solution?

  1. Leave it as it is
  2. Add dialog for a single rule export
  3. Do not show dialog for bulk export, if all selected rules are immutabe

Thanks for the question. Yes I think the biggest problem right here is the inconsistency for how we treat and let users know that for prebuilt/immutable rules they cannot do single and bulk actions.

However I am leaning towards to leave as it is for now (because I don't see there would be strong negative or blocker for users to see a disable button since immutable rules cannot be edited anyway), and it would be nice if we have time or bandwidth, to Add the same dialog for a single rule export as a future direction to go for but I agree it's not critical for now.

vitaliidm added a commit that referenced this issue Jul 25, 2022
…lk exporting action (#136418)

## Summary

- addresses #127746
- when users select rules for bulk export confirmation dialog is displayed, that shows how many rules can be exported. Only custom rules are exportable
- if no rules can be exported, dialog will show users, that action is not available
- changes successful export message, by showing note that prebuilt rules are excluded, only when rule have been excluded

### Modal windows

#### no rules can be exported
<img width="1293" alt="Screenshot 2022-07-18 at 14 01 36" src="https://user-images.githubusercontent.com/92328789/179517392-913f3dd9-4118-46eb-ba35-77d46906efd2.png">

#### some rules can be exported
<img width="1267" alt="Screenshot 2022-07-18 at 14 02 30" src="https://user-images.githubusercontent.com/92328789/179517376-cff64ee2-af9a-448b-aa2a-ce19e1542d6b.png">


### Implementation details
- we won't need dry run action here, because export doesn't mutate state
- once user click on export, we download file in browser, read it, and display message to user how many rules can/can't be exported
- since all failed export are immutable rules, we can safely display immutable message error to users in modal window
- user can proceed with download of exported rules OR cancel export action, thus experience will become consistent with bulk edit

### Checklist

Delete any items that are not applicable to this PR.

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

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)


### Release note
improves user experience for bulk export of security rules, by displaying confirmation modal, that show how many rules can be exported
@vitaliidm
Copy link
Contributor

@karanbirsingh-qasource, issue has been addressed in #136418

@vitaliidm vitaliidm assigned ghost and unassigned vitaliidm Jul 25, 2022
@vitaliidm vitaliidm added fixed QA:Ready for Testing Code is merged and ready for QA to validate labels Jul 25, 2022
@ghost
Copy link
Author

ghost commented Jul 27, 2022

Hi @vitaliidm

thanks for updating.

we have validated this issue on mains branch and found it fixed . export option is enabled and after ward message of only custom rule can be exported and not the elastic ones which are selected in bulk action.

Build Details:
Mains branch

Snap-Shoot:

image

image

Hence we are closing this issue and adding "QA:Validated" tag to it.

thanks !!

c.c @MadameSheema

@ghost ghost closed this as completed Jul 27, 2022
@ghost ghost added the QA:Validated Issue has been validated by QA label Jul 27, 2022
@ghost
Copy link
Author

ghost commented Jul 29, 2022

Hi @MadameSheema

we have validated this issue on 8.4.0 BC1 and found the issue to be fixed ✔️ .

Build Details:

Version:8.4.0 BC1
Commit:58f7eaf0f8dc3c43cbfcd393e587f155e97b3d0d
Build:54999

Snap-Shoot/Screen-Cast

image

Hence we are closing this issue and adding "QA:Validated" tag to it.

thanks !!

@ghost ghost removed the QA:Ready for Testing Code is merged and ready for QA to validate label Aug 23, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.4 candidate bug Fixes for quality problems that affect the customer experience enhancement New value added to drive a business result Feature:Rule Management Security Solution Detection Rule Management area fixed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA 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.4.0
Projects
None yet
Development

No branches or pull requests

6 participants