Reputation: 85
How to write read and write rules for a node in Firebase real-time database, so that it can be accessed only through the Firebase Admin SDK and not by the users?
If I write rules in the following way:
{
"rules": {
"MyData": {
".read": false,
".write": false
}
}
}
Users won't be able to read and write the node MyData. But will Firebase admin SDK be able to read and write that node?
Upvotes: 1
Views: 396
Reputation: 317878
By default, access to Firebase products (including Realtime Database) via the Firebase Admin SDK is always 100% privileged to perform reads and writes of all data within those products, assuming that the SDK was initialized with a service account for the project that hosts the product.
Upvotes: 3