Expand description
Kanidm token mint, verify and revoke executors. Kanidm token executors: list, mint, verify and revoke.
These perform the effects the pure planner (super::token) decides on.
They never choose what to do: minting happens only for a
CurrentToken::Mint plan, revoking only for ids in a plan computed from a
fresh observation (see the planner’s module docs).
Bearer tokens are write-only and shown once by Kanidm. Bearer holds
one without Display, Serialize or a revealing Debug, so it cannot
reach a log line or event by accident; call Bearer::expose only to
write the config Secret or authenticate a verification session.
Structs§
- Bearer
- A Kanidm bearer token. Deliberately opaque: see the module docs.
- Minted
Token - A freshly minted, not yet verified or stored token.
- Verify
Retry - How
verify_tokenretries. Right after a mint, a Kanidm replica other than the one that issued the token may not know it yet.
Enums§
- Revoke
Outcome - What
revoke_tokendid.
Functions§
- find_
minted_ token - Find the one token carrying
labelthat was not inbefore. - list_
tokens - Tokens currently on the account.
- mint_
token - Mint a read-only token on the (already ownership-verified) account.
- new_
token_ label - A unique label for one mint. The account is dedicated to one CR UID, so the label is informational (it names the issuer in Kanidm’s UI) and the uniqueness only serves to find the new token’s id after the call.
- revoke_
token - Revoke one token by id. A token that is already gone is success, so the call is idempotent across retries and concurrent reconciles.
- verify_
token - Promotion gate: authenticate to Kanidm with the candidate token
alone.
KanidmClient::new_sessioncopies the cached client’s address and TLS settings but not its bearer, so a success proves the candidate itself.