Use micrometer context-propagation to propagate auth between threadlocal and reactor ops #13733
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: ideal-for-contribution
An issue that we actively are looking for someone to help us with
type: enhancement
A general enhancement
In spring mvc with reactive API, it uses a custom reactor subscriber, SecurityReactorContextSubscriber, to propagate the authentication and servlet request and response to the reactor operation chain. (Defined in
SecurityReactorContextConfiguration
imported byOAuth2ImportSelector
)The micrometer context-propagation library provides support for propagating such objects between threadlocal and reactor operation chains.
It is nice to migrate to it which aligns how micrometer observations are propagated as well as avoiding reactor corner cases that may not able to propagate by
Hooks.onLastOperator
.cc @sjohnr, @chemicL
relates to #11973
The text was updated successfully, but these errors were encountered: