code wiki / (root) / nx_mgmt_session_mint.nx

nx_mgmt_session_mint.nx

buildroot/runtime/nx_mgmt_session_mint.nx

1414 B21 linesdepth 11pulls 18 transitivereach 0 importersview sourcekind tooltopic mgmt
docsdependenciesstructsconstsfunctions

about

nx_mgmt_session_mint.nx -- CLI over nx_session_mint_lib: mint an M5 no-cookie session token (the X-Nishi-Session credential) from a server KEY BUNDLE, for a realm + handle, WITHOUT the OPAQUE passphrase. Sovereign equivalent of what /login issues on a correct password -- used to SELF-AUTHORIZE the mgmt control plane from the NAS-resident signing key (operator-authorized 2026-07-08: "mint a session from the NAS key"; strictly less power than the sudo already granted). uid_hash = SHA256(realm|||handle); if that handle is admin in the roles registry, the session is PRIVILEGED. CLI: nx_mgmt_session_mint <keysfile> <realm> <handle> <ttl_s> -> prints base64(token) on stdout.

dependencies 1 imports · 0 importers

nx_session_mint_lib.nx nx_mgmt_session_mint.nx

imports: nx_session_mint_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main msm_atoi msm_mint_b64 msm_mint_raw msm_load_edpriv msm_hexval nx_ncs_derive_user_id_hash sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable nxa_dump_sizes nx_ncs_derive_realm_id_has nx_ncs_mint_token _ncs_put_i64_be nx_csprng_fill sys_mmap ↻ nx_csprng_urandom_path sys_openat_rd sys_read sys_close ed25519_sign_full sys_mmap ↻ ed25519_sha512 sys_mmap ↻ sha512_init sha512_update sha512_final ge_p3_alloc sys_mmap ↻ ed25519_basepoint_p3 sys_mmap ↻

structs

none

consts

none

functions

9func main(argc: i64, argv: *i64) -> i64