1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
---
title: "Gitea Federation Development"
author: "Anthony Wang"
date: "2022-07-20"
theme: "Berlin"
---
You can find a recording of the presentation [here](https://cloud.forgefriends.org/s/JZyKDSpQR8GqLRF).
# Current progress
## Gitea main
- Not much currently, but the building blocks are there.
- User keypairs and HTTP signatures
## Pull request #20391
- Adds backend for federated following, starring, issues, forks, and pull requests
- Task list:
- 36/84 = 43% done!
- Federated following demo:
- Go to https://YOURFEDIVERSEINSTANCE.com/authorize_interaction?uri=https://git.exozy.me/api/v1/activitypub/user/Ta180m
# Steps to implement a federated feature
## Step 1
- Think about and **conceptually design** the feature.
- Example: We can support account migrations using a `Move` activity like what Mastodon does, and we'll need a UI to migrate all of an account's repos.
## Step 2
- If there are spec-level changes, **contribute them to ForgeFed**.
- Example: Submit a PR to ForgeFed documenting the usage of `Move`.
## Step 3
- **Implement** the feature in Gitea.
- Example: Write backend code for sending/processing `Move` and implement the UI.
# Upcoming challenges
## Frontend/UI
- I'm temporarily using some Ruby scripts and handwriting AS objects, but that won't work long-term.
- I predict this will be tricky and time-consuming, so we should start now.
- Reuse current Gitea UI but add federation handling to internal functions?
- Example: Use current create new issue UI, but handle federated issues in `issues.CreateCommentCtx()`.
## Federated collaborators and organizations
- Federated collaborators:
- How to handle Git push?
- How to handle settings synchronization?
- Federated organizations:
- A huge headache due to all sorts of crazy scenarios that can happen.
- Example: User on instance A is in a organization on instance B and forks a repo located on instance C to the organization.
## Permissions and private repo federation
- fr33domlover is working on OCAP in ForgeFed.
- Another simple solution is to use HTTP signatures for authentication.
- Example: I would like to view open issues on a remote private repo, so my instance uses my private key to send a signed request to the remote instance's Ticket actor endpoint.
## Contributors
- I won't have much time over the next two weeks to work on Gitea.
- Both Loïc and I posted calls for help on the fediverse, but no one has showed up yet.
- Contributions to my Ta180m/gitea fork highly welcome!
- Gergely Nagy set up daily Docker builds of my Gitea fork, so it'll be easy for testers to try it out.
## Moderation
- Blocking instances
- Add each remote instance as a login source, then you can disable login sources in the admin UI?
- Blocking users
- Any ideas how to do this?
|