code wiki / (root) / nx_asset_access_gate.nx

nx_asset_access_gate.nx

buildroot/runtime/nx_asset_access_gate.nx

7157 B117 linesdepth 9pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic asset
docsdependenciesstructsconstsfunctions

about

nx_asset_access_gate.nx -- KAT + TEETH for nx_asset_access (R6 of the universal org-tooling arc). Proves the asset PDP is DENY-BY-DEFAULT + FAIL-CLOSED over a real content-addressed record's classification field (decoded via nx_asset_record): (a) public -> readable by EVERYONE (ANON..OWNER all ALLOW) (b) professional -> ANON/FAMILY DENY, PRO/OWNER ALLOW (the professional split) (c) private -> only OWNER ALLOW; ANON/FAMILY/PRO DENY (the private split) (d) operator-only -> only OWNER ALLOW (the image-stack "operator-only" law) TEETH (must DENY -- the fail-closed proof a default-allow system would get WRONG): (e) NO classification field -> DENY for EVERY level, including OWNER (f) UNRECOGNIZED classification ("bogus") -> DENY for OWNER (fail-closed, not "allow if unsure") (g) private @ ANON -> DENY (the public internet can never read a private asset) Verdict appended to knowledge/status/asset_access_gate.log (additive law #13). expect_exit: 0 license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_asset_record.nx nx_asset_access.nx nx_gate_verdict.nx nx_asset_access_gate.nx

imports: nx_syscalls.nxnx_canon_cid.nxnx_asset_record.nxnx_asset_access.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main sys_openat_append g_puts sys_write sys_mmap mk_classified sys_mmap ↻ sset E ar_fields sys_mmap ↻ ar_addf ar_present ar_encode canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap E ↻ expect aa_allowed aa_decide sys_mmap ↻ canon_decode ud_r32 sys_mmap ↻ ar_get ar_streq aa_required_level aa_streq AA_ANON AA_PRO AA_OWNER g_puts ↻ g_putn sys_mmap ↻ g_puts ↻ sys_write ↻

structs

none

consts

none

functions

22func g_puts(logfd: i64, s: *u8) -> i64
called by 3: g_putnexpectmain calls 1: sys_write
29func g_putn(logfd: i64, v: i64) -> i64
called by 2: expectmain calls 3: sys_mmapg_putssys_write
43func E() -> *u8 { return "\x00" as *u8 }
called by 2: mk_classifiedmain
44func sset(a: *i64, i: i64, s: *u8) -> i64 { a[i] = s as i64; return 0 }
called by 1: mk_classified
47func mk_classified(cls: *u8, out: *u8) -> i64
64func expect(logfd: i64, label: *u8, rec: *u8, n: i64, level: i64, want: i64) -> i64
71func main() -> i64