Most of the tutorials I've read so far uses @EnableOAuth2Sso
instead of @EnableResourceServer
on the API gateway. What are the differences? What the OAuth2Sso
does in contrast?
Details: I'm implementing a security/infra architecture for spring-based microservices and single page apps. For some time, while we didn't have security requirements, the SPAs talked directly to open microservices, on different hosts (CORS party).
Now I'm adding a layer of security and the gateway pattern using spring-oauth
and spring-zuul
. So I have a service (uaa-service) with @EnableAuthorizationServer
and a gateway with @EnableZuulProxy
& @EnableResourceServer
. I only need the password grant type, so each SPA has it's own login form and authenticates with uaa-service token endpoint, trough the gateway, and then proceeds to use that token for further requests.
Is there anything wrong with this approach? Should I be using @EnableOAuth2Sso
?