0

我使用这种架构:

AWS API Gateway (Lambda Authorizer) -> NLB -> Proxy (Nginx container) -> Backend container (private subnet)

当我使用有效令牌调用 API 时,Cloudwatch(Nginx 容器)出现错误:

Method response headers: {Server=nginx/1.16.1, Date=Mon, 28 Jun 2021 07:16:28 GMT, Content-Length=0, 
Connection=keep-alive, Vary=Origin,Access-Control-Request-Method,Access-Control-Request-Headers, 
WWW-Authenticate=Bearer error="invalid_token", error_description="An error occurred while attempting to decode the Jwt: 
Unable to resolve the Configuration with the provided Issuer of 
https://olaqinb2c.b2clogin.com/[tenant-id]/null/v2.0/", 
error_uri="https://tools.ietf.org/html/rfc6750#section-3.1", X-Content-Type-Options=nosniff, 
X-XSS-Protection=1; mode=block, Cache-Control=no-cache, no-store, max-age=0, must-revalidate, Pragma=no-cache, Expires=0, X-Frame-Options=DENY}

在此迁移(cognito 到 Azure AD B2C)之前,我将 Cognito 与 AWS Api Gateway 一起使用,它运行良好。

此外,在我没有 API 网关和 Nginx 代理的本地电脑上,它工作正常。

谢谢您的帮助

4

1 回答 1

0

您是对进入 API 网关的请求使用代理配置,还是在映射每个请求?您还可以启用 API Gateway 日志以检查您是否正确接收所有参数。

于 2021-09-01T02:16:05.873 回答