Are you an LLM? You can read better optimized documentation at /guide/extensions/cosec.md for this page in Markdown format
CoSec
The CoSec extension integrates the CoSec security framework with Wow's WebFlux command and query endpoints, handling security context injection and propagation.
How It Works
CoSec integration provides three key components:
- CommandRequestHeaderAppender — Extracts
CoSec-App-IdandCoSec-Device-Idfrom HTTP request headers and appends them to command headers - CommandBuilderExtractor — Extracts
CoSec-Request-IdandCoSec-Space-Idfrom HTTP request headers and injects them into the CommandBuilder - MessagePropagator — Propagates
app_idanddevice_idfrom upstream message headers to downstream messages in the processing chain
Installation
Add the wow-cosec dependency and enable the cosec-support capability in your Spring Boot Starter:
kotlin
implementation("me.ahoo.wow:wow-spring-boot-starter") {
capabilities { requireCapability("cosec-support") }
}Auto-Configuration
When both wow-cosec and CoSec are on the classpath, the CoSecAutoConfiguration automatically registers the security integration beans. No additional configuration is required.