SonarQube Connection to SQL Database using Windows Authentication


(Madhuvanthi Teli) #1

Hi,

SonarQube 7.3 is installed on Windows machine. SonarQube server is connected to Microsoft SQL database (using SQL Authentication) and therefore, $SONARQUBE-HOME/conf/sonar.properties is configured as below:

sonar.jdbc.username=sonarqube
sonar.jdbc.password=mypassword
sonar.jdbc.url=jdbc:sqlserver://hostname;databaseName=DatabaseName;instanceName=InstanceName

I don’t want to use ‘SQL Authentication’ and use ‘Windows Authentication’ instead. How can i achieve this?

From online resources, i found out that jTDS Driver supports Windows authentication to SQL database.

I downloaded jTDS - SQL Server and Sybase JDBC Driver and copied “jtds-1.3.1.jar” file to
Sonarqube 7.3\extensions\jdbc-driver\mssql" directory (created ‘mssql’ directory manually).

Commented sonar.jdbc.username and sonar.jdbc.password properties.

sonar.jdbc.url=jdbc:sqlserver://hostname;integratedSecurity=true;databaseName=DatabaseName;instanceName=InstanceName

When i restarted the sonarqube instance, it’s getting errored out. Is this the right way? If not, how can i achieve windows authentication to SQL database?

Thanks,
Madhu


(Colin Mueller) #2

Madhu,

Let me recommend that you read through our "Installing the Database" documentation, specifically the section on Microsoft SQL Server.

Colin


(Madhuvanthi Teli) #3

Hi Colin,

Thank you. Successfully implemented Windows authentication. Could you please guide me on how to use SSO with crowd?

Thanks,
Madhu