Skip to content

Private CA and TLS

Chuck edited this page Nov 13, 2026 · 2 revisions

Many self-hosted GitLab instances use a certificate from an internal or self-signed certificate authority. Node.js only trusts the public CAs it ships with, so without extra configuration every GitLab API call from Glint fails with an error such as self-signed certificate in certificate chain or unable to get local issuer certificate.

The fix is to tell Glint which CA to trust — not to turn verification off.


Use GITLAB_CA_FILE

  1. Get the CA certificate in PEM format (text starting with -----BEGIN CERTIFICATE-----). Ask your GitLab administrator for the root CA, or export it from your browser's certificate viewer for the GitLab site (export the root, not the server certificate). A bundle with several certificates is fine.

  2. Point Glint at it:

    Docker — mount the file read-only and set the path inside the container:

    docker run -d --name glint \
      -p 3000:3000 --env-file glint.env \
      -v /etc/glint/ca.crt:/certs/ca.crt:ro \
      -e GITLAB_CA_FILE=/certs/ca.crt \
      ghcr.io/smith8ca/glint:latest

    The repository's docker-compose.yml has the matching GITLAB_CA_FILE and volumes: lines commented out.

    Node.js — set the host path in webhook-receiver/.env:

    GITLAB_CA_FILE=/etc/glint/ca.crt
  3. Restart Glint. It reads the file at startup and refuses to start if the file is missing or contains no PEM certificate, so a wrong path is caught immediately.

What it changes

  • The CA is trusted in addition to the normal public CAs (and anything in NODE_EXTRA_CA_CERTS).
  • It applies only to Glint's connections to GitLab. The connection to the Anthropic API keeps using the standard public CAs.
  • Hostname checking stays on, so the GitLab certificate must still match the host in GITLAB_BASE_URL.

Converting other formats

# DER-encoded (.cer/.der) to PEM
openssl x509 -inform der -in ca.cer -out ca.crt

# Check a PEM file
openssl x509 -in ca.crt -noout -subject -issuer -enddate

# Confirm the chain verifies against GitLab
openssl s_client -connect gitlab.example.com:443 -CAfile ca.crt </dev/null | grep "Verify return code"
# Verify return code: 0 (ok)

Alternative: NODE_EXTRA_CA_CERTS

Node's own NODE_EXTRA_CA_CERTS=/path/to/ca.crt also works, and also applies to the Anthropic connection. It must be set in the real process environment (Docker -e / Compose environment:, systemd Environment=, or the shell): Node reads it before Glint loads .env, so it has no effect inside webhook-receiver/.env.


Last resort: GITLAB_REJECT_UNAUTHORIZED=false

This turns certificate verification off for GitLab connections. Anyone able to intercept traffic between Glint and GitLab can then impersonate GitLab and read GITLAB_TOKEN, which has api scope. Use it only for a short local test, never in production.


HTTPS for Glint itself

GITLAB_CA_FILE is about Glint calling GitLab. To have GitLab call Glint over HTTPS, put a reverse proxy in front of Glint — see Deployment → Behind a reverse proxy. If that proxy uses a private CA too, GitLab needs to trust it, or you can turn off SSL verification on the webhook if the network between them is trusted.

Clone this wiki locally