How to configure SSL/TLS for Jenkins

Configuring SSL/TLS AD signed certificate for Jenkins

Enable only TLS 1.2

JENKINS_JAVA_OPTIONS="-Dhttps.protocols=TLSv1.2 -Djava.awt.headless=true"

Configure the certificate

Covert and export pkcs12 version to import into keystore


sudo openssl pkcs12 -inkey /var/lib/jenkins/ssl/myhost.key -in /var/lib/jenkins/ssl/myhost.cer -export -out /var/lib/jenkins/ssl/myhost.pkcs12
sudo keytool -importkeystore -srckeystore /var/lib/jenkins/ssl/myhost.pkcs12 -srcstoretype pkcs12 -destkeystore /var/lib/jenkins/ssl/jenkins.jks

Enter some password where ever it asks. (I have used jenkins)

Edit the /etc/sysconfig/jenkins with following

JENKINS_ARGS="--httpsKeyStore=/var/lib/jenkins/ssl/jenkins.jks --httpsKeyStorePassword=jenkins --httpsPort=8080"

1 comment:

  1. It helped me to pin point the issue, Thanks a lot for you help

    ReplyDelete

Please share your views and comments below.

Thank You.