Module group

Module group 

Source
Expand description

HSM group CRUD operations and membership management.

Backs the /groups family of handlers. Every public function gates access through crate::service::authorization before reaching the backend so callers can only see and mutate groups their JWT grants them.

Membership operations (add_nodes_to_group, delete_group_members) resolve a hosts expression via node_ops::from_user_hosts_expression_to_xname_vec first and re-validate per-xname group access before issuing per-node backend writes — the resolver runs against full cluster metadata so the caller-supplied expression may name nodes outside their reach.

Structs§

GetGroupParams
Typed parameters for fetching HSM groups.

Functions§

add_nodes_to_group
Resolve hosts_expression and add the resulting nodes to the existing HSM group target_hsm_name.
create_group
Create the HSM group described by group.
delete_group
Delete the HSM group named label.
delete_group_members
Resolve host_expression and remove the resolved nodes from group_name.
get_available_groups
List the group names accessible to the caller.
get_groups
List HSM groups visible to the caller.
resolve_target_and_available_groups
Resolve the caller’s accessible groups (Vec<Group>) and the target-label vector in a single backend round-trip.
validate_group_deletion
Check that deleting label would not leave any node without a group.