code wiki / _hdl_build / nx_modauth_arm.nx
nx_modauth_arm.nx
buildroot/runtime/_hdl_build/nx_modauth_arm.nx
about
nx_modauth_arm.nx -- PROVISION an admin into the canonical Modern Auth (the arming step that makes
"all sites use modern_auth" deployable). File-driven by construction so the operator's passphrase NEVER
touches chat / argv / stdout: it is read from a STAGED file, used to register the admin, and the one-time
BIP39 24-word recovery mnemonic is written to an out-file for the operator to save then DELETE (it is
never echoed). Idempotent: re-running supersedes the admin (additive-only store -- old passphrase dies,
new lives; rows 8-9 of nx_modauth_e2e_gate prove this). ONE server-key bundle + ONE store serve every
realm; realm+handle decide WHICH site+admin (a status token can't validate a wiki ctx -- realm-scoped hash).
argv: [1]=keysfile [2]=storefile [3]=realm [4]=handle [5]=passphrase-file [6]=mnemonic-outfile
e.g. nx_modauth_arm /vault/nishi_auth_keys /vault/nishi_auth_store nishi_status_adm elder /tmp/pw /tmp/mn
Sovereign: nx_modern_auth_flow + nx_syscalls (no gcc, no 3rd-party). 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
| 14 | const K_MAGIC_8192: i64 = 8192 |
functions
| 16 | func arm_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 17 | func arm_w(s: *u8) -> i64 { sys_write(1, s, arm_len(s)); return 0 } |
| 19 | func main(argc: i64, argv: *i64) -> i64 |