
Tenant Data Isolation: Patterns and Anti-Patterns
Explore effective patterns and pitfalls of tenant data isolation in multi-tenant systems to enhance security and compliance.
Jul 30, 2025
Read More
White-labeling transforms your SaaS product into a platform that customers can rebrand and resell as their own. Instead of selling to 1,000 individual users, you sell to 10 agencies who each resell to 100 users. It's a powerful growth lever — but only if your architecture can handle it without collapsing under the weight of custom branding, isolated data, and unique configurations.
At Propelius Technologies, we've built white-label platforms for marketing agencies, HR software providers, and ecommerce tools. This guide covers the technical decisions that make white-labeling work at scale.
White-labeling means your product can be rebranded to look like it was built by someone else. Your customer (a reseller/partner/agency) gets to:
Common white-label use cases:
Your white-label platform needs to isolate each partner's data and branding. There are three main approaches:
How it works: All partners share the same tables. Every record has a tenant_id column. Your queries filter by tenant.
Pros:
Cons:
WHERE tenant_id = ?Best for: Early-stage products with standard feature set across all partners.
How it works: One database with a schema per tenant (PostgreSQL schemas, MySQL databases). Each tenant's data lives in their own namespace.
Pros:
Cons:
Best for: Mid-market SaaS with some per-tenant customization needs.
How it works: Each tenant gets their own database instance (sometimes entire cluster).
Pros:
Cons:
Best for: Enterprise white-label platforms with strict security or data residency requirements.
| Model | Cost | Isolation | Complexity | Customization |
|---|---|---|---|---|
| Shared Schema | $ | Low | Low | Limited |
| Separate Schemas | $$ | Medium | Medium | Moderate |
| Separate Databases | $$$ | High | High | Full |
Each partner needs to customize appearance without touching code. Here's what to support:
:root variablesImplementation:
:root {
--primary-color: {{tenant.primaryColor}};
--logo-url: url('{{tenant.logoUrl}}');
--font-family: {{tenant.fontFamily}};
}
Partners want app.partnersite.com instead of yourapp.com/partner. Two approaches:
Option 1: CNAME + TLS certificate management
CNAME app.partnersite.com → proxy.yourplatform.comOption 2: Reverse proxy with SNI routing
Propelius recommendation: Use Cloudflare for SaaS. It handles certificate provisioning, global CDN, DDoS protection, and costs ~$2/domain/month.
Different partners pay different amounts and get different features. Implement this with feature flags:
{
"tenant_id": "acme",
"plan": "enterprise",
"features": {
"advanced_analytics": true,
"api_access": true,
"white_label": true,
"sso": true
}
}
Check features in your backend:
if tenant.has_feature('advanced_analytics'):
return advanced_report()
else:
return basic_report()
Use feature flag services like LaunchDarkly, Flagsmith, or build your own with Redis.
Users belong to a tenant. Your auth flow must identify both:
Option 1: Email-based tenant detection
Option 2: Domain-based tenant detection
app.acme.com → server detects tenant from domain → shows Acme brandingEnterprise partners expect SAML or OAuth SSO. Implement per-tenant SSO configuration:
Use libraries like ruby-saml, python-saml, or SaaS solutions like Auth0, WorkOS.
Charge partners a fixed monthly/annual fee. They handle billing to their end users.
Pros: Simple, predictable revenue
Cons: Doesn't scale with partner's growth
Partner pays you a percentage of what they charge their customers.
Pros: Aligns incentives, scales with partner success
Cons: Requires auditing partner revenue (trust issues)
Charge based on end-user count, API calls, storage, etc.
Pros: Fair pricing, scales automatically
Cons: Complex metering and billing
Base fee + usage charges above threshold.
Example: $500/month + $5/seat above 100 users
Partners will want to:
Plan for churn: make offboarding painless to build trust during sales.
No. Build for direct customers first, validate product-market fit, then add white-labeling when you have inbound demand from resellers. Retrofitting is hard but doable — building it too early is premature optimization.
Use middleware that automatically injects tenant_id filters into all queries. Never trust client-provided tenant IDs. Use database-level row security policies (PostgreSQL RLS) as a second layer. Regular penetration testing and code reviews are essential.
Not in shared schema models. With separate schemas or databases, you can allow custom fields via JSON columns (PostgreSQL JSONB) or EAV (Entity-Attribute-Value) tables. True schema customization requires separate databases and versioned migration systems.
Separate databases per tenant make this easier — store EU customers in EU regions, US customers in US regions. With shared databases, you'll need geo-sharding (complex). Many white-label customers need data residency guarantees, so plan for multi-region deployment early.
Store all dates in UTC. Let each tenant configure their timezone. Display dates in tenant timezone on frontend. For scheduled jobs (reports, emails), trigger based on tenant's local time by calculating offset from UTC.
White-labeling is a powerful distribution strategy that turns your SaaS into a platform. It requires careful architectural decisions around multi-tenancy, branding, authentication, and billing.
Start simple: Shared schema with tenant_id filtering. Add custom domains and branding. Launch with 3-5 pilot partners.
Scale strategically: Move large tenants to separate schemas or databases as needed. Invest in tenant-aware monitoring and performance optimization.
Build for portability: Make data export and migration easy. Partners who trust they can leave are more likely to stay.
At Propelius Technologies, we've built white-label platforms from scratch and retrofitted existing SaaS products for multi-tenancy. Get in touch to discuss your white-label architecture.
Need an expert team to provide digital solutions for your business?
Book A Free CallDive into a wealth of knowledge with our unique articles and resources. Stay informed about the latest trends and best practices in the tech industry.
View All articlesTell us about your vision. We'll respond within 24 hours with a free AI-powered estimate.
© 2026 Propelius Technologies. All rights reserved.