We've recently set up a Jenkins CI server on Windows. Now in order to use Active Directory authentication I'd like to require https (SSL/TLS) for access. Given this setup, what is the recommended way to do this?
To configure an HTTPS server, the ssl parameter must be enabled on listening sockets in the server block, and the locations of the server certificate and private key files should be specified: server { listen 443 ssl; server_name www.example.com; ssl_certificate www. example.com. crt; ssl_certificate_key www.
Let's make a folder inside /var/lib/jenkins to put our cert and key in. Now we need to edit the Jenkin config to tell it to use HTTPS and where the certificate and key are located. For those who use Ubuntu, this is /etc/default/jenkins .
Go to your %JENKINS_HOME% and modify the jenkins.xml. Where you see --httpPort=8080
change it to --httpPort=-1 --httpsPort=8080
you can make the ports anything you want of course, but in my testing (a while ago, it may have changed) if you don't keep --httpPort=<something>
then Jenkins will always use 8080. So if you simply change --httpPort=8080
to --httpsPort=8080
, port 8080 will still use http.
Also, if you want to use your own certificate, there are some instructions at the bottom of this page.
http://wiki.jenkins-ci.org/display/JENKINS/Starting+and+Accessing+Jenkins
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With