简体   繁体   English

如果我使用服务器端,是否需要 firebase 规则?

[英]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.

相关问题 如何在 Firebase 规则中获得正确的条件? - How do I get the correct condition in Firebase Rules? GAE3 Python 和验证 firebase 令牌服务器端(我们需要每次都调用 Firebase 吗?) - GAE3 Python and validating firebase token server side (do we need to call Firebase everytime?) 如果我使用 Firebase/Firestore 查询返回值,如何返回 TableView 数据源值? - How do I return TableView datasource values if I'm using Firebase/Firestore to query the returning value? 如果我使用 firebase 在 React Native 中进行身份验证,我是否需要使用 redux-toolkit - Do i need to use redux-toolkit if i am using firebase to authenticate in react native 如何判断我的 Kubernetes 集群中是否启用了服务器端应用? - How can I tell if server-side apply is enabled in my Kubernetes cluster? 我可以将 Cognito 与“客户端凭据”流联合(或其他信任在别处验证的服务器端应用程序的方式吗?) - Can I federate Cognito with "client credentials" flow (or other way to trust a server-side application authenticated elsewhere?) 如何使用规则禁止 Firebase 实时数据库中的用户? - How can I ban a User in Firebase realtime Database using the rules? 我是否需要 Firebase 项目才能使用 Firebase App Check? - Do I need a Firebase project to use Firebase App Check? 仅使用函数修改服务器端对象的元数据 - Modify metadata of object on server-side only using a function 使用服务器端 firestore 客户端时是否可以选择乐观锁定? - Is optimistic locking an option when using a server-side firestore client?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM