Placing Signed SSL Certificates on the Appliances
Overview
Note: This document applies to Stratusphere versions
This document provides instructions on how to place signed SSL certificates on the Stratusphere Hub, Database, and Collector appliances. Apart from getting rid of the alarming warning each time the Stratusphere Hub Web UI is accessed, placing a signed SSL certificate provides verifiable identification and security compliance to administrator & users accessing the Web UI of Stratusphere.
If you are using a version of Stratusphere Hub, Database, and Collector older than 5.6.0, upgrade to the latest version or contact Support@Liquidware.com for additional information to upgrade.
Preparation
- Procure any change controls required to make changes to the production Stratusphere Hub & Database appliances.
- Acquire credentials of the console users as per the platform i.e., <username> as friend on VMware, Citrix, and Nutanix, ec2-user on AWS, azureuser on Azure, and root users to access the console of the Stratusphere Hub, Database, and Collector appliances.
- Procure access to the local console of the Stratusphere Hub, Database, and Collector Appliances depending on the hypervisor on which the Hub is housed. Alternatively, an SCP client such as Windows 10 Command Prompt and PuTTY can also be used to access the console of the Hub, Database, and Collector provided SSH (TCP/22) access is allowed to the appliances.
- Download and install your favorite SCP client such as WinSCP or FileZilla or similar to download certificate requests and upload the SSL Certificate files.
- Be aware that you will need to start the initial steps to prepare the SSL certificate request, pause in the middle of the instructions as you submit the request to the Certifying Authority (CA), and then receive your certificate. This may take minutes, hours, or even days depending on your CA. You will then use the new certificate to complete the process.
Scenarios
- Ad Hoc: Import and Install a PFX Certificate
- Traditional: Generate a Request, Import & Install an SSL certificate.
Scenario 1: Ad Hoc: Import and Install a PFX Certificate
This scenario applies when the IT or Security department created a certificate without using a request generated by a Stratusphere appliance. It walks the user through the steps to import the certificate, apply the right permissions, and then install it in the appropriate locations.
Instructions for the Stratusphere Hub & Collector Appliances
- Use your favorite SCP client, such as WinSCP, to upload the PFX file to
/home/<username>/
(replace<username>
withfriend/ec2-user/azureuser
) on the Hub or Collector using credentials for the<username>
on your platform i.e.,<username>
asfriend
on VMware, Citrix, and Nutanix,ec2-user
on AWS, andazureuser
on Azure. - Use your favorite SSH client, such as Windows 10 Command Prompt or PuTTY, to connect and log in using the credentials for
<username>
and runsudo bash
to change toroot
user. When prompted, enter the password for your<username>
. - Export the certificate from the PFX file by running the following command on the command line (replace
<username>
as appropriate along with the OFX file name YOURCERTNAME): -
Copy
openssl pkcs12 -in /home/<username>/YOURCERTNAME.pfx -clcerts -nokeys -out /home/<username>/ssl.crt.new
- Export the private key file from the PFX file:
-
Copy
openssl pkcs12 -in /home/<username>/YOURCERTNAME.pfx -nocerts -nodes -out /home/<username>/ssl.key.new
- Remove the passphrase from the private key (if needed):
-
Copy
openssl rsa -in /home/<username>/ssl.key.new -out /home/<username>/ssl.key.new
- Back up the working or existing certificate and key:
-
Copy
cp /etc/lwl/ssl/ssl.crt /etc/lwl/ssl/ssl.crt.backup
cp /etc/lwl/ssl/ssl.key /etc/lwl/ssl/ssl.key.backup - Copy the new certificate and key into the same location:
-
Copy
cp /home/<username>/ssl.crt.new /etc/lwl/ssl/ssl.crt
cp /home/<username>/ssl.key.new /etc/lwl/ssl/ssl.key - Update ownership, permissions, and the security context of the certificate and key:
-
Copy
chown root:root /etc/lwl/ssl/ssl.crt
chmod 644 /etc/lwl/ssl/ssl.crt
chmod 640 /etc/lwl/ssl/ssl.key
restorecon -RF /etc/lwl/ssl - Restart the Web Server to load the newly added SSL Certificate.
- On versions up to 6.1.1, use the following command:
-
Copy
/etc/init.d/httpd restart
- On versions 6.1.3, 6.1.4, use the following command:
-
Copy
/etc/init.d/lwl-httpd24 restart
- On versions 6.5.0 and higher, use the following command:
-
Copy
systemctl restart httpd
- Check that httpd is running:
- On versions up to 6.1.1, use the following command:
-
Copy
/etc/init.d/httpd status
- On versions 6.1.3, 6.1.4, use the following command:
-
Copy
/etc/init.d/lwl-httpd24 status
- On versions 6.5.0 and higher, use the following command:
-
Copy
systemctl status httpd
- If httpd restarted successfully after the cert was replaced, the Stratusphere Web UI should be accessible. Check that your browser shows the correct certificate.
Instructions for the Stratusphere Database Appliances
- Use your favorite SCP client, such as WinSCP, to upload the PFX file to
/home/<username>/
(replace<username>
withfriend/ec2-user/azureuser
) on the Database using credentials for the<username>
on your platform i.e.,<username>
asfriend
on VMware, Citrix, and Nutanix,ec2-user
on AWS, andazureuser
on Azure. - Use your favorite SSH client, such as Windows 10 Command Prompt or PuTTY, to connect and log in using the credentials for
<username>
and runsudo bash
to change toroot
user. When prompted, enter the password for your<username>
. - Export the certificate from the PFX file by running the following command on the command line (replace
<username>
as appropriate along with the OFX file name YOURCERTNAME): -
Copy
openssl pkcs12 -in /home/<username>/YOURCERTNAME.pfx -clcerts -nokeys -out /home/<username>/server.crt.new
- Export the private key file from the PFX file:
-
Copy
openssl pkcs12 -in /home/<username>/YOURCERTNAME.pfx -nocerts -nodes -out /home/<username>/server.key.new
- Remove the passphrase from the private key (if needed):
-
Copy
openssl rsa -in /home/<username>/server.key.new -out /home/<username>/server.key.new
- Back up the working or existing certificate and key:
-
Copy
cp /var/lib/pgsql/current/data/server.crt /var/lib/pgsql/current/data/server.crt.backup
cp / var/lib/pgsql/current/data/server.key / var/lib/pgsql/current/data/server.key.backup - Copy the new certificate and key into the same location:
-
Copy
cp /home/<username>/server.crt.new / var/lib/pgsql/current/data/server.crt
cp /home/<username>/server.key.new / var/lib/pgsql/current/data/server.key - Update ownership, permissions, and the security context of the certificate and key:
-
Copy
chown postgres:postgres / var/lib/pgsql/current/data/server.crt
chmod 400 / var/lib/pgsql/current/data/server.crt
chown postgres:postgres / var/lib/pgsql/current/data/server.key
chmod 400 / var/lib/pgsql/current/data/server.key - Restart the Postgres Database Server to load the newly added SSL Certificate.
- On versions prior to 6.5.0, use the following command:
-
Copy
/etc/init.d/postgresql<PRESS-TAB-KEY> restart
- On versions 6.5.0 and higher, use the following command:
-
Copy
systemctl restart postgresql-12
- Check whether the Postgres Database Server is running:
- On versions prior to 6.5.0, use the following command:
-
Copy
/etc/init.d/postgresql-<PRESS-TAB-KEY> status
- On versions 6.5.0 and higher, use the following command:
-
Copy
systemctl status postgresql-12
- If postgresql-12 service restarted successfully, then new certificate was accepted.
Scenario 2: Traditional: Generate a Request, Import, and Install an SSL Certificate
In this scenario, Stratusphere administrators will execute a script which prompts the end user for relevant inputs to create a certificate request. After entering information for the generation of the certificate request, the end user must download the certificate request file, send it to the Certifying Authority (CA) to receive the certificate back, and then place it back on the appliance to install it.
Instructions for the Stratusphere Hub Appliance
- Use your favorite SSH client, such as Windows 10 Command Prompt or PuTTY, to connect and log in to the Stratusphere Hub appliance console using the credentials for
<username>
on your platform i.e.,<username>
asfriend
on VMware, Citrix, and Nutanix,ec2-user
on AWS, andazureuser
on Azure. The default password issspassword
. - Switch to the
root
user by executing thesudo bash
command. When prompted, enter the password for your<username>
. The default password issspassword
. - Change to the following folder using the command:
-
Copy
cd /home/friend
- Enter the following commands to generate a new key and backup the original:
-
Copy
openssl genrsa 2048 > /etc/lwl/ssl/ssl.key.2048
cp /etc/lwl/ssl/ssl.key /etc/lwl/ssl/ssl.key.original - Press CTRL+C on your keyboard to copy the information below into a text editor like Notepad:
-
Copy
[req]
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
[req_distinguished_name]
countryName = Country Name (2 letter code)
stateOrProvinceName = State or Province Name (full name)
localityName = Locality Name (eg, city)
organizationName = Organization Name (eg, company)
commonName = Common Name (e.g. server FQDN or YOUR name)
[req_ext]
subjectAltName = @alt_names
[alt_names]
DNS.1 = insert your alternate dns here
DNS.2 = insert your alternate dns here
DNS.3 = insert your alternate dns here - Within Notepad, edit the lines under
[alt_names]
forDNS.1
throughDNS.3
and enter additional DNS names for the Hub. This step is necessary to address compatibility errors on Google Chrome related to missingSubject Alternative Name
and/orNET::ERR_CERT_COMMON_NAME_INVALID
errors. After the DNS alternate names are updated, copy the entire contents of Notepad to your clipboard by pressing CTRL+C. - In the SSH Client’s command prompt used in #3 above, execute the following command to open a text editor like vi.
-
Copy
vi /etc/lwl/ssl/name.req.config
- This opens a blank text configuration file that needs to be populated with what is copied to the clipboard.
- Perform the following to save the contents to the file:
- Press the
I
key to go into insert mode. - Right-click your mouse to paste the clipboard contents from Notepad within the vi editor.
- Press the ESC key to exit insert mode.
- Type
:wq!
to write and quit the vi editor.
- Press the
- Execute the following command in the command prompt to generate a certificate request on the Stratusphere Hub using the existing SSL Key.
-
Copy
openssl req -key /etc/lwl/ssl/ssl.key.2048 -config /etc/lwl/ssl/name.req.config -out hubcertrequest.csr -new -sha256
- When prompted for a common name, provide your Hub’s fully qualified DNS name.
-
Copy
common name: <hubdnsname.domain.com>
- The certificate request is generated in the following location:
-
Copy
/home/friend/hubcertrequest.csr
- Enter the following to change ownership of the file so that it is accessible to the
<username>
for the platform, such asfriend
,ec2-user
orazureuser
user. Here is an example for thefriend
user: -
Copy
chown friend:friend /home/friend/hubcertrequest.csr
- Use your favorite SCP client, such as WinSCP or similar software, to connect to the appliance using its IP or DNS address, with SCP protocol and connecting to Port 22 using the credentials of the platform
<username>
(e.g.,friend
orec2-user
orazureuser
user) to download this certificate request from/home/friend/hubcertrequest.csr
file to your local desktop. - Provide this certificate request file to your security provider or Certifying Authority and request that they provide the SSL Certificate specifically in base64 / PEM format. For these instructions, call the SSL Certificate file
hubsslcert.crt
. When you see references tohubsslcert.crt
in this document, you should substitute the actual name of the SSL Certificate file you received from your security provider or Certifying Authority. -
Important: Pause here until you receive your SSL certificate from your provider, then complete the process using the following instructions.
- Use your favorite SCP client, such as WinSCP or similar software, to connect to the appliance using its IP or DNS address, with SCP protocol and connecting to Port 22 using the credentials of the platform
<username>
(e.g.,friend
orec2-user
orazureuser
user) to upload thehubsslcert.crt
SSL Certificate file to your Stratusphere Hub or Collector in the/home/friend/hubsslcert.crt
location. - On the Stratusphere Hub local console, while still logged in as the
root
user, make a copy the original SSL certificate as a backup: -
Copy
cp /etc/lwl/ssl/ssl.crt /etc/lwl/ssl/ssl.crt.orig
- Place the new key and certificate in place of the original and modify the file permissions as follows:
-
Copy
cp /etc/lwl/ssl/ssl.key.2048 /etc/lwl/ssl/ssl.key
mv /home/friend/hubsslcert.crt /etc/lwl/ssl/ssl.crt
chown root:root /etc/lwl/ssl/ssl.crt
chmod 644 /etc/lwl/ssl/ssl.crt
chmod 640 /etc/lwl/ssl/ssl.key
restorecon -RF /etc/lwl/ssl - Restart the Web Server to load the newly added SSL Certificate.
- On versions up to 6.1.1, use the following command:
-
Copy
/etc/init.d/httpd restart
- On versions 6.1.3 to 6.1.5, use the following command:
-
Copy
/etc/init.d/lwl-httpd24 restart
- On versions 6.5.0 and higher, use the following command:
-
Copy
systemctl restart httpd
- Using your browser of choice, log in to the Stratusphere Hub Web UI. Ensure that the UI Login page shows with no certificate related warning. Also verify the information within the certificate provided by the browser address bar.
Instructions for the Stratusphere Database Appliance
- Use your favorite SSH client, such as Windows 10 Command Prompt or PuTTY, to connect and log in to the Stratusphere Database appliance console using the credentials for
<username>
on your platform i.e.,<username>
asfriend
on VMware, Citrix, and Nutanix,ec2-user
on AWS, andazureuser
on Azure. The default password issspassword
. - Switch to the
root
user by executing thesudo bash
command. When prompted, enter the password for your<username>
. - Change to the following folder using the command:
-
Copy
cd /home/friend
- Enter the following commands:
-
Copy
openssl genrsa 2048 > /var/lib/pgsql/current/data/server.key.2048
cp /var/lib/pgsql/current/data/server.key /var/lib/pgsql/current/data/server.key.original - Generate a certificate request on the Stratusphere Database using the existing SSL Key.
-
Copy
openssl req -key /var/lib/pgsql/current/data/server.key.2048 -out dbcertrequest.csr -new -sha256
- When prompted for common name, make sure you provide your database’s fully qualified DNS name.
-
Copy
common name: <dbdnsname.domain.com>
- The certificate request is generated in the following location:
-
Copy
/home/friend/dbcertrequest.csr
- Enter the following to change ownership of the file so that it is accessible to the
<username>
for the platform, such asfriend
,ec2-user
orazureuser
user. Here is an example for thefriend
user: -
Copy
chown friend:friend /home/friend/dbcertrequest.csr
- Use WinSCP or FileZilla or similar software to download this certificate request
/home/friend/dbcertrequest.csr
file to your local desktop. In WinSCP or FileZilla, use the User IDfriend
and the passwordsspassword
as credentials within the program. Use the SCP protocol with WinSCP (Port 22). - Provide this certificate request file to your security provider or Certifying Authority and request that they provide the SSL Certificate specifically in base64 / PEM format. For these instructions, call the SSL Certificate file
server.crt
. When you see references toserver.crt
in this document, you should substitute the actual name of the SSL Certificate file you received from your security provider or Certifying Authority. -
Important: Pause here until you receive your SSL certificate from your provider, then complete the process using the following instructions.
- Use WinSCP or FileZilla or similar software to upload the
server.crt
SSL Certificate file to your Stratusphere database in the/home/friend/server.crt
location. In WinSCP or FileZilla, use the User IDfriend
and the passwordsspassword
as credentials within the program. Use the SCP protocol with WinSCP (Port 22). - On the Stratusphere Database local console, while still logged in as the
root
user, make a copy the original SSL certificate as a backup: -
Copy
cp /var/lib/pgsql/current/data/server.crt /var/lib/pgsql/current/data/server.crt.orig
- Place the new key and certificate in place of the original and modify the file permissions as follows:
-
Copy
cp /var/lib/pgsql/current/data/server.key.2048 /var/lib/pgsql/current/data/server.key
mv /home/friend/server.crt /var/lib/pgsql/current/data/server.crt
chown postgres:postgres /var/lib/pgsql/current/data/server.crt
chmod 400 /var/lib/pgsql/current/data/server.crt
chown postgres:postgres /var/lib/pgsql/current/data/server.key
chmod 400 /var/lib/pgsql/current/data/server.key - Restart the database server to load the newly added SQL Certificate:
- On versions prior to 6.5.0, use the following command:
-
Copy
/etc/init.d/postgresql<PRESS-TAB-KEY> restart
- On versions 6.5.0 and higher, use the following command:
-
Copy
systemctl restart postgresql-12
Instructions for the Stratusphere Collector Appliance
- Use your favorite SSH client, such as Windows 10 Command Prompt or PuTTY, to connect and log in to the Stratusphere Hub appliance console using the credentials for
<username>
on your platform i.e.,<username>
asfriend
on VMware, Citrix, and Nutanix,ec2-user
on AWS, andazureuser
on Azure. The default password issspassword
. - Switch to the
root
user by executing thesudo bash
command. When prompted, enter the password for your<username>
. The default password issspassword
. - Change to the following folder using the command:
-
Copy
cd /home/friend
- Enter the following commands to generate a new key and backup the original:
-
Copy
openssl genrsa 2048 > /etc/lwl/ssl/ssl.key.2048
cp /etc/lwl/ssl/ssl.key /etc/lwl/ssl/ssl.key.original - Generate a certificate request on the Stratusphere Collector using the existing SSL Key.
-
Copy
openssl req -key /etc/lwl/ssl/ssl.key.2048 -out colcertrequest.csr -new -sha256
- When prompted for common name, provide your Collector’s fully qualified DNS name.
-
Copy
common name: <coldnsname.domain.com>
- The certificate request is generated in the following location:
-
Copy
/home/friend/colcertrequest.csr
- Enter the following to change ownership of the file so that it is accessible to the
<username>
for the platform, such asfriend
,ec2-user
orazureuser
user. Here is an example for thefriend
user: -
Copy
chown friend:friend /home/friend/colcertrequest.csr
- Use WinSCP or FileZilla or similar software download this certificate request
/home/friend/colcertrequest.csr
file to your local desktop. In WinSCP or FileZilla, use the User IDfriend
and passwordsspassword
as credentials within the program. Use the SCP protocol with WinSCP (Port 22). - Provide this certificate request file to your security provider or Certifying Authority and request that they provide the SSL Certificate specifically in base64 / PEM format.
- For these instructions, call the SSL Certificate file
colsslcert.crt
. When you see references tocolsslcert.crt
in this document, you should substitute the actual name of the SSL Certificate file you received from your security provider or Certifying Authority. -
Important: Pause here until you receive your SSL certificate from your provider, then complete the process using the following instructions.
- Use WinSCP or FileZilla or similar software to upload the
colsslcert.crt
SSL Certificate file to your Stratusphere Hub in the/home/friend/colsslcert.crt
location. In WinSCP or FileZilla, use the User IDfriend
and the passwordsspassword
as credentials within the program. Use the SCP protocol with WinSCP (Port 22). - On the Stratusphere Collector local console, while still logged in as the
root
user, make a copy the original SSL certificate as a backup: -
Copy
cp /etc/lwl/ssl/ssl.crt /etc/lwl/ssl/ssl.crt.orig
- Place the new key and certificate in place of the original and modify the file permissions as follows:
-
Copy
cp /etc/lwl/ssl/ssl.key.2048 /etc/lwl/ssl/ssl.key
mv /home/friend/colsslcert.crt /etc/lwl/ssl/ssl.crt
chown root:root /etc/lwl/ssl/ssl.crt
chmod 644 /etc/lwl/ssl/ssl.crt
chmod 640 /etc/lwl/ssl/ssl.key
restorecon -RF /etc/lwl/ssl - Restart the Collector to load the newly added SSL Certificate.
- On versions up to 6.1.1, use the following command:
-
Copy
/etc/init.d/httpd restart
- On versions 6.1.3 to 6.1.5, use the following command:
-
Copy
/etc/init.d/lwl-httpd24 restart
- On versions 6.5.0 and higher, use the following command:
-
Copy
systemctl restart httpd