Skip to end of metadata
Go to start of metadata
By SonarSource – GNU LGPL 3 – Issue TrackerSources – Supported by SonarSource
More versions
GitHub Authentication for SonarQube 1.4 – Aug 07, 2018 – SonarQube 7.2+
Support renaming of account
DownloadRelease notes

Description

This plugin allows GitHub users to sign-up and log in SonarQube.

Configuration

  1. At https://github.com, create a Developer application : 

    1. Go to "Your profile" -> "Edit Profile" -> "OAuth applications" -> "Developer applications" -> "Register new application"
    2. "Application name" is something like "My SonarQube"
    3. "Homepage URL" is the public URL to your SonarQube server, for example "https://sonarqube.mycompany.com". For security reasons HTTP is not supported. HTTPS must be used. The public URL is configured in SonarQube at "Administration" -> "General" -> "Server base URL"

    4. "Authorization callback URL" is <Homepage URL>/oauth2/callback, for example "https://sonarqube.mycompany.com/oauth2/callback"
  2. In SonarQube settings :
    1. Go to "Administration" -> "Configuration" -> "General Settings" -> "GitHub" -> "Authentication"
    2. Set the "Client ID" from the value provided by the GitHub developer application
    3. Set the "Client Secret" from the value provided by the GitHub developer application
    4. Set the "Enabled" property to true
  3. Go to the login form, the new button "Log in with GitHub" allows users to connect with their GitHub account.

 

General Configuration

Property
Description
Default value
Example
sonar.auth.github.enabled

Enable GitHub users to login. Value is ignored if client ID and secret are not defined.

false
 
sonar.auth.github.clientId.secured
Client ID provided by GitHub when registering the application
 
1t69ed9cb41gb26545z8
sonar.auth.github.clientSecret.secured

Client password provided by GitHub when registering the application

 
d7941h19ae8ze9b51276bb6eh42694ac5dfece9d
sonar.auth.github.allowUsersToSignUp

Allow new users to authenticate. When set to 'false', only existing users will be able to authenticate to the server.

true
 
sonar.auth.github.loginStrategy

When the login strategy is set to 'Unique', the user's login will be auto-generated the first time so that it is unique.

When the login strategy is set to 'Same as GitHub login', the user's login will be the GitHub login.

This last strategy allows, when changing the authentication provider, to keep existing users (if logins from new provider are the same than GitHub)

Unique 

Have Question or Feedback?

To provide feedback (request a feature, report a bug) use the Community Forums. Please do not forget to specify plugin and SonarQube versions if it relates to a bug.

 

  • No labels