Create a new signing request and update new cert in sonarqube.

Gopi M
1 min readMay 27, 2024

--

TO create a new signing request using openssl the command used is.

openssl req -new -newkey rsa:2048 -nodes -keyout ssl.key -out ssl.csr

then using the .csr certificate been created.

2. To list all the certificates

keytool -list -cacerts

3.To print cert file which has .cer extension use the tool named keytool

keytool -printcert -file <ssl.cer>

4. To import the keys

keytool -import -keystore /tmp/sonar-scanner/jre/lib/security/cacerts -file /tmp/sonar.cer -alias sonar

5. To view the keydetails in cacerts path with alias name

keytool -v -list -keystore /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts -alias sonar_new_key

6.Then we need to paste cert file(.cer) in path

/etc/pki/tls/certs

7.Next we need to keep the private keyfile(.key) on

/etc/pki/tls/private

8. then we need to make the changes on server.

for apache /etc/httpd/conf.d

under server certificate add this value

SSLCertificateFile /etc/pki/tls/certs/sonar.cer

under server private key add this value

SSLCertificateKeyFile /etc/pki/tls/private/sonar.key

--

--

Gopi M
Gopi M

Written by Gopi M

Security Researcher, Web Application and Network Pentester, CTF Player, Bug Bounty Hunter, Interested in Learning Technical stuffs.

No responses yet