-
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][Endpoint][Response Actions] Show Actions history on Endpoint Details for platinum users #145837
[Security Solution][Endpoint][Response Actions] Show Actions history on Endpoint Details for platinum users #145837
Conversation
d016de4
to
f5ecbf1
Compare
Endpoint details flyout should show response actions history tab for platinum+ users with Actions Log management RBAC permission. fixes elastic/security-team/issues/5489
a26ca5a
to
d043c42
Compare
Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt) |
@@ -38,7 +38,7 @@ jest.mock('../../services'); | |||
const mockGetActionList = getActionList as jest.Mock; | |||
const mockGetActionListByStatus = getActionListByStatus as jest.Mock; | |||
|
|||
describe(' Action List Handler', () => { |
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.
cleaned up typo here
@@ -223,6 +225,7 @@ export const calculateEndpointAuthz = ( | |||
canReadPolicyManagement, | |||
canWriteActionsLogManagement, | |||
canReadActionsLogManagement: canReadActionsLogManagement && isEnterpriseLicense, | |||
canAccessEndpointActionsLogManagement: canReadActionsLogManagement && isPlatinumPlusLicense, |
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.
Maybe we could name this canAccessEndpointListActionsLog
? @paul-tavares.
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.
I'm ok introducing the additional property, but can we name it consistency with how other are named? So in this case, it would be something like canReadSingleEndpointAcitonLog
(notice I also renamed it a bit).
Also, looking at this change, are we saying that Action logs can be seen in Endpoint Details panel if license is Platinum++, but Action Log page is Enterprise?
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.
Actually - never mind. I think the naming you created is good. I see there is precedence. Sorry for the noise.
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @ashokaditya |
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.
LGTM!
@@ -138,8 +139,7 @@ jest.mock('../../hooks/response_actions/use_get_file_info', () => { | |||
|
|||
const mockUseGetEndpointsList = useGetEndpointsList as jest.Mock; | |||
|
|||
// FLAKY https://github.com/elastic/kibana/issues/145635 | |||
describe.skip('Response actions history', () => { | |||
describe('Response actions history', () => { |
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.
Assuming these tests (and the others below) are not flaky anymore because these changes.
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.
LGTM.
I have some question around the APIs/UI side and the intersection between Enterprise license and Platinum+ but I think our discussion offline helped.
👍
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…on Endpoint Details for platinum users (elastic#145837) ## Summary Fixes a bug where response actions history was not shown for platinum users with Actions Log RBAC privileges. ### Checklist - [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 - [x] 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) (cherry picked from commit 7e5c361) # Conflicts: # x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts # x-pack/plugins/security_solution/public/management/pages/integration_tests/index.test.tsx # x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts
…story on Endpoint Details for platinum users (#145837) (#145890) # Backport This will backport the following commits from `main` to `8.6`: - [[Security Solution][Endpoint][Response Actions] Show Actions history on Endpoint Details for platinum users (#145837)](#145837) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ashokaditya","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-11-21T15:33:03Z","message":"[Security Solution][Endpoint][Response Actions] Show Actions history on Endpoint Details for platinum users (#145837)\n\n## Summary\r\n\r\nFixes a bug where response actions history was not shown for platinum\r\nusers with Actions Log RBAC privileges.\r\n\r\n### Checklist\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\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"7e5c361e3820ca9831bc25b6fb50e75a3010b318","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:fix","Team:Onboarding and Lifecycle Mgt","OLM Sprint","v8.6.0","v8.7.0"],"number":145837,"url":"https://github.com/elastic/kibana/pull/145837","mergeCommit":{"message":"[Security Solution][Endpoint][Response Actions] Show Actions history on Endpoint Details for platinum users (#145837)\n\n## Summary\r\n\r\nFixes a bug where response actions history was not shown for platinum\r\nusers with Actions Log RBAC privileges.\r\n\r\n### Checklist\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\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"7e5c361e3820ca9831bc25b6fb50e75a3010b318"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145837","number":145837,"mergeCommit":{"message":"[Security Solution][Endpoint][Response Actions] Show Actions history on Endpoint Details for platinum users (#145837)\n\n## Summary\r\n\r\nFixes a bug where response actions history was not shown for platinum\r\nusers with Actions Log RBAC privileges.\r\n\r\n### Checklist\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\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"7e5c361e3820ca9831bc25b6fb50e75a3010b318"}}]}] BACKPORT-->
Summary
Fixes a bug where response actions history was not shown for platinum users with Actions Log RBAC privileges.
Checklist
For maintainers