Use Kotlin DSL Marker Annotations to prevent scope leaking in WebFlux DSL #8366
Labels
in: config
An issue in spring-security-config
status: first-timers-only
An issue that can only be worked on by brand new contributors
type: enhancement
A general enhancement
Milestone
Summary
The Kotlin DSL is designed with a specific hierarchy in mind.
However, the hierarchy is not enforced.
The following configuration should not compile, but currently it does.
Kotlin allows the creation of DSL markers, to control the scope in which a function is available.
We can use a DSL marker to annotate all classes that belong to the server HTTP security DSL and prevent scope leaking.
For this we will need a new DSL marker, similar to
@SecurityMarker
.A possible name for the new marker is
@ServerSecurityMarker
.See fde3ccb for the changes that introduced the
@SecurityMarker
.The text was updated successfully, but these errors were encountered: