openfga / community

The Community repository is the place to go for OpenFGA support
https://openfga.dev
Apache License 2.0
27 stars 32 forks source link

Support for MongoDB as an additional database in openFGA #372

Closed S4nfs closed 1 month ago

S4nfs commented 8 months ago

Checklist

Describe the problem you'd like to have solved

I've identified a crucial feature that's currently missing & might increase productivity, which became apparent due to my production app utilizing MongoDB Atlas as its database. Currently, only MySQL and PostgreSQL are supported. As a result, I had to provision a separate cloud server specifically for MySQL, which is my preferred current choice for openFGA. This not only increases the complexity of managing the database server but also consumes additional time optimizing both the databases.

Describe the ideal solution

I would like to suggest the addition of MongoDB as an add-on to OpenFGA. Ideally, this would include straightforward data migration options via the OpenFGA CLI. Thanks.

Alternatives and current workarounds

No response

Additional context

No response

miparnisari commented 7 months ago

Hi @S4nfs, we are discussing internally within the team how to make the addition of new supported databases a smoother and faster experience, both for the community and the maintainers. Sadly, we don't have a specific date for when the design will be finalized, but I'll post here when we have updates. Stay tuned :)

danielloader commented 5 months ago

I imagine it'll be possible, and the right time to revisit this if/when https://github.com/openfga/roadmap/issues/49 makes some traction. In principle if you can support DynamoDB, MongoDB isn't a huge leap from there.

JMRMourao commented 3 months ago

Hello team,

This is exactly what i was looking for, since you are using JSON documents it would be relevant to have MongoDB as a specific connector as it would indeed fit as a great addition.

danielloader commented 3 months ago

The issue isn't storing the json/tuples per se, it's more the query patterns are quite SQL friendly and not very NoSQL friendly at a guess.