RBAC Architecture¶
InfraLynx now treats authorization as a first-class platform service rather than a thin role-name check.
Core Layers¶
@infralynx/core-domainowns permissions, roles, scoped assignments, provider mappings, and evaluation helpers.@infralynx/auth-corepersists role assignments and provider-role mappings next to providers, users, and sessions.apps/api/src/rbacexposes the administrative RBAC surface and shared request-enforcement helpers.apps/web/src/pages/admin/rbacprovides the operator UI for role assignments and provider-role mappings.
Enforcement Model¶
- API enforcement is authoritative.
- UI enforcement is advisory and experience-oriented.
- Request handlers ask for permission IDs plus optional scope context.
- Identity providers can map groups or claims into scoped role assignments.
Scope Types¶
global: unrestricted administrative scopetenant: tenant boundarysite: physical site boundarydevice: object-level device boundary
Design Rules¶
- permissions stay stable and machine-readable
- routes and UI actions consume permission summaries, not raw role-name logic
- external identity mapping is normalized before authorization evaluation
- domains reference RBAC by IDs and scopes, never embedded provider-specific objects