TLS Certificate Procedures for Eyeglass
Introduction
This guide covers replacing the TLS certificate used by the Eyeglass appliance web UI, either with a newly generated self-signed certificate or with a certificate signed by an internal or external Certificate Authority (CA).
Quick Replace: Generate a New Self-Signed Certificate
This only replaces the main port 443 certificate. If you also need to replace the certificate used for websockets and the web UI, follow the external CA signing procedure below instead.
There will be a service interruption on Eyeglass while this procedure is performed.
- SSH to Eyeglass as
admin(default password3y3gl4ss). - Elevate to root:
(default password
sudo su3y3gl4ss) - Stop the services:
systemctl stop sca
systemctl stop lighttpd - Move the old key aside:
mv /opt/superna/sca/.secure/ssl.pem /tmp/ssl.pem.old - Generate the new self-signed certificate:
/opt/superna/bin/create_ssl_keys.sh /opt/superna/sca/.secure/ssl - Fix ownership:
chown sca:users /opt/superna/sca/.secure/* - Restart the services:
systemctl start sca
systemctl start lighttpd
Using an Internal or External Certificate Authority
Option A: Create a CA Root Certificate on the Eyeglass Appliance
Use this option if you don't have an existing external CA and want to sign the certificate without one.
- SSH to Eyeglass as
admin, thensudo -s. - Create a working directory:
mkdir -p /opt/ca
cd /opt/ca - Create the root CA key:
Change the passphrase and store it — it's needed to sign certificates in the future. To have clients/browsers trust certificates issued by this root, install
openssl genrsa -passout pass:foobar -out rootCA.key 2048rootCA.pemin each client's trusted certificate store. - Self-sign the root CA certificate:
You'll be prompted for organization details (country, province, city, etc.).
openssl req -x509 -new -nodes -key rootCA.key -days 3650 -out rootCA.pem-days 3650sets a 10-year validity — adjust as needed. - Create the appliance private key:
openssl genrsa -out eyeglass.key 2048 - Create the certificate request:
You'll be prompted for environment details (country, city, company, email) and can optionally set a passphrase.
openssl req -new -key eyeglass.key -out eyeglass.csr - Sign the request with the root CA:
Adjust
openssl x509 -req -in eyeglass.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out eyeglass.cer -days 365-daysto control the certificate's validity period. Verify it with:openssl x509 -in eyeglass.cer -text -noout - Continue with Installing a Signed Certificate below.
Option B: Request a Certificate from an External CA
Use this option if your organization has an external CA server.
-
Create a config file at
/tmp/iglscert.cnfon the Eyeglass appliance:[ req ]
default_bits = 2048
prompt = no
encrypt_key = no
default_md = sha256
distinguished_name = dn
req_extensions = v3_req
[ dn ]
CN = iglscert.superna.local
emailAddress=support-team@superna.net
O = SUPERNA
OU = Support Team
L = Ottawa
ST = Ontario
C = CA
[ v3_req ]
subjectAltName = @alt_names
[ alt_names ]
DNS.1 = iglscert.superna.local
DNS.2 = *.superna.localnoteCNshould be the appliance's FQDN.alt_namesshould match the appliance's FQDN — using a wildcard (*.domain) is common. You can also addIP.1=<x.x.x.x>here if the appliance needs to be reachable by IP address. -
Generate the CSR and private key:
openssl req -new -config /tmp/iglscert.cnf -keyout /tmp/iglscert.key -out /tmp/iglscert.csr -
Verify the CSR:
openssl req -text -noout -verify -in /tmp/iglscert.csr -
Submit the CSR to your CA (Windows Server CA or other) to be signed. The signed certificate must be in Base-64-encoded X.509 (
.cer) format. See Signing with a Microsoft CA Server below for an example (consult your CA vendor's documentation for the exact steps). -
Copy the signed
.cerfile back to the Eyeglass appliance (e.g. via WinSCP). -
Continue with Installing a Signed Certificate below.
Installing a Signed Certificate
- Confirm you have the signed certificate in
.cerformat, along with its matching private key (.key). - SSH to Eyeglass as
admin, thensudo -s, and copy the certificate file onto the appliance (e.g. via WinSCP). - If you used the Eyeglass Root CA procedure (Option A):
- Confirm you're root:
whoami - Verify the certificate format:
openssl x509 -in /tmp/iglscert.cer -textcautionIf this returns "unable to load certificate," the file is not in CER format. Do not continue — all further steps will fail until the file is corrected.
- Install the certificate:
scacli replace-certificate --privateKey=/opt/ca/eyeglass.key --certificate=/opt/ca/eyeglass.cer - Skip to step 6 below.
- Confirm you're root:
- If you used an external CA (Option B): convert the private key to PEM format:
openssl rsa -in /tmp/iglscert.key -out /tmp/iglscert.pem - Replace the existing certificate:
scacli replace-certificate --privateKey=/tmp/iglscert.pem --certificate=/tmp/iglscert.cer - Navigate to the certificate directory:
cd /opt/superna/sca/.secure - Back up the existing certificate file:
mv ssl.pem ssl.pem.orig - Concatenate the new key and certificate into the combined file lighttpd expects:
cat ssl.pem.orig ssl > ssl.pem - Fix ownership:
chown sca.users /opt/superna/sca/.secure/* - Restart the services:
systemctl restart lighttpd sca - Log in to the Eyeglass web UI using the appliance's FQDN and verify the certificate details and expiry in your browser. The FQDN used to access Eyeglass should match the value set in the CSR's
alt_names.
Signing with a Microsoft CA Server
If you're using a Microsoft Certificate Authority to sign the request:
- SSH to Eyeglass as
admin, thensudo -s. - Display the CSR contents:
cat /tmp/iglscert.csr - Copy the output into a new file named
iglscert.reqon a machine with access to the Microsoft CA management console. - In the CA console, right-click the CA server name and select Submit New Request, then browse to
iglscert.reqand submit it. - Open the Pending Requests folder for the CA.
- Right-click the pending request, choose All Tasks, then Issue.
- Open the Issued Certificates folder, find the issued certificate, and double-click it to view details.
- On the Details tab, click Copy to File to launch the Certificate Export Wizard.
- Select Base-64 encoded X.509 (.CER) as the export format.
- Save the file as
iglscert.cer, then follow Installing a Signed Certificate above.