Identity Plugin

Issue Tracker You can browse tickets for the plugin in JIRA
Price 350 € per instance of Sonar and per year, including upgrade, maintenance and support.

Download

  I accept the Terms and Conditions
Version 1.0 - Released Dec. 7, 2009
Support LDAP and Microsoft ActiveDirectory
Sonar 1.12 Release notes Download
Two-weeks evaluation license | Buy a full year license

Features

The Sonar Identity Plugin enables the delegation of Sonar authentication to an external system. The plugin currently supports LDAP and Microsoft Active Directory.

Only password-checking is done against the external system. Authorization (access control) is fully managed in Sonar. Since Sonar 2.0, users can automatically be created in Sonar. The Sonar administrator should also assign the user to the desired groups in order to grant him necessary rights. If exists, the password in the Sonar account will be ignored as the external system password will override it.

Installation

1. Copy the file sonar-identity-plugin.jar to /extensions/plugins

2. Make sure that at least one user with global administration role exists in Sonar as well as in the external system

3. Configure sonar.properties by adding and editing the following :

#———————————————–
# SonarSource Identity Plugin
#———————————————–

# A license key needs to be entered to activate the plugin.
# Uncomment the line with the key or set the key in the Sonar admin console
#sonarsource.identity.license.secured:

# IMPORTANT : before activation, make sure that one Sonar administrator is defined in the external system
# Activates the plugin. Leave blank or comment out to use default sonar authentication.
sonar.authenticator.class: com.sonarsource.plugins.identity.LdapAuthenticator

# Ignore failure at startup if the connection to external system is refused.
# Users can browse sonar but not log in as long as the connection fails.
# When set to true, Sonar will not start if connection to external system fails. Default is false.
#sonar.authenticator.ignoreStartupFailure: false

# Automatically create user in sonar if authentication has been successfully done
# against LDAP server. User will be associated to the default group defined in the UI.
# Default value is false. This is only available from Sonar 2.0.
#sonar.authenticator.createUsers: true

# URL of the ldap server, eg. ldap://localhost:10389
sonarsource.ldap.url:

# Distinguished Name (DN) of the root node in LDAP from which to search for users, eg. “ou=users,o=mycompany”
sonarsource.ldap.baseDn:

# (optional) Bind DN is the username of an LDAP user to connect (or bind) with.
# This is a Distinguished Name of a user who has administrative rights,
# eg. “cn=sonar,ou=users,o=mycompany”. Leave blank for anonymous access to the LDAP directory.
sonarsource.ldap.bindDn:

# (optional) Bind Password is the password of the user to connect with.
# Leave blank for anonymous access to the LDAP directory.
sonarsource.ldap.bindPassword:

# Login Attribute is the attribute in LDAP holding the user’s login.
# Default is ‘uid’. Set ’sAMAccountName’ for Microsoft Active Directory
#sonarsource.ldap.loginAttribute:

# Object class of LDAP users. Default value is ‘inetOrgPerson’. Set ‘user’ for Microsoft Active Directory.
#sonarsource.ldap.userObjectClass: inetOrgPerson

# Context factory class. Default is com.sun.jndi.ldap.LdapCtxFactory
#sonarsource.ldap.contextFactoryClass: com.sun.jndi.ldap.LdapCtxFactory



4. Restart the Sonar server and check the log file for :

INFO org.sonar.INFO Authentication plugin: class com.sonarsource.plugins.ldap.LdapAuthenticator
INFO org.sonar.INFO Authentication plugin started



5. Log in to Sonar !

Alternatively, the license key can be entered in Sonar admin console. In that case, it will require to : copy the jar, restart Sonar, enter the key, configure sonar.properties and restart Sonar.