SonarQube – Active Directory Plugin


If you’ve been using SonarQube with TFS on-premises chances are you using the LDAP plugin to integrate with your Active Directory.  We are currently running version 5.4 of SonarQube with v1.5.1 of the LDAP plugin and are migrating to SonarQube 5.6 which brought this to my attention.

In Update Center in SonarQube you will see the following update

SonarQube-Ldap-plugin-update-available

LDAP Plugin

I deployed SonarQube 5.6 and went to the Update Center to look for the Active Directory plugin referenced above but instead I saw this

SonarQube-AAD-plugin

Azure Active Directory (AAD) Authentication Plugin

This had the words Active Directory in the name of the plugin but wasn’t quite what I needed so I went back to the internet and bing’d a few searches out which finally led to this:

I went to the releases page and downloaded the release candidate of the plugin and copied it to my plugins folder.

sonar-plugins-folder

Next I edited the sonar.properties file and entered the following:

# Active Directory configuration
sonar.security.realm=ACTIVE_DIRECTORY

which replaced the entries I had for the LDAP plugin so I could safely remove these:

# LDAP Configuration
sonar.security.realm=LDAP
sonar.forceAuthentication=true

You should now be able to start SonarQube and if you take a look at the logs you should see the plugin load:

sonar-log

If you navigate to the SonarQube homepage

sonar-notloggedin

Clicking on Login should immediately log you into SonarQube which you can verify when your logon account is display (as shown below)

sonar-loggedin

Good luck and of course if you have any questions please post them below.  More information about the plugin can be found here in the readme.md

 

 

About wesmacdonald

Wes MacDonald is a Visual Studio ALM MVP, PSD, MCT and a Principal Consultant for LIKE 10 INC., a SharePoint Server, Visual Studio and Team Foundation Server Consulting Firm providing premium support and guidance services.

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: