Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 52,717
    • Issues 52,717
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,549
    • Merge requests 1,549
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #30672
Closed
Open
Issue created Aug 03, 2019 by Christoph Schulz@criztovyl

Federating GitLab through ForgeFed-ActivityPub

Introduction

Hello there :)

I am Christoph, I am part of the ForgeFed working group which is developing a specification for federating "Software Development Forges" using ActivityPub (AP).

While the spec is still in the works I would already like to play a little bit around with the software that could benefit from this, namely GitLab, Gitea, and Gogs. Mainly to get a better feeling what is required to be in the spec. :) Because I am not very familiar with Go yet, I decided to start with GitLab.

I am opening this issue to present the current state of my mind regarding this and to open the discussion with the GitLab community so I don't implement a thing that nobody likes. :)

So far I already have a small plan of action. It involves this steps regarding the user and project core entities:

  • expose them as JSON-LD / ActivityStreams / AP objects (including project issues)
    • implement (remote) browsing? (this is a challenging UI task to me)
  • add outboxes to them
  • add inboxes
    • make entities followable (implement the side-effects of the Follow activity)
    • make inbox browsable for the owner?
  • deliver new events to followers through AP means
  • allow adding new comments to existing issues via AP
  • open new issues via AP

There is a also a alternate plan, parallel to the tasks above, related to #14116:

  • forking of remote project repositories
  • creating MRs for remote projects
  • sending MRs to remote projects

I already have tinkered a little bit around with exposing the objects, by adding a new jsonld format to the corresponding controllers. The JSON is built with JBuilder.

Right now I am thinking about where to put the (remote) browsing of objects. Initially I imagined it as a third drop-down in the top bar, after "Projects" and "Groups", like "Projects", "Groups", "Federation", "Activity", ..., but UI/UX wise that might not be the wisest choice. ^^

Nothing of this is set in stone yet, I am open to suggestions and discussions. :)

Thanks for reading.

Below some more, but still incomplete, information that the Feature Proposal template suggests to provide.


Problem to solve

Federated GitLab (#14116, #21582).

Intended users

Users on GitLab.com or that self-host GitLab but want to interact on other GitLabs or even other forges like Gitea/Gogs.

Further details

See Introduction. :)

Proposal

Implement the ForgeFed Spec in GitLab.

Permissions and Security

some bullet points (WIP):

  • ActivityPub Inboxes will need to allow unauthenticated POSTs from the open internet. This is how ActivityPub works, but might be a challenge in regard to Spam.
  • Speaking utopian, Users and Identities should be separated. Local users would have both, remote users only Identities. (Read more.)
  • ...?

Documentation

N/A

Testing

N/A

What does success look like, and how can we measure that?

  • I can follow my GitLab user via ActivityPub
  • Merge Requests can be created locally for branches of remote projects / repositories
  • Merge Requests can be created remotely for branches of remote projects / repositories
  • ...? (WIP)

Links / references

  • #14116
  • #21582
  • ForgeFed category in the forum of the Federated Network Association (Feneas) (👋 @jaywink)
  • A topic of mine regarding my work on ForgeFed

Edit Sep 14: Fixed links of moved issued, extended description

Edited Sep 14, 2019 by Christoph Schulz
Assignee
Assign to
Time tracking