无法将认知身份验证添加到 aws 负载均衡器 (ELB)

问题描述

我正在尝试在 https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html?icmpid=docs_elbv2_console 之后向我的负载均衡器添加认知验证。

当我设置身份验证过程时,我只有“oidc”类型,但我希望“cognito”类型:

enter image description here

当我尝试rest api时,我遇到了同样的问题

动作类型'authenticate-cognito'必须是'redirect,fixed-response,forward,authenticate-oidc'之一

认知不可用。

我是否缺少某些权限?我是 AmazonCognitoPowerUser

解决方法

我遇到了同样的问题,我在 eu-west-3 上,

通过在 eu-west-1us-east 中切换,它可以完美运行,

我猜这个选项还没有完全部署

,

我在 eu-west-3 区域遇到了完全相同的问题,这可能是 Amazon 的一个错误,让我损失了一天的生命。
好消息是,您实际上可以将 Authenticate OIDC 配置为与 Authenticate Cognito 完全一样:

  • 颁发者https://cognito-idp.eu-west-3.amazonaws.com/[pool-id](确保使用 pool-id 而不是 pool-name)
  • 授权端点https://[pool-name].auth.eu-west-3.amazoncognito.com/oauth2/authorize
  • 令牌端点https://[pool-name].auth.eu-west-3.amazoncognito.com/oauth2/token
  • 用户信息端点https://[pool-name].auth.eu-west-3.amazoncognito.com/oauth2/userInfo

要填写的其他信息应该很简单。
确保在高级设置中选择您的范围,并允许负载平衡器安全组上的 HTTPS 出站流量。

您的应用客户端在 Cognito 中的回调 URL 应该是:

  • https://[CNAME]/oauth2/idpresponse 如果使用自定义域访问您的最终应用
  • https://[DNS]/oauth2/idpresponse 如果使用负载均衡器 DNS 名称访问您的最终应用