CoSecAutoConfiguration
Wires CoSec into the host when the application has wow-cosec and CoSec's WebFlux module: the host wires its optional integrations as it wires Kafka, and wow-cosec keeps the Spring-free part, the resolver, the authorizers and the route map. It reads wow.cosec.* once, through WowProperties.cosec, the keys' one reader and one default.
CoSecCallerResolver is the host's CallerResolver when CoSec is on (
cosec.enabled, true unless set) and the application has none: the host's development callers (DevelopmentCallerResolver) step aside. Its options arewow.tenant.default,wow.cosec.cross-scope.rolesandwow.cosec.tenant-level.roles(the tenant-level callers), comma-separated or indexed lists. The caller's app and space are those of the scope CoSec resolved, behind a CoSec gateway (wow.cosec.mode=gateway) the ones the gateway forwarded. No CoSec principal is a service identity: a service names itself on the internal port.The app of the request's scope is the standard fact
app_id. CoSec's device id,CoSec-Device-Id, a client's persistent identifier, is recorded only when the application lists it inwow.http.request-facts, as any header: Wow adds no personal data of its own to a command.With CoSec on,
CoSec-Request-Idis the request id of a command withoutWow-Request-Id(CoSecRequestIds), so a command a CoSec gateway sends again under the same header is answered as a duplicate. With it off, Wow reads no header of CoSec's.Where CoSec decides the requests itself, the route map CoSec's pipeline reads is the Manifest's command and service routes (CoSecRouteMapAutoConfiguration).
CoSecCommandAuthorizer and CoSecServiceRouteAuthorizer, CoSec's decision on a command and on a service route call, are the node's authorizers when
wow.cosec.authorizer.enabledis true and CoSec decides here: an auto-configuration of their own after CoSec's pipeline, which defines the checker they ask (CoSecAuthorizersAutoConfiguration).
Experimental as wow-cosec is in 10.0: the class and its constant may change within 10.x until a 10.x minor release drops the marker.
Functions
CoSec's cross-scope roles (wow.cosec.cross-scope.roles) as platform roles, so that the edge refuses a caller of another tenant than the platform's that holds one (#7346). A configured name only adds a refusal, never removes one: a service's own platform roles stay declared in code.
Writes CoSec's refusals as Wow's problems when wow.cosec.problems is wow and the application declares no ProblemRenderer of its own, which wins: CoSec takes one renderer and refuses to start with two.
Says at startup who writes CoSec's refusals when wow.cosec.problems is wow: Wow, or the application.