-
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
Add configurations to enable/disable individual built-in action types #52326
Comments
Pinging @elastic/kibana-stack-services (Team:Stack Services) |
The function sounds good, but we should base the action names on the names provided by the action type specifically, that way we can easily handle other action types other than the built-in ones provided by the action plugin. I think. If this stays in One interesting twist with this is that our current action names all start with I think we should also consider whether we want this in |
As an alternative, we could allow the config to be an array of action types that are disabled (default is they're enabled). |
There is one drawback that came to mind. If ever we provide a default list of disabled action types and the user overwrites with |
Ya, so thinking if we do a list, it should be a list of action types that enabled, allowing for Then folks who want to lock down the action types would change that value to the list of action types to enable, other action types would be disabled. The upside here is that there is no surprise at upgrade time - they had a list of action types enabled, and that list will STILL be enabled, the ones they didn't enable STILL aren't enabled, and new action types will NOT be enabled, which I think is what the expectation would be. I think we'd want to validate the action types entered and warn if they list an action type we don't know of. |
from #52326 (comment)
I'm guessing that may be hard - if they previously had created actions with an enabled action type, and then disabled that action type and restarted, we may have issues when those actions get touched by various things. Feels safer to do the following for "disabled" action types:
That would still allow:
So, cRUDx. The reason I left update in the allowed list, is you could imagine someone wanting to rename the action, and it seems silly to not allow that. It also feels like we'll want to provide some kind of live "enabled" state on actions themselves, where if the action type is disabled, this "enabled" state would return "false". But we'd also like a "reason". An action could be disabled because it no longer validates (say after an export/import and it lost it's credentials). Will need to noodle on that a bit more, but feels like:
Feels pretty gross, and of course it could be disabled for MULTIPLE reasons ... I think we'll also need to augment the service/http API that returns the list of action types to return the disabled state. |
I think failing actions are OK. Preventing action types from executing is the purpose of the config. If connectors and actions of that type have been created already, then the type is disabled, the alerts and connectors should error. It's definitely a blunt instrument, but I think we should keep it simple and support the use case of the server administrator who wants to lock down the types of actions that can be run. As for whitelist vs blacklist approach, I agree with @pmuellr using whitelist with a default of *. That supports getting new types on upgrade by default, while avoiding upgrade surprises when you have an explicit list and new types are added. |
++ makes sense to me as well. |
…Types (elastic#52967) * adds per-actionType enablement via config xpack.actions.enabledTypes resolves: elastic#52326
As a security control for server administrators, provide the ability to enable/disable built-in action types in kibana.yml. For example:
xpack.actions.webhook.enabled
xpack.actions.email.enabled
xpack.actions.slack.enabled
xpack.actions.pagerduty.enabled
xpack.actions.index.enabled
xpack.actions.serverlog.enabled
Disabling an action would prevent it from being registered in
x-pack/legacy/plugins/actions/server/builtin_action_types/index.ts
We should consider if we want to expose settings for all action types. Some apps may expect built-in types to be available, and we create the edge case where all of them may be disabled, effectively disabling alerting altogether.
At a minimum I think we should expose
xpack.actions.webhook.enabled
because of the potential for webhooks to be used for SSRF, it is the mostly likely one people may want to disable.This may impact the configurations we need to whitelist in cloud #51205
The text was updated successfully, but these errors were encountered: