-
Notifications
You must be signed in to change notification settings - Fork 56
Description
This is a query regarding the implementation of Authentication and Authorisation within soul-cli.
I have a requirement to support anonymous access to my application. At a basic level, I picture a soul API request being sent without a JWT token, and soul allowing GET on any resource.
I imagine we could introduce a set of role_permissions for a special role which only allow READ content to tables. Somehow, soul would translate anonymous calls as being calls using that role - and provide access according to the specified role_permissions.
I guess this would be implemented in src/middlewares/auth.js, as changed processing in hasAccess for if the request.cookies.accessToken is missing.
I also-guess that for this special processing we'd introduce a runtime -anonRole config parameter that specifies the role id to be used for unauthenticated (anonymous) users.
Feedback is welcomed on this :-D