Overview
Hasura supports role-based authorization where access control is done by creating rules for each role,
table and operation (insert, update, etc.). These access control rules use dynamic session
variables that are passed to the GraphQL engine from your authentication service
with every request. Role information is inferred from the X-Hasura-Role
and X-Hasura-Allowed-Roles
session variables. Other session variables can be passed by your auth service as per your requirements.
For example:
Note
Hasura roles and permissions are implemented at the Hasura layer.
They have nothing to do with Postgres roles and users.