Hello,
Versions:
- SonarQube Enterprise Edition 9.6.1
- Gitlab 15.3.3
I host SonarQube and Gitlab on two different virtual machines. Each machine is behind a proxy implementing mutual TLS, i.e. I need to send a client certificate to connect to them.
SonarScanner can successfully send its report from Gitlab’s machine to SonarQube. It sends a client certificate thanks to the following command line prior to its execution :
export SONAR_SCANNER_OPTS=“-Djavax.net.ssl.keyStore=/path/to/my-cert.pfx -Djavax.net.ssl.keyStorePassword=whatever”
However I also want to get the analysis details in Gitlab’s Merge Request page. So I need SonarQube to send a client certificate to Gitlab along with the MR decoration.
When I go to Administration > DevOps Platform Integration > Gitlab and click on ‘Check configuration’, the page displays : Could not validate GitLab url. Got an unexpected answer.
In SonarQube’s web.log file, I get the following message:
400 No required SSL certificate was sent
My question is: how can I get Sonar to send a local client certificate with its requests to my Gitlab server?
I tried to force Sonar to use my keystore by exporting the two following variables before restarting Sonar but it did not work:
export SONAR_CE_JAVAADDITIONALOPTS=“-Djavax.net.ssl.keyStore=/path/to/my-cert.pfx -Djavax.net.ssl.keyStorePassword=whatever”
export SONAR_WEB_JAVAADDITIONALOPTS=“-Djavax.net.ssl.keyStore=/path/to/my-cert.pfx -Djavax.net.ssl.keyStorePassword=whatever”
Thanks,
Adrien