Support external identity provider/authentication source #102
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
orinoco/dump-things-server#102
Loading…
Add table
Add a link
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?
Presently, access token and user identity need to be hard-coded in the server config. With our next deployment, this means >100 users. This implies substantial maintenance load:
An external identity provider would help here. Below is a sketch of a possible scenario that would be very convenient for our use cases:
Only have the following in the config, for a particular (or all) collection(s):
With an incoming request, the server checks whether an included token gives (a particular kind of) access to the configured project. If so, it grants access to the dump and perform the action, using the Forgejo user identity.
With this setup, users only need to be added once to the respective project, and from there on can generate and regenerate access tokens whenever they want or need.
This appears to be straightforward to do:
Yield a JSON object with a
permissionskey:For a token that has no write permissions,
pushwould befalse.I just realized that, while better for all other goal, it would be easier for a TRR user if the auth check would go against the TRR gitlab instance API.
In order to place a complete submitted record, it needs two more bits of information that would need to be inferred from an API query of an identity provider:
Idea for a forgejo provider (should be doable in the same fashion for any git hoster).
submitter id
The
https://<forgejohost>/api/v1/userendpoint provides a number of properties such aslogin,login_name,id,email,username. Any and all of these could be used as an identifier. It could become a configuration item, which of them to use for a particular deployment.incoming area label
This could also be the submitter id chosen above, in case the shall be isolation of submitters. Alternatively, a submitter's team association could be used to determine an incoming label.
The
https://<forgejohost>/api/v1/repos/<owner>/<repo>/teamsendpoint lists all known teams for the reference repo. This information could be obtained once and remain cached (for some time).From
https://<forgejohost>/api/v1/user/teamsit could now be determined, which team a user is part of (assuming one, and enforcing a 1:1 association). Thenameproperty of the matching team could be used as an incoming label.Addressed by PR #129, published in version 3.1.0