Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Self-issued Certificates are created individually per user and are not applicable within reasonable effort for deploying individual certificate files to JOC Cockpit, Controllers and AgentsJS7 products.
  • Private CA-signed Certificates are issued by users who operate their own Private Certificate Authority (CA).
  • Public CA-signed Certificates are issued by a trusted Certificate Authority (CA) that validates the domain owner. They are not created by users but are purchased from the trusted CA and are not in scople of this article.

...

Expand
titleExplanations...
  • The following files will be created for the given server:
    • myhost.crt: the Server Certificate
  • For operation with JS7 JOC Cockpit, Controller and Agents users can add

Shell Scripts

As an alternative to running OpenSSL commands in an interactive shell, scripts are provided that perform this task.

The below scripts assume the following directory layout:

  • <ca>  The directory <ca> is a placeholder. Any directory can be used.
    • create_root_ca.sh
    • create_certificate.sh
    • certs
    • csr
    • private

The sub-directories certs, csr and private will be created should they not exist.

Creating the Private Root CA Certificate

Download: create_root_ca.sh

The following files will be created:

  • <ca>/certs/root-ca.crt
  • <ca>/csr/root-ca.csr
  • <ca>/private/root-ca.key

This step is performed just once. In case of renewal of the Root CA Certificate any Server Certificates will have to be renewed.

Code Block
titleRun .create_root_ca.sh shell script
linenumberstrue
# Description
# create_root_ca.sh --key-name=<basename> --subject=<distinguished-name> --days=<number-of-days>

# Example: run with defaults
./create_root_ca.sh

# Example: use basename such as ca-root.key, ca-root.crt, ca-root.csr
./create_root_ca.sh --key-name=ca-root

# Example: apply specific distinguished name and lifetime
./create_root_ca.sh --subject="/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=JS7 CA" --days=7660


The shell script is executed optionally with the following arguments:

  • --key-name
    • The basename of the key without extension. Default: root-ca
  • --subject
    • The distinguished name that is used as the subject of the CA Certificate.
  • --days
    • The lifetime of the certificate is specified by the number of days. Default: 7305
    • Consider that Server Certificates have to be renewed if the Root CA Certificate expires.

Creating a Server Certificate

Download: create_certificate.sh

The following files will be created with <server> being a placeholder for the hostname for which a certificate should be created.

  • <ca>/certs/<server>.crt
  • <ca>/certs/<server>.csr
  • <ca>/private/<server>.key

This step is performed for each Server Certificate that should be created.

Code Block
titleRun .create_certificate.sh shell script
linenumberstrue
# Description
# create_certificate.sh --dns=<server-hostname>[,<server-hostname>] --days=<number-of-days>

# Example
./create_certificate.sh --dns=apmaccs,apmaccs.sos --days=365


The shell script is executed with two arguments:

  • --dns
    • The DNS hostname of the server that should be assigned the certificate. A server can be assigned more than one DNS hostname, for example the FQDN can extend the hostname. Only DNS hostnames that are added to the certificate can be used later on to establish secure HTTPS connections.
  • --days
    • The lifetime of the certificate is specified by the number of days (default: 5475, matching approx. 15 years).

Resources

...