Firebase 如何识别我的应用程序并防止其他应用程序冒充我的应用程序?

发布于 2025-01-20 09:31:39 字数 508 浏览 2 评论 0原文

我已经在 Firebase 中创建了一个项目并注册了我的应用程序。我向此应用程序发送数据消息。 我不想在我的应用程序上进行任何用户身份验证。但是,我确实希望所有 FCM 数据消息仅由我的应用程序处理。没有其他应用程序能够访问我的数据消息。

因此,我的问题是 - Firebase 如何确保在我的项目中注册的应用程序是预期的应用程序?

如果它基于包名称,那么我可以很好地创建一个虚拟应用程序,并将其命名为我试图欺骗的应用程序。这不是一个很大的安全漏洞吗?

我可以反编译 APK 以获取 google-services.json 所需的所有配置。那么,什么可以阻止某人欺骗我的 Firebase 项目来注册他们的应用并访问所有数据消息呢?

我创建了一个虚拟应用程序并能够重现上述内容。虚拟应用程序成功接收到数据消息。

我确实在 Firebase 项目设置中看到了我的应用程序的“App ID”,但这不是我在设置时提供的内容。所以,这是 Firebase 生成的。因此,这不是验证我假设的应用程序的方法。

I have created a project in Firebase and registered my app. I send data messages to this app. I do not want to have any user authentication on my app. However, I do want that all my FCM data messages be handled only by my app. No other app be able to access my data messages.

So, my question is - How does Firebase ensure that the app which is registering with my project is the intended app?

If it is based on package name, then I can very well create a dummy app and name it exactly the way as the app I'm trying to spoof. Isn't this a big security flaw?

I can decompile the APK to get all the required config for the google-services.json. So, what stops someone from tricking my Firebase project into registering their app and getting access to all the data messages?

I created a dummy app and was able to reproduce the above. The dummy app successfully received the data message.

I do see something called App ID for my app in the Firebase project settings, but this isn't something I provided while setup. So, this is something Firebase generated. So, this wouldn't be a way to verify the app I assume.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文