To improve Spring Security's traceability, it would be helpful to be able to listen for when the SecurityContext changes in the SecurityContextHolder. This is specifically helpful when creating spans with Spring Cloud Sleuth.
One way would be to add SecurityContextHolder#addListener, where setContext and clearContext notify the listeners of changes.
/cc @marcingrzejszczak
Comment From: marcingrzejszczak
Cc @jonatan-ivanov