I have an API gateway in front of my Spring Boot app. This API gateway performs the oauth2 authentication and validation of the JWT token for me. My app receives the valid JWT token as HTTP header.
How can I combine this JWT token with the standard Spring security? I want to use the user groups passed in the JWT token for access control to my REST endpoints. And how can I avoid double validation of the JWT (on API gateway and service side)?