IhawuKtorConfig
Configuration for the IhawuKtor plugin — the analogue of the Spring Boot starter's beans.
Supply, at minimum, the field-policy source (policies or policyResolver) and the resources registry; wire resolvePrincipal to your Authentication to identify the caller.
Properties
Notified on each fail-closed drop; defaults to a no-op so the adapter needs no logger.
How a policy-resolver failure (a policy-store outage or misconfiguration) is handled. Defaults to ResolverErrorMode.MASK_ALL — mask the whole resource fail-closed ({}, still 200). ResolverErrorMode.FAIL_REQUEST instead lets the error surface as a 500, so an outage is not silent (only the resolver-error path; a missing principal still masks). See ADR 0011.
Resolves the caller for each request. The default fails closed — a null principal masks the whole resource ({}), matching the other adapters. In production map your Authentication result here, e.g. resolvePrincipal = { it.ihawuPrincipal() }.
Functions
Resolve field policies from static role-based rules.
Resolve field policies with a custom ResourcePolicyResolver (a DB, OPA, Casbin, …).