graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

docs: add a guide on multi-tenant modelling with hasura

Open coco98 opened this issue 4 years ago • 11 comments

We should talk about the different approaches, how-to with hasura and their trade-offs:

  1. Different databases
  2. Different schemas
  3. tenant_id (shard column) type modelling

coco98 avatar Sep 05 '19 11:09 coco98

Really interested to see how we can do this with different databases. Is there any existing information already out there on that?

richardgirges avatar Oct 07 '19 22:10 richardgirges

@coco98 very interesting. Any plan for this?

mnlbox avatar Dec 09 '19 09:12 mnlbox

I would like to know about this as well..

bjensen avatar Jan 04 '20 22:01 bjensen

Any plans to support this? Would be really helpful to have that!

undefinedExpert avatar Feb 27 '20 19:02 undefinedExpert

This would be massively helpful. Is this stalled?

petecorreia-appital avatar Mar 15 '20 22:03 petecorreia-appital

@petecorreia-appital no this is not stalled. We'll work on this in the next weeks and hope to publish soon 🙂

marionschleifer avatar Mar 19 '20 09:03 marionschleifer

@marionschleifer that's amazing! thank you all at hasura for the hard work and please remember to take it easy, all this can wait in light of the pandemic. stay safe!

petecorreia-appital avatar Mar 19 '20 09:03 petecorreia-appital

Looking forward to it, especially the 3. tenant_id (shard column) type modelling, this will add support for citus data: https://www.citusdata.com/use-cases/multi-tenant-apps

mubaidr avatar Mar 31 '20 08:03 mubaidr

I wrote a gist summarized from a conversation with @leoalves and another Discord member about how to do Organization-based/Multi-tenant permissions modeling without the use of X-Hasura-Organization-Id or other session variables that some may find useful:

https://gist.github.com/GavinRay97/d7b8805078a47e00001e58eb8b1027b9

GavinRay97 avatar Mar 31 '20 20:03 GavinRay97

Hey folks,

This blogpost covers multi-tenancy using Hasura Authz quite comprehensively (also include Gavin's gist above): https://hasura.io/blog/authorization-rules-for-multi-tenant-system-google-cloud/

Hope this helps.

tirumaraiselvan avatar Apr 22 '20 04:04 tirumaraiselvan

I'm currently defining an app architecture. A documentation like that would help me a lot! I'm looking forward to study it! :clap: :smiley:

MarcusBondezan avatar Jun 17 '21 20:06 MarcusBondezan