serverless / serverless-google-cloudfunctions

Serverless Google Cloud Functions Plugin – Adds Google Cloud Functions support to the Serverless Framework
https://www.serverless.com
MIT License
271 stars 127 forks source link

http function with egress through vpc-connector does not egress traffic to internet when called from external IP #248

Open davidrdm opened 3 years ago

davidrdm commented 3 years ago

What I’m trying to do:

What’s happening:

What I have done:

What I expected to happen:

When my external ip calls the function, why is egress traffic from the vpc-connector try to go to a different ip on the Google network (and getting blocked) rather than directly back to my external ip?

More generally, can someone explain to me what I’m doing wrong, and what the right way is to block egress to the internet of my http function except for whitelisted ip addresses? (I intend this as a backup security mechanism, as I am also checking the hash of a secret that is passed with the HTTP GET call and returning an error if it doesn’t match.)