bitly / oauth2_proxy

A reverse proxy that provides authentication with Google, Github or other provider
MIT License
5.1k stars 1.21k forks source link

Integrating oauth2_proxy with AWS Cognito #674

Open AdeOpe opened 5 years ago

AdeOpe commented 5 years ago

Hi, thanks for oauth2_proxy. I managed to get oauth2_proxy to work with AWS cognito ;)

So I just tried to submit a feature branch but i get permission denied.

in the branch i added the following to the readme:

`

AWS with Cognito User pool OIDC

Example on how to integrate oauth-proxy with AWS cognito user pool

  1. Setup your AWS Cognito User pool - https://docs.aws.amazon.com/cognito/latest/developerguide/getting-started-with-cognito-user-pools.html
  2. Launch oauth2_proxy with the following

    -provider=oidc -client-id= -client-secret= -redirect-url=https:///oauth2/callback -login-url=https://.auth..amazoncognito.com/oauth2/authorize -profile-url=https://.auth..amazoncognito.com/oauth2/userInfo -redeem-url=https://.auth..amazoncognito.com/oauth2/token -scope=openid -cookie-secure=false -upstream= -email-domain=* -cookie-secret= -http-address= `

Could you please add the above to the README, if you think its useful for other people?

falfaro commented 5 years ago

How did you create the user pool?

AdeOpe commented 5 years ago

i scripted it using terraform https://www.terraform.io/docs/providers/aws/d/cognito_user_pools.html

or you can set it up manually using (I added this link in my above comment) https://docs.aws.amazon.com/cognito/latest/developerguide/getting-started-with-cognito-user-pools.html

falfaro commented 5 years ago

Do you mind sharing your Terraform parameters?

Also, my instance of oauth2_proxy crashes because I am not supplying the --oidc-issuer-url. Any ideas?