3 ms·
In these kind of systems, your app users also become database users and effectively each visitor gets their own token to access the database. You then add rule
by manigandham 8y ago
In these kind of systems, your app users also become database users and effectively each visitor gets their own token to access the database.
You then add rules to limit users so they can only read/write their own data. This works fine for many simpler scenarios and avoids the need for a backend completely, with the potential risk for overuse.
If you need more control and protection then you should have a backend layer to get the data server-side.
- maldeh 8y agoBy "In these kind of systems, your app users also become database users", do you mean by RBAC or some other session-based control on the backend, or does Firestore perform some intelligent user entity resolution I'm missing? As far as I can tell, any naked frontend-only client serving content without its own access management sounds quite open to a single bad actor spawning a large number of sessions on the same host, and on a small number of distributed hosts, to eat up all available resources. I'm not inclined to ever trust a number of users behaving nicely at n>100 personally. Given that Firestore appears to advocate "serverless" client-driven applications, unless there's some foolproof DDoS mitigations I'm finding it a hard sell, especially on the whole "if you need more control and protection, do X" argument - you rarely need that until somebody straight-up exploits you, and when you do, you're not going to be particularly sympathetic towards Google's marketing speak.
- thecatspaw 8y agoYou can require login for read/write access