-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] [CASES] Allow cases to be there when security solutions privileges is none #113573
Conversation
Pinging @elastic/security-threat-hunting-cases (Team:Threat Hunting:Cases) |
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
...rity_solution/public/detections/containers/detection_engine/alerts/use_cases_from_alerts.tsx
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/cases/components/create/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/cases/pages/configure_cases.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts
Outdated
Show resolved
Hide resolved
805b60b
to
dc8e77f
Compare
This comment has been minimized.
This comment has been minimized.
x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested locally and everything LGTM!
Thanks Xavier
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not going to block this change on the limit increase, but I would please ask that you address the massive plugin bundle size. #95870
Friendly reminder: Looks like this PR hasn’t been backported yet. |
## Summary Small fixes and just a few docs to clarify things. I might be wrong on what I'm doing, so please let me know. Looking at the telemetry data from servers I see things like this (I made this up, not real data, but the shape of the data is the same as what we see on the servers): ```json "securitySolution:overview" : { "clicks_total" : 420, "minutes_on_screen_total" : 55.58454999999998, "viewId" : "main", "clicks_7_days" : 0, "clicks_90_days" : 0, "appId" : "securitySolution:overview", "minutes_on_screen_7_days" : 0, "minutes_on_screen_30_days" : 0, "clicks_30_days" : 0, "minutes_on_screen_90_days" : 0 }, ``` and I also see the views which is 👍 what I would make the dashboards from ... So not for sure if the structure above this is legacy. I could not get the shape of data above to happen locally. However, this shape below seems better and what I would create dashboards from. ```json "securitySolution" : { "clicks_total" : 420, "minutes_on_screen_total" : 2.90670000000006, "viewId" : "main", "clicks_7_days" : 70, "clicks_90_days" : 370, "appId" : "securitySolution", "minutes_on_screen_7_days" : 104.62756666666667, "minutes_on_screen_30_days" : 121.61288333333334, "clicks_30_days" : 121, "minutes_on_screen_90_days" : 250.55426666666665, "views" : [ { "clicks_total" : 8, "minutes_on_screen_total" : 5.709183333333334, "viewId" : "overview", "clicks_7_days" : 0, "clicks_90_days" : 6, "appId" : "securitySolution", "minutes_on_screen_7_days" : 0, "minutes_on_screen_30_days" : 0.5038833333333333, "clicks_30_days" : 0, "minutes_on_screen_90_days" : 6.565383333333333 }, ``` With this new key of "securitySolutionUI" I don't see keys like `securitySolutionUI:overview` but I do see the views like above so let me know if changing the keys here in some areas are a mistake or not or if this is not the right thing to do. Ref to earlier PR with the new key of `securitySolutionUI` from `APP_ID` changing: #113573
## Summary Fixes elastic/kibana-team#1136 The Kibana feature definition for Security Solution was missing the correct plugin ID registered in the `app` definition. We were still defining the old _"securitySolution"_ app ID in the `app` property, instead of the new _"securitySolutionUI"_ ID. The Security Solution plugin ID change (_"securitySolution"_ -> _"securitySolutionUI"_) was done a long time ago, the inconsistency with the Security feature definition is causing the _Security_ app to still be visible in the global search when the Security feature is disabled: - In the role features <img width="737" alt="Security and Cases disabled" src="https://github.com/user-attachments/assets/146b8205-90f7-4218-9f1a-7b55c3bad563"> - Or in the space features config <img width="1213" alt="Captura de pantalla 2024-09-03 a les 15 31 09" src="https://github.com/user-attachments/assets/2563675a-d956-4422-a887-d6d95bcad773"> This is fixed now: Before: <img width="1302" alt="Security app incorrectly enabled" src="https://github.com/user-attachments/assets/8031f054-7cfb-4098-93c2-eac402501887"> After: <img width="1302" alt="Security app disabled properly" src="https://github.com/user-attachments/assets/a4f38ec2-fb78-4b1b-8c2d-bac58b97ff99"> ### Caveat As per this PR changes: #113573 In the Kibana features of the role, under the Security catalog, both Security and Cases features need to be `none` for the Security Solution plugin to be disabled. Otherwise, we must enable the plugin and make the enabled features available. So, with a role with the following Kibana features: <img width="737" alt="Security disabled cases enabled" src="https://github.com/user-attachments/assets/aca8288e-9dd9-49d0-b864-e60273d30759"> The Security app needs to be available and display only Cases available: <img width="247" alt="navigation with only cases" src="https://github.com/user-attachments/assets/d4866edb-1d1d-4290-a399-76a37536b05c"> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary Fixes elastic/kibana-team#1136 The Kibana feature definition for Security Solution was missing the correct plugin ID registered in the `app` definition. We were still defining the old _"securitySolution"_ app ID in the `app` property, instead of the new _"securitySolutionUI"_ ID. The Security Solution plugin ID change (_"securitySolution"_ -> _"securitySolutionUI"_) was done a long time ago, the inconsistency with the Security feature definition is causing the _Security_ app to still be visible in the global search when the Security feature is disabled: - In the role features <img width="737" alt="Security and Cases disabled" src="https://github.com/user-attachments/assets/146b8205-90f7-4218-9f1a-7b55c3bad563"> - Or in the space features config <img width="1213" alt="Captura de pantalla 2024-09-03 a les 15 31 09" src="https://github.com/user-attachments/assets/2563675a-d956-4422-a887-d6d95bcad773"> This is fixed now: Before: <img width="1302" alt="Security app incorrectly enabled" src="https://github.com/user-attachments/assets/8031f054-7cfb-4098-93c2-eac402501887"> After: <img width="1302" alt="Security app disabled properly" src="https://github.com/user-attachments/assets/a4f38ec2-fb78-4b1b-8c2d-bac58b97ff99"> ### Caveat As per this PR changes: elastic#113573 In the Kibana features of the role, under the Security catalog, both Security and Cases features need to be `none` for the Security Solution plugin to be disabled. Otherwise, we must enable the plugin and make the enabled features available. So, with a role with the following Kibana features: <img width="737" alt="Security disabled cases enabled" src="https://github.com/user-attachments/assets/aca8288e-9dd9-49d0-b864-e60273d30759"> The Security app needs to be available and display only Cases available: <img width="247" alt="navigation with only cases" src="https://github.com/user-attachments/assets/d4866edb-1d1d-4290-a399-76a37536b05c"> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit e373e44)
Summary
We rename the
plugins.home.featureCatalogue.registerSolution({id
to a new ID like that kibana core is not controlling the magic to hide/show the security solution app dependently of its privileges. Since we have different applications under the same application id like cases, security( management, timelines etc ...) with different privileges likecases
andsecurity
.#112980 (review)
One thing I did notice that is slightly different behavior than before is that a user can have cases
read
orall
and not havesecurity
and they will not be able to access cases because the entire security plugin will be disabled.This is slightly different from how it worked as a sub feature because it was not possible to grant cases privileges when the
security
privilege was set tonone
The toggle is grayed out:
Checklist