code wiki / _hdl_build / nx_apistack_svctoken.nx
nx_apistack_svctoken.nx
buildroot/runtime/_hdl_build/nx_apistack_svctoken.nx
about
nx_apistack_svctoken.nx -- CAP-API-SVCTOKEN: scoped machine-to-machine tokens for /api (service accounts that
aren't a human OPAQUE login). A token store maps HASH(token) -> service + level (svctokens.conf: tokenhex TAB
service TAB level), so the store holds only HASHES -- a leaked store never reveals a usable token (the sovereign
exceed over plaintext API keys). st_resolve hashes the presented token and looks it up; deny-by-default. Scope =
the same DATA-driven level as the roles SSOT, so a service token is level-scoped exactly like a user. license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_site_lock_lib.nx
imported by: nx_apistack_svctoken_gate.nx
structs
| none |
consts
| 8 | const K_MAGIC_3750763034362895579: i64 = 3750763034362895579 |
| 9 | const K_MAGIC_1099511628211: i64 = 1099511628211 |
| 10 | const K_MAGIC_65536: i64 = 65536 |
functions
| 12 | func st_read_file(path: *u8, out: *u8, cap: i64) -> i64 |
| 18 | func st_fnv(s: *u8, n: i64) -> i64 |
| 23 | func st_hex16(h: i64, out: *u8) -> i64 |
| 29 | func st_resolve(store_path: *u8, token: *u8, token_n: i64, out_service: *u8, svc_cap: i64, out_level: *i64) -> i64 |