[英]Do I need firebase rules if I'm using server-side?
Do I need to modify the code in firebase rules if I'm using server-side using nodejs如果我使用服务器端使用nodejs,是否需要修改firebase规则中的代码
I set the rules as follows:我设定的规则如下:
allow read, write: if true;
is there any problem?有什么问题吗? Note that I do not use firebase on the client side
请注意,我不在客户端使用 firebase
Backend code using the server/admin SDKs that are initialized with a service account always bypasses security rules completely, as if they don't exist.使用服务帐户初始化的服务器/管理 SDK 的后端代码总是完全绕过安全规则,就好像它们不存在一样。 Rules only apply to web and mobile apps.
规则仅适用于 web 和移动应用程序。 If you don't need frontend access at all, set your rules to reject everything for maximum security.
如果您根本不需要前端访问权限,请将您的规则设置为拒绝所有内容以获得最大的安全性。
From the documentation :从文档中:
The server client libraries bypass all Cloud Firestore Security Rules and instead authenticate through Google Application Default Credentials.
服务器客户端库绕过所有 Cloud Firestore 安全规则,而是通过 Google 应用程序默认凭据进行身份验证。 If you are using the server client libraries or the REST or RPC APIs, make sure to set up Identity and Access Management (IAM) for Cloud Firestore.
如果您使用的是服务器客户端库或 REST 或 RPC API,请确保为 Cloud Firestore 设置身份和访问管理 (IAM)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.