Django Tenants User Management Requirements
Django Tenants User Management Requirements
Management Requirements
Content
1. Django Tenants (optional read)
2. Identity Provider / SSO System / Authentication
3. Authentication with Django Python Social Auth
Django Tenants (optional read)
- 1 Database managed.
- Tenants identified via their host name (i.e tenant.domain.com). Stored in a table in
the public schema.
- We need a tenant for our main domain.
- Public schema -> shared.
- Tenant schema -> Tenant specific.
How does Django Tenants know which schema to use?
Two ways to set up Django Tenants:
www.domain.com
1. Using subdomains:
a. Client1.domain.com -> client1 schema
b. Client2.domain.com -> client2 schema
3. Auth0
a. Easy to integrate
b. SSO
c. User Management
d. Good documentation
e. Supports a lot of Social Identity Providers
These are for if we use these Identity Providers and we want to use their services.
Authentication with Django Python Social Auth
If we let companies authenticate using their own IdP such as Google or Microsoft:
Using Python Social Auth Django we can use:
Logging in with Google Account – Google OAuth2 use
Logging in with Microsoft Account integration – Azure AD use
- Client ID (needed usually)
- Client Secret (needed usually)
We need to add new authentication backend if we add them, because the normal user
creation flow will be different. The users created in this way won’t have a password due to
IdP.