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] Disable installation button for users with Security:Read privileges #176598

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

jpdjere
Copy link
Contributor

@jpdjere jpdjere commented Feb 9, 2024

Fixes: #161543

Summary

Original bug issue reported an infinite loading state in the Add Elastic rules page when user doesn't have write privileges, i.e. has Security: Read.

However, that seems to have been fixed already, as the list of rules to install is shown, but no individual "Install button" for each row is showed. This is expected behaviour.

image

However, when displaying the Rule Details flyout, the button for Installation in the flyout is still enabled due to missing checks. This PR fixes that and now displays a disabled button for users with no privileges.

image

For maintainers

@jpdjere jpdjere added release_note:fix Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules v8.12.0 8.13 candidate v8.13.0 labels Feb 9, 2024
@jpdjere jpdjere self-assigned this Feb 9, 2024
@jpdjere jpdjere requested a review from a team as a code owner February 9, 2024 14:20
@jpdjere jpdjere requested a review from maximpn February 9, 2024 14:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

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

LGTM

@jpdjere jpdjere enabled auto-merge (squash) February 9, 2024 16:43
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Investigations - Security Solution Cypress Tests #7 / Basic esql search and filter operations "before each" hook for "should remove the query when the back button is pressed after adding a query" "before each" hook for "should remove the query when the back button is pressed after adding a query"

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.4MB 11.4MB +49.0B

History

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

cc @jpdjere

@jpdjere jpdjere merged commit c3c1b66 into elastic:main Feb 9, 2024
36 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 9, 2024
…ty:Read privileges (elastic#176598)

Fixes: elastic#161543

## Summary

Original bug issue reported an infinite loading state in the **Add
Elastic rules** page when user doesn't have write privileges, i.e. has
`Security: Read`.

However, that seems to have been fixed already, as the list of rules to
install is shown, but no individual "Install button" for each row is
showed. **This is expected behaviour**.

![image](https://github.com/elastic/kibana/assets/5354282/f57adc2b-9073-4019-a15e-8c05e48f1b9d)

However, when displaying the Rule Details flyout, the button for
Installation in the flyout is still enabled due to missing checks. This
PR fixes that and now displays a disabled button for users with no
privileges.

![image](https://github.com/elastic/kibana/assets/5354282/70a6b209-59bb-4199-99f9-f2222fb78d68)

### For maintainers

- [ ] 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 c3c1b66)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.12

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 Feb 9, 2024
… Security:Read privileges (#176598) (#176616)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Security Solution] Disable installation button for users with
Security:Read privileges
(#176598)](#176598)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Juan Pablo
Djeredjian","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-09T16:47:13Z","message":"[Security
Solution] Disable installation button for users with Security:Read
privileges (#176598)\n\nFixes:
https://github.com/elastic/kibana/issues/161543\r\n\r\n##
Summary\r\n\r\nOriginal bug issue reported an infinite loading state in
the **Add\r\nElastic rules** page when user doesn't have write
privileges, i.e. has\r\n`Security: Read`.\r\n\r\nHowever, that seems to
have been fixed already, as the list of rules to\r\ninstall is shown,
but no individual \"Install button\" for each row is\r\nshowed. **This
is expected
behaviour**.\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/5354282/f57adc2b-9073-4019-a15e-8c05e48f1b9d)\r\n\r\nHowever,
when displaying the Rule Details flyout, the button for\r\nInstallation
in the flyout is still enabled due to missing checks. This\r\nPR fixes
that and now displays a disabled button for users with
no\r\nprivileges.\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/5354282/70a6b209-59bb-4199-99f9-f2222fb78d68)\r\n\r\n###
For maintainers\r\n\r\n- [ ] 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":"c3c1b667c1de1aa36955528098ce0be15e7272b1","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection Rules","v8.12.0","8.13
candidate","v8.13.0"],"title":"[Security Solution] Disable installation
button for users with Security:Read
privileges","number":176598,"url":"https://github.com/elastic/kibana/pull/176598","mergeCommit":{"message":"[Security
Solution] Disable installation button for users with Security:Read
privileges (#176598)\n\nFixes:
https://github.com/elastic/kibana/issues/161543\r\n\r\n##
Summary\r\n\r\nOriginal bug issue reported an infinite loading state in
the **Add\r\nElastic rules** page when user doesn't have write
privileges, i.e. has\r\n`Security: Read`.\r\n\r\nHowever, that seems to
have been fixed already, as the list of rules to\r\ninstall is shown,
but no individual \"Install button\" for each row is\r\nshowed. **This
is expected
behaviour**.\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/5354282/f57adc2b-9073-4019-a15e-8c05e48f1b9d)\r\n\r\nHowever,
when displaying the Rule Details flyout, the button for\r\nInstallation
in the flyout is still enabled due to missing checks. This\r\nPR fixes
that and now displays a disabled button for users with
no\r\nprivileges.\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/5354282/70a6b209-59bb-4199-99f9-f2222fb78d68)\r\n\r\n###
For maintainers\r\n\r\n- [ ] 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":"c3c1b667c1de1aa36955528098ce0be15e7272b1"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176598","number":176598,"mergeCommit":{"message":"[Security
Solution] Disable installation button for users with Security:Read
privileges (#176598)\n\nFixes:
https://github.com/elastic/kibana/issues/161543\r\n\r\n##
Summary\r\n\r\nOriginal bug issue reported an infinite loading state in
the **Add\r\nElastic rules** page when user doesn't have write
privileges, i.e. has\r\n`Security: Read`.\r\n\r\nHowever, that seems to
have been fixed already, as the list of rules to\r\ninstall is shown,
but no individual \"Install button\" for each row is\r\nshowed. **This
is expected
behaviour**.\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/5354282/f57adc2b-9073-4019-a15e-8c05e48f1b9d)\r\n\r\nHowever,
when displaying the Rule Details flyout, the button for\r\nInstallation
in the flyout is still enabled due to missing checks. This\r\nPR fixes
that and now displays a disabled button for users with
no\r\nprivileges.\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/5354282/70a6b209-59bb-4199-99f9-f2222fb78d68)\r\n\r\n###
For maintainers\r\n\r\n- [ ] 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":"c3c1b667c1de1aa36955528098ce0be15e7272b1"}}]}]
BACKPORT-->

