Skip to content
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

NimbusReactiveJsonWebTokenValidator runs on Netty event group threads #1846

Closed
kevin-wise opened this issue Nov 5, 2024 · 0 comments · Fixed by #1847
Closed

NimbusReactiveJsonWebTokenValidator runs on Netty event group threads #1846

kevin-wise opened this issue Nov 5, 2024 · 0 comments · Fixed by #1847

Comments

@kevin-wise
Copy link
Contributor

kevin-wise commented Nov 5, 2024

Expected Behavior

NimbusReactiveJsonWebTokenValidator should delegate to another thread pool so that RoleFinders etc won't run on a Netty event group thread

Actual Behaviour

NimbusReactiveJsonWebTokenValidator runs on a Netty event group thread.

JwtTokenProvider delegated to BLOCKING, but NimbusReactiveJsonWebTokenValidator does not. I would expect the behavior not to change. My RolesFinder implementation hits a database, so it has blocking operations. At the very least, I should have a way to configure it to use an executor service.

Steps To Reproduce

Create an application with io.micronaut.security:micronaut-security-jwt and io.micronaut:micronaut-http-server. Set a breakpoint in the RolesFinder resolveRoles function and you will see that it gets called on a Netty thread.

Environment Information

JDK 21

Example Application

No response

Version

4.6.6 (core) / 4.6.3 (platform) / micronaut-security-jwt 4.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant