You've correctly identified the key distinction. Here's how
Permit.io's hierarchy works for your scenario:
Tenants vs Environments
*Tenants* are designed to isolate users and data, but roles and policies are shared across tenants within the same environment.
(1) (2)
This means tenants work well when your customers share the same permission model but need data isolation.
*Environments* are silos of policy and data, usually representing a specific deployment (e.g., dev, prod, staging) .
(1)
Each PDP syncs to a specific environment via its secret environment API key.
Recommended Approach for Your B2B PaaS
Since each of your customers needs *different policies, roles, and relationships*, you have two main options:
Option 1: Environments per Customer
Use separate environments for each customer organization.
(3)
• Each environment has its own independent policy schema
• Each PDP connects to its designated environment using a unique secret key
• This provides complete policy isolation
Option 2: Projects + Environments
Structure it as:
• *Projects* = each customer organization (or your own application)
• *Environments* = deployment stages within each (dev, staging, prod)
This aligns with the best practice: each application or major service should correspond to a Permit *Project*, with deployments matched to specific Permit *Environments*.
For Your Own Dev/Staging/Prod
Use environments within a single project for your internal deployment stages.
You can implement environment-specific access control to manage who can make policy changes across different stages.
The
copy-env
API can be used to merge/promote changes between environments.