Skip to main content

Module token

Module token 

Source
Expand description

astrs token mint (blueprint §16, §22).

  astrs token mint --scope mutate   -> the root token itself (back-compat)
  astrs token mint --scope read     -> the HKDF-derived read-scope token

Purely local: unlike every other verb in command/, minting never dials a coordinator — it only needs the root secret already on this machine (resolved exactly like every coordinator-facing verb resolves one, via crate::runtime_dir::find_token), and the scope derivation is a pure function of it (astrs_coordinator::auth::derive_read_token). A coordinator configured from the same root token always reaches the identical 32 bytes (see that function’s own docs), so minting needs neither a network round trip nor a coordinator restart — the credential it prints is already the one a running coordinator will recognise.

Structs§

MintArgs
astrs token mint arguments, independent of clap.

Functions§

mint
Mints (derives, or reveals) the credential for one scope from the cluster’s root token.