We are in the process of setting up api gateway with Lamba function behind it. The setup uses aws cognito authorizer. We have the VPC endpoint for api gateway so that is reachable through private IP.
But cognito does not support private links so we can't have the VPC endpoint for it. So this means the token issued by Cognito has to travel from https://ourdomain.auth.ap-southeast-2.amazoncognito.com to client over the internet.
Cognito documentation says following for data in transit:-
" Encryption in transit
All requests to Amazon Cognito must be made over the Transport Layer Security protocol (TLS). Clients must support Transport Layer Security (TLS) 1.0 or later. We recommend TLS 1.2 or later. Clients must also support cipher suites with perfect forward secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7 and later support these modes."
According to above the token should be encrypted.
But I have following questions:
Is TLS (1.2) enforced for Cognito?
with encryption in transit being available would security best practices still dictate having Cognito available through VPC endpoint so that the token does not need to travel on internet.
if a client application is coming from on-prem environment and accessing the api then if we make it go through a proxy in AWS then will the traffic remain in AWS backbone network or still flow through internet?