> For the complete documentation index, see [llms.txt](https://docs.threatrix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.threatrix.io/integrations/scm-integrations/gitlab.md).

# GitLab

## Prepare for SCM Integration Setup

* Within Threat Center, navigate to Admin-> Settings->Integrations->SCM Integrations.
* Take note of your Redirect URL as you'll need it in the next step.&#x20;

## Create Instance or Group GitLab OAuth Application

Login to GitLab with a user that has permission to create an application

1. Login to GitLab with a user that has permission to create an application
   1. This should be a service account.
2. Navigate to the group for which you wish to add the application
3. On the left menu, select Select Settings -> Applications
4. Click "Add new application"
5. Enter Name "Threatrix"
6. Enter the `Redirect URIfrom the Threatrix dashboard`
7. &#x20;Select the following permissons:
   * api (Access the authenticated user's API)
   * read\_user (Read the authenticated user's personal information)
   * read\_repository (Allows read-only access to the repository)
   * write\_repository (Allows read-write access to the repository)
8. Click "Save application"

Copy your application ID and Secret as you'll need them for the next step.&#x20;

<figure><img src="/files/I2zLDtiTbOYDdi6srmZT" alt=""><figcaption></figcaption></figure>

## Complete SCM Integration

In Threat Center, SCM Integration,  complete the following fields&#x20;

* Name: Use a unique name that employees will recognize, like your team, group or division. If necessary, add the SCM type if there are more than one in the same group.
* Provider Type: Select GITLAB from the&#x20;
* Base URL: This is the URL of your SCM server
* Token URL: The Token URL of your server
* Authorization URL: The authorization URL of your server
* Client ID / Application ID: This is the Application ID or Client ID provided to you when you created your application in your SCM
* Client Secret / Secret: This is the secret provided to you when you created your application in your SCM.

<figure><img src="/files/rPHCJ1zkqoS0yRJqxOXG" alt=""><figcaption></figcaption></figure>
