How to Use Self-Signed Certificates with DSS 6 - DSS 6 | Data Source Solutions Documentation
Documentation: How to Use Self-Signed Certificates with DSS 6 - DSS 6 | Data Source Solutions Documentation
How to Use Self-Signed Certificates with DSS 6
Question
How to use Self-Signed Certificates with DSS 6
Environment
DSS 6
Answer
Self-signed certificates allow you to establish secure connections within a private network without relying on public Certificate Authorities (CAs). For DSS 6, self-signed certificates provide a practical way to secure data transfers over the network, ensuring encrypted communication between systems without the need for external validation.
This guide outlines the steps to set up self-signed certificates for DSS 6. This includes creating a CA, generating self-signed certificates for the DSS Hub Server, and installing the root certificate on your machines.
Prerequisites
Before generating the CA and Hub Server certificates, ensure the following prerequisites are met:
- Administrative (root) privileges
- Access to a terminal or command prompt
- OpenSSL installed
- A text editor (such as vim, nano, or Notepad)
If you are unable to generate the CA or Hub Server certificates, contact your IT or system administrator for assistance.
Generate the CA and Hub Server Certificates
To generate the CA and Hub Server self-signed certificates, you can follow either of the two methods below - a step-by-step manual process or an automated bash script for faster setup.
Manual Steps
Perform the following steps to generate the CA and Hub Server self-signed certificates:
-
Create a directory (e.g., /etc/ssl) for certificates:
sudo mkdir -p /etc/ssl cd /etc/sslAll files generated in the following steps will be saved in this directory.
-
Create the Certificate Authority (CA):
-
Generate the CA’s private key (e.g., dss6.key):
openssl genrsa -des3 -out dss6.key 2048When prompted, enter a password. Securely save this password, as you will need it to sign future certificates.
-
Generate the CA’s public certificate (e.g., dss6.pem), valid for 1825 days:
openssl req -x509 -new -nodes -key dss6.key -sha256 -days 1825 -out dss6.pemWhen prompted, enter the following details for the certificate:
- Country Name (2-letter code, e.g., US)
- State or Province Name (full name, e.g., California)
- Locality Name (city, e.g., Oakland)
- Organization Name (e.g., MyCompany)
- Common Name (e.g., hubserver)
- Email Address (e.g., admin@yourcompany.com)
The above commands create the following CA files in your /etc/ssl directory:
- dss6.key
- dss6.pem
-
-
Generate the certificates for the DSS Hub Server:
-
Generate the Hub Server’s private key (e.g., dsshubserver.priv_key):
openssl genrsa -out dsshubserver.priv_key 2048 -
Generate a Certificate Signing Request (CSR) for the DSS Hub Server using the private key:
openssl req -new -key dsshubserver.priv_key -out dsshubserver.csrWhen prompted, enter the following details for the certificate:
- Country Name (2-letter code, e.g., US)
- State or Province Name (full name, e.g., California)
- Locality Name (city, e.g., Oakland)
- Organization Name (e.g., MyCompany)
- Common Name (e.g., dsshubserver.local). This is the hostname that is required in the next step.
- Email Address (e.g., admin@yourcompany.com)
Do not enter any values for 'extra' attributes. Do not enter a password.
3. Create a certificate extensions configuration file (e.g., **dsshubserver.ext**) in the **/etc/ssl** directory to define the Subject Alternative Names (SANs) for the Hub Server’s SSL certificate. Replace the **DNS.1** value with the hostname of your DSS Hub Server. In this example, the hostname (the Common Name entered in the previous command) for the DSS Hub Server is **dsshubserver.local**. ``` authorityKeyIdentifier=keyid,issuer basicConstraints=CA:FALSE keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment subjectAltName = @alt_names [alt_names] DNS.1 = [dsshubserver.local] ``` <div class="callout callout-note">This allows the certificate to be valid for multiple domain names or IP addresses, not just a single hostname.
-
-
4. Generate the DSS Hub Server‘s self-signed public certificate, valid for 1825 days:
Use the CA to sign the CSR and generate the Hub Server’s public certificate.
```
openssl x509 -req -in dsshubserver.csr -CA dss6.pem -CAkey dss6.key -CAcreateserial -out dsshubserver.pub_cert -days 825 -sha256 -extfile dsshubserver.ext
```
The following is displayed upon successful completion of the command’s execution:
```
Signature ok
subject=/C=US/ST=California/L=Oakland/O=MyCompany/CN=dsshubserver.local/emailAddress=info@datasourcesolutions.ai
Getting CA Private Key
```
<div class="callout callout-note">
By signing the CSR, the CA verifies and validates the Hub Server’s identity and issues a public certificate that confirms the server’s legitimacy. The CA uses its private key (dss6.key) to sign the CSR. This process creates a unique digital signature that can be verified against the CA’s public certificate (dss6.pem), establishing a chain of trust.