After trying to keep this updated for some time, I have just not been able to with all of my other demands. If anyone would like to take this project over, you are welcome to. As an alternative, you can use oauth2-proxy and HTTP Header Authentication to support ANY OAuth2/OIDC provider.
This plugin enables user authentication and Single Sign-On via Google. It is heavily based on the code by Julien Lancelot Compatible with SonarQube version 5.6 and higher.
In the Google Developers Console:
In SonarQube settings :
Go to the login form, a new button "Log in with Google" allow users to connect to SonarQube with their Google accounts.
Note: Only HTTPS is supported
- SonarQube must be publicly accessible through HTTPS only
- The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL
Property | Description | Default value |
---|---|---|
sonar.auth.googleoauth.allowUsersToSignUp | Allow new users to authenticate. When set to 'false', only existing users will be able to authenticate to the server | true |
sonar.auth.googleoauth.clientId.secured | Consumer Key provided by Google when registering the consumer | None |
sonar.auth.googleoauth.clientSecret.secured | Consumer password provided by Google when registering the consumer | None |
sonar.auth.googleoauth.enabled | Enable Google users to login. Value is ignored if consumer Key and Secret are not defined | false |
sonar.auth.googleoauth.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 Google login', the user's login will be the Google login. This last strategy allows, when changing the authentication provider, to keep existing users (if logins from new provider are the same than Google) | Unique |
sonar.auth.googleoauth.limitOauthDomain | When set with a GApps domain, only allow users from that domain to authenticate. Can be a list by separating domains with "," | None |