Tenancy
Overview
🏙️ What is a Tenant in DIGIT?
A tenant in DIGIT is a logical container that isolates and manages data and configurations for an administrative unit such as a city, department, or state. It ensures data isolation, independent configurations, and secure multi-tenancy even when all tenants are hosted on the same DIGIT instance.
🔹 What Does a Tenant Isolate?
Reference Data
Service types, boundaries
Configuration Data
Workflows, SLAs
Transactional Data
Complaints, user records, audit logs
🔹 Hierarchical Multi-Tenancy (DIGIT 2.9 LTS)
DIGIT supports a hierarchical tenant structure, allowing inheritance of data and configuration.
Example Tenant Hierarchy:
State: StateA
├── CityA → tenantId: statea.citya
├── CityB → tenantId: statea.cityb
└── CityC → tenantId: statea.cityc
Each tenant can:
Use its own master/config data.
Inherit from the parent tenant (e.g., state-level).
Example Tenancy
State-level tenant: e.g.,
statea
City-level tenants: e.g.,
statea.citya
,statea.cityb
Each tenant has metadata:
Contact info, address, logo
District, ULB grade, region
Coordinates (latitude/longitude)
Tenant Isolation in API Requests
Tenant ID
Must be passed in every API request (e.g., statea.citya
)
Validated By
Gateway Service
Scope of Data Access
Only within that tenant — no cross-tenant access permitted
Defined In
tenants
master (MDMS module)
External Integrations
Always maintain the tenant context when integrating with 3rd-party systems.
If external systems lack multi-tenancy support, handle tenant-specific routing carefully.
Summary
Tenant ID
Identifies the tenant (e.g., pg.citya
)
Scope
Data, configuration, workflows are tenant-bound
Defined In
tenant
module → tenants
master (MDMS)
Required In APIs
All requests must include tenantId
Validated By
Gateway Service
Last updated
Was this helpful?