SonarQube - V5.1 Integration with Crowd-2.8.2 Authentication

779 views
Skip to first unread message

moha...@gmail.com

unread,
Feb 22, 2016, 10:32:29 PM2/22/16
to SonarQube

Dear Team,

 

This is regarding SonarQube integration with Crowd authentication.

 

The following is our environment,

 

Crowd Server Environment:


Server OS : – Ubuntu – 12.04 LTS

Atlassian Crowd Version: - 2.8.2

 

SonarQube Server Environment:-


Server OS : – Ubuntu 14.04.3 LTS

SonarQube Version – 5.1

 

Problem Description:

 

·        On SonarQube Server I have installed (sonar-crowd-plugin-2.0) plugin.

·        Then opt/sonarqube-5.1/conf/sonar.properties file à have added the following lines

# Crowd Authentication

sonar.security.realm

sonar.authenticator.createUsers: true

# URL of the Crowd server (usually ends with /services/).

crowd.url:http://110.120.130.140:8095/crowd/

# Crowd application name.

# Default is 'sonar'.

crowd.application:sonarqube

# Crowd application password.

crowd.password:test@123

 

·        Then restarted the Sonarqube service & tried, but it is not allowing me to login.

 

Note: On Crowd server I have created application and provided required details and added sonar server ip details.

 

It would be good if you could be guide to integrate sonarqube with crowd authentication.

 

Thanks,

Mohan

moha...@gmail.com

unread,
Mar 2, 2016, 1:21:35 AM3/2/16
to SonarQube, moha...@gmail.com

Dear team,

 

Sonar.log file log as follows, even seems configuration is fine.

 

2016.03.01 15:56:49 INFO  web[org.sonar.INFO] Security realm: Crowd

2016.03.01 15:56:49 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'application.name' : 'sonarqube'

2016.03.01 15:56:49 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: application.login.url

2016.03.01 15:56:49 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.tokenkey' : 'session.tokenkey'

2016.03.01 15:56:49 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.lastvalidation' : 'session.lastvalidation'

2016.03.01 15:56:49 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.validationinterval' : '1'

2016.03.01 15:56:49 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: cookie.domain

2016.03.01 15:57:49 INFO  web[o.s.p.c.CrowdRealm] Crowd configuration is valid, connection test successful.

2016.03.01 15:57:49 INFO  web[org.sonar.INFO] Security realm started

2016.03.01 15:57:49 INFO  web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.)

2016.03.01 15:57:49 INFO  web[o.s.s.s.IndexSynchronizer] Index rules

2016.03.01 15:57:51 INFO  web[o.s.s.s.IndexSynchronizer] Index activeRules

2016.03.01 15:57:51 INFO  web[o.s.s.s.RegisterMetrics] Register metrics

2016.03.01 15:57:51 INFO  web[o.s.s.s.RegisterMetrics] Cleaning quality gate conditions

2016.03.01 15:57:51 INFO  web[o.s.s.s.RegisterDebtModel] Register technical debt model

2016.03.01 15:57:51 INFO  web[o.s.s.r.RegisterRules] Register rules

2016.03.01 15:57:53 INFO  web[o.s.s.q.RegisterQualityProfiles] Register quality profiles

2016.03.01 15:57:53 INFO  web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters

2016.03.01 15:57:53 INFO  web[o.s.s.s.RegisterDashboards] Register dashboards

2016.03.01 15:57:53 INFO  web[o.s.s.s.RegisterPermissionTemplates] Register permission templates

