0% found this document useful (0 votes)
35 views

Django Tenants User Management Requirements

Django tenants document made by Steven

Uploaded by

Unknown Fist
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Django Tenants User Management Requirements

Django tenants document made by Steven

Uploaded by

Unknown Fist
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Django Tenants User

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

2. Using part of the URL (beta/optional):


a. domain.com/r/client1 -> client1 schema
b. domain.com/r/client2 -> client2 schema
Identity Provider / SSO System / Authentication
We need an Identity Provider, so that clients can use our application, without us having to
take care of the steps needed for verifying the identity of a client and so that they can use
the application without the need to create an account for our application.
An Identity Provider provides and takes care of:
- Authentication
- Simplicity of one account, only one account is needed to access all the necessary
resources with SSO.
- Password security
For example, some companies use Google Sign-In as their Identity Provider.

Identity Management Solutions for User Management


1. Okta Identity Cloud
a. Easy to use
b. SSO
c. Scalability
d. Simple UI

2. Azure Active Directory


a. Most popular IdP
b. Good integration with web applications using OAuth
c. Easy User Management
d. Microsoft Services

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.

Django User Management


-Speculative / I do not possess enough basic Django knowledge with Django-Tenant
For User Management we can just use Django Admin.
In Django Admin it’s possible to manage users with permissions and groups.
With Django-Tenants, a user in the tenant schema can only see their own tenant schema in
Django Admin.

Django Tenant Users for Global Authentication


If one user needs to access more than one tenant and doesn’t want to authenticate himself
for each of the tenants. This can be used for global authentication since Django tenants
doesn’t support that normally. In this way the user can also see to which tenants he belongs
to.

You might also like