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] Update session viewer Policy permissions to use Policy specific check #160448

Merged
merged 3 commits into from Jul 3, 2023

Conversation

kevinlog
Copy link
Contributor

@kevinlog kevinlog commented Jun 23, 2023

Summary

This PR updates the session viewer code to use the canReadPolicyManagement permission as opposed to canAccessEndpointManagement. This is because canAccessEndpointManagement requires super user permissions while canReadPolicyManagement which is a more specific permission.

Checklist

@kevinlog kevinlog added Team:Defend Workflows “EDR Workflows” sub-team of Security Solution release_note:fix v8.9.0 v8.10.0 labels Jun 23, 2023
@kevinlog kevinlog marked this pull request as ready for review June 23, 2023 19:19
@kevinlog kevinlog requested a review from a team as a code owner June 23, 2023 19:19
@kevinlog kevinlog requested a review from a team June 23, 2023 19:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Investigations - Security Solution Tests #2 / Detections : Page Filters Alert list is updated when the alerts are updated
  • [job] [logs] Investigations - Security Solution Tests #2 / Detections : Page Filters Impact of inputs should recover from invalide kql Query result

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 11.0MB 11.0MB -8.0B
sessionView 391.1KB 391.1KB -12.0B
total -20.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 14 16 +2
securitySolution 416 420 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 15 17 +2
securitySolution 497 501 +4
total +6

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

Copy link
Contributor

@mitodrummer mitodrummer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kevinlog kevinlog merged commit 6a9e8d4 into main Jul 3, 2023
33 checks passed
@kevinlog kevinlog deleted the task/update-sessions-view-policy-permissions branch July 3, 2023 16:53
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 3, 2023
…olicy specific check (elastic#160448)

## Summary

This PR updates the session viewer code to use the
`canReadPolicyManagement ` permission as opposed to
`canAccessEndpointManagement`. This is because
`canAccessEndpointManagement` requires super user permissions while
`canReadPolicyManagement` which is a more specific permission.

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 6a9e8d4)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.9

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 3, 2023
… use Policy specific check (#160448) (#161127)

# Backport

This will backport the following commits from `main` to `8.9`:
- [[Security Solution] Update session viewer Policy permissions to use
Policy specific check
(#160448)](#160448)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Logan","email":"56395104+kevinlog@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-07-03T16:53:46Z","message":"[Security
Solution] Update session viewer Policy permissions to use Policy
specific check (#160448)\n\n## Summary\r\n\r\nThis PR updates the
session viewer code to use the\r\n`canReadPolicyManagement ` permission
as opposed to\r\n`canAccessEndpointManagement`. This is
because\r\n`canAccessEndpointManagement` requires super user permissions
while\r\n`canReadPolicyManagement` which is a more specific
permission.\r\n\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---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6a9e8d422cc1e27089615429152b175f075790a7","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Defend
Workflows","v8.9.0","v8.10.0"],"number":160448,"url":"#160448
Solution] Update session viewer Policy permissions to use Policy
specific check (#160448)\n\n## Summary\r\n\r\nThis PR updates the
session viewer code to use the\r\n`canReadPolicyManagement ` permission
as opposed to\r\n`canAccessEndpointManagement`. This is
because\r\n`canAccessEndpointManagement` requires super user permissions
while\r\n`canReadPolicyManagement` which is a more specific
permission.\r\n\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---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6a9e8d422cc1e27089615429152b175f075790a7"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"#160448
Solution] Update session viewer Policy permissions to use Policy
specific check (#160448)\n\n## Summary\r\n\r\nThis PR updates the
session viewer code to use the\r\n`canReadPolicyManagement ` permission
as opposed to\r\n`canAccessEndpointManagement`. This is
because\r\n`canAccessEndpointManagement` requires super user permissions
while\r\n`canReadPolicyManagement` which is a more specific
permission.\r\n\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---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6a9e8d422cc1e27089615429152b175f075790a7"}}]}]
BACKPORT-->

Co-authored-by: Kevin Logan <56395104+kevinlog@users.noreply.github.com>
adcoelho pushed a commit to adcoelho/kibana that referenced this pull request Jul 4, 2023
…olicy specific check (elastic#160448)

## Summary

This PR updates the session viewer code to use the
`canReadPolicyManagement ` permission as opposed to
`canAccessEndpointManagement`. This is because
`canAccessEndpointManagement` requires super user permissions while
`canReadPolicyManagement` which is a more specific permission.


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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:fix Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.9.0 v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants