Firebase storage file is accessed by everyone

I have restricted rules:

rules_version = '2';
service firebase.storage {
 match /b/{bucket}/o {
   match /{allPaths=**} {
    allow read, write: if false;
    }
  }
}

but every one can access and download file from this link. enter image description here

how should I restrict downloading from this link?

Upvotes: 1

Views: 529

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598847

Download URLs by definition give read-only access to the file, and are not affected by the security rules.

If you want to control access to the file, you should not generate a download URL and instead access the file through the SDK only.

Upvotes: 3

Related Questions