code wiki / _hdl_build / nx_modauth_probe.nx
nx_modauth_probe.nx
buildroot/runtime/_hdl_build/nx_modauth_probe.nx
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
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
structs
| none |
consts
| 11 | const K_MAGIC_8192: i64 = 8192 |
functions
| 13 | func pr_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 14 | func pr_w(s: *u8) -> i64 { sys_write(1, s, pr_len(s)); return 0 } |
| 16 | func main(argc: i64, argv: *i64) -> i64 |