3 ms·
Has anyone here seen a database where your users are users in the db itself? Not just a user(id, name, email, password) table but actual db users with GRANTed
by gorgoiler 3y ago
Has anyone here seen a database where your users are users in the db itself? Not just a user(id, name, email, password) table but actual db users with GRANTed permissions and ACLs etc set appropriately, and open access to the DB for these users.
It seems like it would solve a lot of problems by eliminating the need for data broker apps / endpoints that simply put POST or GET parameters into different SQL queries based on which endpoint you hit. I have no idea if it would scale but I don’t see why it couldn’t.
This sort of idea came up earlier this month in another post as well:
https://news.ycombinator.com/item?id=38489307 https://news.ycombinator.com/item?id=38489307
- hahn-kev 3y agoYes I have, it was a nightmare. The biggest scaling issue was that on a server you must open a new db connection for each request. There's also little benefit because you still need to track application user data, so you still need a user table.
- lgas 3y ago> Has anyone here seen a database where your users are users in the db itself? PostgREST does this and it was a pretty nice experience when I used it. https://postgrest.org/en/stable/references/auth.html https://postgrest.org/en/stable/references/auth.html
- sarreph 3y agoYes, Firebase / Firestore has this capability. You grant access to collections (and even fields) using rulesets[0]. Firestore is a NoSQL db so it's a quite different paradigmatically though. [0] - https://firebase.google.com/docs/firestore/security/get-started https://firebase.google.com/docs/firestore/security/get-star...
- cloutiertyler 3y agoSpacetimeDB is one such database. It has the concept of an `Identity` which is just a 256 bit unique identifier for a connected user.