oauth2_proxy
oauth2_proxy copied to clipboard
Integrating oauth2_proxy with AWS Cognito
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
-
Setup your AWS Cognito User pool - https://docs.aws.amazon.com/cognito/latest/developerguide/getting-started-with-cognito-user-pools.html
-
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?
How did you create the user pool?
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
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?