hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.08k stars 2.77k forks source link

Restrict list of database schemas over graphql #7821

Open nadendlaprasad opened 2 years ago

nadendlaprasad commented 2 years ago

Is it possible create permissions in hasura at database schema level ? If yes, can you please provide related docs ?

m-rgba commented 2 years ago

Hey there @nadendlaprasad - we don't current have umbrella support for database schema level permissions (only permissions for the inner objects - tables, views, functions, etc.), but it's something we will look at adding as a later enhancement.

As an alternative, if you're looking for something like having a tenant-specific schema - you can have a look at An Example by Data Schema Derived Multi-Tenancy in this article: https://hasura.io/blog/multi-tenancy-history-quick-take-and-how-to-with-hasura/ which can give you some hints at how to create views which will support multiple tenants using multiple schemas.

nadendlaprasad commented 2 years ago

@m-rgba Thanks for your quick response. I have gone through the above article. It requires creating permission for each table in the schema to grant access for a given role.. Glad you have consider this feature as an enhancement. can we expect this feature in Hasura 2.1.0 release ?