code wiki / _hdl_build / nx_access_wall.nx
nx_access_wall.nx
buildroot/runtime/_hdl_build/nx_access_wall.nx
about
nx_access_wall.nx -- the unified POLICY DECISION POINT (NIST SP 800-207 PDP) for the access-provisioning
wall. ZERO-TRUST: a request is ALLOWED only if EVERY layer permits; DENY-BY-DEFAULT + FAIL-CLOSED otherwise.
It does NOT reinvent any security primitive -- it COMPOSES the existing security workstreams:
L1 network tier -> nx_nettier (nt_meets): is the peer's tier >= the area's required minimum?
L2/L5 identity policy -> nx_vault_acl (acl_eval): deny-by-default, explicit-deny-wins, longest-prefix grant
L3 device -> a provisioned-device flag (mTLS client cert, nx_device_cert -- R4)
L4 abuse -> a rate-ok flag (nx_rate_limit)
The enforcement point (a daemon, e.g. nx_sites_daemon_v2 / nx_cms_admin) gathers the signals (peer_ip->tier,
session->role->policy, cert->device_ok, nx_rate_limit->rate_ok) and calls aw_decide once. The specific deny
CODE is returned so nx_access_audit (L6) can log WHY. license_tier: ORIGINAL
dependencies 3 imports · 3 importers
imports: nx_vault_acl.nxnx_nettier.nxnx_syscalls.nx
imported by: nx_access_pep.nxnx_access_wall_exceed_gate.nxnx_access_wall_gate.nx
structs
| none |
consts
| 15 | const AW_ALLOW: i64 = 1 |
| 16 | const AW_DENY_RATE: i64 = 0 - 1 |
| 17 | const AW_DENY_TIER: i64 = 0 - 2 |
| 18 | const AW_DENY_DEVICE: i64 = 0 - 3 |
| 19 | const AW_DENY_POLICY: i64 = 0 - 4 |
functions
| 24 | func aw_decide(paths: *i64, lens: *i64, deny: *i64, caps: *i64, nrules: i64, req: *u8, req_len: i64, req_cap: i64, |
| 34 | func aw_allowed(verdict: i64) -> i64 { if verdict == AW_ALLOW { return 1 } return 0 } |