-
Notifications
You must be signed in to change notification settings - Fork 21
Enabling Https on tendrl server
This wikipage describes how to set up SSL access for Tendrl Web UI, Tendrl REST API and Grafana based dashboard.
- Tendrl Web, API and Grafana dashboard, which are provided by apache server, will be secured with SSL by reconfiguration of apache.
- Access to unencrypted http port is redirected to encrypted https port.
- Tendrl contains sample configuration files for apache to simplify the SSL setup.
- Nothing else is secured or restricted compared to default setup without HTTPS enabled.
-
Package
mod_sslis installed and the default configuration in/etc/httpd/conf.d/ssl.confis left unmodified. -
SSL key and certificate files are deployed on the Tendrl server. For testing purposes, one can use local self signed key and certificate pair created during installation of
mod_sslpackage (file paths for this option are used as a default in tendrl ssl sample config file).
-
Access to Grafana dashboard is not authenticated, so that anyone who can access Tendrl web login page can also access and read all panels in Tendrl dashboard without any password (and learn about cluster structure, current workload and historic trends). This is happening because Tendrl uses anonymous access to Grafana main dashboard.
-
Tendrl server is listening on few other ports, which are not secured and which are needed for internal communication (eg. to receive metrics data from storage machines). The only other component of Tendrl stack which can be protected via SSL is Etcd, as described in wikipage Etcd SSL enabling using tendrl-ansible.
On a machine where Tendrl server is installed, perform the following steps:
-
Make sure
mod_sslrpm package is installed and/etc/httpd/conf.d/ssl.conffile is not modified:# rpm -V mod_ssl # -
Create new
00_tendrl-ssl.conffile using the sample configuration file:# cp /etc/httpd/conf.d/00_tendrl-ssl.conf.sample /etc/httpd/conf.d/00_tendrl-ssl.conf -
Make the following changes to the
00_tendrl-ssl.conffile:- Set
ServerNameto hostname (fqdn) of Tendrl server. - Edit the file path for the
SSLCertificateFilevariable if you want to use your own certificate instead of default self-signed/etc/pki/tls/certs/localhost.crtgenerated bymod_ssl. - Edit the file path for the
SSLCertificateKeyFilevariable if you have changed cert file in the previous step. The default value points to/etc/pki/tls/private/localhost.keyfile generated bymod_ssl.
- Set
-
Make the following changes to the
tendrl.conffile (this is necessary for http redirection to work):- Un-comment the line which has the
Redirectrule and replace%ssl_virtualhost_fqdn%with fully qualified domain name of Tendrl server. - Comment out the lines which have the
DocumentRoot,ProxyPassandProxyPassReversedirectives.
- Un-comment the line which has the
-
Thereafter, check if the configuration is valid using
apachectl -tand reload httpd usingsystemctl reload httpd.service. -
Make sure https port is open:
# firewall-cmd --add-service=https # firewall-cmd --add-service=https --permanentSee Firewall Configuration section for more details (especially if you are using iptables or firewalld zones).
If you have a web browser open with Tendrl web or Grafana dashboard during this procedure, you will need to reload the page. This step is important especially if you use self signed SSL certificates.