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.
- Allowlist the Chainloop host (recommended)
- Allow the whole local network
In Local IP addresses and domain names that hooks and integrations can access, add the hostname of the Chainloop backend, for example:Add a port if the backend is not on the default HTTPS port (
api.chainloop.example.com:8443). You can also add an IP address or a CIDR range. GitLab does not accept wildcards, and entries are separated by semicolons, commas, or whitespace.This option allows only the Chainloop backend. All other local network targets stay blocked.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.
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 warningfailed 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.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:- Linux package
- GitLab Helm chart
Copy the public CA certificate (PEM or DER) into If the chain has intermediate certificates, put each certificate in a separate file. See GitLab’s custom public certificates documentation.
/etc/gitlab/trusted-certs, then run:Webhook Secret
GitLab sends a shared secret in theX-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:- In GitLab, open the project and select Settings > Webhooks.
- Find the webhook with the URL
<backend-external-url>/gitlab/events?connection=<id>. It is subscribed to Merge request events. - Select Test > Merge request events, or open a merge request.
- Select Edit on the webhook and look at Recent events. A successful delivery shows HTTP status
200.
