Skip to main content
A GitLab connection needs no Helm chart values. Org admins register it at runtime with an access token, as shown in Connect GitHub & GitLab. But when GitLab is self-managed, Chainloop is self-hosted, or both, the two systems must reach each other over the network and trust each other’s TLS certificates. This page lists what GitLab administrators and Chainloop operators must configure for that.

Network Requirements

Traffic goes in both directions: The backend external URL is the origin that the chart derives from backend.externalHostname, or from the backend.ingress or backend.httpRoute hostname. See backend external URL for the resolution order. GitLab must be able to resolve and reach this exact hostname. If GitLab cannot reach Chainloop, the connection still registers and repositories still appear in the Create Project wizard. Only the event-driven features stop: no merge-request summary note, no commit statuses, and no pull-request scans.

Allow Webhooks to Chainloop in GitLab

By default, GitLab blocks webhook requests to local network addresses: 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and their IPv6 equivalents. When the Chainloop backend hostname resolves to a private IP address, as is usual for a self-hosted Chainloop in the same network as GitLab, GitLab refuses to create the project webhook that Chainloop registers. A GitLab administrator must allow outbound requests to the Chainloop backend. This setting is available on GitLab Self-Managed and GitLab Dedicated. On gitlab.com you cannot change it, so the Chainloop backend must be reachable from the public internet.
1

Open the outbound request settings

In GitLab, select Admin in the upper-right corner. In the left sidebar, select Settings > Network, then expand Outbound requests.
2

Allow the Chainloop backend

Choose one of the options below, then select Save changes.
If Block all requests, except for IP addresses, IP ranges, and domain names defined in the allowlist is selected, GitLab blocks every webhook target that is not in the allowlist, public or private. In that case, add the Chainloop backend hostname to the allowlist even when it resolves to a public IP address.
For more information, see GitLab’s filtering outbound requests documentation.

Register the Webhooks Again

Chainloop registers a project webhook each time a repository is linked to a project. If GitLab rejects the webhook, the link still succeeds and the Chainloop UI shows no error. The backend logs the warning failed to ensure SCM webhook. After you change the outbound request settings, link the repository to a project again: unlink it and link it again, or link it to another project. Chainloop then creates the webhook, or updates the existing one.

Trust TLS Certificates

Both directions use HTTPS with certificate verification. If GitLab or Chainloop uses a certificate signed by a private certificate authority (CA), the other side must trust that CA.

Chainloop Trusts GitLab

Add the CA that signed the GitLab certificate to the Chainloop chart. The backend and worker then trust it for all calls to GitLab.
If this CA is missing, the connection fails at registration with token failed to authenticate against <host>, followed by a TLS error such as x509: certificate signed by unknown authority.

GitLab Trusts Chainloop

Chainloop registers every project webhook with Enable SSL verification turned on. You cannot change this from Chainloop, and you must not turn it off on the webhook. If the Chainloop backend certificate is signed by a private CA, add that CA to the trusted certificates of GitLab:
Copy the public CA certificate (PEM or DER) into /etc/gitlab/trusted-certs, then run:
If the chain has intermediate certificates, put each certificate in a separate file. See GitLab’s custom public certificates documentation.

Webhook Secret

GitLab sends a shared secret in the X-Gitlab-Token header of each webhook delivery, and Chainloop rejects deliveries with a missing or incorrect token. The chart generates this secret on install and keeps it across upgrades. Set backend.gitlab.webhookSecret only if you want to manage the value yourself. See Configure GitLab. Chainloop sets the same secret on every webhook it registers, so you do not need to copy it into GitLab.

Verify the Webhook

After you link a GitLab repository to a project:
  1. In GitLab, open the project and select Settings > Webhooks.
  2. Find the webhook with the URL <backend-external-url>/gitlab/events?connection=<id>. It is subscribed to Merge request events.
  3. Select Test > Merge request events, or open a merge request.
  4. Select Edit on the webhook and look at Recent events. A successful delivery shows HTTP status 200.
If there is no webhook in the list, GitLab rejected the registration. Check the outbound request settings, then register the webhook again.

Troubleshooting