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] [Bug] Alerts allow write actions to read-only users #171905

Closed
semd opened this issue Nov 24, 2023 · 4 comments
Closed

[Security Solution] [Bug] Alerts allow write actions to read-only users #171905

semd opened this issue Nov 24, 2023 · 4 comments
Labels
bug Fixes for quality problems that affect the customer experience impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team

Comments

@semd
Copy link
Contributor

semd commented Nov 24, 2023

Describe the bug:

Alerts write actions are available and working for roles without write Security feature privilege.

Steps to reproduce:

  1. Open an ESS (non-serverless) instance.
  2. Create a role with all index and kibana privileges, except for read access to Security in the Kibana privileges.
  3. Using the new role go to the Alerts page, select an alert, go to "Selected Alerts".

Current behavior:
Open, close, ack, and alert tags are all available

Expected behavior:
Open, close, ack, and alert tags should be hidden

Additional information:

Related to this issue: #169684

The fix does not check the Kibana feature privileges, which is necessary to prevent the authorization bug. The current logic is checking index privileges only, which is actually not strictly necessary, since ES itself will reject write operations to the index if the write privilege is not granted, and the error would pop up in the UI.

Screenshots:

Role definition:

role_definition

Demo:

alerts_bug_readonly_privilege.mov
@semd semd added bug Fixes for quality problems that affect the customer experience impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team labels Nov 24, 2023
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@semd
Copy link
Contributor Author

semd commented Nov 30, 2023

Talked with @yctercero about this, the permissions table in the the docs states that only the Read Kibana privilege is required for Security feature in order to "manage alerts".

This means that a Security read-only user is allowed to update alerts (status, tags, assignments...), it is the expected behavior. So according to the docs, this issue is not a bug.

However, I would like to understand why are we applying this special behavior here, because this criteria is inconsistent with the privilege checks we do in the rest of the Security application.

If there's no special reason I think we should consider changing that behavior to be consistent, and update the docs.

cc @paulewing

@semd
Copy link
Contributor Author

semd commented Nov 30, 2023

Discussed with @paulewing.
It seems this criteria was put in place to allow Analyst users to manage alerts, but not to manage rules.

In a perfect world ✨, this behavior should be accomplished using a Kibana sub-feature for alerts (or rules) management, but since we are still not able to migrate roles due to an architectural limitation, extracting "alert management" into a new sub-feature would result in the introduction of breaking changes in the RBAC system for existing users, so the Read Kibana privilege was (miss)used instead to achieve the same behavior.

Nonetheless, the Security (Kibana Platform) team has plans to provide a way to migrate existing roles in the mid-term (issue), when this is available it would be great to revisit this topic, and add more granularity to the Security RBAC system, having sub-features for key functionalities such as alerts, timelines, rules, and so on.

closing this issue.

@semd semd closed this as completed Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Investigations Security Solution Investigations Team
Projects
None yet
Development

No branches or pull requests

3 participants