GitLab setup
designIQ connects a GitLab (self-managed, any edition, or gitlab.com) with one access token of the platform's own. With it the Live Host lists the content projects, checks per person and project whether they may write, clones, fetches and pushes release branches, opens merge requests and files todos as issues. The token's bot user authors merge requests and issues; the person is named in their text, and each release commit carries the person as its author. No person's GitLab token is ever stored (ADR 0001). People sign in at your identity provider, never at GitLab (ADR 0007).
A GitLab works alone (OIDC + GitLab) or next to a GitHub App on the same host (OIDC + GitHub App + GitLab, below). The steps here are the GitLab side; the rest of the installation is the same for every git host: the install guide.
You need an administrator of the GitLab for the system hook (step 4) and the commit email check (step 5), and an Owner of the group for the token (step 3).
1. A group for the content repositories
Put the content repositories in one group (or a few), say acme/modeling. A project counts as a content repository when its default branch has a root designiq.yml that names the folder its models live in:
models: processesCode projects next to them stay out: the Live Host lists only projects with that file. A project's subgroups (acme/modeling/flows) work like any other path. The example content (process-documentation/ of this repository, or the template Miragon/process-documentation-starter) is a good first project.
2. Who may write
designIQ shows a person the projects in which their effective membership is Developer or more, inherited from a group included, and nothing else: a Reporter or Guest sees no repository. That is GitLab's own membership, so nothing is managed twice. Grant access in GitLab as you do for code.
Releases open merge requests from a branch release/<title>-<time>-<six characters> into the default branch. Leave release/* unprotected for Developers (it is by default), or a release answers with GitLab's refusal and asks a Maintainer to let the token push those branches. Protect the default branch as usual: the merge request's approval rules decide who merges (on GitLab Free a Developer cannot merge into a protected default branch).
3. The access token
Create a group access token on the group of step 1 (the group's Settings > Access tokens > Add new token):
| Field | Value |
|---|---|
| Name | designiq (it becomes the bot user's name, shown on merge requests and issues) |
| Role | Developer |
| Scopes | api (nothing narrower covers merge requests, issues and the membership checks) |
| Expiration | at most a year (GitLab's limit unless an administrator changed it); write the day down |
The token is shown once: it goes into GITLAB_TOKEN (step 6), or a file that GITLAB_TOKEN_FILE names. Decide now who renews it and when: GitLab refuses an expired token from the start of its expiry day, and designIQ then cannot list, release or file todos until a new one is set. The Live Host reads the expiry from GitLab at its start and once a day, shows it in the startup report, and warns 14 days ahead in the log (WARN GITLAB_TOKEN expires on ...) and in /healthz (When the GitLab token expires). Put the renewal in a calendar with that person.
Instead of a group access token, a bot user's personal access token (scope api) works the same; give the bot user Developer on the group. On gitlab.com, group access tokens need Premium or Ultimate, so a bot user is the way on Free.
4. The system hook
A webhook tells the Live Host at once when a project is created, renamed, moved or deleted, or a membership changes. Without one, such a change shows up within 10 minutes (the safety-net sync) or when someone presses Refresh on the start page.
On GitLab self-managed, any edition, an administrator adds a system hook (Admin area > System hooks > Add new webhook):
| Field | Value |
|---|---|
| URL | https://<your designIQ host>/webhook/gitlab |
| Secret token | a long random value (openssl rand -hex 24); the same goes into GITLAB_WEBHOOK_SECRET |
| Triggers | turn off Push events, Tag push events, Merge request events and Repository update events (GitLab ticks the last one by default) |
| Enable SSL verification | on |
The project, group and member events a system hook always sends are the ones designIQ uses. The other triggers come for every project of the whole GitLab, and the Live Host ignores them: leave them off. A hook created through the API:
curl --request POST --header "PRIVATE-TOKEN: <an administrator's token>" \
--data-urlencode "url=https://design.example.com/webhook/gitlab" \
--data-urlencode "token=<secret>" \
--data "push_events=false&tag_push_events=false&merge_requests_events=false&repository_update_events=false&enable_ssl_verification=true" \
https://gitlab.example.com/api/v4/hooks- TLS. With SSL verification on, GitLab must trust the certificate of your designIQ host. A certificate of an internal CA: put the CA into
/etc/gitlab/trusted-certs/on the GitLab server and runsudo gitlab-ctl reconfigure(corporate-network.md). - Local network. A designIQ host on an internal address needs Admin area > Settings > Network > Outbound requests > Allow requests to the local network from system hooks (on by default).
- GitLab Premium or Ultimate can use a group webhook instead (the group's Settings > Webhooks, with Member events and Project events). Project webhooks do not carry these events.
- gitlab.com has no system hooks: use a group webhook (Premium), or rely on the 10-minute sync and Refresh.
A test delivery from GitLab's hook page answers 202. A delivery the Live Host refuses (a wrong or missing secret) answers 401 and writes a line webhook refused on /webhook/gitlab: X-Gitlab-Token does not match GITLAB_WEBHOOK_SECRET.
5. The commit email host name
A release commit names the person by their private commit email (<user id>-<username>@users.noreply.<GitLab host>), which GitLab shows with their avatar and profile link whatever email they chose, and which names no address of theirs. GitLab keeps the host name of that address from the URL it was installed with. Check it (Admin area > Settings > Preferences > Email > Custom hostname for private commit emails, or the API):
curl --header "PRIVATE-TOKEN: <an administrator's token>" https://gitlab.example.com/api/v4/application/settings \
| grep -o '"commit_email_hostname":"[^"]*"'When it is not users.noreply.<the host of GITLAB_URL> (a GitLab installed under another URL, or an administrator changed it), set GITLAB_COMMIT_EMAIL_HOSTNAME to it. Otherwise GitLab attributes the release commits to nobody.
6. The person's GitLab username: the login claim
designIQ learns who someone is from your identity provider's token, and which GitLab user that is from one of its claims: the IdP must put each person's GitLab username in the access token, from a source the person cannot edit. On a host that connects only a GitLab, that claim is the login itself:
LIVE_OIDC_LOGIN_CLAIM=gitlab_username- Keycloak (the realm this repository ships, idp-quickstart.md): the user attribute
gitlab_usernameis declared admin-only, and both clients map it into the token. Set it per person (Users > the user > Attributes), or let Keycloak fill it: with LDAP or Active Directory federation, a user-attribute-ldap-mapper from the directory attribute GitLab takes its usernames from (uidof theldap_serversblock ingitlab.rb, oftensAMAccountNameoruid) togitlab_username. See idp-quickstart.md. - Microsoft Entra ID: entra-id.md.
- Any other IdP: a claim fed from the directory attribute GitLab uses, or one an administrator sets. Never a field people edit themselves (
preferred_usernameof a self-service profile, an email): the claim decides which projects someone may write.
GitLab usernames may hold ., _ and - (ben.mueller). GitLab changes a username when it would clash with another one (it appends a digit), so compare a few people's claims with their GitLab profile once. A person whose token lacks the claim is refused at sign-in (Token carries no 'gitlab_username' claim).
7. The Live Host's settings
In deploy/.env (configuration.md has every variable):
GITLAB_URL=https://gitlab.example.com
GITLAB_TOKEN=glpat-... # step 3; or GITLAB_TOKEN_FILE=/run/secrets/gitlab-token
GITLAB_GROUPS=acme/modeling # step 1; comma-separated, unset: every project the token sees
GITLAB_WEBHOOK_SECRET=... # step 4
#GITLAB_COMMIT_EMAIL_HOSTNAME=... # step 5, only when it differs
LIVE_OIDC_LOGIN_CLAIM=gitlab_username # step 6plus the LIVE_OIDC_* block of your identity provider, LIVE_PUBLIC_URL, SESSION_ENC_KEY and, with an internal CA, NODE_EXTRA_CA_CERTS (corporate-network.md): the Live Host reaches GitLab's API and git over HTTPS with it. Leave the GITHUB_APP_* lines empty. Then start as in the install guide.
8. Check it
The startup report names the mode, the GitLab, the token's expiry and the projects:
mode : OIDC + GitLab
host repo : none, the GitLab's projects name the repositories
repos : acme/modeling/models
gitlab : https://gitlab.example.com (access token, expires 2027-01-29, groups acme/modeling)
minting : none (the GitLab connection uses GITLAB_TOKEN)access token REFUSED: GitLab does not take the token (expired, revoked, a typo).NOT reachablewith a reason: the Live Host could not list the projects (DNS, a proxy, an untrusted certificate). It tries again after 30 seconds and at growing intervals.reposlacks a project: its default branch has no rootdesigniq.yml, it is outsideGITLAB_GROUPS, or the token's user is not a member with Developer.
Then sign in as someone with Developer on a content project: the start page lists it. Someone with Reporter sees no repository. /healthz with the health secret shows the token's state (gitlabToken) and the connection's (connectionsDegraded) (Health).
When GitLab's changes reach designIQ
A merge request merged in GitLab, a commit from the web IDE or a push: the Live Host fetches a repository when someone uses it (a page, an editor, a save, at most once a minute) and after each of its releases, and takes the default branch's new state into every file nobody has open. A file open in an editor waits until nobody has it open; the editor says that main has a newer version and offers to take it in. No push webhook is needed for this (Changes made outside designIQ).
Which projects exist and who is a member reach the Live Host through the system hook at once, else within 10 minutes. A project whose designiq.yml was pushed after it was created and its members added shows up with the next of these events (a push is none). A project whose designiq.yml was removed leaves within an hour (the Live Host keeps a project's yes for an hour) or at the next start.
A host with GitHub and GitLab
A GitHub App and a GitLab on one host list the repositories of both. Each person then has two identities, and the IdP must issue both:
LIVE_OIDC_LOGIN_CLAIM=github_login # the GitHub login (the default)
LIVE_OIDC_GITLAB_LOGIN_CLAIM=gitlab_username # the GitLab usernameThe Live Host does not start without LIVE_OIDC_GITLAB_LOGIN_CLAIM on such a host: a GitHub login (anyone picks their own) must never be taken for a GitLab user. Name the same claim twice when the logins are the same on both. designIQ knows the person by their GitHub login (favorites, presence, forget-user.ts); the GitLab username decides their GitLab projects and names them on merge requests and todos. A person whose token lacks the GitLab claim sees the GitHub repositories only. A repository name both list stays with the connection that had it first; the log names it.
Verified
This path was followed step by step on GitLab CE 19.6.2 (behind an internal CA), Keycloak 26.6.3 with the realm of deploy/keycloak/realm-designiq.json and a Caddy TLS proxy: the group access token (Developer, api), a system hook with the four triggers off and SSL verification on, GITLAB_COMMIT_EMAIL_HOSTNAME, and LIVE_OIDC_LOGIN_CLAIM=gitlab_username with the usernames bf.ben and bf_ana. The startup report showed the token's expiry and its 14-day warning; the content project was listed and the code project beside it was not; a live edit through the proxy was released as a merge request authored by the token's bot, its commit by <id>-bf.ben@users.noreply.<host>; a person without the claim was refused at the callback; a project created and given a designiq.yml showed up 0.7 s after a member was added, not on the push; an MCP client signed in with designiq-mcp. The same host with a GitHub App beside it refused to start without LIVE_OIDC_GITLAB_LOGIN_CLAIM and, with it, listed each person the repositories of both hosts their two identities allow.