Package-level declarations

Types

Link copied to clipboard
class Caller @InternalWowApi constructor(val tenantId: String = DEFAULT_TENANT, val scope: Scope = Scope.NONE, val subject: String? = null, val crossScope: Boolean = false, val attributes: Map<String, List<String>> = emptyMap(), val service: Boolean = false)

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.

Link copied to clipboard
class Operator @InternalWowApi constructor(val id: String, val tenantId: String, val actedElsewhere: Boolean = false)

Whose name a fact is recorded in: the operator of a command and of the event stream it commits, the primary record of an audit.

Link copied to clipboard
class PlatformRoles @InternalWowApi constructor(val names: Set<String>)

The roles by whose name a service grants platform-wide power: what every tenant reads, or what lives in the platform's own tenant (Caller.PLATFORM_TENANT). A platform role counts only for a caller of that tenant (#7346): the edge refuses a caller of any other tenant that holds one with 403 wow.auth.forbidden, naming the rule, before any route reads its request. An identity service may let a tenant's administrator give a role of any name, so a name alone proves nothing.

Link copied to clipboard

The targets a service reserves (#7333): 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). A service declares them in code, as a bean, which the host unites into the tenant policy every node of the service applies alike.

Link copied to clipboard
class TargetScope @InternalWowApi constructor(val tenantId: String? = null, val scope: Scope? = null)

The tenant and scope a request asks to act in instead of its sender's own: tenantId, when given, replaces the sender's tenant; scope, when given, replaces the sender's scope as a whole, so a part it leaves out is not checked against the aggregate (Scope.NONE: replaced by none, nothing of it checked); a null scope keeps the sender's own (for a command a saga derives, the commit's; for a request a service route's handler sends through its call, the call's). A target that names only a tenant therefore acts in that tenant with that scope, on every path: an in-process client, an HTTP client and a saga alike.