Looking into enabling an AWS Lambda function, reachable via an AWS API gateway, to auth via Okta. The lambda must have access to the IP address of the caller. Once an Application has been defined for the lambda in Okta, I think the following would work:
- client (requester) calls the URL that reaches lambda
- lambda sees that client not authenticated, responds with a redirect to okta
- client automatically redirects to okta, user logs in
- okta redirects client to the lambda, but this time there is a token so the lambda is happy
- lambda uses the event source IP: my understanding is that this will be the client WAN IP, not the okta server IP
- lambda does its work using this source IP, and sends http response
Did I get anything wrong?