...
JS7 - Deployment of Scheduling Objects makes use of Signing Certificates to digitally sign workflows and other objects. Use of certificates for signing is not related to use of certificates to secure connections using HTTPS.
...
HTTPS connections, see JS7 - How to create X.509 SSL TLS Certificates.
Users
...
- Creating self-issued Certificates.
- Creating Private CA-signed Certificates.
- Purchasing Public CA-signed Certificates
can choose one of the following approachs:
- Self-issued Certificates are created individually per user and are deployed from individual certificate files to Controllers and Agents.
Rollout of certificates to Controllers and Agents depends on the following choice:
- Self-issued Certificates have to be deployed from individual certificate files made available to Controllers and Agents.
- There is no security gap in use of self-issued Certificates. When users store certificate files to Controllers and Agents then this proves that they trust the certificates.
- Private CA-signed Certificates are issued by users who operate their own Private Certificate Authority (CA). Individual Signing Certficates on behalf of users are not deployed to Controllers and Agents. Instead, the CA Certificate is deployed that was used to sign individual Signing Certificates.
- The approach includes that any Signing Certificate signed by the CA will be accepted for deployment of scheduling objects.
- For better control which certificates are made available for deplyoment, users might decide to use a specific Private 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 therefore are not considered in the article.
There is no difference in using a Private CA or Public CA concerning the functionality of X.509 certificates, usage for Signing, or security of certificates. The only difference is that users trust the Private CA that they set up on their own.
...
Examples in the article make use of JS7 Release 2.7.2, OpenSSL 1.1.1k FIPS 25 Mar 2021 for Unix and OpenSSL 3.1.4 24 Oct 2023 for Windows. OpenSSL ships with Linux & other Unix OS and is available for Windows.
...
...
...
...
...
Creating self-issued Certificates Anchor |
---|
| creating_private_key_and_csr |
---|
| creating_private_key_and_csr |
---|
|
Creating the Private Key and Certificate Signing RequestThe steps to create a Private Key and Certificate Signing Request are the same similar for use of self-issued Certificates and Private CA-signed Certificates.
Users have the option to use ECDSA or RSA for the encryption type applied to the Private Key.
Users can run the following commands from the shell and replace the value of the key_name
environment variable with a name of their choice that is used when creating related files.
Anchor |
---|
| using_private_key_ecdsa |
---|
| using_private_key_ecdsa |
---|
|
Using ECDSA Encryption Code Block |
---|
language | bash |
---|
title | Example how to create Private Key and Certificate Signing Request using ECDSA encryption (Unix) |
---|
linenumbers | true |
---|
|
# Specify key name used for file names
key_name=signing
# Create Private Key
openssl ecparam -genkey -name secp384r1 -out ${key_name}.key
# Create Certificate Signing Request
openssl req -new -sha512 -nodes \
-key ${key_name}.key \
-out ${key_name}.csr \
-subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=${key_name}" |
Expand |
---|
title | ExplanationsWindows version... |
---|
|
Code Block |
---|
language | text |
---|
title | Example how to create Private Key |
---|
|
- Choice of algorithm such as
secp256k1 , secp384r1 depends on support by the Java version used with JS7. Certificare Signing Request- The hash algorithm such as
-sha256, -sha512 can be freely chosen. - The
-subj option specifies the Distinguished Name used for the subject of the CSR and resulting Certificate.- The Distinguished Name is a unique identifier frequently using the hierarchy of Country
C , State ST , Location L , Organization O , Organizational Unit OU and Common Name CN . - For self-signed Certificates the subject and issuer properties of the CSR/Certificate are the same. The minimum requirement is to specify the Common Name
CN=<name> where <name> can freely be chosen. - For Private CA-signed Certificates the subject property holds the Certificate's Distinguished Name and the issuer property holds the Private CA Certificate's Distinguished Name using different values.
The following files will be created with this step:The <key_name> .key file will hold the Private Key.The <key_name> .csr file will hold the Certificate Signing Requestand Certificate Signing Request using ECDSA encryption (Windows) | linenumbers | true |
---|
| @rem Specify key name used for file names
set key_name=signing
@rem Create Private Key
openssl ecparam -genkey -name secp384r1 -out %key_name%.key
@rem Create Certificate Signing Request
openssl req -new -sha512 -nodes ^
-key %key_name%.key ^
-out %key_name%.csr ^
-subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=%key_name%" |
|
Expand |
---|
|
- Private Key
- Choice of algorithm such as
secp256k1 , secp384r1 depends on support by the Java version used with JS7.
- Certificare Signing Request
- The hash algorithm such as
-sha256, -sha512 can be freely chosen. - The
-subj option specifies the Distinguished Name used for the subject of the CSR and resulting Certificate.- The Distinguished Name is a unique identifier frequently using the hierarchy of Country
C , State ST , Location L , Organization O , Organizational Unit OU and Common Name CN . - For self-signed Certificates the subject and issuer properties of the CSR/Certificate are the same. The minimum requirement is to specify the Common Name
CN=<name> where <name> can freely be chosen. - For Private CA-signed Certificates the subject property holds the Certificate's Distinguished Name and the issuer property holds the Private CA Certificate's Distinguished Name using different values.
- The following files will be created with this step:
- The
signing.key file will hold the Private Key. - The
signing.csr file will hold the Certificate Signing Request.
|
Anchor |
---|
| using_private_key_rsa |
---|
| using_private_key_rsa |
---|
|
Using RSA Encryption Expand |
---|
title | Click to expand/collapse... |
---|
|
Code Block |
---|
language | bash |
---|
title | Example how to create Private Key and Certificate Signing Request using RSA encryption (Unix) |
---|
linenumbers | true |
---|
| # Specify key name used for file names
key_name=signing
# Create Private Key and Certificate Signing Request
openssl req -new -newkey rsa:4096 -sha256 -nodes \
-keyout ${key_name}.key \
-out ${key_name}.csr \
-subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=${key_name}" |
Expand |
---|
| Code Block |
---|
language | text |
---|
title | Example how to create Private Key and Certificate Signing Request using RSA encryption (Windows) |
---|
linenumbers | true |
---|
| @rem Specify key name used for file names
set key_name=signing
@rem Create Private Key and Certificate Signing Request
openssl req -new -newkey rsa:4096 -sha256 -nodes ^
-keyout %key_name%.key ^
-out %key_name%.csr ^
-subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=%key_name%" |
|
Expand |
---|
| - In the example the Private Key is created using the specified key size
4096 . - Choice of algorithm such as
secp256k1 , secp384r1 depends on support by the Java version used with JS7. - For use of the
-subj option see Using ECDSA Encryption. - The following files will be created with this step:
- The
signing.key file will hold the Private Key. - The
signing.csr file will hold the Certificate Signing Request.
|
|
Anchor |
---|
| creating_self_signed_certificates |
---|
| creating_self_signed_certificates |
---|
|
Creating the CertificateUsers can run the following commands from the shell and replace the value of the key_name
environment variable with a name of their choice that is used when creating related files.
Code Block |
---|
language | bash |
---|
title | Example how to create self-issued Certificate (Unix) |
---|
linenumbers | true |
---|
|
# Specify key name used for file names
key_name=signing
# Create Certificate
openssl x509 -req -sha512 -days 3652 \
-signkey ${key_name}.key \
-in ${key_name}.csr \
-out ${key_name}.crt \
-extfile <(printf "keyUsage=critical,nonRepudiation,digitalSignature\nextendedKeyUsage=critical,codeSigning\n") |
Expand |
---|
|
Code Block |
---|
language | text |
---|
title | Example how to create self-issued Certificate (Windows) |
---|
linenumbers | true |
---|
| @rem Specify key name used for file names
set key_name=signing
@rem Create Certificate
set user_crt_tmp_file=user-crt-%RANDOM%.tmp
echo keyUsage=critical,nonRepudiation,digitalSignature >> %user_crt_tmp_file%
echo extendedKeyUsage=critical,codeSigning >> %user_crt_tmp_file%
openssl x509 -req -sha512 -days 3652 ^
-signkey %key_name%.key ^
-in %key_name%.csr ^
-out %key_name%.crt ^
-extfile %user_crt_tmp_file%
del /q %user_crt_tmp_file% |
|
Expand |
---|
|
- The SHA option such as
-sha256, -sha384, -sha512 can be freely chosen. - The
-days argument optionally specifies the validity period of the resulting certificate. - The
-signkey option specifies the location of the Private Key file created from the previous step. - The
-in option specifies the location of the Certificate Signing Request file created from the previous step. - The
-out option specifies the location of the resulting Certificate file. - The
-extfile option specifies a number of extensions recommended for use with Signing Certificates. - The following files will be created with this step:
- The
<key_name> .crt file will hold the self-signed Certificate.
|
Self-signed Certificates must be copied to the <data>/config/private/trusted-x509-keys
directory of Controller and Agent instances.
Anchor |
---|
| creating_certificates |
---|
| creating_certificates |
---|
|
Creating CA-signed CertificatesUsers have the option to create self-signed Certificates or Private CA-signed Certificates.
Setting up the Private CAFor Private CA-signed Certificates a Certificate Authority (CA) is required owning a CA Private Key and CA Certificate. The CA Private Key and CA Certificate will be used to sign certificates on behalf of users.
- Setup of the Certificate Authority is performed once.
- Signing is performed for each certificate on behalf of users.
The steps to create the CA Private Key and CA Certificate are similar to Creating the Private Key and Certificate Signing Request for self-issued Certificates.
Anchor |
---|
| creating_ca_private_key |
---|
| creating_ca_private_key |
---|
|
Creating the Private Key and Certificate Signing RequestSteps include to create the signing-ca.key
CA Private Key file and signing-ca.csr
CA Certificate Signing Request file both in PEM format.
Users can run the following commands from the shell and replace the value of the ca_key_name
environment variable with a name of their choice that is used when creating related files.
...
...
Using ...
ECDSA Encryption
Code Block |
---|
language | bash |
---|
title | Example how to create CA Private Key and Certificate Signing Request |
---|
| using RSA encryption |
# Specify key name used for file names
key_name=signing key name used for file names
ca_key_name=signing-ca
# Create Private Key
openssl ecparam -genkey -name secp384r1 -out ${ca_key_name}.key
# Create Private Key and Certificate Signing Request
openssl req -new - newkey rsa:4096 -sha256 sha512 -nodes \
- keyoutkey ${ca_key_name}.key \
-out ${ca_key_name}.csr \
-subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=${ca_key_name}" |
Expand |
---|
| Explanations... |
- In the example the Private Key is created using the specified key size
4096 . - Choice of algorithm such as
secp256k1 , secp384r1 depends on support by the Java version used with JS7. - For use of the
-subj option see Using ECDSA Encryption. - The following files will be created with this step:
- The
<key_name> .key file will hold the Private Key. - The
<key_name> .csr file will hold the Certificate Signing Request.
|
...
Users have the option to create self-signed Certificates or Private CA-signed Certificates.
...
Users can run the following commands from the shell and replace the value of the key_name
environment variable with a name of their choice that is used when creating related files.
Code Block |
---|
language | bash |
---|
title | Example how to create self-signed Certificate |
---|
linenumbers | true |
---|
|
# Specify key name used for file names
key_name=signing
# Create Certificate
openssl x509 -req -sha512 -days 3652 \
-signkey ${key_name}.key \
-in ${key_name}.csr \
-out ${key_name}.crt \
-extfile <(printf "keyUsage=critical,nonRepudiation,digitalSignature\nextendedKeyUsage=critical,codeSigning\n") |
Expand |
---|
|
- The SHA option such as
-sha256, -sha384, -sha512 can be freely chosen. - The
-days argument optionally specifies the validity period of the resulting certificate. - The
-signkey option specifies the location of the Private Key file created from the previous step. - The
-in option specifies the location of the Certificate Signing Request file created from the previous step. - The
-out option specifies the location of the resulting Certificate file. - The
-extfile option specifies a number of extensions recommended for use with Signing Certificates. - The following files will be created with this step:
- The
<key_name> .crt file will hold the self-signed Certificate.
|
Self-signed Certificates must be copied to the <data>/config/private/trusted-x509-keys
directory of Controller and Agent instances.
...
For Private CA-signed Certificates a Certificate Authority (CA) is required owning a CA Private Key and CA Certificate. The CA Private Key and CA Certificate will be used to sign certificates on behalf of users.
- Setup of the Certificate Authority is performed once.
- Signing is performed for each certificate on behalf of users.
...
The steps to create the CA Private Key and CA Certificate are similar to Creating the Private Key and Certificate Signing Request for self-signed Certificates.
...
|
Code Block |
---|
language | text |
---|
title | Example how to create Private Key and Certificate Signing Request using ECDSA encryption (Windows) |
---|
linenumbers | true |
---|
| @rem Specify key name used for file names
set ca_key_name=signing-ca
@rem Create Private Key
openssl ecparam -genkey -name secp384r1 -out %ca_key_name%.key
@rem Create Certificate Signing Request
openssl req -new -sha512 -nodes ^
-key %ca_key_name%.key ^
-out %ca_key_name%.csr ^
-subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=%ca_key_name%" |
|
Anchor |
---|
| using_ca_private_key_rsa |
---|
| using_ca_private_key_rsa |
---|
|
Using RSA Encryption Expand |
---|
title | Click to expand/collapse... |
---|
|
Code Block |
---|
language | bash |
---|
title | Example how to create Private Key and Certificate Signing Request using RSA encryption (Unix) |
---|
linenumbers | true |
---|
| # Specify key name used for file names
ca_key_name=signing-ca
# Create Private Key and Certificate Signing Request
openssl req -new -newkey rsa:4096 -sha256 -nodes \
-keyout ${ca_key_name}.key \
-out ${ca_key_name}.csr \
-subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=${ca_key_name}" |
Expand |
---|
| Code Block |
---|
language | text |
---|
title | Example how to create Private Key and Certificate Signing Request using RSA encryption (Windows) |
---|
linenumbers | true |
---|
| @rem Specify key name used for file names
set ca_key_name=signing-ca
@rem Create Private Key and Certificate Signing Request
openssl req -new -newkey rsa:4096 -sha256 -nodes ^
-keyout %ca_key_name%.key ^
-out %ca_key_name%.csr ^
-subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=%ca_key_name%" |
|
|
---
Anchor |
---|
| creating_ca_certificate |
---|
| creating_ca_certificate |
---|
|
Creating the CA CertificateSteps include to create the signing-ca.crt
Private CA-signed Certificate file in PEM format.
Users can run the following commands from the shell and replace the value of the ca_key_name
environment variable with a name of their choice that is used when creating related files.
Code Block |
---|
language | bash |
---|
title | Example how to create CA Certificate (Unix) |
---|
linenumbers | true |
---|
|
# Specify key name used for file names
ca_key_name=signing-ca
# Create Certificate
openssl x509 -req -sha512 -days 7305 \
-signkey ${ca_key_name}.key \
-in ${ca_key_name}.csr \
-out ${ca_key_name}.crt \
-extfile <(printf "basicConstraints=CA:TRUE\nkeyUsage=critical,nonRepudiation,keyCertSign,cRLSign\n") |
...
Steps include to create the signing-ca.key
CA Private Key file and signing-ca.csr
CA Certificate Signing Request file both in PEM format.
Users can run the following commands from the shell and replace the value of the ca_key_name
environment variable with a name of their choice that is used when creating related files.
Code Block |
---|
language | bash |
---|
title | Example how to create CA Private Key and Certificate Signing Request |
---|
linenumbers | true |
---|
|
# Specify key name used for file names
ca_key_name=signing-ca
# Create Private Key
openssl ecparam -genkey -name secp384r1 -out ${ca_key_name}.key
# Create Certificate Signing Request
openssl req -new -sha512 -nodes \
-key ${ca_key_name}.key \
-out ${ca_key_name}.csr \
-subj "/C=DE/ST=Berlin/L=Berlin/O=SOS/OU=IT/CN=${ca_key_name}" |
...
Steps include to create the signing-ca.crt
Private CA-signed Certificate file in PEM format.
Users can run the following commands from the shell and replace the value of the ca_key_name
environment variable with a name of their choice that is used when creating related files.
Code Block |
---|
language | bash | title | Example how to create CA Certificate (Windows) |
---|
linenumbers | true |
---|
| # Specify key name used for file names
ca_key_name=signing-ca
# Create Certificate
@rem Specify key name used for file names
set ca_key_name=signing-ca
@rem Create Certificate
set ca_crt_tmp_file=ca-crt-%RANDOM%.tmp
echo basicConstraints=CA:TRUE >> %ca_crt_tmp_file%
echo keyUsage=critical,nonRepudiation,keyCertSign,cRLSign >> %ca_crt_tmp_file%
openssl x509 -req -sha512 -days 7305 | \signkey${caname}\${caname}\${caname}\ <(printf "basicConstraints=CA:TRUE\nkeyUsage=critical,nonRepudiation,keyCertSign,cRLSign\n") %ca_crt_tmp_file%
del /q %ca_crt_tmp_file% |
|
---|
Expand |
---|
|
- Explanations are similar to Creating self-signed issued Certificates with a few exceptions.
- The
-days option specifying the validity period of the CA Certificate should be longer than the validity period of individual certificates. - The
-extfile option specifies the Basic Constraint CA:TRUE which is required for a CA Certificate. Key Usage is limited to Signing Certificates.
- The following files will be created with this step:
- The
signing-ca.crt file will hold the CA Certificate.
|
...