spring-attic / spring-cloud-aws

All development has moved to https://github.com/awspring/spring-cloud-aws Integration for Amazon Web Services APIs with Spring
https://awspring.io/
Apache License 2.0
590 stars 376 forks source link

Add cognito integration #680

Closed eddumelendez closed 3 years ago

eddumelendez commented 3 years ago

See gh-123

eddumelendez commented 3 years ago

Doc related https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html#amazon-cognito-user-pools-using-the-id-token

eddumelendez commented 3 years ago

If I got it right, with this integration we are saving user from setting Spring Security OAuth config like explained here: https://www.baeldung.com/spring-security-oauth-cognito - is this correct?

It's related to this https://docs.spring.io/spring-security/site/docs/current/reference/html5/#oauth2resourceserver-jwt-jwkseturi

I am wondering if we could do more - for example map Cognito groups to GrantedAuthorities (I am not even sure if this is a good idea)

Not sure about it.

eddumelendez commented 3 years ago

I have tested it and it is working after some polish