Firebase 数据库安全,无需 Firebase 身份验证

2024-02-08

我在 Play 商店上发布了一个应用程序,我想在该应用程序中实现 firebase。

我已阅读所有文档,但有两个疑问:

  1. 如果有人在我的应用程序中使用 apk 反编译器并获取 google services.json,他们可以对数据库做任何他们想做的事情吗?

  2. 在用户未登录的情况下,我的数据库是否可能是安全的?

我将不胜感激任何帮助


  1. 事实上,有人可以阅读您的信息谷歌服务.json不涉及安全漏洞。如果您正确配置了 Firebase 项目,您会注意到“项目设置“面板上有一个要添加的 SHA-1 签名。如果您添加了您的签名调试/生产密钥库,只有具有特定签名 con 的应用才会使用 googleservices.json 的数据与您的 Firebase 平台进行通信。 (如果您决定不提供 SHA-1,Google 将使用其他内容作为身份识别机制,如下所述here https://firebase.google.com/support/faq/#android-sha1)

  2. This question is not very clear. Your database is safe everytime. If your user is not logged in, probably he will not able to communicate with the database. Remember that a user should only be able to see it's own data, so if your app logic is correct a logged user shouldn't be able to see other peoples sensitive data. Moreover remember to not change the database/storage connection rules in the "Rules" panel like in the image below to prevent unauthorized operations:rules panel in Firebase console

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Firebase 数据库安全,无需 Firebase 身份验证 的相关文章