Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

See if permission system can restrict applications to perform mutations on their own schema only #1

Open
Ked57 opened this issue Jun 24, 2019 · 3 comments

Comments

@Ked57
Copy link
Contributor

Ked57 commented Jun 24, 2019

The example:

Humeur du mois needs a remote schema to perform actions like casting a vote, as it can't be entrusted to the user. Right now we think this can't be using the users JWT and would rather use and userId that has administrator privileges, problem is that this user could have access to the rest of the database and it exposes the whole system to privilege elevation.

We need to find a way to get the JWT token on remote schemas too and define a permission to modify data

@Ked57
Copy link
Contributor Author

Ked57 commented Jun 24, 2019

Since this is a thing
image
We can define permissions for a role like "Collaborator" to insert a vote, the remote schema will do the verification and forward the JWT back to Hasura when doing the mutation
Additionally, we want the JWT to include the application ID it came from so an application can only mutate its own data

@hgwood
Copy link
Member

hgwood commented Jul 5, 2019

@Ked57 could you write here what we have discussed?

@Ked57
Copy link
Contributor Author

Ked57 commented Jul 5, 2019

Ok so each app has it's own namespace in the database which means roles have to be declared as applicationNamespace_role. Auth0 will send this during authentication, so the roles defined in schema have to be the same

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants