Allow access from firebase functions only

October 3, 2018 933 views
Security Ubuntu 16.04

I have a mobile app with a backend hosted on firebase. I also have several services that a hosted on digitalocean. There services are only meant to be called from firebase functions and should not be accessed directly. What would be the best way achieve this level of security? I know that firebase functions does not have a fixed ip address so whitelisting ips will not work.

I’m thinking of using a basic http authentication between firebase functions and digitalocean server… Is there a better option?

1 Answer

You can leverage the time tested SSL certificate pattern. The DO server will have the key and firebase a certificate signed by the key. You can read more here:

Have another answer? Share your knowledge.