Introduction
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 such as HTTPS.
- Certificates for the specific use of code signing should be used.
- Users choose which approach they want to follow:
- Creating self-signed certificates.
- Creating CA-signed certificates.
Rollout of certificates to Controllers and Agents depends on the following choice:
- Self-signed certificates have to be deployed from individual certificate files made available for Controllers and Agents.
- There is no security gap in use of self-signed certificates. When users store certificate files to Controllers and Agents then this proves that they trust the certificates.
- CA-signed certificates usually are not deployed. Instead, the CA Certificate is deployed that was used to sign individual 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 Signing CA.
Anchor |
---|
| self_signed_certificates |
---|
| self_signed_certificates |
---|
|
Creating self-signed CertificatesUsing ECDSA Encryption
Code Block |
---|
language | bash |
---|
title | Create self-signed Certificate using ECDSA |
---|
linenumbers | true |
---|
|
# Specify key name used for file names
key_name=signing
# Step 1 - Generate Private Key
openssl ecparam -name secp256k1 -genkey -noout -out ${key_name}.key
# Step 2 - Generate and sign the Certificate
openssl req -new -x509 -key ${key_name}.key -out ${key_name}.crt -days 5475 |
Explanation:
- Step 1: The Private Key is created.
- Choice of algorithm such as
secp256k1
is up to the user.
- Step 2: The Certificate is created.
- The
-days
argument optionally specifies the validity period of the Certificate.
Using RSA Encryption
Code Block |
---|
language | bash |
---|
title | Create self-signed Certificate using RSA |
---|
linenumbers | true |
---|
|
# Specify key name used for file names
key_name=signing
# Generate Private Key and Certificate
openssl req -x509 -sha256 -newkey rsa:4096 -nodes -keyout ${key_name}.key -out ${key_name}.crt -days 5475 |
Explanation:
- The Private Key is created using the specified key size of 4096.
- The Certificate is created with the
-days
argument optionally specified for the validity period of the Certificate.
Anchor |
---|
| ca_signed_certificates |
---|
| ca_signed_certificates |
---|
|
Creating CA-signed Certificates Anchor |
---|
| signing_ca_certificate |
---|
| signing_ca_certificate |
---|
|
Creating the Signing CA CertificateThe first step includes to create the signing-ca.key
private key file and the signing-ca.crt
self-signed certificate file for the Signing CA both in PEM format. This step is performed just once.
...
Country Name
: a 2 letter country code is expected as stated for example with https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2State or Province Name
: the name of a state is expectedLocality Name
: the name of a city is expectedOrganization Name
: arbitrary input is allowedOrganizational Unit Name
: arbitrary input is allowedCommon Name
: an arbitrary name can be chosen as the name of the Signing CAEmail Address
: empty input is allowed
...
...
Creating a Signing CertificateFor a new signing certificate the steps include to create a private key and Certificate Signing Request (CSR). The resulting signing certificate will be signed by the Signing CA.
...
Code Block |
---|
language | bash |
---|
title | Create Signing Certificate |
---|
linenumbers | true |
---|
|
# Specify server for which the certificate should be created
certificate_name=signing
# Step 1 - Generate Private Key and Certificate Signing Request
openssl req -new -sha256 -config <(cat openssl-cert.config <(printf "\n[SAN]\nnsCertType = objsign\nkeyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment\n\nextendedKeyUsage = critical, codeSigning\n\nsubjectKeyIdentifier = hash\n")) \
-key ${certificate_name}.key -out ${certificate_name}.csr
# -days 5475 -newkey rsa:4096 -keyout ${certificate_name}.key -out ${certificate_name}.csr
# -extensions 'standard exts' -nodes \
# self signed
# openssl ecparam -name secp256k1 -genkey -noout -out ${certificate_name}.key
# openssl req -new -x509 -key ${certificate_name}.key -out ${certificate_name}.crt -days 5475
# Step 2 - Generate and sign the Server Certificate
openssl x509 -req \
-in ${certificate_name}.csr \
-CA signing-ca.crt \
-CAkey signing-ca.key \
-CAcreateserial \
-out ${certificate_name}.crt -days 7300 \
-extfile <(printf 'nsCertType = objsign\nkeyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment\n\n\nextendedKeyUsage = critical, codeSigning\n\nsubjectKeyIdentifier = hash\n' "${certificate_name}") |
Explanation:
- The Certificate Signing Request is created for the Key Usage and Extended Key Usage as indicated.
- The following files will be created for the given server:
<certificate_name>
.key
: the Private Key<certificate_name>
.csr
: the Certificate Signing Request<certificate_name>
.crt
: the Signing Certificate
...