security-dashboards-plugin
security-dashboards-plugin copied to clipboard
[FEATURE] Improve Create Action Group UX to ensure valid action groups are created
The current user interface for creating action groups in the OpenSearch Security plugin allows for the combination of actions from different categories within a single group. These categories are:
- cluster_permissions
- index_permissions
- tenant_permissions
Ideally, all actions within a single action group should belong to the same category. Although it's technically possible to mix action types in a group, this practice is ineffective for role assignment purposes. Only actions belonging to the category relevant to the role's section will be acknowledged during authorization checks.
For example, consider an action group that includes both a cluster action (cluster:monitor/health) and an index action (indices:data/read/search). To utilize all permissions in this action group, it must be assigned to both the cluster_permissions and index_permissions sections of a role. If this action group is only assigned to the cluster_permissions section, then the index actions in the group will not be effective.
Here's an example of how a role is defined:
example_role:
reserved: true
hidden: false
static: true
description: "Example role"
cluster_permissions:
- "<list_of_allowed_cluster_actions_or_action_groups>"
index_permissions:
- index_patterns:
- "*"
allowed_actions:
- "<list_of_allowed_index_actions_or_action_groups>"
tenant_permissions:
- tenant_patterns:
- "*"
allowed_actions:
- "kibana_all_write | kibana_all_read"
This structure implies that when defining roles, careful attention should be paid to the categorization of actions in action groups to ensure effective permission assignments.
[Triage] Hi @cwperks, thank you for adding this issue. This seems like a worthwhile change. We can always get specific UX/UI input but in the meantime you idea seems reasonable and like a good improvement. Let's mark this as triaged, and help wanted/ good first issue. Thanks :)