aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

(aws-cognito): UserPoolDomain.baseUrl() returns incorrect URL for gov cloud

Open kastork opened this issue 5 years ago • 5 comments

When operating in us-gov-west-1, baseUrl() returns

https://<prefix>.auth.us-gov-west-1.amazoncognito.com

when it should return

https://<prefix>.auth-fips.us-gov-west-1.amazoncognito.com

This is :bug: Bug Report

kastork avatar Jan 14 '21 01:01 kastork

Thanks for filing this issue. Is there any documentation around this you can point to? I'm wondering about things like the FIPS endpoint being opt-in or just standard for gov cloud.

nija-at avatar Jan 14 '21 11:01 nija-at

One would expect this page to document ALL the gov cloud differences, but it does not: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-cog.html. Perhaps an issue should be raised with the documentation people.

FIPs info is available here, but it doesn't mention non-fips for cognito: https://aws.amazon.com/compliance/fips/

I don't think you can opt out of FIPS for the authorization endpoint in the gov partition. This would make sense considering cognito is likely to be used to protect services that also require FIPS.

kastork avatar Jan 14 '21 14:01 kastork

@nija-at Any update or workaround on this? I presently can not deploy an API with a Cognito authorizer to GovCloud with the CDK. (Subsequent to comment, noticed https://github.com/aws-cloudformation/aws-cloudformation-coverage-roadmap/issues/553 which may be relevant)

sky-c avatar Apr 09 '21 13:04 sky-c

One would expect this page to document ALL the gov cloud differences, but it does not: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-cog.html. Perhaps an issue should be raised with the documentation people.

FIPs info is available here, but it doesn't mention non-fips for cognito: https://aws.amazon.com/compliance/fips/

Yes, GovCloud documentation is lacking.

The page above should list <your_user_pool_domain>.auth-fips.us-gov-west-1.amazoncognito.com in the middle column for GovCloud. Personally, I think <your_user_pool_domain> should say <your_user_pool_domain_prefix>.

I don't think you can opt out of FIPS for the authorization endpoint in the gov partition. This would make sense considering cognito is likely to be used to protect services that also require FIPS.

Yes, Cognito in GovCloud (only available in us-gov-west-1 right now) requires using a subdomain of auth-fips.us-gov-west-1.amazoncognito.com. Custom domains are not available (leverages CloudFront in Commercial partition).

cmckni3 avatar Apr 09 '21 18:04 cmckni3

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar May 05 '22 02:05 github-actions[bot]