2016.03.01 15:57:53 INFO  web[o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys

2016.03.01 15:57:53 INFO  web[o.s.s.s.IndexSynchronizer] Index activities

2016.03.01 15:57:54 INFO  web[o.s.s.s.IndexSynchronizer] Index issues

2016.03.01 15:57:54 INFO  web[o.s.s.s.IndexSynchronizer] Index source lines

2016.03.01 15:57:54 INFO  web[o.s.s.s.IndexSynchronizer] Index users

2016.03.01 15:57:54 INFO  web[o.s.s.s.IndexSynchronizer] Index views

2016.03.01 15:57:54 INFO  web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on OpenJDK 64-Bit Server VM 1.7.0_95-b00 [linux-amd64]

2016.03.01 15:57:54 INFO  web[jruby.rack] using a shared (threadsafe!) runtime

2016.03.01 15:58:04 INFO  web[jruby.rack] keeping custom (config.logger) Rails logger instance

2016.03.01 15:58:04 INFO  web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-107.108.4.178-9000"]

2016.03.01 15:58:04 INFO  web[o.s.s.a.TomcatAccessLog] Web server is started

2016.03.01 15:58:04 INFO  web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000

2016.03.01 15:58:05 INFO  app[o.s.p.m.Monitor] Process[web] is up

 

-Mohan

Scott B.

unread,
Mar 2, 2016, 7:42:32 AM3/2/16
to SonarQube, moha...@gmail.com
HI.

I think the documentation is completely wrong. See https://github.com/SonarQubeCommunity/sonar-crowd

The properties in sonar.properties should be in the format "key=vale".

So, try this:

# Crowd Authentication
sonar.security.realm=Crowd
sonar.authenticator.createUsers=true

# URL of the Crowd server (usually ends with /services/).

# Crowd application name.
# Default is 'sonar'.
crowd.application=sonarqube

# Crowd application password.
crowd.password=test@123

moha...@gmail.com

unread,
Mar 2, 2016, 10:10:26 PM3/2/16
to SonarQube, moha...@gmail.com

Dear Team,

 

Thanks for the reply, Yes I have been following the same URL guidelines. However still I am unable to login to sonar.

 

The following are the log information from the sonar.log file.

 

2016.03.03 08:26:50 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'application.name' : 'sonarqube'

2016.03.03 08:26:50 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: application.login.url

2016.03.03 08:26:50 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.tokenkey' : 'session.tokenkey'

2016.03.03 08:26:50 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.lastvalidation' : 'session.lastvalidation'

2016.03.03 08:26:50 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Loading property: 'session.validationinterval' : '1'

2016.03.03 08:26:50 INFO  web[c.a.c.s.c.ClientPropertiesImpl] Failed to find value for property: cookie.domain

2016.03.03 08:28:00 INFO  web[o.s.p.c.CrowdRealm] Crowd configuration is valid, connection test successful.

2016.03.03 08:28:00 INFO  web[org.sonar.INFO] Security realm started

2016.03.03 08:28:00 INFO  web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.)

2016.03.03 08:28:00 INFO  web[o.s.s.s.IndexSynchronizer] Index rules

2016.03.03 08:28:04 INFO  web[o.s.s.s.IndexSynchronizer] Index activeRules

2016.03.03 08:28:04 INFO  web[o.s.s.s.RegisterMetrics] Register metrics

2016.03.03 08:28:04 INFO  web[o.s.s.s.RegisterMetrics] Cleaning quality gate conditions

2016.03.03 08:28:04 INFO  web[o.s.s.s.RegisterDebtModel] Register technical debt model

2016.03.03 08:28:04 INFO  web[o.s.s.r.RegisterRules] Register rules

2016.03.03 08:28:05 INFO  web[o.s.s.q.RegisterQualityProfiles] Register quality profiles

2016.03.03 08:28:06 INFO  web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters

2016.03.03 08:28:06 INFO  web[o.s.s.s.RegisterDashboards] Register dashboards

2016.03.03 08:28:06 INFO  web[o.s.s.s.RegisterPermissionTemplates] Register permission templates

2016.03.03 08:28:06 INFO  web[o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys

2016.03.03 08:28:06 INFO  web[o.s.s.s.IndexSynchronizer] Index activities

2016.03.03 08:28:06 INFO  web[o.s.s.s.IndexSynchronizer] Index issues

2016.03.03 08:28:06 INFO  web[o.s.s.s.IndexSynchronizer] Index source lines

2016.03.03 08:28:06 INFO  web[o.s.s.s.IndexSynchronizer] Index users

2016.03.03 08:28:06 INFO  web[o.s.s.s.IndexSynchronizer] Index views

2016.03.03 08:28:07 INFO  web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on OpenJDK 64-Bit Server VM 1.7.0_95-b00 [linux-amd64]

2016.03.03 08:28:07 INFO  web[jruby.rack] using a shared (threadsafe!) runtime

2016.03.03 08:28:18 INFO  web[jruby.rack] keeping custom (config.logger) Rails logger instance

2016.03.03 08:28:18 INFO  web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-107.108.4.178-9000"]

2016.03.03 08:28:18 INFO  web[o.s.s.a.TomcatAccessLog] Web server is started

2016.03.03 08:28:18 INFO  web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000

2016.03.03 08:28:18 INFO  app[o.s.p.m.Monitor] Process[web] is up

 

And below are my crowd settings in sonar.properties,

 

#-------------------------

# Sonar Crowd Plugin

#------------------------

 

# To first try to authenticate against the external sytem.

# If the external system is not reachable or if the user is not defined in the external system, the authentication will be performed through the SonarQube internal system.

sonar.security.realm=Crowd

sonar.authenticator.createUsers=true

 

# URL of the Crowd server.

crowd.url= http://110.120.130.140:8095/crowd/

 

# Crowd application name.

# Default is 'sonar'.

crowd.application=sonarqube

 

# Crowd application password.

crowd.password=test@123

 

# Don't use crowd for sonar account

sonar.security.localUsers=admin,sonar

 

-Mohan

 



On Tuesday, February 23, 2016 at 9:02:29 AM UTC+5:30, moha...@gmail.com wrote:

Reply all
Reply to author
Forward
0 new messages