The CLI commands can be run with any user with read access to the configuration file.
But the REST API should have more protection. The levels could be something like this:
Superuser: can do anything
Project configuration: can administer (e.g. using PUT) a specific existing project
Subject administration: can administer the subjects of a specific project
Learning: can perform learning operations on existing subjects of a specific project
Analysis: can perform document analysis, evaluation etc. - read only, no need for protection
How to implement this is left open for now. The Connexion toolkit seems to support OAuth2 access control, which might be used here in some way.
And once that's implemented in the backend, for the frontend there are libraries like Kindergarten, CASL, that support authorization through permissions/groups.
The CLI commands can be run with any user with read access to the configuration file. But the REST API should have more protection. The levels could be something like this:
How to implement this is left open for now. The Connexion toolkit seems to support OAuth2 access control, which might be used here in some way.