Versions Compared

Key

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

...

  • Connections from JOC Cockpit to the Controller use the JS7 - REST Web Service API (that ships with JOC Cockpit) and  and can be secured by HTTPS TLS/SSL certificates.
    • Should JOC Cockpit and Controller be operated on the same server and network interface then no HTTPS connection between components is required.

    • Should JOC Cockpit and Controller be operated on different servers or network interfaces then this connection should be secured by HTTPS.

  • This article describes the steps required to set up secure HTTPS communication from JOC Cockpit to the Controllerto a Controller. This includes to use a standalone Controller or a Controller cluster with a primary and standby instance.

...

Flowchart
Controller [label="   Controller   \nStandalone / Primary",fillcolor="lightskyblue"]
JOC [label="   JOC Cockpit   \nPrimary",fillcolor="lightskyblue"]
 
Controller_Truststore [label="Controller Truststore\n./config/private/httpsnhttps-truststore.p12\n\nCA certificates",fillcolor="limegreen"]
Controller_Keystore [label="Controller Keystore\n./config/private/httpsnhttps-keystore.p12\n\nCA Certificates\nServer Authentication PrivatenPrivate Key / Certificate",fillcolor="orange"]
JOC_Truststore [label="JOC Cockpit Truststore\nJETTY_BASE/resources/joc/https-nhttps-truststore.p12\n\nCA certificates",fillcolor="orange"]
JOC_Keystore [label="JOC Cockpit Keystore\nJETTY_BASE/resources/joc/httpsnhttps-keystore.p12\n\nCA Certificates\nClient Authentication PrivatenPrivate Key / Certificate",fillcolor="limegreen"]

Controller_Truststore_CA_RootCertificate [shape="ellipse",shape="ellipse",label="CA Root Certificate\nCertificate",fillcolor="white"]
JOC_Truststore_CA_RootCertificate [shape="ellipse",shape="ellipse",label="CA Root Certificate\nCertificate",fillcolor="white"]
JOC_Keystore_CA_RootCertificate [shape="ellipse",shape="ellipse",label="CA Root Certificate\nCertificate",fillcolor="white"]
JOC_Keystore_CA_IntermediateCertificate [shape="ellipse",label="CA Intermediate Certificate\nCertificate",fillcolor="white"]

Controller_Keystore_CA_RootCertificate [shape="ellipse",shape="ellipse",label="CA Root Certificate\nCertificate",fillcolor="white"]
Controller_Keystore_CA_IntermediateCertificate [shape="ellipse",label="CA Intermediate Certificate\nCertificate",fillcolor="white"]
Controller_PrivateKey [shape="ellipse",label="Server Authentication\nPrivate Private Key",fillcolor="white"]
Controller_Keystore_Certificate [shape="ellipse",label="Server Authentication Certificate\nCertificate",fillcolor="white"]

JOC_PrivateKey [shape="ellipse",label="Client Authentication Private\nPrivate Key",fillcolor="white"]
JOC_Certificate [shape="ellipse",label="Client Authentication Certificate\nCertificate",fillcolor="white"]

Controller -> Controller_Keystore 
Controller_Keystore -> Controller_Keystore_CA_RootCertificate -> Controller_Keystore_CA_IntermediateCertificate [label=" add to keystore "]
Controller_Keystore -> Controller_PrivateKey -> Controller_Keystore_Certificate [label=" add to keystore "]

Controller -> Controller_Truststore 
Controller_Truststore -> Controller_Truststore_CA_RootCertificate [label=" add to truststore "]

JOC -> JOC_Keystore 
JOC_Keystore -> JOC_Keystore_CA_RootCertificate -> JOC_Keystore_CA_IntermediateCertificate [label=" add to keystore "]
JOC_Keystore -> JOC_PrivateKey -> JOC_Certificate [label=" add to keystore "]

JOC -> JOC_Truststore
JOC_Truststore -> JOC_Truststore_CA_RootCertificate [label=" add to truststore "] 

