Core concepts
Tenant Isolation
What is a Tenant?
A Tenant is a customer of your SaaS. For example, if you are a SaaS selling to hospitals, each hospital will be a tenant. Note that even within a tenant, there can be multiple users, which can have varying degrees of access control.
Why is Tenant Isolation important?
Tenant isolation is important to keep your customer’s data private and secure. It is a common mistake for SaaS companies to accidently expose data to other customers, which can lead to reputation damage and legal issues.
There are many ways to enforce tenant isolation.
- You could use a shared database with tenant_id, and use WHERE clauses on every query.
- You could do a shared database, using Row-level-security policies to ensure that each customer can only access their own data.
- You could do a shared database with separate schemas, where each customer has their own schema.
- You could make each customer their own database.
Fortress simplifies tenant isolation. We allow you to easily enforce tenant isolation by connecting directly to a tenant, regardless of where they are. Once you make a connection, there is no need to use WHERE clauses or include it in your queries.