Gitlab (Server): MR Gating via Aikido Dashboard with a Service Account Access Token

⚠️ Disclaimer

This guide is only available for Gitlab Premium & Gitlab Ultimate users. Check out our other guide for Gitlab Free users

Gitlab (Server) CI: MR Gating via Aikido Dashboard with a Personal Access Token (PAT)

Introduction

You can easily configure GitLab MR Gating via the Aikido interface. This doc focusses on managing configurations in bulk - multiple repos at the same time - without code.

Use Cases

  • Bulk Repository Management: Easily specify and manage configurations for multiple repositories at once through the Aikido interface.

  • Zero Code Integration: Install the Aikido app on GitLab to manage checks without embedding any code, simplifying the setup process.

  • Cost Efficiency: By managing GitLab Checks through Aikido, avoid using CI minutes on GitLab, leading to significant cost savings.

Creating a Service Account and Access Token

  1. Navigate to the "Service Accounts" settings page. Group > Settings > Service accounts

    Gitlab group sidebar: highlighting "Service accounts" under the "Settings" option

  2. Click on "Add service account"

  3. Give a Name and Username to the Service Account and click Create

  4. Click the options of the newly created service account and select Manage access tokens

    Gitlab Service Accounts overview

  5. Click on "Add new token"

  6. Enter a name for the token, remove the expiration date or set it to the max value and select the api scope

    Form to create a GitLab Service Account access token with selectable roles and API permission scopes.

  7. Click on "Create token"

    GitLab Service Account access token generation and management interface, showing an active token.

  8. Copy the token and keep it for the "Setting up GitLab CI" step

  9. Go to the members page: Group > Manage > Members

    Gitlab Group sidebar; showing members under the manage option

  10. Click "Invite Members"

  11. Search for your new Service account created earlier and set role to "Maintainer"

Setting up GitLab CI

Step 1. Enter the access token from the previous part into the input field on this page and click "Update token"

Gitlab Checks: Enter or update your personal access token for authentication.

Step 2. Aikido redirects you to the GitLab CI page with an overview of your repos. You can start configuring your repos. We recommend starting out with 1 repo to make sure everything works well.

Step 3. Select repos in bulk and click Setup MR Scans button in the floating bulk actions bar on the bottom.

Step 4.This will trigger the modal to choose the severity level for failure and the scans you want to execute.

Configure security scans and severity settings for 65 repositories.

If you've added new repositories after the initial setup, you'll need to configure those repos as well.

Adding Exceptions for specific repos

You might want to have 1 specific repo where the configuration slightly differs. You can easily add exceptions by clicking the triple dots on a repo item or just select 1 or more items and go through the Configure Scans process again.

Vulnerable projects list with critical status and configuration management options.

Last updated

Was this helpful?