TenantPolicy

Which tenant the aggregates of a type are in (replacing 9.x @StaticTenantId): by default the caller's, or the one a cross-scope caller names, unless fixedTenant fixes one for the type, which then holds whoever the caller is. Every path that gives a command its tenant decides it through tenantOf, the one rule: the gateway and the test DSL (CallerAdmission), a transformer's target, the commands a saga derives, a timer's and those the command topic delivers; the query admission (QueryTargets) decides a read's tenant through it too, and which tenants a caller reaches through reaches: one rule for the write and the read side.

Types

Link copied to clipboard

Properties

Link copied to clipboard

The targets this service reserves (#7333, me.ahoo.wow.api.caller.ReservedTargets, which the host unites here): those any caller its resolver gives may name in Wow-Scope beyond its own scope, such as the view store's owner (shared) of the caller's tenant and owner (system) of the tenant (platform). Admission (CallerAdmission) and the read side (QueryTargets) take a request naming one, exactly, as they take a cross-scope caller's. Naming one is all it grants: who may write there is the authorizer's, and who is let in at all the resolver's, so in development the anonymous caller reads there and its writes are refused, and behind CoSec there is no anonymous caller. It gives no reach: reaches and confinedTo read Caller.crossScope alone, so naming one reaches no other tenant and no other target. None by default.

Functions

Link copied to clipboard
abstract fun fixedTenant(type: AggregateType): String?

The tenant every aggregate of type is in, or null when it is the caller's.

Link copied to clipboard
open fun tenantOf(type: AggregateType, named: String?, acting: String?): String

The tenant a command of type is in, sent for the acting tenant (the caller's, or the execution's that derived it: the commit's, the receipt's or the job instance's; the scheduling aggregate's for a timer) to the tenant named, if it names one:

open fun tenantOf(type: AggregateType, caller: Caller, target: TargetScope? = null): String

The tenant caller addresses an aggregate of type in, with the cross-scope target it may name (whether the caller may name one is checked apart), by the one rule (tenantOf): a target's tenant is named, whoever names it, the caller's own included, since a request names it on purpose; with none, the caller's tenant is the acting one.

Link copied to clipboard

This policy with targets reserved too (reservedTargets); itself when there are none.