-
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][Investigations] - Add check for changing alert status from bulk options #169723
[Security Solution][Investigations] - Add check for changing alert status from bulk options #169723
Conversation
f5fde4e
to
2010f05
Compare
}); | ||
}); | ||
|
||
context('Marking alerts as acknowledged', () => { | ||
context('User is readonly', () => { |
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.
These are the newly added tests, the other changes are just moving code to an encapsulated space
bef0656
to
d24ef5e
Compare
Excellent PR Mike! |
0c04ab9
to
749b3cd
Compare
@elasticmachine merge upstream |
1 similar comment
@elasticmachine merge upstream |
950578f
to
077760d
Compare
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.
Thanks @michaelolo24 for these changes. PR looks good. I just add one question.
}); | ||
|
||
it('should not allow users to change a single alert status', () => { | ||
cy.get(TIMELINE_CONTEXT_MENU_BTN).should('not.exist'); |
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.
This will remove complete context menu btn? Are other actions such as Run Osquery
, Add to Case
, etc are also not allowed?
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 need to update the role used. The Roles.reader
affects those as well. Wanted to avoid creating another user, but maybe it's worth it... 🤷🏾♂️
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.
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.
@yctercero looking at it now. Reader may still be the most accurate. I don't know if there's really a defined role that has cases and osquery write access, but not alert status access?
@elasticmachine merge upstream |
201e57f
to
a67e86a
Compare
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.
Pulled down and confirmed change. Thanks! LGTM
f30cff8
to
0a4a80b
Compare
0a4a80b
to
338d041
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Closing this PR for now as there seems to be issues with utilizing the viewer role. Will re-open a more trimmed down PR. Sorry for the noise! |
…atus from bulk options (#170584) ## Summary Addresses #169684 This PR is a re-do of: #169723 (With cypress tests currently skipped until proper role is available). The alert privileges needs to be added for the alert table as it wasn't added when the migration took place. An example of the privileges elsewhere is below: https://github.com/elastic/kibana/blob/75e9d46b4b3a6ff5be4ffc324ba282cea0faea0c/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx#L33 Fix: https://github.com/elastic/kibana/assets/17211684/7b354906-9b96-4ba8-b30f-4080cf7e7c2f --------- Co-authored-by: Kibana Machine <[email protected]>
…atus from bulk options (elastic#170584) ## Summary Addresses elastic#169684 This PR is a re-do of: elastic#169723 (With cypress tests currently skipped until proper role is available). The alert privileges needs to be added for the alert table as it wasn't added when the migration took place. An example of the privileges elsewhere is below: https://github.com/elastic/kibana/blob/75e9d46b4b3a6ff5be4ffc324ba282cea0faea0c/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx#L33 Fix: https://github.com/elastic/kibana/assets/17211684/7b354906-9b96-4ba8-b30f-4080cf7e7c2f --------- Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 3651571) # Conflicts: # x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts
…atus from bulk options (elastic#170584) ## Summary Addresses elastic#169684 This PR is a re-do of: elastic#169723 (With cypress tests currently skipped until proper role is available). The alert privileges needs to be added for the alert table as it wasn't added when the migration took place. An example of the privileges elsewhere is below: https://github.com/elastic/kibana/blob/75e9d46b4b3a6ff5be4ffc324ba282cea0faea0c/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx#L33 Fix: https://github.com/elastic/kibana/assets/17211684/7b354906-9b96-4ba8-b30f-4080cf7e7c2f --------- Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 3651571) # Conflicts: # x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts
…lert status from bulk options (#170584) (#170780) # Backport This will backport the following commits from `main` to `8.11`: - [[Security Solution][Investigations] - Add check for changing alert status from bulk options (#170584)](#170584) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Michael Olorunnisola","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-11-07T17:01:23Z","message":"[Security Solution][Investigations] - Add check for changing alert status from bulk options (#170584)\n\n## Summary\r\nAddresses https://github.com/elastic/kibana/issues/169684\r\n\r\nThis PR is a re-do of: https://github.com/elastic/kibana/pull/169723\r\n(With cypress tests currently skipped until proper role is available).\r\nThe alert privileges needs to be added for the alert table as it wasn't\r\nadded when the migration took place. An example of the privileges\r\nelsewhere is below:\r\n\r\nhttps://github.com/elastic/kibana/blob/75e9d46b4b3a6ff5be4ffc324ba282cea0faea0c/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx#L33\r\n\r\n\r\nFix:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/17211684/7b354906-9b96-4ba8-b30f-4080cf7e7c2f\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"36515713a69f6021db8b959b95f7a8ff851b0aa7","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Threat Hunting:Investigations","v8.12.0","v8.11.1","v8.10.5"],"number":170584,"url":"https://github.com/elastic/kibana/pull/170584","mergeCommit":{"message":"[Security Solution][Investigations] - Add check for changing alert status from bulk options (#170584)\n\n## Summary\r\nAddresses https://github.com/elastic/kibana/issues/169684\r\n\r\nThis PR is a re-do of: https://github.com/elastic/kibana/pull/169723\r\n(With cypress tests currently skipped until proper role is available).\r\nThe alert privileges needs to be added for the alert table as it wasn't\r\nadded when the migration took place. An example of the privileges\r\nelsewhere is below:\r\n\r\nhttps://github.com/elastic/kibana/blob/75e9d46b4b3a6ff5be4ffc324ba282cea0faea0c/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx#L33\r\n\r\n\r\nFix:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/17211684/7b354906-9b96-4ba8-b30f-4080cf7e7c2f\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"36515713a69f6021db8b959b95f7a8ff851b0aa7"}},"sourceBranch":"main","suggestedTargetBranches":["8.11","8.10"],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/170584","number":170584,"mergeCommit":{"message":"[Security Solution][Investigations] - Add check for changing alert status from bulk options (#170584)\n\n## Summary\r\nAddresses https://github.com/elastic/kibana/issues/169684\r\n\r\nThis PR is a re-do of: https://github.com/elastic/kibana/pull/169723\r\n(With cypress tests currently skipped until proper role is available).\r\nThe alert privileges needs to be added for the alert table as it wasn't\r\nadded when the migration took place. An example of the privileges\r\nelsewhere is below:\r\n\r\nhttps://github.com/elastic/kibana/blob/75e9d46b4b3a6ff5be4ffc324ba282cea0faea0c/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx#L33\r\n\r\n\r\nFix:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/17211684/7b354906-9b96-4ba8-b30f-4080cf7e7c2f\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"36515713a69f6021db8b959b95f7a8ff851b0aa7"}},{"branch":"8.11","label":"v8.11.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.5","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Kibana Machine <[email protected]>
Summary
Addresses #169684
The alert privileges need to be added for the alert table as it wasn't added when the migration took place. An example of the privileges elsewhere is below:
kibana/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx
Line 33 in 75e9d46
Fix:
Screen.Recording.2023-10-25.at.12.24.18.PM.mov