Rethink forgejo auth #288
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
orinoco/dump-things-service#288
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Forgejo integration is implemented by looking up the permissions of particular teams that the user identified by a token must be a member of. The current mapping of forgejo team permissions is detailed at https://dump-things-service.psychoinformatics.de/en/latest/authentication.html#forgejo-based-authentication
The team must have
repo.codeset towritefor permission categories:incoming_writethe time must have
repo.actionsset towritefor permission categories:curated_writezones_access(write to user inboxes)These write permissions have no implications on actual write access to the forgejo organization, because the teams can be configured to only have access to specific repos, and the list of specific repos can be empty.
However, some teams are large, and maintenance is tedious. It would be good, if the purpose of a team would not be forcibly independent of actual repos.
One use case is file upload. This is a shacl-vue feature that allows for uploading attachments via POST to the git-annex endpoint of a dedicated repository. Reading this specific repo requires
repo.readand posting requiresrepo.write. It would be good to be able to make the attachment repo be part of the list of the repos in the collection access management teams. However,repo.actionswrite is also used as a permission indicator (but not read). This means that any curator account also gets write access to the action system for such a repo.That all being said: the coming read access policy management also needs to be evaluated in this light. With respect to attachments, the effective access granularity is at the level of a whole repository. It is certainly possible to separate attachment repos by policy they are governed under, but I think this has not been thought through and documented properly at this point.