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 sys_now_realtime_sec sys_mmap sys_clock_gettime_real msm_mint_b64 msm_mint_raw msm_load_edpriv sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close msm_hexval nx_ncs_derive_user_id_hash sys_mmap ↻ 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 ↻ fe_alloc fe_zero ed25519_basepoint_p3 sys_mmap ↻ ge_p3_decompress

structs

none

consts

none

functions

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