TechnologyMulti-tenant isolation

Five layers of isolation. Institution-scoped by construction.

Multi-tenancy is where most education-platform breaches happen. ArthurAI is built so cross-tenant data access requires bypassing five independent layers of enforcement. Tenant boundaries are not a configuration flag; they are the architecture.

  1. 1

    Database

    Every query that touches institutional data filters by `institutionId`. The institution identifier is part of the query predicate, not the result filter. Repository implementations enforce the filter at the data-access layer, not at the API layer. A query that forgets the filter will not return data — it will return nothing.

  2. 2

    API

    The institutionId is extracted from the JWT token on every request, never from user input. A user cannot ask the API for ‘this other institution’s data’; the request is bound to the token's tenant scope before the route handler runs. Authentication and tenant-scoping are inseparable.

  3. 3

    File storage

    Tenant-scoped Azure Blob Storage containers, named `tenant-{institutionId}-documents`. SAS tokens for blob access are scoped to the institution at issuance. Cross-tenant blob access requires obtaining a SAS for the target institution — which the API will not issue without authentication into that institution's tenant.

  4. 4

    Cache

    Cache keys include the institution identifier as a prefix: `entity:{institutionId}:{id}`. A cache lookup that forgets the institutionId will not collide with another institution's cache; it will simply miss. The Redis cluster is one cluster, but the keyspace is partitioned by tenant by construction.

  5. 5

    Frontend

    Every API call from the client carries the institutionId from the auth context, derived from the user's active session. The auth context is established at login and bound to the JWT; switching institutions requires re-authentication. The client cannot fabricate a different institution scope without forging a token, which the API rejects.