admit
The admission of a command of type that caller sends, acting in target when it names one, to an aggregate whose ref names the tenant named (null for none), or why it is refused:
a target is the caller's to name only when it acts across scopes (Caller.crossScope) or the service reserves it (TenantPolicy.reservedTargets, which any caller names and which reaches nothing else): FrameworkCodes.AUTH_FORBIDDEN else. A service's synchronous call (called) names its root's scope, which is checked apart;
the tenant is tenants' (TenantPolicy.tenantOf): a target naming another than the type's fixed one is FrameworkCodes.COMMAND_MALFORMED. A call's root tenant is its target's, and the call says which tenant its saga acts for (acting): a root tenant that is that one names none, so a type of a fixed tenant is in it, as the saga's own derived command would be;
a ref naming another tenant than that one is FrameworkCodes.COMMAND_MALFORMED: a ref's tenant is the caller's, a cross-scope target's or the type's fixed one, never a request's choice;
a caller's request (not a called one) whose command lands in the platform tenant (Caller.PLATFORM_TENANT) while the caller is of another tenant is FrameworkCodes.AUTH_FORBIDDEN, whatever its roles and Caller.crossScope say: the backstop behind the edge's rule on platform roles, which no resolver goes around (#7346). A service's own code is not asked: a saga's derived command, a timer's and a job's do not come through here, and a call stays as the saga's own derived command would be.
Before all that, a caller that is not a service identity whose subject the framework reserves (service:, system:, in any letter case) is FrameworkCodes.AUTH_FORBIDDEN (Caller.reservedSubjectRefusal, #7364): the edge's refusal again, for a request no edge stands in front of (the node's own CommandClient with a caller the application built, a relayed peer command, the test DSL).
The one rule of the gateway, for this node's aggregates and a peer's, and of the test DSL.