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:

  1. Tenant ID is converted to uppercase.
  2. Creation timestamp is recorded.
  3. Default MongoDB connection URL is assigned.
  4. Tenant configuration is stored in the rentone_tenants collection.

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:

  • Email
  • Password
  • Tenant ID
  • User Type
  • User Name

Default Access Configuration

During tenant user creation:

  1. User type is selected.
  2. Cloud App Service is queried for default access levels.
  3. Access Control Groups (ACG) are assigned automatically.
  4. Password is salted and hashed.
  5. 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