Rethink forgejo auth #288

Open
opened 2026-10-09 14:04:31 +00:00 by mih · 0 comments
Owner

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.code set to write for permission categories:

  • incoming_write

the time must have repo.actions set to write for permission categories:

  • curated_write
  • zones_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.read and posting requires repo.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.actions write 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.

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.code` set to `write` for permission categories: - `incoming_write` the time must have `repo.actions` set to `write` for permission categories: - `curated_write` - `zones_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.read` and posting requires `repo.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.actions` write 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.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
orinoco/dump-things-service#288
No description provided.