Co-authored-by: Juan Pablo Djeredjian <[email protected]>
@banderror banderror removed the v8.12.0 label Feb 9, 2024
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
…ty:Read privileges (elastic#176598)

Fixes: elastic#161543

## Summary

Original bug issue reported an infinite loading state in the **Add
Elastic rules** page when user doesn't have write privileges, i.e. has
`Security: Read`.

However, that seems to have been fixed already, as the list of rules to
install is shown, but no individual "Install button" for each row is
showed. **This is expected behaviour**.


![image](https://github.com/elastic/kibana/assets/5354282/f57adc2b-9073-4019-a15e-8c05e48f1b9d)

However, when displaying the Rule Details flyout, the button for
Installation in the flyout is still enabled due to missing checks. This
PR fixes that and now displays a disabled button for users with no
privileges.


![image](https://github.com/elastic/kibana/assets/5354282/70a6b209-59bb-4199-99f9-f2222fb78d68)

### For maintainers

- [ ] 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)
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
…ty:Read privileges (elastic#176598)

Fixes: elastic#161543

## Summary

Original bug issue reported an infinite loading state in the **Add
Elastic rules** page when user doesn't have write privileges, i.e. has
`Security: Read`.

However, that seems to have been fixed already, as the list of rules to
install is shown, but no individual "Install button" for each row is
showed. **This is expected behaviour**.


![image](https://github.com/elastic/kibana/assets/5354282/f57adc2b-9073-4019-a15e-8c05e48f1b9d)

However, when displaying the Rule Details flyout, the button for
Installation in the flyout is still enabled due to missing checks. This
PR fixes that and now displays a disabled button for users with no
privileges.


![image](https://github.com/elastic/kibana/assets/5354282/70a6b209-59bb-4199-99f9-f2222fb78d68)

### For maintainers

- [ ] 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.13 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules release_note:fix Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.12.2 v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution] Infinite loading state on the rule install page when user doesn't have write privileges
6 participants