-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide Micrometer Context Propagation for SecurityContext #13123
Comments
Hi, @philsttr, thanks for the suggestion. Reading the links you provided, I gather that this will be done automatically when an application uses |
Hi @jzheaux, Thanks for considering this feature. In order to support context propagation of the Spring Security Context, Spring Security would need to:
When micrometer context propagation needs to propagate context in either direction (e.g. handle/tap or captureContext), it will invoke all of the registered |
|
@osi Spring Security stores a |
ah, i could be wrong! i was looking at the type signature of what is being ***@***.*** - http://fotap.org/~osiOn Sep 28, 2023, at 1:01 AM, Phil Clay ***@***.***> wrote:
@osi I'm curious if that one is correct, because Spring Security stores a Mono<SecurityContext> in the subscriber context with key SecurityContext.class, but that accessor puts the SecurityContext directly into the subscriber context with key SecurityContext.class.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Add context propagation support via Micrometer Context Propagation for the
SecurityContext
, betweenSecurityContextHolder
andReactiveSecurityContextHolder
.This would allow applications to easily cross between the reactive <-> imperative border in either direction, and have the
SecurityContext
available on both sides.Examples:
handle
ortap
operators (which propagate from Context to ThreadLocals) to call into imperative code that expects theSecurityContext
to be accessible fromSecurityContextHolder
.captureContext
operator (which propagates ThreadLocals to Context) to call into reactive code that expects theSecurityContext
to be accessible fromReactiveSecurityContextHolder
.The text was updated successfully, but these errors were encountered: