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§
- GetGroup
Params - Typed parameters for fetching HSM groups.
Functions§
- add_
nodes_ to_ group - Resolve
hosts_expressionand add the resulting nodes to the existing HSM grouptarget_hsm_name. - create_
group - Create the HSM group described by
group. - delete_
group - Delete the HSM group named
label. - delete_
group_ members - Resolve
host_expressionand remove the resolved nodes fromgroup_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
labelwould not leave any node without a group.