OptionalcacheCache-prefix behaviour.
OptionaldatabaseDatabase-isolation strategy: a discriminant string, or a custom
ITenantIsolationStrategy instance.
Default: 'column-per-tenant'.
A strategy NAMES the isolation an ITenantDataStore is expected
to implement; it does not by itself create schemas or databases. The
shipped MemoryTenantDataStore uses the strategy's label as a
partition-map key, so all three kinds isolate correctly on it. The
shipped DatabaseTenantDataStore bridge (from @setu-ts/database-plugin)
is told the strategy and implements 'column'; it throws
TenantStoreStrategyUnsupportedError for 'schema' and 'database'.
A register() warning fires when a non-'column-per-tenant' strategy is
selected with no dataStore.
OptionaldataAn application-provided data store. When absent the plugin ships
a zero-dependency MemoryTenantDataStore.
Accepts a store instance (validated and used in register()) or a
RegistryFactory (M101c, V8-8) resolved in onInit through
resolveRegistryEntry — the M70d arm for a store that must read a
capability, such as createDatabaseTenantDataStore() from
@setu-ts/database-plugin, which resolves CAPABILITIES.DATABASE from
the registry it is handed.
OptionalexcludePaths that skip tenant resolution entirely — no resolver runs, no tenant
is stamped, and a required deployment does not reject them. Matched
against ctx.request.path by exact string equality or RegExp.test.
Default when omitted: the operational probes the framework's own plugins
serve — ['/live', '/ready', '/health', '/metrics', '/openapi.json', '/docs']. A matching path goes straight to next(). Pass [] to restore
the previous behaviour (no path is exempt) for an application whose own
routes sit on those paths.
OptionalheaderOptions forwarded to HeaderResolver.
OptionaljwtOptions forwarded to JwtResolver.
Security note: the resolver reads the tenant id from an UNVERIFIED JWT
claim — a client can mint a token naming any tenant. Acceptable only
alongside authentication middleware which separately verifies the token.
A register() warning fires when the resolved chain contains a
JwtResolver.
OptionalmiddlewarePriority passed to ctx.middleware.add (default 40).
OptionalpathOptions forwarded to PathResolver.
OptionalrejectionHTTP status code returned when short-circuiting (default 400).
OptionalrequiredWhen true and no resolver returns a tenant, short-circuit with an
error response. Default: false.
Which resolver(s) to use for tenant resolution (required).
OptionalsubdomainOptions forwarded to SubdomainResolver.
Top-level options for
MultiTenancyPlugin.