JOC -> Controller

...

  • Keystore and truststore in orange color are required for any connections of JOC Cockpit to a Controller.The
    • Keystore and truststore in green color are required only if mutual authentication is in place, e.g. to allow certificate based authentication.
      • A Controller truststore in green color is required should secure connections be used by a Controller to access Agents.
      • It is therefore recommended to set up the Controller truststore.
      • The Controller's private key and certificate for Server Authentication are added to the Controller's keystore. In case of a self-signed certificate the certificate is added to the JOC Cockpit truststore as well.
      • This step can be skipped if a CA-signed certificate is used as the Root Certificate in the JOC Cockpit truststore is sufficient to verify Controller certificates.
    • Keystore and truststore in green color are required if mutual authentication is in place for certificate based client authentication (default).
    • A Controller truststore in green color is required should secure connections be used by a Controller to access Agents. It is therefore recommended to set up the Controller truststore.

    Secure Connection Setup

    This configuration is applied in order to secure the connection if JOC Cockpit and Controller are not operated on the same server. If not otherwise stated then the steps for HTTPS configuration are performed on the server that hosts the Controller.

    Step 1: Create the Keystore

    • On the JobScheduler MasterController server create the keystore using the keytool from your Java JRE or JDK or some third party utility.
      • For use with a third party tool
        • create a keystore, e.g. https-keystore.p12, in PKCS12 format and import:
          • Controller private key and certificate
          • Root CA certificate
          • Intermediate CA certificates
        • create a truststore, e.g. https-truststore.p12, in PKCS12 format and import:
          • Root CA certificate
      • Generate the keystore with the private key and the certificate for the Controller and export the certificate to a second Keystore that is later on used by the JOC Cockpit. The below examples suggest one possible approach for certificate management, however, there may be other ways how to achieve similar results.
        • Example for use of CA signed certificate with PKCS12 keystore format


          Code Block
          languagebash
          titleExample how to add a CA signed private key and certificate to a PKCS12 Keystore
          # should the Controller's private key and certificate be provided with a .jks keystore (keypair.jks) then temporarily convert the keystore to pkcs12 (keystore.p12)
          #   for later use with openssl, assuming the alias name of the Controller private key being "controller-https"
          # keytool -importkeystore -srckeystore keypair.jks -destkeystore keystore.p12 -deststoretype PKCS12 -srcalias controller-https
          
          # assuming the Controller's private key from a pkcs12 keystore (keystore.p12), store the Controller private key to a .key file in PEM format (controller-https.key)
          openssl pkcs12 -in keystore.p12 -nocerts -out controller-https.key
          
          # concatenate CA Root certificate and CA Intermediate certificate to a single CA Bundle certificate file (ca-bundle.crt)
          cat RootCACertificate.crt > ca-bundle.crt
          cat CACertificate.crt >> ca-bundle.crt
          
          # Export Controller private key (controller-https.key), Controller certificate (controller-https.crt) and CA Bundle (ca-bundle.crt) in PEM format to a new keystore (https-keystore.p12)
          #   assume the fully qualified hostname (FQDN) of the Controller server being "controller.example.com"
          openssl pkcs12 -export -in controller-https.crt -inkey controller-https.key -chain -CAfile ca-bundle.crt -name controller.example.com -out https-keystore.p12
          
          # should you require use of a .jks keystore type then convert the pkcs12 keystore assuming the alias name of the Controller private key being "controller-https"
          # keytool -importkeystore -srckeystore https-keystore.p12 -srcstoretype PKCS12 -destkeystore https-keystore.jks -deststoretype JKS -srcalias controller-https
        • Example for use of self-signed certificate with PKCS12 keystore format

          Code Block
          languagebash
          titleExample how to generate a self-signed certificate for import into a PKCS12 Keystore
          # generate Controller's private key with alias name "controller-https" in a keystore (https-keystore.p12)
          #   use the fully qualified hostname (FQDN) and name of your organization for the distinguished name
          #   consider that PKCS12 keystores require to use the same key password and store password
          keytool -genkey -alias "controller-https" -dname "CN=hostname,O=organization" -validity 1461 -keyalg RSA -keysize 2048 -keypass jobscheduler -keystore "https-keystore.pk12" -storepass jobscheduler -storetype PKCS12
        • Example for use of self-signed certificate with JKS keystore format

          Code Block
          languagebash
          titleExample how to generate a self-signed private key and certificate for import into a JKS Keystore
          # generate Controller's private key with alias name "controller-https" in a keystore (https-keystore.jks)
          #   use the fully qualified hostname (FQDN) and name of your organization for the distinguished name
          keytool -genkey -alias "controller-https" -dname "CN=hostname,O=organization" -validity 1461 -keyalg RSA -keysize 2048 -keypass jobscheduler -keystore "https-keystore.jks" -storepass jobscheduler
        • Explanations

          • Replace the SCHEDULER_DATA placeholder as specified above.
          • The -dname option specifies the certificate issuer, therefore use your own set of CN, O, OU, DC that specify the issuer's distinguished name. The O setting is required for the issuer.
          • The -keypass option accepts the password that you will need later on to manage your private key. With the default password being used no further settings are required as explained below.
          • The -keystore option specifies the location of your Keystore file. 
            • The Keystore file should be in reach of the JobScheduler Master, it is therefore recommended to use a sub-folder private in the ./config directory.
            • Using the default file name "private-https.jks" will save the effort of adding further settings as explained above.
          • The -storepass option specifies the password for access to your Keystore file. For the handling of the default password the same applies as stated with the -keypass option.
          • The -storetype option is used for the PKCS12 keystore format, this option is not required for the JKS keystore format.
      • If not otherwise configured then the Controller by default uses the password jobscheduler for the respective Keystore.
      • If you choose an individual password for the Controler Keystore then adjust the following properties in the SCHEDULER_DATA/config/private/private.conf configuration file:
        • Explanations
          • jobscheduler.master.webserver.https.keystore.file is used for the path to the Keystore
          • jobscheduler.master.webserver.https.keystore.password is used for the Keystore password
          • jobscheduler.master.webserver.https.keystore.key-password is used for the password of your private key
        • Example

          Code Block
          languagetext
          titleExample for private.conf file specifying the Master Keystore
          jobscheduler.master.webserver.https.keystore {
            file = "C:/ProgramData/sos-berlin.com/jobscheduler/master110/config/private/private-https.jks"
            # Backslashes are written twice (as in JSON notation):
            # file = "\\\\other-computer\\share\\my-keystore.jks"
            password = "jobscheduler"
            key-password = "jobscheduler"
          }
    • Export the JobScheduler Master public certificate for use with the JOC Cockpit Web Service
      • Example for export with JKS keystore format

        Code Block
        languagebash
        titleExample how to export the Master public certificate from a JKS Keystore
        # export Master public certificate from keystore (private-https.jks) identified by its alias name (master-https) to a file in PEM format (master-https.crt)
        keytool -exportcert -rfc -noprompt -file "master-https.crt" -alias "master-https" -keystore "SCHEDULER_DATA/config/private/private-https.jks" -storepass jobscheduler
      • Example for export with PKCS12 keystore format

        Code Block
        languagebash
        titleExample how to export the Master public certificate from a PKCS12 Keystore
        # export Master public certificate from keystore (private-https.p12) identified by its alias name (master-https) to a file in PEM format (master-https.crt)
        keytool -exportcert -rfc -noprompt -file "master-https.crt" -alias "master-https" -keystore "SCHEDULER_DATA/config/private/private-https.p12" -storepass jobscheduler -storetype PKCS12
      • The exported public certificate of each JobScheduler Master has to be imported to the Java Truststore that is used by the JOC Cockpit.

    ...