I have a question about the JwT decoder in Spring Security.
My implementation looks like this
@Configuration
internal class JwtConfig(
private val serverProperties: ServerProperties,
) {
@Bean
// for decoding JWT tokens
fun jwtDecoder() : ReactiveJwtDecoder {
return NimbusReactiveJwtDecoder
.withJwkSetUri(serverProperties.auth0JwKeySetUri)
.build()
}
}
the jwkseturi is an external endpoint with the public jwt key to verify signing.
The auth manager then uses it here:
val jwtAuthManager = JwtReactiveAuthenticationManager(jwtDecoder)
jwtAuthManager.setJwtAuthenticationConverter(jwtTokenConverter)
This then gets plugged into the main Spring security chain.
My question is does this endpoint get called for EVERY request? If so, isn’t this resource intensive, just as token introspection is for opaque tokens….?
4