I received a warning email from Firebase, that my (productive for a while already) database has insecure rules, and that authenticated users can read/write the whole database, and thus change or steal data or make costly changes.
This is kind of true, as it's a server-less turn-based game DB, and the app of every user basically can make changes to all parts of it. There is almost no data anywhere that read-only to all users, every move changes something everywhere in data pertaining to a game match and all participating users. Beside the "auth != null" restriction, the only further rule makes sure that a change-set has a +1 version number to the existing version to avoid race conditions.
Until that mail I still felt kind of safe as the only authentication provider is Playstore and Gamecenter oAuth, so given how complicated it is to set those up with all the signing cert stuff ;-) , I thought that really only the app itself would be able to do a proper authentication towards Firebase, and no individual with some other tools (premium hackers aside, that might always do that somehow...). Am I too naive?
On the mentioned potential of "making costly changes": if that would be the goal of a hacker, I am not sure how that should be prevented anyway unless Firebase would (finally -- sic) offer some hard data growth restriction limits. An authenticated user will always have _some_ area to validly write to, and then he could just fill it up with tons of data.
Regards, habitoti