SonarQube で LDAP 認証 (Active Directory) を行う方法です。
プラグインのインストール
まずは LDAP Plugin をインストールします。
プロキシ設定を適切に行っていれば [Administration] > [Marketplace] からインストールできます。
LADP
で検索してインストールを行います。
設定
SonarQube の設定は以下に記述します。
/opt/sonarqube/conf/sonar.properties
プラグインをインストールしたら、sonar.properties に設定を追記します。
以下は例です。
# LDAP
sonar.security.realm=LDAP
ldap.url=ldap://example.com:389
ldap.bindDn=user@example.com
ldap.bindPassword=password
ldap.user.baseDn=dc=example,dc=com
ldap.user.request=(&(objectClass=user)(sAMAccountName={login}))
ldap.user.realNameAttribute=cn
ldap.user.emailAttribute=mail
注意事項として、LADP プラグインのインストール前に上記の設定を行うと、起動エラーになります。
私はこれで結構はまりました・・・。