Tenant Onboarding Guide
Overview
RentOne follows a multi-tenant architecture where tenant information is managed by the Tenant Service.
Each tenant is identified using the HTTP request header:
X-Tenant-Header
The platform dynamically resolves the tenant and connects to the corresponding MongoDB database.
Tenant Creation Process
Create Tenant
API:
POST /rentone/tenants/create
Example Request:
{
"tenantId": "RENTONE",
"enabled": true
}
What Happens Internally
When a tenant is created:
- Tenant ID is converted to uppercase.
- Creation timestamp is recorded.
- Default MongoDB connection URL is assigned.
- Tenant configuration is stored in the
rentone_tenantscollection.
Example:
| Field | Value |
|---|---|
| tenantId | RENTONE |
| mongoURL | Default MongoDB URI |
| creationDate | Current Timestamp |
| enabled | true |
Tenant Database Resolution
The application uses the tenant identifier supplied in:
X-Tenant-Header
Example:
X-Tenant-Header: RENTONE
The Tenant Service resolves:
RENTONE
│
▼
MongoDB Database: RENTONE
MongoDB databases are created automatically when data is first written to them.
No manual database creation is required.
Tenant User Creation
After creating a tenant, create the first administrative user.
API:
POST /tenants/tenants-user/v1/create
Required Information:
- Password
- Tenant ID
- User Type
- User Name
Default Access Configuration
During tenant user creation:
- User type is selected.
- Cloud App Service is queried for default access levels.
- Access Control Groups (ACG) are assigned automatically.
- Password is salted and hashed.
- User account is created.
Verification
Verify:
- Tenant exists
- Admin user can login
- Tenant header resolves correctly
- Data is stored in the tenant database
- Access permissions are assigned correctly