code wiki / _hdl_build / nx_modauth_probe.nx

nx_modauth_probe.nx

buildroot/runtime/_hdl_build/nx_modauth_probe.nx

3557 B68 linesdepth 15pulls 43 transitivereach 0 importersview sourcekind probetopic modauth
docsdependenciesstructsconstsfunctions

about

nx_modauth_probe.nx -- POST-ARMING smoke test: prove an armed admin actually LOGS IN before any deploy. Loads the SAME server-key bundle + realm context the daemon will use, reads a passphrase from a staged file (leading-BOM + trailing-CR/LF tolerant, identical to nx_modauth_arm so a round-trip is exact), and attempts nx_modern_auth_login. Prints "PROBE OK" + token length on success, "PROBE FAIL" on rejection. Login does NOT mutate the store (read-only verification). Run this after nx_modauth_arm to confirm the credential is good BEFORE flipping the access wall live -- fail here, never in production. argv: [1]=keysfile [2]=storefile [3]=realm [4]=handle [5]=passphrase-file Sovereign: nx_modern_auth_flow + nx_syscalls. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_modern_auth_flow.nx nx_syscalls.nx nx_modauth_probe.nx

imports: nx_modern_auth_flow.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_write pr_len sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close pr_w sys_write ↻ pr_len ↻ nx_uas_server_keys_load_or sys_mmap ↻ sys_read_file ↻ _uas_hex_dec _uas_nib nx_csprng_fill sys_mmap ↻ nx_csprng_urandom_path sys_openat_rd ↻ sys_read ↻ sys_close ↻ nx_opq_derive_keypair sys_mmap ↻ _voprf_load_context_string u256_alloc nx_scratch nx_scratch_init sys_mmap ↻ nx_scratch_oom sys_write ↻ sys_exit sys_mmap ↻ nx_opq_hash_to_scalar sys_mmap ↻ nx_h2c_expand_message_xmd_ sys_mmap ↻ _h2c_i2osp_1

structs

none

consts

11const K_MAGIC_8192: i64 = 8192

functions

13func pr_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: pr_wmain
14func pr_w(s: *u8) -> i64 { sys_write(1, s, pr_len(s)); return 0 }
called by 1: main calls 2: sys_writepr_len
16func main(argc: i64, argv: *i64) -> i64