如何不使用Firebase安全规则安全风险?

发布于 2025-01-27 03:11:19 字数 212 浏览 4 评论 0原文

我有一个NextJS应用程序,我正在使用Firebase Databse。我没有添加安全规则,因为我没有使用身份验证。

我将托管在Vercel上,我的Firebase配置存储在环境变量中。我听说不使用火焰是安全风险,但我不明白如何使用。即使客户端提出了请求,服务器API也是对firebase调用的呼叫。

如果我不使用安全规则,用户如何破解我的firebase请求并修改我的数据库?

I have a nextjs application and I'm using firebase databse. I have not added security rules as I'm not using authentication.

I'm hosting on vercel and my firebase config is stored in environment variables. I heard that not using firease is a security risk but I don't understand how. Even though the client makes the request, the server API is the one making firebase calls.

How is it that the user can hack my firebase requests and modify my database if I don't use security rules?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

洒一地阳光 2025-02-03 03:11:20

如果您的客户端应用不使用提供的Web或移动API直接访问数据库,则从未使用安全规则。它们仅适用于网络和移动访问。后端访问完全绕过规则。

如果您没有直接的客户端访问权限,则安全规则是毫无意义的。黑客将不得不找到其他方法来获得对数据库的未经授权访问,而不是利用缺乏规则。

If your client app is not using the provided web or mobile APIs to directly access the database, then security rules are not ever being used. They only apply to web and mobile access. Backend access bypasses rules completely.

If you have no direct client access, then security rules are meaningless. Hackers will have to find some other way to gain unauthorized access to your database other than exploiting a lack of rules.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文