Cognito with Load Balancer

0

I'm trying to make the Cognito SSO. I'm already implemented it with Apache Server and it works ! Now I'm trying to do it without Apache, but with Load Balancer which redirect me to the Cognito Authentification. The authentification works, but next I need to do the similar thing to

RequestHeader set CAS-User something

Is it possible to do it with Load Balancer or maybe with Lambda Function or another method ?... This header is required by my application.

I was searching for CloudFront and LambdaEdge solution, but still can not understand how to get OIDC_Claim from Cognito after a authentification and then set with it my header...

已提問 2 年前檢視次數 280 次
1 個回答
0

Hi,

the OIDC claims (and Access Token ) are only available to backends of Application Load Balancer cause it is Application Load Balancer that acts as the OAuth2 client in this case and receives the JWTs from Cognito.

Adding a CloudFront and Lambda@Edge won't work as they are before the Application Load Balancer.

Can add a Lambda function or an API Gateway as the backend of the Application Load balancer to provide the Header as needed and proxify access to your Apache server.

Jeff

AWS
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南