hasura / hasura/graphql-engine

anonymous/authorized roles problem

Open
#4,148 3 comments 1 reaction 0 assignees View on GitHub
a/authz c/server
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

If I have one query, let's pretend `query { feed { title } }` that should be available for both `anonymous` and `authorized` roles. Turns out I need to create 2 similar permissions for both roles.
It's not a problem until you have one, but if you have tens or hundreds of such resources it becomes a problem.
It would be convenient if `anonymous` permission is applied when there is no permission for the current role.
For example, `anonymous` user logged in and became `authorized`. There is no `select` permission for `authorized`, but it exists for `anonymous`, so it just applies.
Anonymous role by design got minimal access, so it's **always** safe.

And it always makes no sense to restrict access to a resource for authorized roles while allowing to `anonymous`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.