session validation in Lambda authorizer

0

Hi, I've a B2B system that authenticate users using spring security (store tokens in Redis & set session cookie as same site, secure, http only).

I want that the authorize process will do a Lambda authorizer.

How can the lambda authorizer get this token from Redis using the session cookie & validate it?

Any oen face this issues?

Thanks!

1개 답변
0

Your Lambda authorizer function should be attached to the VPC where Redis is running. You will include in the function a Redis SDK that will create a connection to the Redis cluster. You should create the connection outside the Lambda handler so it will be reused across all invocations.

You need to configure API Gateway to pass the Cookies header to the Lambda authorizer. When the function is invoked, it extracts the appropriate cookie from the header and validates it agains Redis. It will then return an appropriate resource policy that allows or denies the access.

profile pictureAWS
전문가
Uri
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