B2B Multi Tenants

Overview

Multi-tenant authentication allows multiple clients or organizations (tenants) to use a single instance of an application while keeping their data and configurations isolated. Eartho's concept of Spaces provides a powerful way to implement multi-tenant authentication and authorization, ensuring each tenant has secure and independent access to their resources.

Key Concepts

  1. Spaces: Represent the individual tenants in a multi-tenant environment. Each space acts as an isolated container for access points and user data.

  2. Access Points: Gateways provided by each space that allow users to access various resources within the tenant's environment.

  3. Roles and Permissions: Define what different users within a space can do, ensuring proper authorization and access control.

Steps to Implement Multi-Tenant Authentication

  1. Create a New Space for Each Tenant

    Each tenant is represented by a space in Eartho. When a new tenant signs up, a new space should be created to encapsulate their data and access points. This can be managed through the Eartho Creators Dashboard.

  2. Define Access Points for Each Space

    Access points within each space define the gateways to different resources. For example, a tenant might have access points for login, admin panel, and user dashboard. These can be set up and configured through the Eartho Creators Dashboard.

  3. Manage Roles and Permissions

    Assign roles and permissions to users within each space to control what they can access and perform. Roles like "Admin," "Editor," and "Viewer" can be defined with specific permissions, all managed through the Eartho Creators Dashboard.

  4. User Authentication and Authorization

    When users log in, authenticate them against the access points of their respective spaces. Ensure that their roles and permissions are correctly applied, and managed entirely through the Eartho Creators Dashboard.

  5. Handle User Management

    Manage user profiles, including their roles and permissions, within the context of their spaces. Ensure that user data remains isolated and secure, with all operations performed through the Eartho Creators Dashboard.

Example Workflow

  1. Tenant Signup: When a new tenant signs up, create a new space for them through the Eartho Creators Dashboard.

  2. Setup Access Points: Define the access points for the tenant's space using the Eartho Creators Dashboard.

  3. User Signup and Role Assignment: Add users to the tenant's space and assign roles via the Eartho Creators Dashboard.

  4. User Authentication: Authenticate users based on their space and access points, managed through the Eartho Creators Dashboard.

  5. Access Control: Ensure users can only access resources defined by their roles and permissions, configured through the Eartho Creators Dashboard.

Last updated