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] UI Event Filters RBAC #146111

Merged

Conversation

gergoabraham
Copy link
Contributor

@gergoabraham gergoabraham commented Nov 23, 2022

Summary

Similarly to #145593, this PR handles the None and Read privileges for the Event Filters sub-feature. The All privilege should not need any UI modification, but will need API modification.
image

The modification should:

  • hide Event Filters from Manage navigation items if privilege is NONE, (note: it is still displayed for non-superusers, if the feature flag is disabled) update: it is hidden for non-superusers if the feature flag is disabled
  • disable add/edit/delete for Event Filters if privilege is READ.

Checked:

  • the Event Filters form still works from the "Hosts > Events" side of the app ✅

image

image

Checklist

Delete any items that are not applicable to this PR.

@gergoabraham gergoabraham self-assigned this Nov 23, 2022
@gergoabraham gergoabraham added Team:Defend Workflows “EDR Workflows” sub-team of Security Solution release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting v8.7.0 labels Nov 23, 2022
@gergoabraham gergoabraham force-pushed the feat/olm-4917-ui-event-filters-ui-rbac branch from 2b93348 to 9ada0d8 Compare November 23, 2022 13:58
@gergoabraham gergoabraham marked this pull request as ready for review November 23, 2022 14:39
@gergoabraham gergoabraham requested a review from a team as a code owner November 23, 2022 14:39
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt)

@gergoabraham
Copy link
Contributor Author

@elasticmachine merge upstream

@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 +455.0B
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 109 115 +6
securitySolution 442 448 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 68 74 +6
osquery 110 117 +7
securitySolution 519 525 +6
total +21

History

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

cc @gergoabraham

@gergoabraham gergoabraham merged commit 5f3ac5d into elastic:main Dec 1, 2022
@gergoabraham gergoabraham deleted the feat/olm-4917-ui-event-filters-ui-rbac branch December 1, 2022 11:32
gergoabraham added a commit that referenced this pull request Dec 11, 2022
## Summary

Similarly to #145593 and #146111, this PR handles the None and Read
privileges for the Blocklist sub-feature. The All privilege should not
need any UI modification, but will need API modification.
<img width="541" alt="image"
src="https://user-images.githubusercontent.com/39014407/204349035-ca234eae-66ec-4018-bc04-8deaebdd8a0b.png">


The modification should:
- hide Blocklist from Manage navigation items if privilege is NONE,
- disable add/edit/delete for Blocklist if privilege is READ.
- disable opening Policies from Blocklist (and any other
`ArtifactListPage`) by disabling the links in the _'Applied for N
policies'_ context menu

For testing the last part:
- add `Read` privilege for Blocklist (or any other artifact using
`ArtifactListPage`), and `None` to Policies
- for now, it has to be tested with `Fleet:All` and `Integrations:Read`
privileges

With `Policies:Read` privilege, hovering on the last item:
<img width="773" alt="image"
src="https://user-images.githubusercontent.com/39014407/205944360-fed60b11-7a88-42d5-93cd-307c7b34891b.png">

With `Policies:None` privilege, hovering on the last item:
<img width="778" alt="image"
src="https://user-images.githubusercontent.com/39014407/205944198-7dccfa37-177f-4eb7-a773-09eaeaa4b1fe.png">




### 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
saarikabhasi pushed a commit to saarikabhasi/kibana that referenced this pull request Dec 14, 2022
## Summary

Similarly to elastic#145593 and elastic#146111, this PR handles the None and Read
privileges for the Blocklist sub-feature. The All privilege should not
need any UI modification, but will need API modification.
<img width="541" alt="image"
src="https://user-images.githubusercontent.com/39014407/204349035-ca234eae-66ec-4018-bc04-8deaebdd8a0b.png">


The modification should:
- hide Blocklist from Manage navigation items if privilege is NONE,
- disable add/edit/delete for Blocklist if privilege is READ.
- disable opening Policies from Blocklist (and any other
`ArtifactListPage`) by disabling the links in the _'Applied for N
policies'_ context menu

For testing the last part:
- add `Read` privilege for Blocklist (or any other artifact using
`ArtifactListPage`), and `None` to Policies
- for now, it has to be tested with `Fleet:All` and `Integrations:Read`
privileges

With `Policies:Read` privilege, hovering on the last item:
<img width="773" alt="image"
src="https://user-images.githubusercontent.com/39014407/205944360-fed60b11-7a88-42d5-93cd-307c7b34891b.png">

With `Policies:None` privilege, hovering on the last item:
<img width="778" alt="image"
src="https://user-images.githubusercontent.com/39014407/205944198-7dccfa37-177f-4eb7-a773-09eaeaa4b1fe.png">




### 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
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:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants