code wiki / (root) / nx_iot_hub_tenant_gate.nx

nx_iot_hub_tenant_gate.nx

buildroot/runtime/nx_iot_hub_tenant_gate.nx

4146 B68 linesdepth 12pulls 22 transitivereach 0 importersview sourcekind gate/prooftopic iot
docsdependenciesstructsconstsfunctions

about

nx_iot_hub_tenant_gate.nx -- proves IoT multi-tenancy is the NISHI HR SPINE, not a bespoke store: - HR level -> IoT tier mapping (owner/family/deny) - per-HOUSE isolation BY CONSTRUCTION: enroll owner of house_b; resolved against house_a -> DENY (same handle, different realm = different cred = level 0) -- the key sharding proof - level drives the tier: house_a owner=OWNER, house_a family=FAMILY, stranger=DENY, suspended=DENY - the DENY render leaks NO devices + NO control forms; FAMILY/OWNER do; OWNER alone gets /home/manage Uses a fresh temp HR store (unlinked first for determinism). expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_iot_hub_tenant.nx nx_iot_hub_tenant_gate.nx

imports: nx_iot_hub_tenant.nx

imported by: nobody (leaf or entry point)

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

main hr_enroll hr_cred_id sys_mmap nx_ncs_derive_user_id_hash sys_mmap ↻ hr_hexenc hr_append sys_mmap ↻ hr_puts hr_putn sys_mmap ↻ sys_write sys_close iot_hub_viewer_access hr_cred_id ↻ hr_resolve_level sys_mmap ↻ hr_read sys_openat_rd sys_read sys_close ↻ hr_line_end hr_field_end hr_eqrange hr_intrange iot_access_from_level hr_cred_id ↻ hr_suspend hr_append ↻ iot_tenant_render cp_head cp_cat cp_foot cp_cat ↻ db_card nx_iot_cap_for_class cp_cat ↻ db_badge cp_cat ↻

structs

none

consts

10const TG_STORE: *u8 = "/tmp/iot_hr_tenant_gate.store"

functions

12func tg_find(h: *u8, n: i64, pat: *u8) -> i64
called by 1: main
18func main() -> i64