Context and Problem Statement
Government code lives on several forges and will keep doing so. Some organizations run their own forge or want one, others never will. code.overheid.nl runs Forgejo (0001) and offers SSOn Rijk and GovConext as logins. Code Punt, the team that runs the platform, is not one of the organizations whose code it mirrors or hosts. Below, code.overheid.nl means the platform and Code Punt the people who run it.
Three questions are open. Where is a repository authoritative, who can sign in where, and who may change what? The GovForges architecture notes lay out the options. They deliberately keep hosting, interaction and authority apart, and identity apart from authorization. This ADR picks a direction within that frame.
Take an example. Amsterdam and Utrecht build a component together, a module for reports about public space that both of them run. It lives on Amsterdam's forge. A developer from Utrecht does half the work and should be able to merge. Today Amsterdam gives that developer a local account, and has to remember to remove it when they leave Utrecht.
We tried this twice in November 2026. First came a demo with three forges (Kiesraad, RVO and Logius, with made-up people and projects). It compared a mirror on code.overheid.nl, changes without an account, and signing in with another forge's account. Signing in across forges worked with Forgejo as it is. Forwarding changes through the central platform was the most fragile part (see A2). A proof of concept then built this decision on Forgejo 15.0.11. It runs as a demo with a walkthrough. It leaves out parts of the decision, which Confirmation lists. Every Forgejo limitation named below is unchanged in Forgejo 17.0.2.
This decision changes the mission of code.overheid.nl. Mission and vision names a collaboration platform and a build platform as goals two and three. Under this decision, projects are developed on the forges of organizations, and code.overheid.nl publishes, checks and brokers identity. It builds mirrored code to produce evidence. A mirror runs the workflows its origin already has (0003, rule 10). What code.overheid.nl builds from mirrored code, it publishes signed in its own package registry (same ADR, rule 11). No project has its build defined on code.overheid.nl.
Decision Drivers
- Each repository has one source of truth. A mirror that accepts its own issues or pull requests drifts from the origin.
- An organization keeps control over its code, its access rules and its process.
- Only people whose affiliation an organization vouches for can get rights through the federation. Access ends at the home organization when someone leaves, with no accounts to clean up elsewhere.
- Work lives with the organization of the person who did it. Government employees work for their employer, which stays accountable for what they make. So when a Utrecht developer changes Amsterdam's code, that work happens at Utrecht.
- Anyone can look, report and propose a change, without getting rights by it.
- It works with Forgejo as it is. The Forgejo FAQ warns that ActivityPub federation is experimental. Breaking changes can come without warning and can permanently burn the (sub-)domain for federation.
- An organization without the people to run a forge can still take part.
- Every commit found on code.overheid.nl has had the same checks, with public results.
- Code stays findable and readable when its forge disappears.
Considered Options
Where the code lives:
- A1. At the forges of organizations, with read-only mirrors and checks on code.overheid.nl
- A2. At the forges of organizations, with mirrors on code.overheid.nl that accept changes and forward them
- A3. On code.overheid.nl, as the one forge for all of government
- A4. At the forges of organizations, with a catalog of links on code.overheid.nl
How identity works across forges:
- B1. Forges are identity providers, and code.overheid.nl brokers between them (hub)
- B2. Forges are identity providers and trust each other directly (mesh)
- B3. A local account on every forge someone works on
- B4. One identity provider for all of government
- B5. Native forge federation (ForgeFed in Forgejo)
- B6. Organizations vouch through their own identity provider where it is connected to GovConext or SSOn Rijk, and through their forge otherwise, with code.overheid.nl as the hub
Decision Outcome
Chosen option: "A1. At the forges of organizations, with read-only mirrors and checks on code.overheid.nl" together with "B6. Organizations vouch through their own identity provider where it is connected to GovConext or SSOn Rijk, and through their forge otherwise, with code.overheid.nl as the hub". Together they meet the drivers with what Forgejo already has: pull mirrors, OAuth2 as provider and client, pull requests through AGit, and the commit status API. A1 needs rule 8 for organizations without a forge. Reporting at the origin stays a cost.
Under the name code.overheid.nl we do three things. It is the publication platform where government code is found, mirrored, checked and built. The signed artifacts of those builds go in its registry (0003, rule 11). It is also the identity hub through which someone from one organization is known at another organization's forge (rule 4). And it is where a request for a forge arrives, which Code Punt then runs (rule 8). It holds no project of its own, only mirrors, what is built from them, and the register. The code lives on the forge an organization runs itself (rule 7) or has Code Punt run (rule 8). The projects on code.overheid.nl today move to a forge that Code Punt runs for their organization. Their address on code.overheid.nl becomes the mirror.
flowchart TB
subgraph forges["Forges of organizations"]
direction LR
ams["Forge of Amsterdam<br/>run by Amsterdam"]
utr["Forge of Utrecht<br/>run by Utrecht"]
host["Forge of another organization<br/>run by Code Punt"]
end
subgraph cod["code.overheid.nl"]
direction LR
mirror["Read-only mirrors"] --> checks["Checks"]
end
forges == "pull mirror" ==> mirror
checks -. "results, fetched by<br/>a forge that opts in" .-> forges
Each organization vouches for its own people to code.overheid.nl, through its identity provider or its forge. Every forge trusts code.overheid.nl for people from elsewhere. No forge has to trust another directly.
flowchart LR
ams["Forge of Amsterdam<br/>run by Amsterdam"]
utr["Forge of Utrecht<br/>run by Utrecht"]
host["Forge of another organization<br/>run by Code Punt"]
kr["Forge of the Kiesraad<br/>run by the Kiesraad"]
krc["Community forge of the Kiesraad<br/>open to anyone, not in the register"]
idp["GovConext, SSOn Rijk<br/>identity providers of organizations"]
hub(("code.overheid.nl<br/>identity hub"))
register[("Register: per domain<br/>who vouches, and the home forge")]
ams <-- "@amsterdam.nl" --> hub
utr <-- "@utrecht.nl" --> hub
host <-- "sign-in from elsewhere" --> hub
kr <-- "its own team only" --> hub
krc -- "suppliers, community" --> kr
idp -- "connected organizations" --> hub
register -.- hub
How the developer from Utrecht works on the code of Amsterdam:
sequenceDiagram
actor dev as Developer at Utrecht
participant ams as Forge of Amsterdam
participant hub as code.overheid.nl
participant utr as Forge of Utrecht
dev->>ams: Sign in (OAuth2)
ams->>hub: Sign in (OAuth2)
hub->>utr: Sign in (OAuth2)
utr-->>hub: developer@utrecht.nl
hub->>hub: Check the register for @utrecht.nl
hub-->>ams: developer@utrecht.nl, vouched by Utrecht
dev->>ams: Choose Fork
ams->>hub: Fork for someone from Utrecht
hub->>utr: Create the fork, with consent of the developer
Note over utr: The fork belongs to the organization Utrecht.
dev->>utr: Commit in a branch of the fork
dev->>hub: Open a pull request at Amsterdam
hub->>utr: Fetch the branch from the fork
hub->>ams: Push that branch to refs/for/main/<topic>, in the developer's name
Note over ams: The pull request is the developer's.<br/>Amsterdam reviews and decides who may merge.<br/>Only a vouched account can get that right.
Rules
1. The origin is the source of truth. Every repository has one origin forge. code.overheid.nl holds a read-only pull mirror of it. The mirror names the origin's organization, in that organization's color, with the origin's address and the time of the last sync. Issues are off on the mirror, and Forgejo allows no pull requests on a mirror. The buttons for both lead to the origin. Fork leads to the forge of your own organization (rule 2). code.overheid.nl never commits to a mirror. What it builds, it builds from a definition outside the repository (0003, rule 10). Read-only holds for code and issues. The mirror does run the origin's own workflows, as the origin wrote them and without its secrets (same rule).
A private repository stays outside the federation. It gets no mirror and no checks, no fork at anyone's own forge and no pull request between forges. The system webhook of rule 7 also fires for private repositories, so code.overheid.nl drops those pushes unread. People who work together on a private repository keep doing so as today, with a local account at the forge that holds it.
When a forge leaves the register, its mirrors stay on code.overheid.nl as an archive. They are read-only, stop syncing, and carry a notice that the origin is gone. They are removed only at the request of the organization or after a takedown.
2. Changes are made in a fork at your own organization and proposed at the origin. Fork leads to code.overheid.nl. That holds on a mirror there, and on a federated forge for someone who signed in through the hub. The hub knows this person's home forge from the register. It creates the fork there, with their consent, in an organization they belong to. If they have a fork of the repository there already, it uses that one.
The pull request goes back through AGit. code.overheid.nl pushes the fork's branch to refs/for/<target branch>/<topic> at the origin, in the person's name and with their consent there. Forgejo turns that push into a pull request by that person, without a fork or write rights at the origin. The pull request lives entirely at the origin, where it is reviewed and merged. A second push updates it. Unlike A2, nothing is translated or kept in two places. Only a git push crosses between forges.
This holds for maintainers too. The Utrecht developer with merge rights at Amsterdam works in the fork at Utrecht and merges at Amsterdam. A branch in the repository itself is for the people of the organization that holds it. Someone outside the federation, such as a supplier or a contributor with a private address, forks at the origin with a local account there.
Issues follow the same split. An issue about the code goes to the origin. The Utrecht developer opens it at Amsterdam, signed in through the hub, and Amsterdam's list shows that she came from Utrecht. The fork at Utrecht has issues of its own, for the work in progress there. They stay at Utrecht and are not copied to the origin. code.overheid.nl holds no issues, and the button on a mirror leads to the origin. Someone outside the federation opens an issue at the origin with a local account there, if that forge allows it.
3. code.overheid.nl checks every mirrored commit, and the origin chooses whether it hears about it. The checks cover, for example, publiccode.yml, licenses, leaked secrets and known vulnerabilities in dependencies. They also cover what a build by code.overheid.nl shows, such as an SBOM, the test result and coverage (0003, rules 10 and 11). Every mirror gets the same checks. Results are public on code.overheid.nl, except for leaked secrets and known vulnerabilities. Those go first to the forge's contacts in the register, and become public once fixed or after a fixed period.
A repository says what it wants in the nl section of its publiccode.yml. There it sets whether the checks run and whether the results are reported back to the origin. It also sets how suggestions reach it (0003, rule 13). A check that does not apply can be named there with a reason, which code.overheid.nl then shows instead of a failure. The organization sets the default for its repositories when it joins or requests a forge (rule 9), and the repository's own choice wins.
Reporting back is opt-in and runs at the origin. A workflow in the repository fetches the results for its commit from code.overheid.nl and sets the commit status with the origin's own token. code.overheid.nl offers that workflow as a suggestion (0003, rule 12). A repository is in when it has the workflow and asks for reporting back, in its nl section or through its organization's default. The same workflow fetches the suggestions for a repository that wants them as pull requests (0003, rule 14). code.overheid.nl needs no account or rights at the origin for this. The origin does need Actions to run the workflow. A result is evidence in the sense of the GovForges note on software security. That note keeps evidence apart from policy and leaves open what a failed check blocks. The origin decides that in its branch protection.
4. Organizations vouch through their identity provider or their forge, and code.overheid.nl is the hub. An organization connected to GovConext or SSOn Rijk vouches through that identity provider. Any other organization vouches through its forge, which then acts as an OAuth2 provider for code.overheid.nl. Every federated forge trusts code.overheid.nl as the one identity provider for people from elsewhere. The forge someone visits hears who they are and who vouched for them. Each forge keeps its own login for its own people. It refuses identities from the hub for the people it vouches for itself.
Signing in starts with the work address. code.overheid.nl looks up the domain in the register and sends the person to the source that vouches for it (rule 5). That source asks for the password. A domain belongs to one organization, so the lookup has one answer. Someone whose address is in no registered domain, such as a contractor, picks the organization from a list. Forgejo needs no code change for this, only a login template on the hub that looks up the domain.
A vouch lasts 30 days and is renewed at every sign-in through the home source. When a vouch lapses, code.overheid.nl removes the account from the teams through which forges give rights. It also publishes the list of those accounts, so forges can take away their rights, keys and tokens (rule 7).
code.overheid.nl acts in someone's name only for rule 2, and for sending a suggestion that person chose to send (0003, rule 14). It does so through a second OAuth2 application at each forge. Forgejo keeps the scope of the first consent to an application, so with a single application the sign-in would decide for good what acting may do. The sign-in asks only read:user next to the OpenID scopes. Acting asks write access to repositories and organizations, next to read:user. That is the narrowest scope Forgejo has for creating a repository, pushing a branch and writing a pull request. code.overheid.nl uses the acting token only for that action. The details are in the notes of the proof of concept.
5. An organization vouches only for the people it marks as its own. For each organization, the register names the team on its forge that holds the people who work for it. That covers employees and contractors alike, whatever their address. code.overheid.nl vouches only for an account whose sign-in comes directly from that forge and carries that team. An organization that vouches through its identity provider vouches for the addresses in its domains instead.
An organization may list the domains of its addresses. A domain belongs to one organization only, and an address in it is never vouched for by another. An account at Utrecht's forge with an amsterdam.nl address is therefore vouched for by nobody. A small municipality whose developers all work for a supplier lists no domain and puts those developers in its team.
Trust that a forge places in some other source does not carry over to code.overheid.nl. The Kiesraad, for example, can run a community forge open to anyone behind its own forge, and let those people sign in there. They are not in the Kiesraad's team, even with an address at kiesraad.nl. The register also names the home forge where forks of an organization's people go. An organization without one can sign in and review. It needs a forge (rule 8) before its people fork.
6. Only vouched accounts come through the hub. code.overheid.nl has no registration. Every account on it came in through a source in the register. The only others are a few administrator and bot accounts of Code Punt, which an administrator makes. A bot posts the results of rule 3 on the mirrors. None of these accounts signs in at a forge, with one exception that an organization chooses for itself. Where its entry in the register admits it, the forge has an account without rights for the bot of code.overheid.nl. That bot opens pull requests with suggestions there (0003, rule 14).
A forge may give rights to an account from the hub only while the hub vouches for it. Everyone else, such as a supplier or a community contributor, works with a local account at the forge where they contribute. Whether that account gets rights is up to the organization that runs the forge. Forgejo cannot enforce the limit on rights from the hub, and code.overheid.nl holds no token to read a forge's teams. So every forge checks it itself (rule 7).
7. Every organization can run its own forge. This is the normal case, as for Amsterdam and Utrecht. The organization chooses the software, the hosting and who runs it, and joins through the register (rule 9). To join, a forge has to do seven things:
- Let code.overheid.nl mirror its public repositories, and tell it about every push with a system webhook.
- Sign in its own people from the organization's identity provider, where it has one. Keep the people it vouches for in its team. For an organization that vouches through its forge, sign them in for code.overheid.nl (rules 4 and 5). People who come in through another source of the forge, such as a community forge behind it, never land in that team. An account from such a source is never linked automatically to an existing account by its address.
- Accept code.overheid.nl as identity provider for people from elsewhere.
- Let code.overheid.nl act in someone's name for forks and pull requests, with that person's consent (rule 2). This is a second OAuth2 application.
- Give rights through the federation only to vouched accounts. Check that every week and report the result to code.overheid.nl (rule 6).
- Take away rights, keys and tokens of accounts whose vouch has lapsed (rule 4).
- Sign the commits the forge makes itself, such as merges and edits in the web interface, with a key of its own. A commit at the origin then shows which forge made it.
An eighth is optional. An organization that wants suggestions as pull requests, without anyone acting first, creates an account for the bot of code.overheid.nl on its forge. That account is in no team and has no rights on any repository. The organization gives Code Punt a token for it (0003, rule 14). Another kind of forge, such as GitLab, can join when it does the same and accepts a pull request pushed as in AGit. GitLab has no such route today. An organization may run several forges, for example one per department, but only one of them is the home forge for a given domain.
8. An organization that does not want to run a forge gets one on request. It requests the forge from code.overheid.nl with a pull request on the register (rule 9). Every organization gets its own Forgejo instance from the same image, with its own administrators. It also chooses the address. That can be a name under code.overheid.nl, or its own domain if the platform Code Punt runs on can issue a certificate for it. Once Code Punt merges the request, the forge runs within minutes, joined and mirrored. Code Punt runs it. The organization owns what is in it and who gets access.
Code Punt sets the forge up as operator, not as hub. It creates the organization's first administrator and an organization for its code, and does the things of rule 7 with that account. After that it keeps no account or token on the forge. The one exception is the bot of 0003, rule 14, where the organization admits it. The organization's administrator creates that account. The first password goes by mail to the administrator, who chooses their own at first sign-in. From then on Code Punt forgets the first password. The image runs the weekly check of rule 7 itself. Reaching the container is part of running the forge, but code.overheid.nl as hub still holds no rights there.
An organization with a forge can also have a forge behind it, such as the Kiesraad's community forge. The organization runs it itself, or Code Punt runs it at the organization's request. Such a forge is not in the register. code.overheid.nl does not mirror or check it, and vouches for nobody on it. Its people sign in at the organization's own forge and nowhere else (rule 5). Code Punt keeps the list of forges it runs this way apart from the register. It approves a request for one the way it approves a request for the register. This goes one level deep. A forge behind a forge gets no further forge behind it from Code Punt, and an organization that wants more layers runs them itself. Who runs CI on such a forge is the organization's responsibility, since a forge with open registration lets strangers run code on its runners. A forge that Code Punt runs this way gets a runner only when the organization asks for one and answers for what runs on it. That covers isolation, outbound traffic and abuse.
An organization can move its forge to its own hosting later. It moves the whole instance, so accounts keep their identity and every sign-in through the hub keeps working. Under its own domain only the DNS record changes. Under code.overheid.nl, the old address redirects to the new one.
9. The register is a repository on code.overheid.nl. Each organization has a file of its own, so two requests never touch the same file. The file gives the organization's name, its forge address and the team of the people it vouches for. It lists its domains if it has any, and says whether it vouches through its identity provider or its forge (rule 5). It names the contacts, and the organization's color for the pages that show its code elsewhere. Last come the organization's defaults for its repositories: whether the checks run, whether results are reported back, and how suggestions are delivered. The setting for suggestions is also where the organization admits the bot of code.overheid.nl to its forge (0003, rule 13). The organization chooses these defaults when it joins or requests a forge, and a repository's own publiccode.yml always wins.
An organization joins or makes a change through a pull request. Code Punt merges it when the organization is a government organization with an OIN or TOOI identifier, a DNS record proves each domain, and a contact at that domain confirms the request. Code Punt removes an organization at its request, or after a report that stays unresolved past an announced deadline. Code Punt decides on the register and on the rules in this ADR, but not on its own. A change to them is a pull request on the register or a new ADR. The contacts of every organization in the register hear about it and can comment before Code Punt merges it.
Consequences
- Good, because every repository has one place where its state is decided.
- Good, because access ends at the home organization, within 30 days at most. code.overheid.nl keeps no rights of its own on mirrored code.
- Good, because when the developer leaves Utrecht, their fork and their work stay with Utrecht.
- Good, because a forge needs one trust relationship, with code.overheid.nl, to work with every other federated forge. The register records once who each organization vouches for. In a mesh every forge keeps that for every other organization (option B2).
- Bad, because every sign-in across organizations passes through code.overheid.nl. When it is down, people from elsewhere cannot sign in at a federated forge, and forks and pull requests across forges stop. Each forge's own login keeps working.
- Bad, because a compromised hub can assert any identity from elsewhere to any forge. It cannot sign in the people a forge vouches for itself, because that forge refuses them from the hub (rule 4).
- Bad, because Forgejo has no setting that says "this account may never get write rights", so rule 6 rests on every forge checking itself. Contributing such a setting would be better.
- Bad, because the acting token reaches further than the action. For a maintainer it carries their full write rights at the origin while code.overheid.nl holds it.
- Bad, because Forgejo keeps the scope of the first consent to a confidential client. Widening it takes a new application or a revoked consent. Consent per scope is a contribution to Forgejo.
- Bad, because Forgejo on the hub stores the access and refresh token of every sign-in. The sign-in asks only
read:user, so those tokens can read a profile and nothing more. - Bad, because Forgejo does not treat a fork at another forge as a fork. code.overheid.nl adds such forks to the count and the list of forks at the origin. Still, such a fork does not follow new commits of the origin by itself.
- Bad, because Forgejo's API lets only an owner of an organization migrate a repository into it. A member of a team that may create repositories cannot. code.overheid.nl creates an empty repository and pushes the code into it instead.
- Bad, because access does not end at once. A session already running at another forge stays valid until it expires, and a vouch until it lapses.
- Bad, because reporting back costs a workflow in every repository that wants it, and Actions at the origin. Forgejo accepts a commit status only from an account that may push to the repository. We tried it by hand on Forgejo 15, and a read-only account gets a 403. GitHub has a permission for statuses alone. Contributing one to Forgejo would let code.overheid.nl post statuses without push rights.
- Bad, because a mirror lags. The lag is seconds when the system webhook triggers the sync. Otherwise it is the mirror interval, which is 8 hours by default in Forgejo and 10 minutes at the lowest.
- Bad, because code.overheid.nl accepts no writes to code at all, so A1 shuts out every organization without a forge unless rule 8 works.
- Bad, because a forge per organization is operations work for Code Punt: updates, backups and monitoring for each one that joins.
- Bad, because the system webhook sends pushes of private repositories to code.overheid.nl, which has to drop them.
- Bad, because the forms to join or request a forge are public and send mail. The mails carry no text typed into a form, and code.overheid.nl limits them per address, per sender and per day.
- Neutral, because government code on GitHub, GitLab or Codeberg can be mirrored and checked too. Those organizations are not in the register, so nobody is vouched through them.
- Neutral, because forges that share one host name each need a path of their own. Forgejo keeps where to return after signing in in a cookie with a fixed name, and cookies ignore the port. A forge per organization under its own name avoids this.
Confirmation
- A check over all mirrors on code.overheid.nl reports any with issues switched on.
- The register has a schema and a test. Every organization names its team, domains are optional, and no domain belongs to two organizations.
- Someone who signs in at the Kiesraad's forge through its community forge, with an address at
kiesraad.nl, reaches other forges through code.overheid.nl without a vouch. - The weekly rights check of every forge reports accounts from the hub with rights and a lapsed vouch. The report should be empty.
- A repository on a test forge that adds the offered workflow shows the commit status of the checks, while code.overheid.nl has no account on that forge.
- The example of Amsterdam and Utrecht is the acceptance test. It follows the sequence above and ends in a merge by the Utrecht developer once Amsterdam has given rights.
- Once set up, code.overheid.nl keeps no account and no access token on any forge, including one it set up. The exception is the bot at a forge whose organization admits it in the register (0003, rule 14). It does keep, at every forge, the OAuth2 client secret that makes it a client.
The proof of concept tests the register, the rights report, the no-account rule and a forge on request. It also tests the Kiesraad with a community forge behind it, where a supplier works at the Kiesraad but is vouched for nowhere else. The team reaches the hub as a group claim, which Forgejo syncs into a team on the hub at every sign-in. The proof of concept vouches through forges only, with no identity provider behind them. On the hub's sign-in page a person picks their organization, without the lookup by work address of rule 4. The rights check runs inside the image of a forge it set up, at an interval of its own. It checks the head of each default branch rather than every commit. A mirror in the proof of concept runs the workflows of its origin on a runner of the hub. That runner runs jobs directly on its host, not in a fresh container per job. Forgejo cannot archive a mirror. An archived mirror in the proof of concept is therefore a mirror that stopped syncing, with a notice. It does not test the mirror report against a broken mirror, or an operation outside the scope of the acting token. The onboarding of rule 3 was not built.
The proof of concept leaves out more of the decision:
- The checks for leaked secrets and known vulnerabilities (rule 3). It checks
publiccode.ymland the license only. - The workflow that reports results back to the origin (rule 3). The API it would call exists.
- The setting for suggestions in the
nlsection ofpubliccode.yml, and the bot that delivers them (0003, rules 13 and 14). - A forge refusing identities from the hub for its own people (rule 4). Its forges offer to link such an identity to the local account instead.
- Taking away the rights, keys and tokens of an account whose vouch has lapsed (rule 7). Such accounts are listed and reported, and keep what they have.
- Checking that a forge which joins does what rule 7 asks. Joining adds the sign-in and nothing more.
- The checks before Code Punt merges a change to the register (rule 9). The register holds the OIN or TOOI identifier, but nothing checks it, the DNS record or the contact's confirmation.
- An address the organization chooses, and moving a forge to its own hosting (rule 8).
It also differs from the decision in four places. The register has a file per forge rather than per organization, so an organization without a forge cannot be in it. The first password of a forge on request stays with the service and shows on its status page, since no mail goes out. Every forge on request, and every forge behind one, gets a runner without asking for it. The hub also holds a templates organization with mirrors of project templates, kept in sync by an account of its own.
Effort
The proof of concept took about 24 hours of focused work with AI assistance. It shows that the rules work with Forgejo as it is, on demo forges with made-up people. It does not tell how long production takes. Its code is not meant to be kept, and what it leaves out (persistence, monitoring, security, upgrades, support) is most of the work. Working the same way, with attention and AI assistance, that work can go a good deal faster than a conventional estimate would say. We therefore name the parts and their relative size, and pin no dates on them.
| Work | Size |
|---|---|
| The service, the hub and the register for production, with review of register changes, monitoring, a security test and the DPIA | large |
| Workflows on mirrors in a fresh container per job, and the signing key out of the service and into a hardware security module (0003, rule 11) | medium |
| The contributions to Forgejo under More Information, including review upstream | small each, but the pace is set upstream |
| Keeping up with Forgejo releases: the image overrides one Forgejo template (the consent page), adds five of its own, and relies on admin forms and API behavior that can change | small, with every release |
| Running code.overheid.nl and the forges of rule 8: updates, backups, monitoring and incidents | ongoing, and how it grows with the number of forges is to be measured |
| Helping an organization join or request a forge | small each, more for the first ones |
The way to find out is to build one part for production, such as the hub with the register, and measure it. Each Forgejo contribution that is accepted upstream removes a workaround from the image and some of the work per release.
Pros and Cons of the Options
Each option is scored against the drivers. The identity options are also scored against three criteria of their own. ✓ means it meets it, ~ that it meets it partly or at a cost, and ✗ that it does not.
| Driver | A1 | A2 | A3 | A4 |
|---|---|---|---|---|
| One source of truth | ✓ | ✗ | ✓ | ✓ |
| The organization keeps control | ✓ | ~ | ~ | ✓ |
| The work stays with the employer | ✓ | ✗ | ~ | ✓ |
| Anyone can report and propose | ~ | ✓ | ~ | ~ |
| Works with Forgejo as it is | ✓ | ✗ | ✓ | ✓ |
| An organization without a forge takes part | ~ | ~ | ✓ | ~ |
| Every commit gets the same checks, in public | ✓ | ✓ | ✓ | ✗ |
| The code stays visible when its origin goes down | ✓ | ✓ | ✓ | ✗ |
| Driver | B1 | B2 | B3 | B4 | B5 | B6 |
|---|---|---|---|---|---|---|
| Only vouched accounts get rights | ~ | ~ | ✗ | ~ | ~ | ~ |
| Access ends at the home organization | ~ | ~ | ✗ | ✓ | ~ | ✓ |
| The work stays with the employer | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ |
| Suppliers and the community take part | ~ | ~ | ✓ | ~ | ✓ | ~ |
| Covers every government organization today | ✓ | ✓ | ✓ | ~ | ✗ | ✓ |
| One trust relationship per forge | ✓ | ✗ | ~ | ✓ | ✓ | ✓ |
| Works with Forgejo as it is | ✓ | ✓ | ✓ | ✓ | ~ | ✓ |
A1 is the only option where nothing lives in two places, the organization keeps control, and the code can still be checked and found when its origin goes down. In A3, one platform holds every organization's rights and data. That is what sets it apart from a forge per organization run by Code Punt (rule 8).
B1 and B6 pay for their single trust relationship with the hub. The hub becomes one point of failure and one target for every sign-in across organizations (see Consequences). B2 has neither problem, but it copies the register into every forge, where the copies drift apart without anyone noticing. A hub can be run redundantly and watched in one place. Ninety copies kept by ten organizations cannot be kept consistent. That is why we accept the hub.
No option enforces "only vouched accounts get rights" in Forgejo. Every one of them rests on the forge. From B4, B6 takes what a government login does well, which is that leaving ends at the employer. From B1 it takes the coverage of organizations that are not connected to GovConext or SSOn Rijk.
A1. At the forges of organizations, with read-only mirrors and checks on code.overheid.nl
- Good, because every repository gets the same checks wherever it lives.
- Bad, because a contributor has to go to the origin to report an issue, and to code.overheid.nl to fork to their own forge.
A2. At the forges of organizations, with mirrors on code.overheid.nl that accept changes and forward them
Someone forks or edits on code.overheid.nl, and code.overheid.nl turns that into a pull request at the origin. This is pattern F in the GovForges note on authority and interaction.
- Good, because a contributor never leaves code.overheid.nl.
- Bad, because code.overheid.nl has to translate pull requests, reviews, updates and statuses between forges, in both directions.
- Bad, because a change exists in two places for a while, and either side can fail on its own. In our demo this route needed a git proxy and a separate service. It broke more often than anything else.
A3. On code.overheid.nl, as the one forge for all of government
- Good, because rights, checks and history are all in one place.
- Bad, because organizations that already run a forge would have to move off it, and some cannot, for legal or practical reasons.
- Bad, because the administrators of one shared instance can see and change the work of every organization.
A4. At the forges of organizations, with a catalog of links on code.overheid.nl
- Good, because it is the least work to run.
- Bad, because nothing gets checked, and nothing remains when an origin disappears.
B1. Forges are identity providers, and code.overheid.nl brokers between them (hub)
- Good, because each forge configures one identity provider for all outside people.
- Bad, because a forge account is only as current as the forge keeps it. Nothing ties it to the organization's own joiners and leavers.
B2. Forges are identity providers and trust each other directly (mesh)
Amsterdam adds Utrecht's forge as an identity provider itself, and so does every forge that wants people from Utrecht.
- Good, because there is no central dependency for signing in, and no single system that an attacker can use to reach every forge.
- Bad, because every forge keeps the register itself. Amsterdam has to know Utrecht's team, its domains and whether it vouches through its identity provider or its forge. It also has to notice when any of that changes at Utrecht. With ten forges that is ninety such entries, each kept by an organization other than the one it describes.
- Bad, because others can only use a forge that joins once every other forge has added it. A forge that leaves stays trusted wherever someone forgets to remove it.
B3. A local account on every forge someone works on
This is how it works today.
- Good, because it needs nothing new.
- Bad, because Amsterdam creates the account of the Utrecht developer and has to notice when that developer leaves Utrecht.
B4. One identity provider for all of government
Everyone signs in everywhere with one government login. GovConext comes closest. By its own count in October 2026 it connects more than 350 government organizations, and it is already a login on code.overheid.nl.
- Good, because joining and leaving is handled at the employer.
- Bad, because not every organization is connected, and contractors and community contributors stay outside it.
B5. Native forge federation (ForgeFed in Forgejo)
People act on other forges with their home account, through ActivityPub. The GovForges federation landscape describes how far Forgejo and ForgeFed have come.
- Good, because in the long run it is the open standard for working across forges.
- Bad, because Forgejo has no federated issues and pull requests, and its FAQ calls the federation experimental.
- Neutral, because nothing in this decision blocks moving to it later.
B6. Organizations vouch through their own identity provider where it is connected to GovConext or SSOn Rijk, and through their forge otherwise, with code.overheid.nl as the hub
See the decision above.
- Good, because for connected organizations the vouch comes from where employment is recorded.
- Bad, because the register has to keep two kinds of source apart per domain. The hub is also a dependency for every sign-in from outside an organization.
More Information
This ADR answers part of the decision table in the GovForges open architecture questions for code.overheid.nl. It chooses discovery, publication and verification without being the development home. Authority sits at the organization's forge, Git is the only synchronization, and evidence is shared while policy stays local. Work across forges follows pattern B of the note on authority and interaction. code.overheid.nl carries it out in the person's name and with their consent, as pattern E asks. We deviate from the note on identity and trust on one point. That note leaves identities independent per forge, and we put code.overheid.nl between them as a broker (rule 4).
Two things are left open here, as in the notes. One is a conservatory for dependencies and builds, which the note on software sovereignty covers. The other is who may make an archived mirror the new origin.
Still open, each for a later decision:
- Commit addresses. 0004 is proposed. It would change rules 2, 3, 4, 5, 7, 8 and 9 of this ADR and rule 14 of 0003, and lists those changes. Until it is accepted, this ADR holds as written.
- Privacy. Which data about a person reach another organization when they sign in or fork there, how long they stay, and who may see them. A DPIA comes before production use.
- How a fork at your own forge keeps up with new commits of the origin.
- Account names across forges. Someone from Utrecht who signs in at Amsterdam gets their name from Utrecht, and that name can be taken at Amsterdam already.
- Whether the weekly rights check of a forge is signed, as the results of rule 3 may be.
- Which contributions to Forgejo we take on. The candidates are a permission for commit statuses alone, consent per scope, a setting that keeps an account from rights, and documenting
is_system_webhookin the API. Then there is a filter for private repositories on system webhooks. Another is the name of an account's sign-in source in templates and the API, so a forge with several sources can tell accounts from the hub apart. The last is clearing the PKCE challenge of an earlier authorization from the session. Until that one is fixed, code.overheid.nl sends PKCE of its own, also as a confidential client. - Which checks run first, and the period after which a leaked secret or vulnerability becomes public.
- The keys in the
nlsection ofpubliccode.yml. The standard deprecated its country sections in version 0.7, and its parser rejects them. The maintainers of the standard will add these keys under itsnlextension. - Signed results (in-toto or SLSA), so the workflow at the origin can verify that a result comes from code.overheid.nl and belongs to that commit.
- Forks of outside dependencies, such as Drupal, which several organizations patch. Our direction is one shared fork on the forge of one organization, with changes going upstream through the upstream project. That needs a decision of its own.