Multi-Tenancy Guide

Autional was built for B2B SaaS multi-tenancy from day one. Every feature is tenant-aware by design.

Three-Layer Isolation

LayerEnforcementCI Check
1. SchemaEvery table has tenant_id column
2. RepositoryEvery query includes tenant_id WHERE clause
3. Handlertenant_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