0

I’m trying to modify my security rules such that I can deploy an app to play store, I tried the following:

rules_version = '2';
service cloud.firestore {

  match /databases/{database}/documents {

    match /{document=**}{

      allow read: if true;

      allow write: if request.auth != null

    }
  }
}

But still I received an email that says:

We've detected the following issue(s) with your security rules:

  • any user can read your entire database
  • any user can write to your entire database

Any solutions?

Frank van Puffelen
  • 499,950
  • 69
  • 739
  • 734
  • The message seems correct, since you have `allow read: if true;` anyone can read your entire database. I recommend reading the documentation that is linked from that alert to learn how to improve these rules, or some of the previous questions about the message: https://stackoverflow.com/search?tab=votes&q=%5bgoogle-cloud-firestore%5d%20%22any%20user%20can%20read%20your%20entire%20database%22 – Frank van Puffelen Apr 18 '22 at 01:18

0 Answers0