Skip to content Skip to sidebar Skip to footer

How To Integrate Security Rules Into Firestore Client From Python's Server Client Library?

I am trying to test my security rules using the Firestore emulator. I made a firestore.rules security rule that disallows all reads and writes: service cloud.firestore { match

Solution 1:

Testing security rules with the emulator is only supported for nodejs apps that use the "@firebase/testing" module as described in the documentation:

Use the @firebase/testing module to interact with the emulator that runs locally.

With this module, you can initilaize the SDK to provide user information that will be delivered to the emulator for the specific purpose of testing rules.

If you want to use python instead, you would have to reverse engineer what that module does, and write that into your own test code. That might be more effort than learning enough JavaScript to perform tests as documented.

Post a Comment for "How To Integrate Security Rules Into Firestore Client From Python's Server Client Library?"