Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Integrating oauth2_proxy with AWS Cognito #674

Open
AdeOpe opened this issue Nov 27, 2018 · 3 comments
Open

Integrating oauth2_proxy with AWS Cognito #674

AdeOpe opened this issue Nov 27, 2018 · 3 comments

Comments

@AdeOpe
Copy link

AdeOpe commented Nov 27, 2018

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=<YOUR_CLIENT_ID>
    -client-secret=<YOUR_CLIENT_SECRET>
    -redirect-url=https://<YOUR_DNS_FROM_ROUTE_53>/oauth2/callback
    -login-url=https://<YOUR_COGNITO_DOMAIN_PREFIX>.auth.<YOUR_AWS_REGION>.amazoncognito.com/oauth2/authorize
    -profile-url=https://<YOUR_COGNITO_DOMAIN_PREFIX>.auth.<YOUR_AWS_REGION>.amazoncognito.com/oauth2/userInfo
    -redeem-url=https://<YOUR_COGNITO_DOMAIN_PREFIX>.auth.<YOUR_AWS_REGION>.amazoncognito.com/oauth2/token
    -scope=openid
    -cookie-secure=false
    -upstream=<URL_OF_THE_APP_YOU_WANT_TO_HIT>
    -email-domain=*
    -cookie-secret=<SET_YOUR_COOKIE_SECRET>
    -http-address=<SET_YOUR_HTTP_ADDRESS>
    `

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

@falfaro
Copy link

falfaro commented Jan 7, 2019

How did you create the user pool?

@AdeOpe
Copy link
Author

AdeOpe commented Jan 7, 2019

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
Copy link

falfaro commented Jan 7, 2019

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants