Caller
Who sends a command or runs a query, as the edge authenticated it: the facts admission takes a command's identity from (identity comes from the principal, never from the path or the body), and the facts an access policy (me.ahoo.wow.api.access.AccessPolicy) compares and a read authorizer (ReadAuthorizer) decides by. Commands and queries share it: the edge resolves one per request.
tenantId is the caller's tenant; a principal without one is in DEFAULT_TENANT. A platform role (PlatformRoles) counts only for a caller of PLATFORM_TENANT.
scope is the caller's owner and space: the scope it acts in.
subject is the principal's opaque id, for authorizers, logs and the Operator of what it commits; null for an anonymous caller.
crossScope says two things of the caller: it may name any other tenant or scope in the
Wow-Scopeheader, and it reaches every tenant where a route reads reach (an operator's routes: the parked entries, the subscriptions). A target the service reserves (the view store's owner(shared),TenantPolicy.reservedTargets) is named by any caller without it, and gives neither: no reach, and no other target (#7333).attributes are further facts about the principal (its roles, policies, claims) that an authorizer, a read authorizer (
ReadAuthorizer) or an access policy (me.ahoo.wow.api.access.AccessPolicy) may read. They live only as long as the request: none of them is written into a fact, but for the standard attribute APP, the calling application, which the edge records as the command's request fact me.ahoo.wow.api.decide.RequestFacts.APP_ID.service says the caller is a service identity: another service of the system, which names itself on the internal port that only the platform's own services reach, calling for a saga of its own; the public routes refuse a caller their resolver returns as one. Only such a caller may assert the root command a call acts for (its tenant, scope, operator and causation, the
Wow-Callheader); the edge refuses that header from any other caller. A service identity has a subject.
A caller is the runtime's view of one request; the Operator is what a commit records of it (toOperator).
Fields may be added: construct one with of; the constructor is internal to Wow.
Constructors
Properties
The application the caller calls from: the first value of its APP attribute, which only its resolver sets, from what it authenticated (CoSec's resolver: the application CoSec authorized the request in); null when it has none. Access policies (me.ahoo.wow.api.access.AccessPolicy) and read authorizers (ReadAuthorizer) read it here, and a command records it as its request fact me.ahoo.wow.api.decide.RequestFacts.APP_ID.
The caller's roles: the values of its ROLES attribute, none when it has none. Wow's resolvers set it, the development callers from the Wow-Roles header and CoSec's from the principal's roles in the request's scope, and an application's own resolver puts the roles it authenticated there. A role is the identity system's name; Wow gives none a meaning.
Functions
This Caller with the given fields replaced: Wow's own copy, left out of the ABI.
The operator a command of this caller records: its subject as the id and its own tenantId; actedElsewhere when the command acts in another tenant or scope than the caller's own, through Wow-Scope. Null for an anonymous caller.