Report this

What is the reason for this report?

Allow access from firebase functions only

Posted on October 3, 2018

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?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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:

https://medium.com/@sevcsik/authentication-using-https-client-certificates-3c9d270e8326

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.