Open SSL setup
Setting up SSL is completely automated in Puppet. However, you can manually set up a trusted certificate so that users can privately browse the metadata server without being warned by a web browser that the they are trying to connect to a site that is using a self-signed certificate. To do this you must get an SSL certificate signed by a certification authority (CA). The following procedure outlines how to do this.
Prerequisites
- The commands used to generate the key and certificate request in the following procedure must be run from a Linux RH6 server.
- You must have Puppet installed on all servers that are running an NGINX instance, that is, each SDP server (if there is more than one), and each MDS.
Procedure
Generate a private key and a certificate signing request, which can be done using the following command:
CODEopenssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr
- You will be prompted for some information, for which you can find guidelines here: https://www.digicert.com/csr-creation-nginx.htm
- Get the server.csr file signed by a CA, such as Verisign or Digicert. For example, go to https://www.digicert.com/csr-creation-nginx.htm.
- The signed certificate must then be inserted into Puppet, as follows:
- In Puppet, go to Smart class parameters.
- Search for 'ssl'.
- Select ssl_certificate.
- In the Default value box, paste the signed certificate, that is, the contents of the .pem file that you received from your chosen CA.
- In the Smart variables search results, select ssl_certificate_key.
- In the Default value box, paste the private key, that is, the contents of the server.key file that you generated in the first step.
On each server that is running an NGINX instance, run the Puppet agent using the following command:
CODEpuppet agent –t
The certificate should then be displayed in /opt/nginx/conf/server.crt, while the private key should be displayed in /opt/nginx/conf/server.key.
On each server that is running an NGINX instance, run the following command:
CODEservice nginx reload