Enable support for TLS
Closes: #90 (closed)
Testing:
-
Create a self signed certificate for
localhost
and place the certificate and key in/tmp/server.crt
and/tmp/server.key
. -
Create a config file
config/gitlab-exporter.yml
with following contentsserver: name: webrick listen_address: localhost listen_port: 8443 tls_enabled: true tls_cert_path: /tmp/server.crt tls_key_path: /tmp/server.key
-
Run
bin/gitlab-exporter web -c config/gitlab-exporter.yml
and see that WEBRick is started without errors. -
Confirm that gitlab-exporter loads all intermediate certificates using
openssl s_client -showcerts -connect localhost:8443 < /dev/null
-
Try
curl http://localhost:8443
and see that gitlab-exporter doesn't support connecting over HTTP
Edited by Balasankar 'Balu' C