Haneesh Bhardwaj
Haneesh Bhardwaj

Reputation: 127

Need of security rules in Firebase Realtime Database?

I am using firebase as backend for my android app. I recently came across database security rules. In my app, any user can access only some specific data to which I have created a DatabaseReference to, in the code of the app. So why do we need security rules if I specify the portions of data the user can access through the app, in the code itself?

Upvotes: 0

Views: 182

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317467

Because your code can easily be changed to do whatever an attacker wants. The rules one the server can't be changed or circumvented in any way, except by knowing how to log in to your Google account.

Upvotes: 1

Related Questions