Skip to content

[Multi-Tenant] Create operator tenant #3149

@mkurapov

Description

@mkurapov

Context

Given that each tenanted resource requires a tenantId to be set, we need to backfill all of the tenanted resources with the operator tenant id. This requires having a migration to seed the first tenant (the operator).

We can do this by having an OPERATOR_TENANT_ID env var that is the same across auth and backend.
auth and backend migration scripts will create the operator tenant in their DBs respectively.

Note: In the backend tenants DB we will not be able to seed the idpConsentUrl and idpSecret. During the tenant lookups via the backend API, we just reach over to the /tenants API and backfill it into the backend DB.

Todo

  • Add OPERATOR_TENANT_ID to auth and backend
  • Create a migration in both auth and backend to seed the first operator tenant (the primary key will be the OPERATOR_TENANT_ID).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions