-
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] Bulk actions and Custom rules got disabled when custom user have "NONE" access of actions and connectors. #141050
Comments
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Great catch @karanverma-qasource, thank you! Some other observations made under a user with the mentioned privileges: Enable/disable switch is disabled on the Details page because The Edit rule settings button is disabled because A rule without any actions can't be enabled/disabled from the Details page, while can be from the Rules page: |
As we figured out with @XavierM, the root cause of this bug is related to Alerting Framework's RBAC. In particular, it relates to the fact that Alerting Framework updates the API key of a rule on every rule modification (except enable/disable since 8.3 (#131581)). The regenerated API key corresponds to the user that initiated this rule modification. In turn, if this user has different privileges than the user that this rule was associated with before the modification, this can lead to unintended consequences:
Now, this specific UI behavior looks to be intentional. We disable all the bulk actions and also single actions if the user doesn't have We could try to add more checks to our code and handle some of the cases on our side, but it would be workarounds that we decided not to introduce at this point. We should instead address the fundamental problem with API keys on the Framework side, e.g. execute rules on behalf of service accounts instead of user accounts, so that user modifications don't change the rules' privileges. UPD: mentioned that since 8.3 enabling or disabling a rule does not regenerate the rule's API key: #131581 |
Since 8.3, I believe you can bulk enable / disable rules without it regenerating the API Key. However if no API Key exists, for example directly after a bulk import of new disabled rules, then one will be assigned the first time the rule is enabled. It is existing behaviour that the API Key will be regenerated on every rule edit and the ability to edit rules is expected to be restricted to users who are also authorized to execute them. Use of "Service Accounts" is appealing, however this is a larger piece of work as it also requires the ability to manage, maintain and audit service accounts. This would be a useful platform feature and not limited to rule execution. There are several areas discussing this but afaik this is not yet in development. (cc @bytebilly for visibility) In the short term, it would be advisable to limit the ability to edit rules to users who are also authorised to execute them. -- the comment above seems to contradict this wrt to bulk disable/enable. Is this a regression? |
@sophiec20 Oh, I was not aware of the improvement made in 8.3. That's great! I don't think we have a regression. |
Describe the bug:
Bulk actions and Custom rules got disabled when custom user have "NONE" access of actions and connectors.
Build Details:
Preconditions:
Steps to Reproduce:
Expected Result:
Bulk actions should be enabled and rule also should be enabled.
Actual Result:
Bulk actions and rule are disabled.
Screenshots:

The text was updated successfully, but these errors were encountered: