How can I do IP whitelisting for a static site hosted in Firebase? / Is there a WAF for Firebase hosting?

无人久伴 提交于 2019-12-01 12:52:10

问题


I have a static website hosted in Firebase. I can attach a custom domain to it fine. I would like to restrict access to my site to a certain range of IPs.

I am aware that in GCP Google Cloud Armor can do this. But Cloud Armor only works with a Load Balancer and the load balancer routes traffic only to GCP VMs.(not to a Firebase hosted site)

In AWS, there is a Web Application Firewall that lets you do IP Filtering.

I see GCP has provided links to 3rd Party partners here: https://cloud.google.com/security/partners/

But my question is what is the best and easiest way to whitelist IPs for a static website hosted in Firebase?


回答1:


Web sites on Firebase Hosting are accessible to everyone. There is no way to block certain users, or IP ranges, from accessing them




回答2:


Because Firebase is PaaS service, there is no such thing like firewall. By Firebase launch checklist

There are only two kind of protection you can do:

Protect By Authenication

Add whitelisting for your domains to prevent unauthorized usage.

  • Whitelist your production domain for browser API keys and client IDs in the Google Developer Console.
  • Whitelist your production domain in the Auth tab of the Firebase console panel.

Protect your data

Because any client can connect to any Firebase, you must write security rules to secure your data.So according to this document Firebase security, it will show you how to secure your web by secure who can access database.

This blog Firebase Security & Rules is also a good reference to learn how to secure your Firebase.

Hope this will help you



来源:https://stackoverflow.com/questions/55447006/how-can-i-do-ip-whitelisting-for-a-static-site-hosted-in-firebase-is-there-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!