You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{file=**} {
allow read, write: if true;
}
}
}
The above rule allows all operations
Given the above rules, simply run the storage emulator, upload a file (example: file.txt).
Then using a new browser tab, go to the emulator storage localhost url for that file (example: http://localhost:port/v0/b/project-id.appspot.com/o/file.txt). This should output the json of the object, as expected.
Next, change the rules to allow read, write: if false. This disables all operations.
The following is logged in the console: i storage: Change detected, updating rules for Cloud Storage...
Reload the browser tab you had previously opened with the object's url. The json response still comes through instead of 403:Forbidden as it used to.
Restart the emulator, then reload the tab for the file
New rules now apply
[REQUIRED] Expected behavior
[REQUIRED] Actual behavior
The text was updated successfully, but these errors were encountered:
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.
I can confirm that I have the same problem on same versions (firebase-tools, Windows and Node but I'm using WSL 2 with Ubuntu 20.04), need to restart emulators to get rules updated.
Thanks for the report. This should be fixed in #4337 which was included in yesterday's release. Let me know if the problem persists; otherwise closing the issue.
[REQUIRED] Environment info
firebase-tools: 10.5.0
Platform: Windows 11, node 16
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
The above rule allows all operations
file.txt
).http://localhost:port/v0/b/project-id.appspot.com/o/file.txt
). This should output the json of the object, as expected.allow read, write: if false
. This disables all operations.The following is logged in the console:
i storage: Change detected, updating rules for Cloud Storage...
403:Forbidden
as it used to.[REQUIRED] Expected behavior
[REQUIRED] Actual behavior
The text was updated successfully, but these errors were encountered: