Connect GitLab

Let ProofLayer read your GitLab group’s security settings, members and projects to prove two-factor sign-in and protected branches.

15 minYou need: An Owner of your GitLab group

Before you start

GitLab is where your developers keep source code. ProofLayer reads your group’s security settings and each project’s rules to show that code is protected. ProofLayer only reads. It never changes code or settings.

WordWhat it means
Group pathThe name of your top-level group in the web address, for example acme in gitlab.com/acme. A subgroup looks like acme/platform.
Access tokenA long code that lets a program read parts of GitLab. It carries a role and “scopes” (what it may do).
OwnerThe highest role in a group. GitLab shows a group’s security settings only to Owners.
read_apiThe scope that allows reading, and nothing else.

Create the token in GitLab

  1. Open your group

    In GitLab open your group (not a single project).

  2. Create a group access token

    Go to Settings → Access tokens → Add new token. Name it “ProofLayer”, pick an expiry, choose the role Owner, and tick only the scope read_api. Press Create group access token.

    Copy the token straight away. GitLab shows it once.

  3. No group tokens on your plan?

    Some plans do not offer group access tokens. Instead, an Owner can create a personal access token: click your avatar, then Edit profile → Access tokens → Add new token, with only the scope read_api. The person must be an Owner of the group.

Give ProofLayer the token

  1. Create the connection

    In ProofLayer go to Connections → New connection. For Provider choose GitLab, give it a Name, and enter the Group path (for example acme).

  2. Paste the token

    Paste it into Access token. Using your own GitLab server rather than gitlab.com? Also fill in Self-managed GitLab host (for example gitlab.acme.com). Otherwise leave it empty. Press Create.

    ProofLayer stores the token encrypted and never shows it again. On the connection page the same field is called API URL (self-managed only) and takes the full address, for example https://gitlab.acme.com/api/v4.

Check that it works

  1. Open the connection in ProofLayer

    Go to Connections, click the connection you just made, and find the card called GitLab access.

  2. Press Test access

    ProofLayer makes one small read-only request and shows the answer.

    Success looks like a green Access verified message. A red Access test failed message says what went wrong; see the table at the end of this page.

What ProofLayer reads

  • Whether the group requires two-factor authentication for every member.
  • Whether ordinary developers can create projects in the group.
  • Whether any blocked or deactivated user is still a member of the group.
  • Whether each active project protects its default branch and forbids force pushes.
  • Whether merging requires a passing pipeline, and whether any active project is public.
  • For every merge request merged into a default branch in the last 35 days: who approved it (not the author, not a bot), whether its pipeline passed, and whether its title or branch names a ticket such as ENG-1234. Titles and descriptions are never stored.
  • Every successful deployment to a production environment in the last 35 days: who ran it and which merge requests it shipped. An environment counts as production only when its tier is set to production in GitLab (Operate → Environments → edit).

If something goes wrong

What you seeLikely causeWhat to do
GitLab refuses the tokenWrong group path, missing read_api scope, expired token.Check the group path and create a new token with read_api.
Warning that group security settings are not visibleThe token’s role is below Owner.Create the token as an Owner.
Cannot reach the serverA self-managed host that is wrong or not reachable from ProofLayer.Check the address. If it is inside your network, ask us about running the in-account agent.
Projects are missingThey live outside the group, or the token cannot see them.Use the top-level group’s path.