Multi-Tenancy Guide
Autional was built for B2B SaaS multi-tenancy from day one. Every feature is tenant-aware by design.
Three-Layer Isolation
| Layer | Enforcement | CI Check |
|---|---|---|
| 1. Schema | Every table has tenant_id column | ✅ |
| 2. Repository | Every query includes tenant_id WHERE clause | ✅ |
| 3. Handler | tenant_id derived from auth context, never from request body | ✅ |
Tenant Configuration
Each tenant can independently configure:
- Password policy — min length, complexity, expiry, breach check
- MFA policy — required methods, risk thresholds
- Session policy — timeout duration, refresh limits
- Branding — custom login page, logo, colors, domain
- Feature gates — plan-based feature enablement
- SSO providers — SAML/OIDC IdP configuration
Member Management
Tenant members are managed through invitation workflow:
Admin invites → User receives email → User accepts → Role assigned
Supports departmental hierarchy, delegated administration, and bulk imports (SCIM 2.0).
NHI (Non-Human Identity)
AI agents, robots, and IoT devices are first-class identity citizens in Autional. Each NHI type has its own lifecycle state machine and authentication methods.
- Agent: provisioning → active → rotating → revoked → deleted
- Robot: commissioning → active → degraded → decommissioned → deleted
- Device: unpaired → active → transferring → revoked → deleted