🎓Multitenancy via AccessPolicy
Build Multitenancy with AccessPolicy
Aidbox stores all the tenants in a single database and serves number of them at once. It obtains tenant-id
from each request and returns the data belonging to the tenant.
Key concepts
All resources have to be created with the
tenant-id
tenant id
is stored within theidentifier
attribute at the resourceAccess policies require
tenant-id
parameter in each request
Multitenancy setup and requests example
Add Client
Client
There are several ways to create client. We use the simplest one to do it: Basic Auth.
Add org-1
tenant resource
org-1
tenant resourceCreate patient providing it's tenant-id
in the identifier
property.
Define AccessPolicy
for multi-tenancy
AccessPolicy
for multi-tenancyCreate access policy to ensure tenant-id
is provided in all requests.
Multi-tenant request examples
Search the Patient
with the correct tenant-id
returns the resource.
Update the Patient
resource.
Read updated Patient
resource.
Delete Patient
resource.
Last updated