Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase 我可以锁定客户端Firestore的读写操作吗?_Firebase_Google Cloud Firestore_Google Cloud Functions_Firebase Security - Fatal编程技术网

Firebase 我可以锁定客户端Firestore的读写操作吗?

Firebase 我可以锁定客户端Firestore的读写操作吗?,firebase,google-cloud-firestore,google-cloud-functions,firebase-security,Firebase,Google Cloud Firestore,Google Cloud Functions,Firebase Security,我可以锁定客户端Firestore的读写操作吗?我只希望Firebase函数只能在Firestore中读写 我曾直接从客户端连接到Firestore,但我想现在客户端只能通过后端(为了满足某些条件和安全)服务器进行呼叫,以避免黑客数据非常简单,您必须拒绝所有访问,如下所示: // Deny read/write access to all users under any conditions service cloud.firestore { match /databases/{databa

我可以锁定客户端Firestore的读写操作吗?我只希望Firebase函数只能在Firestore中读写


我曾直接从客户端连接到Firestore,但我想现在客户端只能通过后端(为了满足某些条件和安全)服务器进行呼叫,以避免黑客数据

非常简单,您必须拒绝所有访问,如下所示:

// Deny read/write access to all users under any conditions
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if false;
    }
  }
}

由于云功能通过Admin SDK与Firestore交互,它们完全绕过了安全规则。

非常简单,您必须拒绝所有访问,如下所示:

// Deny read/write access to all users under any conditions
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if false;
    }
  }
}
由于云功能通过AdminSDK与Firestore交互,因此它们完全绕过了安全规则