防止滥用:适用于 Firebase 的 Cloud Functions 函数 [英] Preventing Abuse: Cloud Functions for Firebase
本文介绍了防止滥用:适用于 Firebase 的 Cloud Functions 函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
阻止攻击者重复触发 Cloud Function、造成巨额账单或导致项目遇到配额限制的最佳方法是什么?
What is the best way to stop an attacker from triggering a Cloud Function repeatedly, causing a huge bill or causing the project to run into quota limits?
一些想法:
- 使用RTDB 或云存储 尽可能多地触发,因为写入这些内容受到这些产品的安全规则
- 将功能置于诸如 Cloudflare 之类的服务之后
- 设置帐单提醒,以便在以下情况下发送通知每月的账单异常大
- Use RTDB or Cloud Storage triggers as much as possible, since writes to those are protected by those products' security rules
- Put functions behind a service like Cloudflare
- Set up billing alerts, so a notification is sent if the monthly bill is unusually large
推荐答案
在这里查看我的答案.
我的回答中项目的简短分类:
Short breakdown of items from my answer :
- 限制请求类型
- 如果可以,请进行身份验证
- 检查来源
- 在两者之间使用负载平衡器
- 使用类似 Cloudflare 页面规则
希望有帮助:)
这篇关于防止滥用:适用于 Firebase 的 Cloud Functions 函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文