GitLab

Step 1: Create a Bearer API token

  1. 1.
  2. 2.
    Go to Settings > Git Broker.
  3. 3.
    Copy and save the Git Broker token somewhere safe👇.
Generating a new token will not break the original connection right away.
There is a grace period during which the original connection is still functional while you deploy the Broker with your new token.

Step 2: Create a GitLab personal access token

For Bearer to perform the required actions, the user account creating the personal access token needs the role Guest (or higher) on the projects you wish to scan.
The Bearer Broker acts on behalf of the user account who created the personal access token. We recommend that you create a dedicated Service Account for Bearer and invite it to all the projects you wish to scan with the role Guest (or higher).
Create a personal access token 👇
Personal access tokens | GitLab
Select the scopes: api read_repository

Step 3: Deploy the Broker

We recommend 1 vCPU and 1 GB of RAM to run one Broker.
You can speed up the scan of your repositories by deploying multiple brokers. We support up to 100 simultaneous brokers.

Method 1: docker-compose.yml

A Docker image is available on Docker Hub: bearersh/broker:latest
1
version: "3"
2
services:
3
bearer-broker:
4
image: bearersh/broker:latest
5
environment:
6
- BEARER_TOKEN=<your-bearer-token>
7
- GITLAB_TOKEN=<your-gitlab-token>
Copied!

Method 2: helm

1
$ helm install --set BEARER_TOKEN=<your-bearer-token> \
2
--set GITLAB_TOKEN=<your-gitlab-token> \
3
--repo https://bearer-helm-repo.s3.eu-west-1.amazonaws.com/ \
4
bearer-broker bearer-broker
Copied!
Once the Broker has been detected, its status will be updated in your dashboard 👇