尽管我完全了解 AppCheck 的用法,但我仍然想知道它如何帮助防止向 API 端点发送垃圾邮件请求。在黑客使用 OpenBullet 或任何黑客工具每分钟向特定端点发送数千个请求的情况下(例如,在社交应用程序中创建数千个虚假个人资料的注册端点):
once the hacker got their hand on the appcheck token from the device, can't they simply attach it to the request's header, and spam all they want the api endpoint that we secured from our backend by checking appcheck token? I mean, as long as the TTL didn't expire, I guess all their requests will pass the check thus they could use their hacker tool and pretend to come from the untempered app? …
我想提高我的应用程序的安全性,我正在研究 Firebase App Check 服务,该服务确保向服务器发出的所有请求都来自我的应用程序。仅在 Firebase 实时数据库中,我设置了以下规则:
"Users": {
"$userId": {
".read": "auth != null && $userId === auth.uid",
".write": "auth != null && $userId === auth.uid",
}
Run Code Online (Sandbox Code Playgroud)
我认为这可以确保请求来自登录到应用程序的用户。
那么 App Check 做的更多,该服务是否也阻止越狱或特别植根的设备?因为它在网站上说:请求来自真实的、未被篡改的设备。但是介绍中没有任何内容明确提到篡改意味着什么,即使我宁愿确定这似乎合乎逻辑。
那么 AppCheck 如何确保发送到数据库的数据没有损坏呢?
例如,如果启用数据持久性并且用户关闭应用程序,则更改本地存储的查询并重新启动应用程序。然后在我看来,损坏的请求将由 AppCheck 发送和验证,但它会被修改。如果没有,你能不能详细说明一下这个过程,因为我有点困惑。
data-integrity ios swift firebase-realtime-database firebase-app-check