Expected Behavior
MODE_INHERITABLETHREADLOCAL and DelegatingSecurityContextAsyncTaskExecutor should be properly documented next to each other.
Current Behavior
People are confused, programs have bugs: https://github.com/spring-projects/spring-security/issues/6856, https://github.com/spring-projects/spring-security/issues/3378, etc.. stackoverflow
Context
It took me a good amount of googling and investigating why do some of my async threads have totally unrelated jwt tokens and crashes related to that (similar to this). If you happen to read the documentation, or click on a wrong stackoverflow thread and apply the MODE_INHERITABLETHREADLOCAL fix, then you're bound for sleepless nights.
Please do document this in the official documentation and provide a guidance how to properly use DelegatingSecurityContextAsyncTaskExecutor (including the proper underlying threadpool shutdown), at best right next to the MODE_INHERITABLETHREADLOCAL.
Comment From: rwinch
Thanks for the report @jmisur Would you be interested in submitting a pull request?
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.