I’d like to offer my customers a graph database for knowledge management or just note taking.
So every customer would get a dedicated child database with a graph.
How would I secure each single child database, so that only the owner is allowed to query the database?
I saw this guide here. The problem for my case is that I want to restrict the role on a database and not only on collections.
So I’d somehow need to create a role which can only access the database, if it’s somehow referenced in the users collection. Would that work and be safe or am I missing something? To me this looks a bit like a hack.
My only idea would be the following:
I create a users collection with a metadata fiel like “owns_database”. So a user can own a database. Then on the server side code, I’d login the user (using fauna auth feature) and then check if the user owns the database thats being queried.
My problem here would be, that I do auth on my server side code and not built in with Fauna.
Is there a better solution for this, which is maybe even offered by Fauna?
Thank’s for the help.