Requirements
Before enabling multi-tenant mode:
- Set
MULTI_TENANT_ENABLED=trueandPLUGIN_AUTH_ENABLED=true. Matcher rejects multi-tenant startup without authorization enforcement. - Use
AUTH_PROVIDER=plugin-auth. The currentworkosprovider resolves verified requests to the default tenant and is not supported for tenant selection. - Set
MULTI_TENANT_URLto an origin-only HTTPS URL in staging and production, plus a non-emptyMULTI_TENANT_SERVICE_API_KEY.MULTI_TENANT_ENVIRONMENTis optional and falls back toENV_NAMEwhen unset. Plaintexthttpis allowed for local development; in other environments it also requires an explicitMULTI_TENANT_ALLOW_INSECURE_HTTP=true. - Set
ENVIRONMENT_NAME(orENV_NAME) tostagingorproduction. - Provide a valid
tenant_idortenantIdclaim in requests authenticated throughplugin-auth. - Keep the default tenant database available on the root pool for default-tenant workloads and operational tools.
SET search_path; tenant-specific credentials, network boundaries, and Tenant Manager configuration remain part of the isolation boundary.
Tenant identity
With
AUTH_PROVIDER=plugin-auth in multi-tenant mode, Matcher derives tenant identity from a valid tenant_id or tenantId JWT claim. It does not accept a caller-controlled tenant selector from request bodies, query parameters, or arbitrary headers. workos, single-tenant, and authentication-disabled deployments use the configured default tenant.
Connection-pool controls
At the configured limits, Matcher’s tenant-pool manager evicts an idle least-recently-used pool when resolving a new tenant would exceed
MULTI_TENANT_MAX_TENANT_POOLS; the evicted tenant is re-resolved on demand. Validate migration and failure behavior against the deployed Tenant Manager integration.
Shared infrastructure
Matcher delegates tenant-aware infrastructure resolution to the multi-tenancy platform service. Do not assume a fixed RabbitMQ virtual-host name, message-header convention, Redis key format, cache TTL, or S3 prefix from Matcher alone. Those conventions are component- and deployment-specific; review the corresponding infrastructure and platform documentation before building an integration around them.
Enabling the mode
- Provision and verify the default tenant and the tenants that Matcher must serve.
- Configure the authentication provider, Tenant Manager, PostgreSQL connectivity, and bootstrap environment variables.
- Start Matcher and confirm the health checks and a tenant-scoped authenticated request.
- Observe the tenant-pool count and database connection use under expected load.
- Roll out the deployment only after isolation and failure behavior have been exercised in the target environment.
Next steps
Runtime configuration
Review the values that Matcher can change through Systemplane.
Security
Review authentication, tenant isolation, and dependency TLS controls.

