Implementing Access Control via Hasura Permissions #8842
-
Hi, I am currently exploring implementing permissions through Hasura. What are best practices to implement permission and also any limitations in implementing the same? Do the permissions inherited on views as well? To provide context, I have created roles that can only access data if that role has access to that row. Any article/blog that provides implementation examples? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Here is the list to the docs on authorization: |
Beta Was this translation helpful? Give feedback.
-
Hello, Thanks for asking. You can visit this blog by hasura on authorization with examples - https://hasura.io/blog/hasura-authorization-system-through-examples/ As it goes, the basic setup for authorization is to have a base auth webhook through which all your API calls would be traversed.
In order to make auth webhook work, you'll need to avoid passing x-hasura-admin-secret (admin secret env var ) directly from your client. After then you'll need to pass your webhook link to
|
Beta Was this translation helpful? Give feedback.
Hello,
Thanks for asking. You can visit this blog by hasura on authorization with examples - https://hasura.io/blog/hasura-authorization-system-through-examples/
As it goes, the basic setup for authorization is to have a base auth webhook through which all your API calls would be traversed.
This auth webhook will act as a middleware between your client and Hasura. It will not be exposed to public and hence you can create your auth business logic in that webhook. For more - https://hasura.io/docs/latest/auth/authentication/webhook/
In order to make auth webhook work, you'll need to avoid passing x-hasura-admin-secret (admin secret env var ) directly from your clien…