I have just recently started using Google's firebase as an online centralized database for android apps data (migrating from using local sqlite).
Being a newbie on firebase I would like to ask how secure is the firebase online database for android?
Reading from the following threads, does it really seem like anyone who can get access to google-services.json can insert and modify online data from my firebase database?
- Should I add the google-services.json (from Firebase) to my repository?
- Is google-services.json safe from hackers?
I am concerned how anyone who can get access to a decompiled apk's configuration file (google-services.json) can use it in their android project, say, to create an android app with a similar package name and push malicious data or delete from my firebase database.
Can you give advice if there are new and clever workarounds to making the online database more secure?
So far to add security, I have tried to:
- Edit firebase's Database Rules to:
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
Add firebase Email/Password authentication to my app to control login.
However, I find that newly-created apps even without the authentication feature can still push and modify data into the online firebase database, just by using the "hacked" google-services.json.
Thank you for your comments and suggestions!