Hook for nickname changes on Blender ID #1

Closed
opened 2023-02-08 12:08:43 +01:00 by Francesco Siddi · 4 comments

We need something to receive webhook POST requests from Blender ID, when a user changes their nickname. That should trigger an API request to Gitea to change their username there.

Originally created by Sybren.

  • Receive Blender ID webhook calls.
  • Gitea API call to find a user by their 'login name' (which is their numerical BID user ID) and 'source id' (database ID of the Blender ID auth source) (upstream PR #23376)
  • Gitea API call to alter a user's username (upstream WIP PR #22789)
  • Use those API calls to perform username changes, gracefully "Gitealizing" nicknames and ensuring uniqueness on the Gitea side.
  • Package everything nicely so that it can be deployed as a service somewhere.
  • Deploy it as a service somewhere.

The Git repository is at infrastructure/gitea-blenderid-webhook, issues are tracked in this (infrastructure/blender-projects-platform) repository.


The Gitea API call to find a user by their email address (upstream PR #22792) was superseeded by #23376 to make the connection between Blender ID and Gitea independent of user-changeable data.

We need something to receive webhook POST requests from Blender ID, when a user changes their nickname. That should trigger an API request to Gitea to change their username there. Originally created by Sybren. - [x] Receive Blender ID webhook calls. - [x] Gitea API call to find a user by their 'login name' (which is their numerical BID user ID) and 'source id' (database ID of the Blender ID auth source) ([upstream PR #23376](https://github.com/go-gitea/gitea/pull/23376)) - [x] Gitea API call to alter a user's username ([upstream WIP PR #22789](https://github.com/go-gitea/gitea/pull/22789)) - [x] Use those API calls to perform username changes, gracefully "Gitealizing" nicknames and ensuring uniqueness on the Gitea side. - [x] Package everything nicely so that it can be deployed as a service somewhere. - [x] Deploy it as a service somewhere. The Git repository is at [`infrastructure/gitea-blenderid-webhook`](https://projects.blender.org/infrastructure/gitea-blenderid-webhook), issues are tracked in this (`infrastructure/blender-projects-platform`) repository. ---------- The Gitea API call to find a user by their email address ([upstream PR #22792](https://github.com/go-gitea/gitea/pull/22792)) was superseeded by [#23376](https://github.com/go-gitea/gitea/pull/23376) to make the connection between Blender ID and Gitea independent of user-changeable data.
Sybren A. Stüvel was assigned by Francesco Siddi 2023-02-08 12:08:57 +01:00
Brecht Van Lommel added the
blender customization
label 2023-02-08 16:59:52 +01:00

There is a start on https://future.projects.blender.org/dr.sybren/gitea-blenderid-webhook, which I can migrate to projects.b.o next time I work on it.

The biggest issue now is that Gitea has no API calls to alter a user's username. Or to even find a user by email address or by BlenderID user ID.

There is a start on https://future.projects.blender.org/dr.sybren/gitea-blenderid-webhook, which I can migrate to `projects.b.o` next time I work on it. The biggest issue now is that Gitea has no API calls to alter a user's username. Or to even find a user by email address or by BlenderID user ID.
Sybren A. Stüvel added the
gitea feature request
label 2023-02-09 18:37:20 +01:00

Both Gitea PRs got merged.

Both Gitea PRs got merged.

Thanks for the poke @Andrej-4 .

Thanks for the poke @Andrej-4 .
Brecht Van Lommel added
deployment
and removed
gitea feature request
labels 2023-03-28 19:59:47 +02:00

The service has been deployed on the production servers.

The service has been deployed on the production servers.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
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: infrastructure/blender-projects-platform#1
No description provided.