Expand description
Kanidm account naming, ownership-checked ensure and delete. Deterministic Kanidm identity for individual RADIUS custom resources, and the executors that ensure and delete it.
A Kubernetes object name is reusable after deletion. Kanidm accounts live outside Kubernetes garbage collection, so using only namespace/name would accidentally adopt a previous or unrelated account after recreation. Instead the immutable Kubernetes UID identifies the account. Always inspect existing account ownership metadata before updating it; a matching computed name alone must never authorize adoption.
Each CR owns exactly one account, joined to the built-in
idm_radius_servers group additively: only this account’s membership
edge is ever added or removed, never group_set_members, which could
revoke unrelated RADIUS instances. Deleting the account removes every
token on it. Call the executors only after namespace authorization, the
restore guard and input validation.
Structs§
- Identity
Outcome - What
ensure_identitychanged. - Radius
Identity
Enums§
- Account
State - What exists in Kanidm under this identity’s account name.
- Delete
Outcome - What
delete_identityfound and did. - Radius
Identity Error
Constants§
- RADIUS_
GROUP - Built-in Kanidm group whose members may act as RADIUS servers.
Functions§
- account_
state - Classify a fetched account. Only the exact marker authorizes use; never update an existing account to make it match (silent adoption).
- delete_
identity - Remove exactly this CR’s membership edge, then delete its account. Call
only after the workload has drained. An account without our marker is
ExecError::AccountNotOwnedand is left untouched (the finalizer turns that into a skip with a Warning event). - ensure_
identity - Ensure the per-CR account (created, never adopted) and its own membership
edge in
idm_radius_servers. Mints, rotates and revokes nothing. - is_
member - Is
accountin amemberattribute list (names or SPNs)?